I want to install an led board with a switch in my car. The switch would be pressed down by the lid of the arm rest when closed. I only have N.O. tact switches to use for this, since I need momentary action. I think this would work:


simulate this circuit – Schematic created using CircuitLab

When the switch is pushed in, the lid is closed and the light should be off. RSwitch should keep the 2n3906 off. When it is released, the 2n3906's base is connected only to ground, so the lights should be on. Is this right?

The LED light current is roughly 64mA, 100mA at worst case, so the 2n3906 I have should work fine I would think.

Additionally, how do I calculate the right values for RBase and RSwitch? Is 1kΩ each correct or should they be different? Can Rswitch be omitted, or should it be included for safety reasons?

  • 1
    \$\begingroup\$ Keep in mind that Rbase will be drawing ~12 mA of current from the battery all the time, even when the LEDs are off. You'll probably want to connect this to the switched power bus, not directly to the battery, so that it is only powered when the engine is running. \$\endgroup\$
    – Dave Tweed
    Commented Aug 31, 2013 at 13:36
  • \$\begingroup\$ @DaveTweed yea,that was the plan. Connected on the Switched 10Amp Power Outlet circuit. A NC switch would avoid all that, so I did order some microswitches with both NC and NO contacts. \$\endgroup\$
    – Passerby
    Commented Aug 31, 2013 at 21:43

1 Answer 1


You need to omit Rswitch so that the transistor base is pulled completely up to the emitter voltage....that's how you turn off a PNP transistor. 1k for Rbase will give you about 12mA of base current which seems like a reasonable choice. Without knowing anything about your LEDs it's hard to say whether the 150 ohm resistors have the right value. You might think about using two transistors, one for each string. You can just connect both bases to the switch and both emitters to 12V. That will reduce the power dissipated in the each transistor although it's probably not necessary.

  • \$\begingroup\$ Don't know much about the leds myself :D. Your average china mart car white led bulb replacement board. 12 leds, 4 strings of 3 leds + 150 resistors. Figuring ~3.2v drop per led, gives 16mA at 12v per string, bit higher at 14~15v. The leds on the schematic are just representative. Even then, the 2n3906 I have is the 200mA version. \$\endgroup\$
    – Passerby
    Commented Aug 31, 2013 at 12:23
  • \$\begingroup\$ If the LEDs and 150 ohm resistor come pre-assembled and are designed for 12V operation then you can assume that the resistor choice is appropriate, but you should mention that in your question. Regarding the 2N3906, just check to see if it feels hot after the LEDs have been on for a minute or so. If not, then there's no need for parallel transistors. \$\endgroup\$
    – Joe Hass
    Commented Aug 31, 2013 at 12:29

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.