0
\$\begingroup\$

I have this circuit. The purpose of this circuit is what SW1 and SW2 are inverted push buttons so when the are pushed they are off. But for me the problem is what buttons are not operating separately and I know why just can’t think how to fix that. I need to make it if SW1 is not pushed the LED is ON even while the SW2 is pushed (what means SW2 is off). In my case when I release (turning OFF) one push button the LED is turning OFF. So when I turning OFF one push button the LED should still be ON.

(Purpose of this is to make light in wardrobe, so the push buttons will be installed inside and the doors will be pushing the push buttons in, that means OFF and when the doors will be opened the push buttons will be released and LEDS with turn ON, wardrobe has two doors that's why I need two buttons to work kind of separately as LED could be ON even if one door is open.)

enter image description here

\$\endgroup\$

4 Answers 4

1
\$\begingroup\$

It sounds like what you want is for the LED to light whenever any door is opened.

You are using normally closed switches. The switches pull the base of the transistor low turning off the transistor and the LED.

You can do what you want by putting all of the switches in series. like this:

schematic

simulate this circuit – Schematic created using CircuitLab

When the doors are closed the switches will all be closed, pulling the transistor base low. If any of the doors open that switch will break the circuit and the LED will light. You can have pretty much any number of switches in series, this is how some burglar alarm systems work, every entry has a normally closed switch or a foil trace on window glass making a complete circuit, if any of the switches open or the foil on a window is broken it breaks the circuit setting off the alarm. The advantage is that you only need to run one wire from switch to switch.

Taking another idea from burglar alarms, they usually use magnetic reed switches, the switch is fixed to the door frame and there's a matching magnet on the door, when the door is opened the switch opens. This might be something you'd want to look at, as it eliminates a mechanical connection between the door and switch so you don't get as much wear and tear and it lasts longer.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you very much GodJihyo , everything works. Really saved me. \$\endgroup\$
    – Marks2000
    Commented Aug 25, 2023 at 20:15
1
\$\begingroup\$

The schematic could be as simple as this.

enter image description here

With both the doors closed, the NC contacts of both the switches are open and the LED is off.

With either door open, the corresponding switch NC contact is closed and the LED is on.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This is actually how the lights in the passenger compartment of a car work. There, connecting in parallel is convenient because the body of the car serves as one of the two conductors (ground). \$\endgroup\$ Commented Aug 26, 2023 at 14:23
  • 1
    \$\begingroup\$ You're right, Cyril, I didn't think of that! Yes, in the car, with the door switches grounded to chassis, a single wire from the fuse box to the lamp and a wire from the lamp to each door switch would suffice. \$\endgroup\$
    – vu2nan
    Commented Aug 26, 2023 at 16:34
0
\$\begingroup\$

There are many circuits that will satisfy your requirement that if one of the normally closed push buttons is pushed, the LED will light up.

Here is one that uses the components that you already have. A difference with yours is that the switches are in series instead of parallel, and only one of the switches has a one of its terminals connected directly to ground.

schematic

simulate this circuit – Schematic created using CircuitLab

Here is another one that doesn't use the same component list, but which has one terminal of both of the switches connected directly to ground.

schematic

simulate this circuit

\$\endgroup\$
2
  • \$\begingroup\$ It's "series instead of parallel", and the difference is not adequately described by "one of the switches is not grounded" (actually SW1 is grounded if and only if SW2 is closed) \$\endgroup\$
    – Ben Voigt
    Commented Aug 25, 2023 at 19:54
  • 1
    \$\begingroup\$ Thanks, i also just tested that circuit, everything is good, thanks. \$\endgroup\$
    – Marks2000
    Commented Aug 25, 2023 at 20:16
0
\$\begingroup\$

I don't see a need for a transistor. Try this as a modification of the schematic in the original post:

Delete Q1, R2, R3, and R4.

Connect both switches in parallel, between the D1 cathode and GND.

Now, if either door opens, that door's switch closes and the LED comes on.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.