Secret Code Checker

This is a simple electronic code lock. The output of the lock in this example is an LED that turns on when you input the right code. But you can replace the LED with a transistor and control a real mechanical lock too.

The Circuit

The NOT-gates and AND-gates are combined so that the output is true only if you input the code 1001 using the switches on the DIP switch.

Parts List

Reference Value
Battery 9V
D1 Light-Emitting Diode (LED)
R1 1k
R2 1k
R3 1k
R4 1k
R5 1k
SW1 4-position DIP Switch
U1 CD4069
U2 CD4081

The Layout

Created: Oct 15, 2025 | Updated: Nov 26, 2025 |