I am experiencing brain freeze or something, but I cannot figure out
the following...
Lets say I have three wires, power, ground, and switch. Power is
always on, ground is always connected to ground. I selectively apply
power to the switch wire. I have two LED's. LED 1 is on whenever
there is power on the power wire and ground is connected and LED 2 is
off.
Using transistor(s), how can I make it so that when power is applied
to the switch wire, LED 1 turns off, and LED 2 turns on instead.
This isnt a school assignment or anything - I'm just learning as I go
and this particular problem has me a bit stumped. I was thinking of
using a NPN driving a PNP on LED1 and an NPN on LED 2, and connecting
the switch wire to the base of the NPN on LED two, as well as the base
of the PNP on LED 1 (through a diode to prevent backflow of current),
so that when power is applied it pulls the base of the NPN on LED 2
high, and also pulls the base on the PNP on LED1 high, turning off the
transistor and therefore turning off the LED.
Or is there a better/simpler way?
the following...
Lets say I have three wires, power, ground, and switch. Power is
always on, ground is always connected to ground. I selectively apply
power to the switch wire. I have two LED's. LED 1 is on whenever
there is power on the power wire and ground is connected and LED 2 is
off.
Using transistor(s), how can I make it so that when power is applied
to the switch wire, LED 1 turns off, and LED 2 turns on instead.
This isnt a school assignment or anything - I'm just learning as I go
and this particular problem has me a bit stumped. I was thinking of
using a NPN driving a PNP on LED1 and an NPN on LED 2, and connecting
the switch wire to the base of the NPN on LED two, as well as the base
of the PNP on LED 1 (through a diode to prevent backflow of current),
so that when power is applied it pulls the base of the NPN on LED 2
high, and also pulls the base on the PNP on LED1 high, turning off the
transistor and therefore turning off the LED.
Or is there a better/simpler way?