Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Garbage Shed
Me and my wife are always trying to make more room in our garage and decided one way was to get the garbage out of there.   So I set off to build the shed.  I knew the thing needed a light to shine on the garbage at night.  The light should go on when the switch is opened and should go off when the switch is closed.  I tried looking on the internet for a circuit that goes on when off and off when on.  I could not find anything.  Maybe I just didnt google the right tags.  Anyway I thought a pnp transistor would do the trick.  I made and tested my first circuit.  It worked, and I was happy, very easy.  But then I noticed the circuit getting really hot when the switch was closed and off.  I measured 2 amps of current getting wasted.  I changed the circuit to include 2 pnp transistors.  I dont know if this is the most efficient way of making the circuit or if I could get by with just one pnp, but my circuit drives 4 green extra bright leds with 105 ma of current and uses 70 micro amps when off, with 3 aaa 1.5 volt batteries.

[img][Image: _DSC6701.jpg][/img]

[img][Image: IMG_20151127_140601.jpg][/img]

[img][Image: IMG_20151127_140654.jpg][/img]

[img][Image: _DSC6703.jpg][/img]

[img][Image: _DSC6694.jpg][/img]
Very nice.

I am going to speculate your original circuit was shorting load instead of switching it off.

What value is R1 - 102 or 10.2 ohm ?

How long do your batteries hold? My calculations say around 9 months depending how often and for how long it is opened.

Btw, by inserting capacitor between base and R3/S junction and diode from base to Vcc it should auto-shutoff should lid be left open.
In the original circuit, there was no pnp 2. The switch connected directly to R1 (that is 10.2 ohms) then too ground, no R3.

The batteries are holding. Its only been a week. And 9 months would be great for a set of energizers. I was originally going to try to make it solar chargeable, I have a few small panels I got from ebay, but I decided not to bother considering normal batteries should last reasonably long enough.

Thankyou for advice of a capacitor, and diode. Can you explain what you mean by the diode connection? Is it connected directly from transistor 2 base to Vcc. If so, I don't understand what that and the capacitor will do in this circuit. Will it make my circuit use no power when off?
Here is what I had in mind:

Added C1, D1 as shown below. Also R2 had to change to 560 or C1 would need to be too big. Polarized C1 positive is on the base.

Green is simulated switch open for 4min (lid is up). Blue is LED current. 

If you leave the lid up, after 1.5min the light starts dimming and at 3min should be fully off. Lid needs to be closed to reset the circuit.

.png   switch-sim.png (Size: 21.15 KB / Downloads: 61)

Attached Files
.asc   switch.asc (Size: 1.85 KB / Downloads: 50)
Not sure why but somehow I got biased to use NPN devices and never even visualize a simple design with PNP. If its something like pushpull then I think of it more naturally, but one or two transistors, never. yes I see the irony of using the word biased here too.
--------------- ---- --- -- -  -
If things weren't meant to be modified, they would not come with wires attached.
Roman, sorry for late reply. Been busy with Christmas.
Thankyou for taking time to draw up a circuit and simulate it. That is a very good circuit and it draws 0mA when off. And a timer to auto shutdown too when on. And only uses 3 more components. I will definitely keep your circuit in my records, for the next anti-switch I make.

May I ask how you drew up and simulated the circuit. What program is it? Is is free?
Jon, I think most designers prefer NPN, that's why they are more available.

Darrin, I only added two parts in your circuit. This function can be designed a bit simpler and lower quiescent current using one MOSFET. The current is not zero, it is basically the same as you get - around 70uA, incidentally, if you leave lid open and it auto-shuts, the current will be way lower. The software I use is free from Linear Technology's LTSpice -
Thankyou Roman, I will download that software and check it out.

Forum Jump:

Users browsing this thread: 1 Guest(s)