ARDUINO CODE
LOCK WITH OLED DISPLAY
Electronic code lock with the ability
to rewrite the entry code. Usind Arduino Uno or Nano, OLED 128x64, I2C, SSD1306 driver and matrix 3x4 keypad. Can be used for entrance door, car door or
a locker. Any number (0-9) can be used. Pressing the right code activates the relay for 2 seconds. To change the 4 digits code press
'Change Code' pushbutton and key 4 new numbers. The pushbutton has to be mounted in an
area not accessible to the public. The 4 digits are stored in the chip's EEPROM, so the numbers are retained when the power is off.
The codelock can be used without the OLED. Ready LED is used instead of the OLED screen.
CODE
LOCK WITH OLED DISPLAY
Electronic code lock with the ability
to rewrite the entry code. Can be used for entrance door, car door or
a locker. Any 4 digits number can be used. Pressing the right code activates the relay for 2 seconds. Using microcontroller PIC16F876A. To change the 4 digits code press
'Change Code' pushbutton. The pushbutton has to be mounted in an
area not accessible to the public. The 4 digits are stored in the chip's EEPROM, so the numbers are retained when the power is off.
CODE
LOCK WITH LCD
Electronic code lock with the ability
to rewrite the entry code. Any 4 digits number can be used. Pressing the right code activates the relay for 2 seconds. To change the 4 digits code press
'New Code' pushbutton. The pushbutton has to be mounted in an
area not accessible to the public. The 4 digits are stored in the chip's EEPROM, so the numbers are retained when the power is off.
PIC16F690: Powered by 5V for the PIC and 12-24V for the relay.
Circuit Description
See also Technical Tips
Supply 12 to 24V for the relay, 5V for the PIC is from 78L05 voltage regulator.
The N.O. contact of the relay is connected to the door electric latch.
Key pad can be any matrix switches.
Transistor are BC237 or equivalent.
LCD module is 2 lines 16 characters. It has 14 way connector, 10 connections are used,
4 bits data bus is selected.
There is a big selection of LCD modules, and they are very similar in characteristics i.e. DM1601, ACM1601.
Contrast pot must be set because in one end of the pot it is totally dimmed.
New Code pushbutton is for entering new 4 digits code.
CODE LOCK 5 NUMBERS
The relay operates after entering 5 numbers (0-9). Enter numbers when READY LED is on, if wrong number entered relay stays off and READY LED comes on after 30 seconds.
You are free to use the circuit diagram and the software with no
limitations.
|