One Transistor Based Code Lock

Hello All, i have tried really hard to search for a Instructable based on the above topic, i do remember that i saw it in this site but now i cannot find it, the circuit is http://www.circuitstoday.com/one-transistor-code-lock, please link me to this Instructable, i would be really thankful to all of you. ALSO HOW CAN I ADD A BUZZER WHEN A WRONG CODE OR COMBINATION IS ENTERED.  ALSO WHAT TYPE OF SWITCH OR PUSH BUTTON SHOULD I USE PLEASE GUIDE ME.

sort by: active | newest | oldest
1-10 of 14Next »
gmoon4 years ago
If you can't find it, it is probably 'cause there isn't one...

But what do you need to know? It's really simple:

-- T1, D1, C1 are the power supply. You can substitute a wallwart or an pre-existing PS. Something around 6V.
-- S1 is the ON switch.
-- The transistor is turned on when switches S0 thru S4 connect the 2.2K resistor to the transistor's base (S0-S4 are closed), AND S5 - S9 are open.
-- If any one of S0-S4 are open, or any one of S5-S9 are close, the relay won't trip.
-- R1 is a pulldown resistor, and keeps the base at a solid ground state.
-- D1 protects the transistor from inductive surges originating in the relay.
-- the relay operates the lock -- or whatever.

Mix up the order of the switches to make up the "combination"--don't just connected them in-line like the schematic, that would defeat the purpose...
khan12 (author)  gmoon4 years ago
thanks for your reply please guide me as how can i attach a buzzer when an incorrect password is entered, also i want to drive a small dc motor, is using the buzzer possible !
gmoon khan124 years ago
Sure--use a DT (double throw) relay. Double-throw switches (relays as switches) make connections in both states, energized and non-energized. Actually, that schematic shows a SPDT relay (a DPDT relay would work, too).

Note with the circuit, as presented, the relay contacts will always be connected in one of the two "states." If you want the motor (or buzzer) to activate only when someone "keys in" the switch pattern (your "password"), you'll need another momentary button switch to act as an "enter" button. That button could just make/break the contacts leading from the relay. So long as the "code" is correct, and the "enter" button pressed, the "action" would happen...

It's a very simple circuit, with limited functionality.  If, for instance, you want the motor or buzzer to work for a specific amount of time, it will either require more complex analog circuitry, or a microcontroller...
khan12 (author)  gmoon4 years ago
thanks again, another question from me is that what type of switches should i use, should i use a Switch, or a push button, if switch which type and pushbutton which type
gmoon khan124 years ago
A SPST (Single Pole Single Throw) switch is what's shown on the schematic. As it's shown, that would work fine. Could be a toggle, or any other non-momentary switch.

For a pushbutton, a N.O. (Normally Open) momentary switch. Double Pole would be best for two devices, but you could make the Single Pole type work in a pinch.
gmoon gmoon4 years ago
Oops. S10, not S1 is the "ON" switch. From the first post, my bad...
khan12 (author)  gmoon4 years ago
PLEASE CHECK THIS CIRCUIT IS THIS THE CORRECT WAY, OF CONNECTING A REALY AND DRIVING A LOAD, PLEASE CHECK IT
keypad-lock-using-transistor.png
gmoon khan124 years ago
It's essentially correct.

Caveats:

A speaker connected to DC won't do anything...unless that's your buzzer.

The relay shown is a DPST (double pole single throw) type. You need a DT (double throw) relay here, if you want to control devices in both the ON and OFF relay states...DTDP preferably.

As drawn, the relay breaks the circuit twice, which is unnecessary. The circuit need only be opened or closed in one spot, not two.

Note that the value of R1 depends on the current draw of the relay--BJ transistors are current devices. With an average 12V relay, 2.2K would probably work OK. Or start with 22K (on a breadboard) and substitute lower resistance values until the switching works reliably. Due to variations in the relay and transistor, this approach would lead to the least amount of base current to do the job.

You can also solve for R1 mathematically...

Low current devices would required much higher R1 resistance values.
khan12 (author) 4 years ago
The image of ckt with a DPDT Relay, is the operated in this way please tell me.
keypad-lock-using-transistor.png
khan12 (author) 4 years ago
Everyone who sees this please reply
1-10 of 14Next »