Posts: 2,300
Threads: 878
Joined: Sep 2010
[attachment=5407]
Microcontroller Based Digital Code Lock
ABSTRACT
Security is a prime concern in our day-today life. Everyone wants to be as much secure as possible. An access control for doors forms a vital page link in a security chain. The microcontroller based Door locker is an access control system that allows only authorized persons to access a restricted area. The system is fully controlled by the 8 bit microcontroller AT89C2051 which has a 2Kbytes of ROM for the program memory. The password is stored in the EPROM so that we can change it at any time.
The system has a Keypad by which the password can be entered through it. When the entered password equals with the password stored in the memory then the relay gets on and so that the door is opened. If we entered a wrong password for more than three times then the Alarm is switched on.
When we go inside and come back then the microcontroller will sense the person using the Laser light, the microcontroller will automatically open the door for you.
Posts: 4,190
Threads: 817
Joined: Feb 2012
MICROCONTROLLER-BASED CODE LOCK
[attachment=18219]
INTRODUCTION
Code locks can be constructed using digital and timer ICs employing pushbuttons or keypads for entering the code for authentication and operation of the code lock. However, such circuits would require a large number of ICs.
On the other hand, a microcontroller-based code lock will require very few peripheral components. With the cost of microcontrollers now dropping to be equivalent cost of approximately four digital ICs, it makes sense to design simple logic circuits using microcontrollers and free version of programming language code length is normally limited to around 2 kB, but that is adequate for small projects like this one.
This simple code lock project is based on a 20-pin ATMEL microcontroller AT89C2051. It employs a 4-digit sequential code with time-out security feature. In addition to the microcontroller, the circuit uses a single additional IC (CD4050) and a transistor to drive a relay. Although the project uses a liquid-crystal display (LCD), it is useful for design and developmental purpose only and is not really an essential part of the circuit.
THE SOFTWARE
The software is written using BASCOM-51. The source code file ‘EFYCLOCK BAS’ for the project in BASCOM-51 is given in the article. Although the program is self-explanatory, you need to be aware of BASCOM51 compiler directives and syntax of statements, which are available with in the help menu of BASCOM compiler. BASCOM contains a lot of statements to control various a lot of statements to control various peripherals including the LCD.
The BOSCOM compiler /IDE can be used to generate a hex file, which should be ‘burnt’ into the chip using any universal programmer. The hex code of the program is only 1.5k long, while AT89C2051 microcontroller can take up to 2k of code. This program may be modified to suit your specific requirement.