Maker Pro
Maker Pro

Driving two transistors with same signal

V

vic

Jan 1, 1970
0
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.
 
E

ehsjr

Jan 1, 1970
0
vic said:
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.

Add diodes to isolate the bases, and resistors
to bias the transistors off when the desired
on signal is not present.

Ed

see below



VCC
+
|
+-------------+
| |
[R] |
| ___ |<
o--------|<------+----|___|--|
| |\
| VCC |
| + |
| | Display2
| | |
| ___ |/ |
Input---o--->|-+-|___|--| GND
| |>
[R] |
| |
| Display1
| |
+----------+
|
GND
 
P

petrus bitbyter

Jan 1, 1970
0
vic said:
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 circuit. Choose the resistor values to limit the base current into
the transistors, yet this current should be high enough to drive the
transistors into saturation.

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


If your displays need GND on one side, then try this. Mind the type of the
transistors.

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

petrus bitbyter
 
R

Rich Grise

Jan 1, 1970
0
A simpler solution is to remove the diodes, change the
locations of the added resistors, and move Display1. I.e.:

VCC
+
|
+---------+
| |
[R1] |
| |<
o-------------[R2]---+-------|
| |\
| VCC |
| + |
| | Display2
| Display1 |
| | |
| |/ |
Input---o-----[R2]-+--------| GND
| |>
[R1] |
| |
+----------+
|
GND

The R1 / R2 resistor pairs need to be chosen so that
there is only about 0.5 volts across the transistors'
base-emitter junctions when the input is floating.
When the input is floating, the various resistors
will pull the input to VCC/2. The value of 0.5 volts was
chosen to be low enough to keep the transistors from
turning on when the input is floating but still allow the
transistors to be turned on when the input is being driven
to VCC or ground.

This looks a little iffy - when there's no drive, then both
bases will still be forward biased unless you divide the
drive down so dramatically that you don't^H^H^H^H^Hmight not
get full saturation when it's supposed to be on.

A much more elegant solution uses two NPN's (the same thing could be
done with two PMP's, just turn the arrows around and the power
supply upside down. ;-) )


Vcc Vcc
| |
| [Display 2]
| |
[Display 1] |
| |/
+--[R]---+---|
| | |>
|/ [R] |
Control --[R]--+--| | |
| |> | |
[R] | | |
| | | |
gnd gnd gnd gnd

The resistors can be anything from around 4.7K to maybe 22K.

Cheers!
Rich
 
P

petrus bitbyter

Jan 1, 1970
0
Dan Coby said:
ehsjr said:
vic said:
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.

Add diodes to isolate the bases, and resistors
to bias the transistors off when the desired
on signal is not present.

Ed

see below



VCC
+
|
+-------------+
| |
[R] |
| ___ |<
o--------|<------+----|___|--|
| |\
| VCC |
| + |
| | Display2
| | |
| ___ |/ |
Input---o--->|-+-|___|--| GND
| |>
[R] |
| |
| Display1
| |
+----------+
|
GND

The revised circuit does not solve the problem. Both diodes
will be conducting when the input is floating. As a result both
displays will still be on.

A simpler solution is to remove the diodes, change the
locations of the added resistors, and move Display1. I.e.:

VCC
+
|
+---------+
| |
[R1] |
| |<
o-------------[R2]---+-------|
| |\
| VCC |
| + |
| | Display2
| Display1 |
| | |
| |/ |
Input---o-----[R2]-+--------| GND
| |>
[R1] |
| |
+----------+
|
GND

The R1 / R2 resistor pairs need to be chosen so that
there is only about 0.5 volts across the transistors'
base-emitter junctions when the input is floating.
When the input is floating, the various resistors
will pull the input to VCC/2. The value of 0.5 volts was
chosen to be low enough to keep the transistors from
turning on when the input is floating but still allow the
transistors to be turned on when the input is being driven
to VCC or ground.

This may work, (so there are some ifs.)
Most important, the driving source must be able to provide the extra current
(sink and source).
The displays may need GND on one side. The OP did not said so, but his
schematic suggests it.
You need to do a little bit of serious calculation to find the values of the
resistors. The voltages are important as you mentioned already, but the base
currents need to be high enough to switch the transistors on when active. I
leave it an excercise for the interested reader.

petrus bitbyter
 
E

ehsjr

Jan 1, 1970
0
Dan said:
vic said:
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.

Add diodes to isolate the bases, and resistors
to bias the transistors off when the desired
on signal is not present.

Ed

see below



VCC
+
|
+-------------+
| |
[R] |
| ___ |<
o--------|<------+----|___|--|
| |\
| VCC |
| + |
| | Display2
| | |
| ___ |/ |
Input---o--->|-+-|___|--| GND
| |>
[R] |
| |
| Display1
| |
+----------+
|
GND


The revised circuit does not solve the problem. Both diodes
will be conducting when the input is floating. As a result both
displays will still be on.

You're right - my circuit fails. Thanks
for spotting the error.

Ed
 
V

vic

Jan 1, 1970
0
petrus said:
The displays may need GND on one side. The OP did not said so, but his
schematic suggests it.

Yes, as I said I'm driving common-anode 7 segments displays, so I can
only use transistors on the "plus" side of the displays. This is part of
my problem :)
 
V

vic

Jan 1, 1970
0
BobW said:
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 :)
 
V

vic

Jan 1, 1970
0
Dan said:
ehsjr said:
vic said:
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.
Add diodes to isolate the bases, and resistors
to bias the transistors off when the desired
on signal is not present.

Ed

see below



VCC
+
|
+-------------+
| |
[R] |
| ___ |<
o--------|<------+----|___|--|
| |\
| VCC |
| + |
| | Display2
| | |
| ___ |/ |
Input---o--->|-+-|___|--| GND
| |>
[R] |
| |
| Display1
| |
+----------+
|
GND

The revised circuit does not solve the problem. Both diodes
will be conducting when the input is floating. As a result both
displays will still be on.

Would it work if, instead of diodes, I used Zener diodes of voltage
around Vcc/2 ?
 
P

petrus bitbyter

Jan 1, 1970
0
vic said:
*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
 
P

petrus bitbyter

Jan 1, 1970
0
petrus bitbyter said:
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
 
V

vic

Jan 1, 1970
0
petrus said:
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 !
 
V

vic

Jan 1, 1970
0
Thank you to all for your support.

I solved my problem temporarily by using the "bias Vbe to 0.5V"
solution. However I had some issues with the transistors still leaking
some current when OFF, and not having the same current when ON. I
reduced Vbe even more to make the OFF current not visible on the
displays, and ON current almost equal. Still not as pleasing visually as
separate drives for each transistor.

The 5 transistors solution seems definately more reliable and less
sensitive to resistor values.

Next time, I'll make sure to use one signal to control each display :)

Thanks again.
 
P

petrus bitbyter

Jan 1, 1970
0
vic said:
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
 
Top