There are many security and access control devices on the market that attempt to prevent unauthorized access to secured areas. One such device is a key-pad based device. To unlock the door, you must enter a secret decimal code. For example, say a device accepts a 4-digit decimal code, 1234. The device will unlock the door when “1234” is entered, but it will not unlock if “123” or “123411” is entered.
For your final project, you are to design an access control system based on a sequence of 6 bits that accepts a 1-bit at a time, either 0 or 1. This could be implemented with a 2-button keypad (o and 1), used to enter the binary code.
A second input functions as the Enter key, which ends the key code entry. As the key is entered, the device outputs Enter = 0 until the input sequence terminates. If the input sequence matches the
access code, then output Enter =1 (for example LED lights up), which will unlock the door in a full implementation. The secret code is preset: choose your own code (see below).
After two unsuccessful attempts (i.e. the secret code was not matched), the system shuts down and won’t accept any more bits, and an alarm is triggered. Thus, your circuit has a second output Alarm, which is set to 1 after two unsuccessful attempts.
Extra credit: Add a reset to the system that presumably only the owner could control: when the reset key is inserted, the system is again enabled and can accept bits again. You can code the reset as either 0 (no key) or 1 (key inserted) for this project.