The main purpose of this project is to develop your Arduino programming skills. The assumption is that you have already worked through the tutorials under Electronic Systems and Fusion 360.
For this safety box you will use a pin pad to create a password that needs to be correct before the box open. There are two main parts to this project: The program and the locking mechanism. The first step before creating the program is to understand how the key pad you will be using works.
The first step is to make sure you understand which pin on the ribbon of the key pad is which digit. For this you need a multimeter to measure the continuity when the button is pressed.
The most important thing is to determine which pin is common. This pin can either go to 5V or ground. Then the other side of the 10kOhm pull down resistor goes to the opposite. In the image below the 5V is common.
To read the value into our microcontroller we need to convert on/off value to a voltage using a voltage divider. Then we can use the digital input to read the value.
Make sure you agree with the pinouts.
The first step is to make sure you understand which two pins on the ribbon of the key pad is which digit. For this you need a multimeter to measure the continuity when the button is pressed.
Map the rows (R1 to R4) and columns (C1 to C4) to the output on the ribbon (Pin 1-8).
How are you going to read the switch value into the Arduino program?
To create a program in Arduino C we develop it in two parts:
Part 1
Read three buttons which represent our password
Add to Array
Part 2
Check if password correct
Turn a servo horn when password correct
Modify this code to be used with the 1x4 or 4x4 keypad.