Enter the correct code into the keypad and the servo will unlock the door. Enter the incorrect code and Sorry you stay out.
There was a couple of stipulations i wanted in my Keyless Entry system:
- Helper Light. A light that would come on whenever a key was pressed. Then off after the preset time limit.
- An override switch so the servo could be operated without the keypad.
- Some indication that the pass code entered was correct or not.
- Powered by a wall charger.
- Be able to operate manually during a power outage
The Keypad works on a matrix system. Pressing any key will involve 2 wires.
Example if you press number 8 it will effect the wire ROW3 and CLO2. By this the micro controller can determine what key was pressed with only 7 wires from the keypad.
While this keypad schematic is not correct to this build the theory is still the same.
This build does not use the external resistors. It takes advantage of the internal pullup resistors in the Atmega328.
Keypad in Arduino Playground.