Maker Pro
Maker Pro

Simple inverter switch transistor circuit help needed

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?
 
LEDS believe it or noy are diodes just use them as AND gates. Put power to one [anode ] it will shut off put gnd to the other it will light and the reverse and it should reverse. you don't need tansistor what forat all
 
M

MooseFET

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.
 
F

Fred Bloggs

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?

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.
 
J

John Fields

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
.
.
.

---
This will work _all_ the time:

..
..Vcc>--+----------------+
.. | |
.. | O |
.. | [R3]
.. | O |
.. | |
.. |A +-----+
.. [LED1] | |
.. | C |A
.. +--[R2]--B NPN [LED2]
.. | Q1 E |
.. [R1] | |
.. | | |
..GND>--+----------+-----+
..
 
J

John Fields

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
.
.
.

---
This will work _all_ the time:

.
.Vcc>--+----------------+
. | |
. | O |
. | [R3]
. | O |
. | |
. |A +-----+
. [LED1] | |
. | C |A
. +--[R2]--B NPN [LED2]
. | Q1 E |
. [R1] | |
. | | |
.GND>--+----------+-----+
.

---
P.S.

Version 4
SHEET 1 880 680
WIRE -160 96 -432 96
WIRE 80 96 -160 96
WIRE -160 128 -160 96
WIRE -208 144 -336 144
WIRE 80 144 80 96
WIRE -208 192 -240 192
WIRE -160 240 -160 208
WIRE 80 256 80 224
WIRE 176 256 80 256
WIRE -432 288 -432 96
WIRE -336 288 -336 144
WIRE 80 304 80 256
WIRE 176 320 176 256
WIRE -160 352 -160 304
WIRE -96 352 -160 352
WIRE 16 352 -16 352
WIRE -160 384 -160 352
WIRE -432 512 -432 368
WIRE -336 512 -336 368
WIRE -336 512 -432 512
WIRE -240 512 -240 192
WIRE -240 512 -336 512
WIRE -160 512 -160 464
WIRE -160 512 -240 512
WIRE 80 512 80 400
WIRE 80 512 -160 512
WIRE 176 512 176 384
WIRE 176 512 80 512
WIRE -432 592 -432 512
FLAG -432 592 0
SYMBOL res 64 128 R0
SYMATTR InstName R1
SYMATTR Value 150
SYMBOL npn 16 304 R0
SYMATTR InstName Q1
SYMATTR Value 2N3904
SYMBOL LED 160 320 R0
SYMATTR InstName D1
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 0 336 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R2
SYMATTR Value 2000
SYMBOL voltage -432 272 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage -336 272 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 24 104 Invisible 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 1e-6 1e-6 1 2)
SYMBOL sw -160 224 M180
WINDOW 0 32 15 Left 0
WINDOW 3 32 44 Left 0
SYMATTR InstName S1
SYMBOL res -176 368 R0
SYMATTR InstName R3
SYMATTR Value 150
SYMBOL LED -176 240 R0
WINDOW 3 87 38 Left 0
SYMATTR InstName D2
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
TEXT -408 536 Left 0 !.model SW SW(Ron=1 Roff=10Meg Vt=0.5Vh=0)
TEXT -408 568 Left 0 !.tran 0 10 0
 
J

Jonathan Kirwan

---
P.S.

Version 4
SHEET 1 880 680
WIRE -160 96 -432 96
WIRE 80 96 -160 96
WIRE -160 128 -160 96
WIRE -208 144 -336 144
WIRE 80 144 80 96
WIRE -208 192 -240 192
WIRE -160 240 -160 208
WIRE 80 256 80 224
WIRE 176 256 80 256
WIRE -432 288 -432 96
WIRE -336 288 -336 144
WIRE 80 304 80 256
WIRE 176 320 176 256
WIRE -160 352 -160 304
WIRE -96 352 -160 352
WIRE 16 352 -16 352
WIRE -160 384 -160 352
WIRE -432 512 -432 368
WIRE -336 512 -336 368
WIRE -336 512 -432 512
WIRE -240 512 -240 192
WIRE -240 512 -336 512
WIRE -160 512 -160 464
WIRE -160 512 -240 512
WIRE 80 512 80 400
WIRE 80 512 -160 512
WIRE 176 512 176 384
WIRE 176 512 80 512
WIRE -432 592 -432 512
FLAG -432 592 0
SYMBOL res 64 128 R0
SYMATTR InstName R1
SYMATTR Value 150
SYMBOL npn 16 304 R0
SYMATTR InstName Q1
SYMATTR Value 2N3904
SYMBOL LED 160 320 R0
SYMATTR InstName D1
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 0 336 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R2
SYMATTR Value 2000
SYMBOL voltage -432 272 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage -336 272 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 24 104 Invisible 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 1e-6 1e-6 1 2)
SYMBOL sw -160 224 M180
WINDOW 0 32 15 Left 0
WINDOW 3 32 44 Left 0
SYMATTR InstName S1
SYMBOL res -176 368 R0
SYMATTR InstName R3
SYMATTR Value 150
SYMBOL LED -176 240 R0
WINDOW 3 87 38 Left 0
SYMATTR InstName D2
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
TEXT -408 536 Left 0 !.model SW SW(Ron=1 Roff=10Meg Vt=0.5Vh=0)
TEXT -408 568 Left 0 !.tran 0 10 0

Just for grins, I ran that circuit through my LTSpice-to-ASC converter
and got this:
: ,----------------+--------------,
: | | |
: | | S1 |
: | ,--------> o |
: | | : / \
: | | : / / R1
: | | ,--> o \ 150
: | | | | /
: | | | | |
: | | | | |
: | | | --- +--------,
: | | | \ / D2 | |
: | | | --- QTLP690C | |
: --- --- | | | |
: - V1 - V2 | | | |
: --- 5 --- PUL| | R2 |/c Q1 ---
: - - | +----/\/\----| 2N3904\ / D1
: | | | | 2000 |>e --- QTLP690C
: | | | | | |
: | | | \ | |
: | | | / R3 | |
: | | | \ 150 | |
: | | | / | |
: | | | | | |
: | | | | | |
: | | | | | |
: +-----+-----+----+--------------+--------'
: | .model SW SW(Ron=1 Roff=10Meg Vt=0.5Vh=0)
: |
: | .tran 0 10 0
: |
: |
: gnd

Jon
 
F

Fred Bloggs

John said:
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
.
.
.


---
This will work _all_ the time:

.
.Vcc>--+----------------+
. | |
. | O |
. | [R3]
. | O |
. | |
. |A +-----+
. [LED1] | |
. | C |A
. +--[R2]--B NPN [LED2]
. | Q1 E |
. [R1] | |
. | | |
.GND>--+----------+-----+
.

This one is better'n the both of them, your circuit wastes current:

Why don't you verify the equations ( I whipped them out) and construct a
design note on how to select R1,2,3 in terms of Vcc, and VF1,2...

View in a fixed-width font such as Courier.
 
J

Jonathan Kirwan

<snip of ASCII schematics>
WOW!

Pretty damn slick!!! :)

hehe. If you are interested, I can provide a link where you can
download it -- with or without source. Like anything done for free,
it has its limitations (due to my time.) But I wouldn't mind feedback
about what to work on. A little useful focus wuold sharpen the use of
what time I can afford to enhance it.

The program is something I whipped up a while back when I decided I
thought I'd let LTSpice capture the schematics I post in ASCII. It
turned out to actually be easier than I first imagined, but there were
a few things I had to learn along the way. Parsing was easy. The key
was to imagine an ASCII drawing space and to use "greatest common
divisor" means to find the least number of ASCII characters required
to replace wires and so on.

Jon
 
J

John Fields

John said:
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
.
.
.


---
This will work _all_ the time:

.
.Vcc>--+----------------+
. | |
. | O |
. | [R3]
. | O |
. | |
. |A +-----+
. [LED1] | |
. | C |A
. +--[R2]--B NPN [LED2]
. | Q1 E |
. [R1] | |
. | | |
.GND>--+----------+-----+
.

This one is better'n the both of them, your circuit wastes current:

Why don't you verify the equations ( I whipped them out) and construct a
design note on how to select R1,2,3 in terms of Vcc, and VF1,2...

View in a fixed-width font such as Courier.


.
.
. /
. Vcc>----+----o o-----+--->
. | SW |
. [R1] |
. | | Vcc-V -V
. | | F1 EB R2+R3
. + - 1N4148| R1 = ----------- - -----
. V V D1 .--|<|--+ I H
. F - ~ | | F1 FE
. - | | -
. | | V D2
. | | - ~
. >| | |
. |--+-[R3]--+ Vcc-V
. /| | F2
. | [R2] R2 = ---------------
. | | V -0.7
. | | F2
. --- --- I + -------
. F2 R3
.
 
R

Rich Grise

hehe. If you are interested, I can provide a link where you can download
it -- with or without source. Like anything done for free, it has its
limitations (due to my time.) But I wouldn't mind feedback about what to
work on. A little useful focus wuold sharpen the use of what time I can
afford to enhance it.

The program is something I whipped up a while back when I decided I
thought I'd let LTSpice capture the schematics I post in ASCII. It turned
out to actually be easier than I first imagined, but there were a few
things I had to learn along the way. Parsing was easy. The key was to
imagine an ASCII drawing space and to use "greatest common divisor" means
to find the least number of ASCII characters required to replace wires and
so on.

I've only just now looked into the thread, and yes, please, post a link. :)

Does it run on Windows, or Linux? I guess if you post source, it shouldn't
matter that much. ;-)

Thanks,
Rich
 
I am new to this and electronic, I am learning about solar, my question is this
if i have one solar cell say a 2.5 watts can i use a step up motor to give me more power. this is a two part question but first this one Thanks
 
Top