Driving tri-state LED matrix

The objective is as follows: uC pin set as output high: The Green LED lights up uC pin set as output low: The Red LED lights up uC pin set as input: Both LED's are off

There will never be a time when both LED's are lit.

Here's what I'm currently thinking of for the circuit:

As you can see, I've marked the current path from Vcc, thru a PNP transistor, thru an NPN transistor, to ground. As far as I'm aware, this current path will be problematic in that it will in theory keep both transistors always turned on. What I'm puzzled about, however, is that I used this exact same setup for my college project and it worked perfectly... but I don't see how both transistors weren't always turned on. There will be 700 mV dropped across each BE junction, granted, but then that still leaves 3.6 V to be dropped across bare metal... so I thought there should have been a high enough current for both transistors to be turned on?? I used BC337's and BC327's for my project.

Reply to
Tomás Ó hÉilidhe
Loading thread data ...

My link disappeared for some reason. Here it is:

formatting link

Reply to
Tomás Ó hÉilidhe

Try redrawing this in a conventional manner, with Vcc at the top. I started looking at this diagram but I lost interest the minute I saw that I was going to have to unravel the circuit before considering it. There's only so much time people are willing to invest in considering a news post.

--
Andrew Smallshaw
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw

Are you talking about the way the emitter on the PNP is the bottom pin rather than the top pin? If so:

formatting link

Reply to
Tomás Ó hÉilidhe

Are you talking about the way the emitter on the PNP is the bottom pin rather than the top pin? If so:

formatting link

Tomas -

There is a reason for transistor symbols looking a bit like a diode between the base and emitter. In your circuit a big current will flow from VCC through the emitter and out of the base of the first (leftmost) PNP transistor, into the base and out of the emitter of the NPN transistor. The second PNP transistor will turn on, the first two transistors will be destroyed.

Why not download SwitcheCAD from

formatting link
and simulate your ciruits.

Michael Kellett

formatting link

Reply to
MK

e

See this is exactly what I was thinking... but miraculously this worked perfectly in my college project. Even if my board mixed up the collector with the emitter for one of the transistors, it still doesn't explain why both transistors weren't always turned on... ?!

Reply to
Tomás Ó hÉilidhe

Transistors work with emitter/collector exchanged. Their efficiency, Vcc, etc. are sharply curtailed. They are not characterized for such operation.

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.

** Posted from http://www.teranews.com **
Reply to
CBFalconer

Is there anyway I can get this to work... ? I'm thinking of using one BJT and one FET, and also a pull-up/down resistor. I'll make up a circuit and post a picture.

Reply to
Tomás Ó hÉilidhe

OK here's what I've got:

formatting link

A few points about it:

  • Because the source of the NMOS isn't going directly to ground, I have to get a FET that has a 4th pin for the bulk.
  • The 10k is a suitable resistor value to put the transistor into saturation.
  • The 200k is a pull-down resistor to ensure that the NMOS gate is kept low when the uC pin is set to high-impedence. This resistor should be as high as possible to ensure that it doesn't provide a current path that will turn on the PNP transistor all the time, but at the same time it has to be significantly smaller than the output resistance of the uC pin to ensure that the entire 5 V is dropped within uC, leaving close enough to 0 V across the 200k resistor.

Any thoughts? (..other than the repetitive "get yourself a uC with more pins")

Reply to
Tomás Ó hÉilidhe

I have already suggested the MOSFET drivers that preserve the

3 State Pin sense. Many now do this, to allow lower idle powers in SMPS.

Much lower parts count, and no gymnastics.

-jg

Reply to
Jim Granville

At this point you can put on a shift register and actually use fewer pins on the micro.

Robert

** Posted from
formatting link
**
Reply to
Robert Adsett

Sorry I can't find your post where you mentioned those drivers. Are you saying that there's a driver chip out there that will preserve the tri-stateness of the uC pin?

Reply to
Tomás Ó hÉilidhe

Yes, Devices like this , Drive HL, LH, and LL on Tristate, 2-3A drive spec.

formatting link

It is an emerging design trend in SPMS, to allow the flywheel FET to not discharge the load in low current situations.

Such devices can also level shift, allowing the LED drive to come from before the regulator (saves power in the regulator, improves LED load line)

-jg

Reply to
Jim Granville

I don't see how this circuit will work any better than your other one. In fact, I think it will work very poorly. I don't think you are considering the voltages in the circuit. If you have thought about that, what will the voltage be at the source of the NMOS FET when it is turned on? What will be the voltage at the emitter of the BJT when it is turned on? What will be the current in the LED in either case? What is the voltage on the base of the BJT when the MCU output is tristate? What will be the current in the two LEDs when the MCU output is tristate?

Instead of going with exotic parts, why don't you try using a practical circuit arrangement? Is there a reason that you used an NMOS FET with a PNP BJT instead of a PMOS FET and an NPN BJT? If you consider the fact that the BJT has a BE voltage of 0.7 volts when on and the FET has anywhere from 2 to 5 volts when on, I think you will find that the BJT is the part you want to use in the emitter follower configuration, not the FET.

Do you know what an emitter follower is? I believe you are looking at the components with too simplistic of a model. You need to understand the difference between current gain and voltage gain and how a FET vs. a BJT achieve each. The look at the circuit in smaller parts. Just consider what it will take to turn an LED on at a particular drive level using both types of FETs and then do the same with BJTs. The consider what happen with each circuit when the input is undriven. Only then are you ready to consider how to combine the circuits to do what you want.

BTW, someone already suggested that you download the Linear Technology SwitcherCAD (Spice) program to simulate your circuits. This is a very easy program to use, there is an excellent support group on Yahoo and you will be able to see *exactly* what is going on without building anything and burning it up.

The typical design process is to first analyze new circuits using paper and pencil based on theory. Then simulate the circuit to see if it behaves as you expect. Only then does an engineer bother to build a new circuit to test it. Testing is the worst way to verify if something works because it is *very* hard to test under all conditions. So you have only proven that the thing works on your bench, not in real world conditions (which include more than a week running time). Testing is really done to verify that nothing stupid was done in the earlier parts. After all, simulation is limited by the GIGO phenomenon (Garbage In - Garbage Out).

To be honest, your posts here are getting a little old. Not that you are asking questions, but that you aren't putting much effort into answering them yourself. Once you have figured out what will work and what won't, then I would be happy to see you post your circuit and ask for comments.

Rick

Reply to
rickman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.