Hello All,
I'm effectively trying to reproduce the function of an SPDT relay but in a project that will run on AA batteries 24/7 so a relay will draw too much power.
In a nutshell, there will be (or not be) +3VDC coming out of a timer. When there is, I want a green LED to light. When there's not, I want a red LED to light.
I could do this using a solid state relay but I'm trying to do this on the cheap (my wife has dared/commanded me to build this thing using only parts on hand) and we're only talking about 20mA.
Found some good tutorials for using a transistor as a simple SPST switch. But the waters get a little muddy when you start talking SPDT.
Found one reference to using a NOT gate and essentially hooking it up with two SPST's in tandem. Also makes sense. Now we're pretty much talking about 3 NPN's, 2 1K resistors and the LED's.
But am I correct that a PNP transistor is effectively the opposite of an NPN? Instead of Could I do this simpler with one NPN and one PNP? Basically two separate switches, one that "puts out" a high positive to the positive end of a green led when there's voltage at it's base, and one that "takes" a high negative from the negative end of a red led when there's not voltage at it's base?
Hope to hear from you. In the mean time I'll probably start experimenting on a breadboard, and hopefully not let the smoke out of too many of my on-hand parts (if I have to buy more I can't tell my wife).
Randini
Seattle
I'm effectively trying to reproduce the function of an SPDT relay but in a project that will run on AA batteries 24/7 so a relay will draw too much power.
In a nutshell, there will be (or not be) +3VDC coming out of a timer. When there is, I want a green LED to light. When there's not, I want a red LED to light.
I could do this using a solid state relay but I'm trying to do this on the cheap (my wife has dared/commanded me to build this thing using only parts on hand) and we're only talking about 20mA.
Found some good tutorials for using a transistor as a simple SPST switch. But the waters get a little muddy when you start talking SPDT.
Found one reference to using a NOT gate and essentially hooking it up with two SPST's in tandem. Also makes sense. Now we're pretty much talking about 3 NPN's, 2 1K resistors and the LED's.
But am I correct that a PNP transistor is effectively the opposite of an NPN? Instead of Could I do this simpler with one NPN and one PNP? Basically two separate switches, one that "puts out" a high positive to the positive end of a green led when there's voltage at it's base, and one that "takes" a high negative from the negative end of a red led when there's not voltage at it's base?
Hope to hear from you. In the mean time I'll probably start experimenting on a breadboard, and hopefully not let the smoke out of too many of my on-hand parts (if I have to buy more I can't tell my wife).
Randini
Seattle