

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Having completed this experiment you will be able to:
In this experiment we learn how to implement combinational lock using micro-controller.
2.1 Operational requirements for the Combinational Lock
You are required to im plement the code for the proposed com binational lock. The lock consists of four (4) switches, a RED LED to indicate an error in entering the code, a GREEN LED to indicate that the system is ready for accepting the code from the user, and a YELLOW LED which represents the solenoid of the actual locking mechanism. In order to unlock, the user will have to press three (3) designated switches in the correct sequence, while the GREEN LED is ON. The system will accept inputs only when the GREEN LED is lit, i.e. any buttons pressed while the GREEN LED is OFF are discarded.
If the user presses wrong switches or in wrong sequence, the RED LED will lit indicating an error in entering the code, the GREEN LED will be turned OFF at this tim e. The RED LED should be turned ON only once all the three switches have been pressed. The RED LED will remain ON (and GREEN LED OFF) for six (6) seconds; and the system will not respond to any switches pressed during this tim e. On the expiry of this dead tim e, the RED LED will turn OFF while the GREEN LED will lit indicating that the user can now try again.
Remember that the system m ust wait for pressing of all the three (3) switches, correct or otherwise, before taking the appropriate action, i.e. energizing the YELLOW LED on entering the correct code or lighting the RED LED on erroneous entry.
2.2 State-Diagram of the lock:
Inputs from switches A, B, C, And Z Assume the correct sequence of button is C A B
Outputs States States are numbered as 1, 2, 3, …. R & G for LEDs Inputs labeled as I:ABCZ Y for Relay/Solenoid x -- indicates don’t care Outputs labeled as O:RGY Outputs are associated with
Assumption: At any time only one button is pressed