Okay I’ll try to keep this short. I have a circuit that has an output of 5VDC I want to use transistors to control LED's one on when the other is off and vice versa will this work? (ignore the orientation of the LED's I could not remember correctly when I drew this) I would also like to hook up a small relay, either mechanical or solid state, so it closes when the first LED (one on the left) is on but when I tried just a simple test the relay would not close when the led was hooked up but would when it was not, like the transistor was not giving enough current. Any ideas? Thanks http://www.patrickcobb.com/DRIVER.jpg
use a NOT gate, since it would be simpler and cheaper or you could use a NAND gate, and leave one of the legs "high" .:EDIT:. most logic devices use 0V for low and 5V for high, and just about every LED can handle 5V (with the right resistor)
This may sound stupid but where can i find a not gate and will it be able to drive a led and a relay? Is there a way to do it with the transistors because i already have them?
the IC's probably won't be able to handle a relay, since they only put out a little current. one thing that amy work is putting the LED's in parallel with the anode (+ side) of one against the cathode (- side) of another and vice versa, and changing the polarity of the leads would do it (this banks on the diode property of LED's) like this:
The DPDT switch way will work fine, but don't forget to add a resistor to limit led current. To add a relay, put a plain silicon diode (1N4001) in series with the coil so it only activates with current going one way, and put the pair in parallel with leds & resistor. Code: LED +---->|---+ | LED +---R---+--- --+----|<---+ | | | +--->|--Relay-----+ The relay will activate when the top led is on.
thanks cpemma, i forgot to mention that when i do quick little schematics like that, i save time by only putting in the "necessary stuff" (i mean the stuff that doesn't change, different LED's need differently rated resistors, unless i specifically mention it, i leave it to you to figure out the ratings of each, i just show how it kinda goes together) PS if you do it my way you'll need a resistor between the battery and the switch