Hobby Electronics Basics Driving two transistors with same signal

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Driving two transistors with same signal vic 05-08-08
Posted by petrus bitbyter on May 10, 2008, 9:31 pm
Please log in for more thread options

>
>> BobW wrote:
>>>>> Hi,
>>>>>
>>>>> I have two common anode 7-segments displays, and only one wire to
>>>>> drive them. I need to achieve the following : when the control signal
>>>>> is +5V, display1 is ON and display2 is OFF. When the signal is 0V,
>>>>> display1 is OFF and display2 is ON. When the signal is not connected
>>>>> (high impedance), both displays are OFF.
>>>>>
>>>>> I tried using a NPN transistor for display1 and a PNP for display2,
>>>>> connecting their bases together. It works when the driving signal is
>>>>> present, but when the signal is floating current flows from the base
>>>>> of the PNP to the base of the NPN and both transistors turn each other
>>>>> on, resulting in both displays being ON.
>>>>>
>>>>> The circuit that didn't work :
>>>>>
>>>>> VCC
>>>>> +
>>>>> |
>>>>> |
>>>>> ___ |<
>>>>> o---------------------|___|--|
>>>>> | |\
>>>>> | VCC |
>>>>> | + |
>>>>> | | Display2
>>>>> | | |
>>>>> | ___ |/ |
>>>>> Input---o---|___|--| GND
>>>>> |>
>>>>> |
>>>>> |
>>>>> Display1
>>>>> |
>>>>> |
>>>>> GND
>>>>>
>>>>>
>>>>>
>>>>> Is there a way to achieve this ?
>>>>>
>>>>> Thanks.
>>>> Try this:
>>>> 5V
>>>> | 5V
>>>> R5 |
>>>> | |<---
>>>> |/-------------| Q3
>>>> ----| Q1 |\--------- (to display 1 and then to GND)
>>>> | |>-- 5V
>>>> | | |
>>>> | | R3
>>>> | | |
>>>> ---R1-----R2----------
>>>> | | |
>>>> | | R4
>>>> | |<--- |
>>>> |--| Q2 GND
>>>> |\
>>>> | |/--------- (to display 2 and then to 5V)
>>>> -------------| Q4
>>>> | |>----
>>>> R6 |
>>>> | GND
>>>> GND
>>>>
>>>> Q1 and Q2 form a comparator so that when the input is floating they
>>>> will both be off. R3 and R4 set the input threshold.
>>>>
>>>> When the input is high (5V) then Q1 will be on and that will turn on
>>>> Q3. When the input is low (GND) then Q2 will be on and that will turn
>>>> on Q4.
>>>>
>>>> You can figure out the resistor values. They shouldn't be too critical,
>>>> but R3 and R4 need to be small enough to ensure enough drive for the
>>>> four transistors.
>>>>
>>>> I hope I got the ascii art right as I had to compose it in a separate
>>>> word processor.
>>>>
>>>> Bob
>>>> --
>>>> == NOTE: I automatically delete all Google Group posts due to
>>>> uncontrolled SPAM ==
>>>
>>> I see, now, that your displays are both common anode. You'll need to add
>>> another PNP (common emitter mode) driven by Q4.
>>>
>>> As Monica Lewinsky used to say, "Close, but no cigar."
>>>
>>> Bob
>>
>> *gasp* 5 transistors needed to do what seemed simple at first glance ...
>>
>> I don't quite understand what R5 and R6 are for, when Q1 and Q2 do not
>> conduct, the base current of Q3 and Q4 would be zero so the ressitors do
>> not seem necessary ?
>>
>> Well I guess I could just try it and see if it works :)
>
>
> Didn't you see my four transistors, four resistors solution yesterday?
>
> +--------+------------------+-------+--Vcc
> | | | |
> ___ |< | ___ |/ |
> in----+--|___|---| | +--|___|--| |
> | |\ | | |> |
> | | | | | |
> | | |< | | |<
> | +------| | +-----|
> | | |\ | | |\
> | .-. | | .-. |
> | | | .---. | | | .---.
> | | | | | | | | | |
> | '-' | D | | '-' | D |
> | | | | | | | |
> | | '---' | | '---'
> | | | | | |
> ------)------------+--------+------)-----------+-------+--GND
> | |
> +----------------------------+
> created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de
>
>
> petrus bitbyter
>

Oops, checking out my own schematic I found it wrong. The one below is good.
I added a diode to make the voltage loss for both displays more equal. If
that loss is not acceptable you can use a five transistor variant shown by
someone else already. I added similar schematic below.


+--------+------------------+-------+--Vcc
| | | |
___ |< V .-. |
in----+--|___|---| - | | |
| |\ | | | |
| | | '-' |
| | |< | |/
| +------| +-----|
| | |\ | |>
| .-. | | |
| | | .---. ___ |/ .---.
| | | | | +--|___|--| | |
| '-' | D | | |> | D |
| | | | | | | |
| | '---' | '---'
| | | | | |
------)------------+--------+------)-----------+-------+--GND
| |
+----------------------------+




+------+---------------------+------+--Vcc
| | | |
___ |< | |< |
in---+--|___|--| | +--| |
| |\ | | |\ |
| | | .-. | |<
| | |< | | +----|
| +----| | | | |\
| | |\ '-' | |
| .-. | | | |
| | | .---. | | .---.
| | | | | ___ |/ .-. | |
| '-' | D | +--|___|--| | | | D |
| | | | | |> | | | |
| | '---' | | '-' '---'
| | | | | | |
-----)-----------+------+----)-----------+----+------+--GND
| |
+-----------------------+
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

For a a Vcc of 5V all resistors can be 4k7. Transistors are general purpose
2N3904, 2N3906 or BC550, BC560.

petrus bitbyter



Posted by vic on May 10, 2008, 9:39 pm
Please log in for more thread options
petrus bitbyter wrote:
> Didn't you see my four transistors, four resistors solution yesterday?
>
> +--------+------------------+-------+--Vcc
> | | | |
> ___ |< | ___ |/ |
> in----+--|___|---| | +--|___|--| |
> | |\ | | |> |
> | | | | | |
> | | |< | | |<
> | +------| | +-----|
> | | |\ | | |\
> | .-. | | .-. |
> | | | .---. | | | .---.
> | | | | | | | | | |
> | '-' | D | | '-' | D |
> | | | | | | | |
> | | '---' | | '---'
> | | | | | |
> ------)------------+--------+------)-----------+-------+--GND
> | |
> +----------------------------+
> created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de
>


Sorry I missed your post. Looks like a good solution. Thanks !

Posted by petrus bitbyter on May 11, 2008, 4:14 pm
Please log in for more thread options

> petrus bitbyter wrote:
>> Didn't you see my four transistors, four resistors solution yesterday?
>>
>> +--------+------------------+-------+--Vcc
>> | | | |
>> ___ |< | ___ |/ |
>> in----+--|___|---| | +--|___|--| |
>> | |\ | | |> |
>> | | | | | |
>> | | |< | | |<
>> | +------| | +-----|
>> | | |\ | | |\
>> | .-. | | .-. |
>> | | | .---. | | | .---.
>> | | | | | | | | | |
>> | '-' | D | | '-' | D |
>> | | | | | | | |
>> | | '---' | | '---'
>> | | | | | |
>> ------)------------+--------+------)-----------+-------+--GND
>> | |
>> +----------------------------+
>> created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de
>>
>
>
> Sorry I missed your post. Looks like a good solution. Thanks !

Be aware that this schematic does not work. By modifiing my first schematic
(with one display connected to Vcc) to the second (with both diplays
connected to Gnd) I made a mistake. I posted the right schematic few minutes
before your post.

petrus bitbyter



Posted by John Fields on May 10, 2008, 9:35 am
Please log in for more thread options

>Hi,
>
>I have two common anode 7-segments displays, and only one wire to drive
>them. I need to achieve the following : when the control signal is +5V,
>display1 is ON and display2 is OFF. When the signal is 0V, display1 is
>OFF and display2 is ON. When the signal is not connected (high
>impedance), both displays are OFF.
>
>I tried using a NPN transistor for display1 and a PNP for display2,
>connecting their bases together. It works when the driving signal is
>present, but when the signal is floating current flows from the base of
>the PNP to the base of the NPN and both transistors turn each other on,
>resulting in both displays being ON.
>
>The circuit that didn't work :
>
> VCC
> +
> |
> |
> ___ |<
> o---------------------|___|--|
> | |\
> | VCC |
> | + |
> | | Display2
> | | |
> | ___ |/ |
> Input---o---|___|--| GND
> |>
> |
> |
> Display1
> |
> |
> GND
>
>
>
>Is there a way to achieve this ?

---
Yes. View in Courier:



+5V>-------+-----------+-----------+-----------+
| | | |
[100k] [100K] | |
| | | E
+-----------|-----------|---------B 2N3906
| | | C
| | E |
| +--[10K]--B 2N3906 |
[10k] | C |
| | | |
| C |A |A
VIN>-------+--[10k]--B 2N3904 [DISPLAY] [DISPLAY]
E | |
| [150R] [150R]
| | |
GND>-------------------+-----------+-----------+


Version 4
SHEET 1 880 680
WIRE -112 -128 -272 -128
WIRE 144 -128 -112 -128
WIRE 384 -128 144 -128
WIRE 624 -128 384 -128
WIRE -112 -80 -112 -128
WIRE 144 -80 144 -128
WIRE 624 0 624 -128
WIRE -112 48 -112 0
WIRE 560 48 -112 48
WIRE 384 96 384 -128
WIRE -112 112 -112 48
WIRE 144 144 144 0
WIRE 192 144 144 144
WIRE 320 144 272 144
WIRE 144 176 144 144
WIRE 624 192 624 96
WIRE -112 224 -112 192
WIRE -32 224 -112 224
WIRE 80 224 48 224
WIRE -272 256 -272 -128
WIRE -112 256 -112 224
WIRE 384 288 384 192
WIRE 624 288 624 256
WIRE 384 384 384 352
WIRE -272 512 -272 336
WIRE -112 512 -112 336
WIRE -112 512 -272 512
WIRE 144 512 144 272
WIRE 144 512 -112 512
WIRE 384 512 384 464
WIRE 384 512 144 512
WIRE 624 512 624 368
WIRE 624 512 384 512
WIRE -272 592 -272 512
FLAG -272 592 0
SYMBOL pnp 560 96 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL LED 608 192 R0
SYMATTR InstName D1
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 608 272 R0
SYMATTR InstName R1
SYMATTR Value 150
SYMBOL voltage -272 240 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL res -128 -96 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL voltage -112 240 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 1e-6 1e-6 .1 .2)
SYMBOL res -128 96 R0
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 64 208 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL npn 80 176 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res 128 -96 R0
SYMATTR InstName R5
SYMATTR Value 100k
SYMBOL pnp 320 192 M180
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL LED 368 288 R0
SYMATTR InstName D2
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 368 368 R0
SYMATTR InstName R6
SYMATTR Value 150
SYMBOL res 288 128 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R7
SYMATTR Value 10k
TEXT -232 536 Left 0 !.tran 1 uic

JF

Posted by John Fields on May 10, 2008, 9:52 am
Please log in for more thread options
On Sat, 10 May 2008 08:35:11 -0500, John Fields

>
>>Hi,
>>
>>I have two common anode 7-segments displays, and only one wire to drive
>>them. I need to achieve the following : when the control signal is +5V,
>>display1 is ON and display2 is OFF. When the signal is 0V, display1 is
>>OFF and display2 is ON. When the signal is not connected (high
>>impedance), both displays are OFF.
>>
>>I tried using a NPN transistor for display1 and a PNP for display2,
>>connecting their bases together. It works when the driving signal is
>>present, but when the signal is floating current flows from the base of
>>the PNP to the base of the NPN and both transistors turn each other on,
>>resulting in both displays being ON.
>>
>>The circuit that didn't work :
>>
>> VCC
>> +
>> |
>> |
>> ___ |<
>> o---------------------|___|--|
>> | |\
>> | VCC |
>> | + |
>> | | Display2
>> | | |
>> | ___ |/ |
>> Input---o---|___|--| GND
>> |>
>> |
>> |
>> Display1
>> |
>> |
>> GND
>>
>>
>>
>>Is there a way to achieve this ?
>
>---
>Yes. View in Courier:
>
>
>
>+5V>-------+-----------+-----------+-----------+
> | | | |
> [100k] [100K] | |
> | | | E
> +-----------|-----------|---------B 2N3906
> | | | C
> | | E |
> | +--[10K]--B 2N3906 |
> [10k] | C |
> | | | |
> | C |A |A
>VIN>-------+--[10k]--B 2N3904 [DISPLAY] [DISPLAY]
> E | |
> | [150R] [150R]
> | | |
>GND>-------------------+-----------+-----------+

---
Oops...

Missed the part about when the input signal floats.

JF

Similar ThreadsPosted
Driving two transistors with same signal May 8, 2008, 1:11 pm
LED driving; MOSFETs or Transistors? January 26, 2007, 3:23 pm
How to identify diodes from diodes, transistors from other transistors, IC's and LED's October 24, 2007, 5:56 am
How is the amplitude component of an audio signal encoded in an FM signal? December 15, 2007, 12:19 am
Small signal vs. Large signal analysis January 11, 2005, 9:14 am
Mixed Signal Oscilloscopes vs Digital Signal Oscilloscopes (MSO vs DSO) November 25, 2005, 8:05 pm
Driving an LED September 1, 2004, 5:03 pm
Re: Driving an LED September 1, 2004, 6:14 pm
Re: Driving an LED September 1, 2004, 10:51 pm
Driving a LED from an IC July 24, 2006, 3:33 am
Driving a DS1393 from a PIC or AVR December 8, 2004, 4:57 am
LED driving questions. April 19, 2006, 5:14 am
Coil driving October 13, 2007, 1:58 pm
Driving 555 IC with a pulse stream November 15, 2004, 2:55 am
Driving a transistor array March 4, 2005, 1:16 am