Secured room access system operation

The keypad is arranged in a 4×4 matrix. There are four scan lines/pins, which are set in output mode, and four sense keys, which are used as input lines to the microcontroller.

At a small time interval, the microcontroller sets one of the four scan lines as low and the other three scan lines as high. Then it checks for the status of sense lines one by one at the intersection of a specific scan line and sense line to find out if any key has been pressed.

Similarly, after a small time interval, the next scan line is made low and remaining three scan lines are taken high, and again all three sense lines are checked for low level. This way the microcontroller checks which of the 16 keys is pressed.

Due to the high speed of the microcontroller, the status of different keys is checked in less than 100 ms and a key press is detected and identified. As the keys are pressed manually by the user, this delay of 100 ms is not noticeable. The net result is that you save on I/O pins of the microcontroller by sacrificing almost nothing.

When a person wants to enter the room, he enters the 6-digit password, say ‘123456.’ If the password matches successfully, the gate is unlocked for 15 seconds.

If you want to change the user password (123456) and enter the master password ‘291279,’ the system will ask you to change the user password. On successfully entering the password, pin A0 of port A becomes high for 15 seconds, because of which transistor T1 starts conducting through the emitter of the opto-coupler and the relay energizes. The connection between the solenoid lock and the power supply is broken and the door is unlocked for 15 seconds.

An actual-size, single-side PCB and its component layout view for secured room access system is provided in the PDF.

Download PCB and component layout PDFs: click here

Software

The software for the AVR microcontroller is written in ‘C’ language and compiled using Code Vision AVR ‘C’ compiler. Since this compiler does not have library functions for the keypad, place ‘kbd.h’ file in the INC folder of the installation folder and ‘kbd.lib’ in the LIB folder of ‘cvavr’ folder. This file is included in the program and the same can be used.

Download source code: click here

 


</center

1 COMMENT

SHARE YOUR THOUGHTS & COMMENTS

Please enter your comment!
Please enter your name here