Among Us Inspired Keypad Control

by misterE-man in Circuits > Arduino

188 Views, 0 Favorites, 0 Comments

Among Us Inspired Keypad Control

20210810_124219.jpg
20210810_123734.jpg

I created this project as a means of securing my door better and testing an idea I had for a lock that re-assigns the values to the buttons. It turns out that one of the tasks in the game Among Us embodies it perfectly, so I set out to create something practical from it.

Supplies

Parts used:

1 x 1602 LCD

1 x Arduino Nano

10 x through hole push button switches (salvaged from old AV receiver)

1 disc drive assembly (also from old receiver)

1 x NEC 2561 Opto-isolator (switches the motor drive on and off, I got this off of a microwave I disassembled a while back)

1 x 10k potentiometer (controls LCD brightness)

3 x 6 cm perfboard (a prefab through hole PCB)

4 x 4 cm piece of perfboard (cut from a larger board)

wires (also savaged from various devices)

solder

soldering iron

The Keypad Assembly

20210810_131608.jpg
20210810_131507.jpg

I created this 2 x 5 array of buttons using a piece of perfboard and a few wires. I used an array configuration because each individual button would take far too many pins. More information on how keypads work can be found here:

https://arduinogetstarted.com/tutorials/arduino-ke...

The total pins for the keypad comes out to 7, 2 for each row and 5 for each column. If you used a Mega or an Uno you could add more buttons such as enter or delete keys, or simply more ascii characters.

The LCD Assembly

The LCD connection is rather standard, and only requires 6 of the digital pins. The digital pinout can be found in the code, and more information can be found here:

https://www.arduino.cc/en/Tutorial/LibraryExamples...

Motor Assembly

20210810_131551.jpg

The motor assembly is driven by an opto-isolator which is a switching element used for better isolation between arduino and the motor. The input side is connected to ground and digital pin 2 while the output is connected in series between the motor's leads and the 5[V] and GND pins. I find opto-isolators easier to use on projects like these than transistors and relays. Once I install the hardware on my doorframe, I will update this aspect to show how it opens and closes the lock (a deadbolt is the most practical choice with this setup).

Final Assembly/ Soldering

20210810_131639.jpg
20210810_123826.jpg

I soldered everything together on the perfboard mentioned before, and made sure to double check my connections before and after. Follow the documentation for each respective component and you should be good to go, especially for the opto-isolator.

Software Aspect/ Final Remarks

20210810_124219.jpg
20210810_132350.jpg
20210810_132345.jpg

One thing new about this design is that I included methods to print the array as well as shuffle it so the button assignments change after each attempt, regardless of whether the lock has opened or not. Let me know if you have any questions regarding the code, I will link it here:

https://github.com/saortiz00/amongUsInspiredkeypad