Pcom project1


Final Sensitive Combination Lock Design


Soldering and building a physical interface

My very sensitive combination lock’s logic:

(︎:figured out ︎: not yet)

︎ Set the password[1,0,0,1,0]
    1 means press the button strongly, 0 means press with low-medium strength.

︎ It starts with an emty array, Trial = [] and it can only contains 5 elements.

︎ Everytime you touck FSR, it reads its peakvalue - Serial. println (peakvalue)

︎ Servo rotates as much as you pushed FSR. LED indicates it visually.

︎ If peakvalue > 800 (high squeeze), 1 is pushed to Trial[] array.
     If peakvalue < 800 (low squeeze), 0 is pushed to Trial[] array.

︎ When it’s filled up after 5 trials, it decides whether it’s locked or unlocked.

︎ When trial [] = password [], other LEDs light up sequentially.

︎ When trial [] != password [], LEDs blink twice all together.

︎ And it resets and becomes an empty array.

︎︎︎ How to properly wire FSR?
︎︎︎ How to make flexible, squishy, sensitive button?

LEDs can share ground wire, so I soldered them all together. 
I designed a very simple interface and laser cut an acrylic sheet to build it. It worked perfect.

I am going to add a squishy button on the top of FSR. And I am not sure about what to add to lock. 


Finalize code and prepare to build physical interface

I debugged the code and finalized it. Next step is building a physical interface of lock.

When it’s unlocked successfully, LEDs light up sequentially. If not, LEDs light up blink twice all together.


Compare two arrays, password[]  and trial[]

I set the password 1,0,0,1. And everytime I press FSR, it reads the peak value. If the peak is high, it pushed 1 into trial[]. If it is low, it pushed 0 in to trial[].

I tried several times to check the proper range for High Squeeze vs Low Squeeze. FSR was sensitive and it could easily peak around 800. So I set 800 as threshold to decide whether it is high pressure or low pressure in this project.

When trail[] is filled up, it is compared to the password. If it is match, “unlocked” in Serial window, else “locked”.

It works kinda perfect! Except I get 4 results after every 4 trials. How can I get only one result after comparing them?

Design& Material experiments 

I added 5 more LEDs below. They will be lighted up sequentially if it is unlocked.

I found translucent silicone mold in shop and tried to see how it looks like with LED below. It’d be better if it’s less transparent.


For project 1, I wanted to create very sensitive combiantionn lock with using all of my favorite components so far - FSR, Servo and LED. 
And I had an old interest in tangible, flexible or elastic interface , I want to try to build a project with those kinds of elements.


Idea Sketch


Even though I mapped LED’s brightness 0 when FSR analog input is 0, LED lights up pretty bright in the beginning. WHY? noise

I am gonna add a green led and red led to this to indicate it is locked or unlocked.

As pushing harder, LED lights up and rotate more. LED indicates how much you pressed. 

© 2022 Yeseul Oh. All Rights Reserved.