CODE
LOCK WITH LCD
Electronic code lock with the ability
to rewrite the entry code. Can be used for entrance door, car door or
a locker. The LCD simplify the interaction by the user. Any 4 digits number can be used. Pressing the right code activates the relay for 2 seconds. Not pressing any key for more than 30 seconds resets the display. Using microcontroller PIC16F870. 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.
CODE
LOCK
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 (the digit 0 is not used). Using microcontroller PIC16F628A
programmed with the downloadable assembly and C source code. To change the 4 digits code press
'code change' switch, the LED will indicate ready state, press the
4 new digits, the LED will switch off. The code changing switch has to be mounted in a hidden
area. There is a max 5 seconds
delay between pressing any two digits, after the 5 seconds delay
the 4 digits code has to be re-entered. The 4 digits are stored in the chip's EEPROM, so the numbers are retained when the power is off.
Software includes PIC code. You are free to use the circuit diagram and the software with no

Circuit Description
See also Technical Tips
Supply 12 to 24V for the relay, 5V for the PIC is from 78L05 voltage regulator.
The NO contact of the relay is connected to the door electric latch.
Key pad can be any matrix switches.
All transistors are BC237 or equivalent.
LCD module is 1 line 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.

Circuit Description
See also Technical Tips
78L05 is the regulator for the
IC. The 12V supply is for the relay, you can use 24V relay and supply
voltage.
Key pad can be any matrix switches. The on resistance
1K max. The digit 0 is not used.
The EEPROM retains the code
when the power is off.
330K resistor determine the microcontroller frequency, increasing
the value will decrease the frequency hence increasing the 5 seconds
delay. |