Main Page | Report this Page
 
   
Science Forum Index  »  Electronics - Basics Forum  »  Driving two transistors with same signal...
Page 1 of 2    Goto page 1, 2  Next
Author Message
vic...
Posted: Thu May 08, 2008 12:11 pm
Guest
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.
ehsjr...
Posted: Thu May 08, 2008 1:22 pm
Guest
vic wrote:
Quote:
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
Dan Coby...
Posted: Thu May 08, 2008 5:21 pm
Guest
"ehsjr" <e.h.s.j.r.removethespampunctuation at (no spam) bellatlantic.net> wrote in message
news:cxHUj.28009$zw.4986 at (no spam) trnddc04...
Quote:
vic 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.

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.
petrus bitbyter...
Posted: Thu May 08, 2008 5:21 pm
Guest
"vic" <news at (no spam) bidouille.org> schreef in bericht
news:48233453$0$20289$426a74cc at (no spam) news.free.fr...
Quote:
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
Rich Grise...
Posted: Thu May 08, 2008 6:49 pm
Guest
On Thu, 08 May 2008 15:21:04 -0700, Dan Coby wrote:

Quote:
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. Wink )


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
petrus bitbyter...
Posted: Thu May 08, 2008 7:13 pm
Guest
"Dan Coby" <adcoby at (no spam) earthlink.net> schreef in bericht
news:7vCdnV2xQMRN4b7VnZ2dnUVZ_oqhnZ2d at (no spam) earthlink.com...
Quote:
"ehsjr" <e.h.s.j.r.removethespampunctuation at (no spam) bellatlantic.net> wrote in
message news:cxHUj.28009$zw.4986 at (no spam) trnddc04...
vic 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.

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
BobW...
Posted: Thu May 08, 2008 8:03 pm
Guest
"vic" <news at (no spam) bidouille.org> wrote in message
news:48233453$0$20289$426a74cc at (no spam) news.free.fr...
Quote:
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 ==
BobW...
Posted: Thu May 08, 2008 9:18 pm
Guest
"BobW" <nimby_NEEDSPAM at (no spam) roadrunner.com> wrote in message
news:B7mdnSJSKb17P77VnZ2dnUVZ_obinZ2d at (no spam) giganews.com...
Quote:

"vic" <news at (no spam) bidouille.org> wrote in message
news:48233453$0$20289$426a74cc at (no spam) news.free.fr...
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
--
== NOTE: I automatically delete all Google Group posts due to uncontrolled
SPAM ==
Dan Coby...
Posted: Thu May 08, 2008 11:14 pm
Guest
"petrus bitbyter" <pieterkraltlaatditweg at (no spam) enditookhccnet.nl> wrote in message
news:48239730$0$3654$e4fe514c at (no spam) dreader31.news.xs4all.nl...
Quote:

"Dan Coby" <adcoby at (no spam) earthlink.net> schreef in bericht
news:7vCdnV2xQMRN4b7VnZ2dnUVZ_oqhnZ2d at (no spam) earthlink.com...
"ehsjr" <e.h.s.j.r.removethespampunctuation at (no spam) bellatlantic.net> wrote in message
news:cxHUj.28009$zw.4986 at (no spam) trnddc04...
vic 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.

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

Actually there is not a very large increase in the driving source requirements..
The maximum voltages across the R1 resistors is 0.7 volts. If VCC is 5 volts,
then there is only about a 14% increase in the required drive currents. Some
diodes can be put in series with the transistor bases to decrease the extra
drive requirements and to add some more margin to the circuit.

Quote:
The displays may need GND on one side. The OP did not said so, but his schematic suggests it.

Yes, this may be a concern.
ehsjr...
Posted: Thu May 08, 2008 11:25 pm
Guest
Dan Coby wrote:
Quote:
"ehsjr" <e.h.s.j.r.removethespampunctuation at (no spam) bellatlantic.net> wrote in message
news:cxHUj.28009$zw.4986 at (no spam) trnddc04...

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

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
vic...
Posted: Fri May 09, 2008 8:40 pm
Guest
petrus bitbyter wrote:
Quote:
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 Smile
vic...
Posted: Fri May 09, 2008 8:58 pm
Guest
BobW wrote:
Quote:
"BobW" <nimby_NEEDSPAM at (no spam) roadrunner.com> wrote in message
news:B7mdnSJSKb17P77VnZ2dnUVZ_obinZ2d at (no spam) giganews.com...
"vic" <news at (no spam) bidouille.org> wrote in message
news:48233453$0$20289$426a74cc at (no spam) news.free.fr...
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 Smile
vic...
Posted: Fri May 09, 2008 8:59 pm
Guest
Dan Coby wrote:
Quote:
"ehsjr" <e.h.s.j.r.removethespampunctuation at (no spam) bellatlantic.net> wrote in message
news:cxHUj.28009$zw.4986 at (no spam) trnddc04...
vic 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.
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 ?
BobW...
Posted: Fri May 09, 2008 10:40 pm
Guest
"vic" <news at (no spam) bidouille.org> wrote in message
news:48250145$0$5055$426a74cc at (no spam) news.free.fr...
Quote:
BobW wrote:
"BobW" <nimby_NEEDSPAM at (no spam) roadrunner.com> wrote in message
news:B7mdnSJSKb17P77VnZ2dnUVZ_obinZ2d at (no spam) giganews.com...
"vic" <news at (no spam) bidouille.org> wrote in message
news:48233453$0$20289$426a74cc at (no spam) news.free.fr...
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 Smile

There is always some leakage from collector to base, so R5 is there to
insure that Q3 doesn't conduct when Q1 is off. Same goes for R6/Q4.

Yeah, it's a lot of parts, but your requirements are kinda tough.

If you're only building one of these, and your supply is tightly regulated,
and your temperature range is limited, then the method (I forget who
proposed it) that keeps Vbe at about 0.4V when the drive is high impedance
may work okay.

If it were my project and the thing had to ALWAYS work (in production
quantities, over a varying range of Vcc, temperature, and Voh/Vol), then I'd
use this scheme.

If you have trouble with the resistor values then give a yell. R3 and R4
should be equal if your drive is from a CMOS output (i.e. the output swings
from supply to supply). If it's from an old TTL output, then the voltage at
the R3/R4 connection should be set to about ((2.4V-0.4V)/2)+0.4V = 1.4V
(i.e. the middle of the output swing range for worst-case TTL).

Have fun with it.

Bob
--
== NOTE: I automatically delete all Google Group posts due to uncontrolled
SPAM ==
petrus bitbyter...
Posted: Sat May 10, 2008 8:31 pm
Guest
"petrus bitbyter" <pieterkraltlaatditweg at (no spam) enditookhccnet.nl> schreef in
bericht news:4825926d$0$15509$e4fe514c at (no spam) dreader16.news.xs4all.nl...
Quote:

"vic" <news at (no spam) bidouille.org> schreef in bericht
news:48250145$0$5055$426a74cc at (no spam) news.free.fr...
BobW wrote:
"BobW" <nimby_NEEDSPAM at (no spam) roadrunner.com> wrote in message
news:B7mdnSJSKb17P77VnZ2dnUVZ_obinZ2d at (no spam) giganews.com...
"vic" <news at (no spam) bidouille.org> wrote in message
news:48233453$0$20289$426a74cc at (no spam) news.free.fr...
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
 
Page 1 of 2    Goto page 1, 2  Next   All times are GMT - 5 Hours
The time now is Sun Jul 27, 2008 2:48 am