Simple inverter switch transistor circuit help needed

Jul 26, 2007 2 Replies

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?



Consider this:

D2 D1 +V -----+-----/\/\--->!-----+-----/\/\---->!-----GND ! ! ----/\/\-----------+------/0------------GND R1 SW1

I R1 has a low value, When SW1 is off, only D1 is on. When SW1 is on, only D2 is on.

SW1 cna be a transistor.

This will work most of the time. It depends on the power supply voltage and LED forward voltage drop:

View in a fixed-width font such as Courier.

. . . / . Vcc>----+----o o----+--->

. | SW | SW closed . [R1] | . | | V -V . | | F EB . + - - ------ | * . V V D1 V D2 R1 \ * . F - - |\ * . - | | | \ * . | | | \ * . >| | | \ * . |---------+ I ^ | \ * . /| | d | | \ * . | [R2] | \ * . | | +*-*-*-*+*----+-- . | | V -V V . --- --- F EB F . V ->

. d . . .

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required