What can I say... still just don't get it? Transistors!

wayneh

Joined Sep 9, 2010
17,498
I like it. I was also thinking about using the transistors as bypasses.

Just wondering - I see all 3 transistors control at the level of the load current flow. I was thinking it might somehow make more sense to control the signals to one or more of those transistors, at their bases, rather than the main power. I couldn't really come up with a good idea but the scheme of 3 serial transistors just rubbed me the wrong way.
 

BobTPH

Joined Jun 5, 2013
8,967
Q1's gate is 0 to 3.3 volts... this is coming out of a CPLD. So therefore we can go straight from the CPLD to Q1's gate through a current limiting resistor.
No, because 3.3V will not turn Q1 off when Q1's emitter is at 5V. That would be Vbe at -1.6V which would not only turn the transistor on but would cause a lot of current to flow from E to B, driving your uController voltage too high.

You should almost never drive a base directly from a uController output.

Bob
 

Thread Starter

rougie

Joined Dec 11, 2006
410
No, because 3.3V will not turn Q1 off when Q1's emitter is at 5V. That would be Vbe at -1.6V which would not only turn the transistor on but would cause a lot of current to flow from E to B, driving your uController voltage too high.
There's no 5vdc.... the signal is 0-3.3vdc.

What's the diff between fig1 and fig2?
 

Attachments

Last edited:

BobTPH

Joined Jun 5, 2013
8,967
The emitter of Q1 is at 5V. If the base is at 3.3V it will go up in flames. Of course it won't really, because the uController can't supply enough current, but Q1 (a PNP) will be turned on fully with 5V on the emitter and a high output from the uController at 3.3V.

Okay, I now see that you said through a current limiting resistor, sorry. It will not go up in flame, but the transistor will be on when you have the emitter at 5V and the base connected to 3.3V through a resistor.

Bob
 

WBahn

Joined Mar 31, 2012
30,062
I like it. I was also thinking about using the transistors as bypasses.

Just wondering - I see all 3 transistors control at the level of the load current flow. I was thinking it might somehow make more sense to control the signals to one or more of those transistors, at their bases, rather than the main power. I couldn't really come up with a good idea but the scheme of 3 serial transistors just rubbed me the wrong way.
I'd love to. What I would like is to use a single current source that has a high output impedance, such as a basic mirror with a cascode transistor or a Wilson mirror, that has a x10 gain or something similar and then have the three control signals control a programming current into that mirror so that they can work with milliamp level signals while still keep the base-currents negligible in comparison.

But the OP won't give me a set of rational interface specs to work with. He doesn't seem able to grasp the concept of a black-box design in which the customer describes what they are willing to accept at the interface. He keeps insisting that the design just has to use the same voltage levels that his latest design happens to use even though he has demonstrated that he's willing to change those if HE changes the design. He can't separate himself from his current design and adopt the notion of a generic black-box design that does what he NEEDS but may involve a different interface.

I've been trying to feel out how much different that interface can be and still be acceptable, and he just seems locked into having 0.531V for 0% and 1.4V for 100%. I could understand such a position if the situation were that he has a bunch of these already built and that is what they are hardcoded to do and changing that would be an unacceptable effort in terms of cost or time, but that doesn't appear to be the case here.
 

WBahn

Joined Mar 31, 2012
30,062
That's impressive, I never would of rationalized it that way. I get the whole circuit except where R3 and Q3's emitter meet. Is the RE current the sum of the current through R3 and the current coming out of Q3's emmiter?
Yes.

If this is so, therefore, as Q2 would increase its current flow, so would IRE and thus increasing VRE and thereby limiting the current through the IR led.... is this right?
Yes and no. As long as Q3 is on, it will hold the voltage at the top of RE to about 0.7V and so the current through RE will be pretty constant. As Q2 increases the current through R3, this will be compensated for by Q3 its collector current (and, hence, the IR LED current) accordingly.

Unfortunately, we need the reverse to happen... as the Vramp voltage goes up, the IR LED current goes up. When vramp = 0.531v the IRled is at 0% and when vramp is at 1.4VDC the IRLED is at 100%.
But WHY???

Those are numbers that happen to be what you need to use for one particular circuit topology. Why do you HAVE to have those EXACT same values for a DIFFERENT circuit topology?

Look, if you were paying me $125/hr I would make one or two attempts to get you to look at the interface through a rational set of lenses and then just throw up my hands and say, "You're the customer. If that's what you WANT, then that is what I will design and you can just pay me the extra several hundred or couple thousand dollars to get what you WANT above and beyond what you NEED." But if I'm doing a design for free, I'm not too interested in spending a bunch of time meeting an irrational interface requirement.

Q1's gate is 0 to 3.3 volts... this is coming out of a CPLD. So therefore we can go straight from the CPLD to Q1's gate through a current limiting resistor.
No, you can't. In order to shut off Q1, you have to get it's gate voltage above ~4.4V with no current flowing in the base of Q1. That means a pullup resistor that can supply whatever current is required in the other resistor when there is the necessary voltage drop across it.

Concerning Q2, since this is a new design, my 0.531 to 1.4VDC may not work in your circuit anymore.
Which is why I have been trying to get you to tell me what your control circuit can generate for this signal -- it doesn't matter what it happens to need to be for a particular circuit you are currently using. The very fact that you are considering changing the circuit means that you aren't going to have the same circuit any more. So unless you can provide a rational reason why the new circuit has to use these exact same values, why can't you accept different values. And, if you can, what values can you accept?

So Q2's gate voltage swing is the voltage swing require to make the current go from 0% to 100% of what Q3 is set to. Remember though, right now at this instance, Q2's base has 0.531 to 1.1VDC swing which I am getting ready to change it to 0.531 to 1.4VDC. So whatever voltage swing you will need for your circuit to work properly, I will have to modify the op amp circuit accordingly.
And the question comes down to, are you willing to modify the op amp circuit and, if so, to what degree? Are you willing to modify it so that it ramps downward from some Vhigh to some Vlow? If so, what values of Vhigh and Vlow can you work with? Or is modifying it so that if ramps downward too much trouble and so you need to impose the constraint of requiring that it ramp upward? If so, it will ramp from some Vlow to some Vhigh and, again, the question is what are acceptable values for Vlow and Vhigh?

So yes I am up for the challenge!!! I have three identical circuits like this to do. I will complete one of them with my circuit and I will do another one with your circuit as this will allow me to compare different typologies.

One thing though WBahn, I will need your guidance to accomplish your circuit, because I never did this type of transistor configuration before. In parallel with this I am getting acquainted with op amps as you can see from my last post.

Thanks for your help... really appreciated.
I'll walk you through the component selection a bit later. In doing so, I may opt to tweak the circuit to use Darlington's to reduce the base current loading on the control circuits.

It would be very, very, very help if you could get me the I/O specs for the three outputs you are using to generate your signals. For the CPLD, I need to know the maximum output LO voltage and what current that is spec'ed at and also what the minimum output HI voltage is and the current that that is spec'ed at. Since we are going to be operating this output with a level shifter, it would be nice to know what the maximum protection current is.

Frankly, I would like to add another transistor and invert the modulation control so that it is directly compatible with 3.3V logic. But that would involve flipping the polarity of the signal and that just strikes me as opening a whole new can of worms as you insist that the old circuit turns on the IR LED when the CPLD output goes HI and therefore the new circuit has to, as well.
 

WBahn

Joined Mar 31, 2012
30,062
There's no 5vdc.... the signal is 0-3.3vdc.

What's the diff between fig1 and fig2?
Fig 1 won't work and Fig 2 will.

In Fig 1 you are using an NPN transistor. In Fig 2, you are showing a PNP transistor (which is what you want) even though you are specing a 2n2222, which is an NPN transistor.

When there is current flowing in the IR LED, it's cathode voltage will be at about 3.6V. So to turn on Q1, you have to get the base current above about 4.3V. Hence, with a 3.3V signal, you will never be able to turn Q1 on.
 

t_n_k

Joined Mar 6, 2009
5,455
The emitter of Q1 is at 5V. If the base is at 3.3V it will go up in flames. Of course it won't really, because the uController can't supply enough current, but Q1 (a PNP) will be turned on fully with 5V on the emitter and a high output from the uController at 3.3V.

Okay, I now see that you said through a current limiting resistor, sorry. It will not go up in flame, but the transistor will be on when you have the emitter at 5V and the base connected to 3.3V through a resistor.

Bob
Hi Bob

I believe Q1 collector is at 5V rather than Q1's emitter being at 5V.

The consensus seems to be that the OP's design is very crude but not subject to change.
 

wayneh

Joined Sep 9, 2010
17,498
...but if I move the RE to the top, it causes stability problems to the circuit itself. For example, if the RE is at the top as you mention, then when every time I replace Q3 with another 2n2222 with a different beta, the currents are not the same and vary which renders the whole circuit inconsistant !
That is easily fixed because you are using Q3 as a switch, and beta is essentially irrelevant. The simplest solution is to just use a logic level MOSFET instead of a BJT. But even with a BJT, all you have to do is put about 10mA into the base, and you will easily get 100mA flowing. You could also choose a darlington to reduce the need for 10mA down to ~1mA.

Operated properly as a switch, the resistance of the BJT, darlington or MOSFET will fall well under 1Ω, and you will not see the anomalies you've mentioned.
 

Thread Starter

rougie

Joined Dec 11, 2006
410
The emitter of Q1 is at 5V. If the base is at 3.3V it will go up in flames. Of course it won't really, because the uController can't supply enough current, but Q1 (a PNP) will be turned on fully with 5V on the emitter and a high output from the uController at 3.3V.

Okay, I now see that you said through a current limiting resistor, sorry. It will not go up in flame, but the transistor will be on when you have the emitter at 5V and the base connected to 3.3V through a resistor.
Okay, I see it now!
thanks
 

WBahn

Joined Mar 31, 2012
30,062
Okay, that description helps a lot! It has enough detail that I can dig into it and try to pull out a fairly complete interface spec (at least to first order) -- and point out some other things that you may or may not have considered and that may or may not be issues.

The process we are going through right now is not at all uncommon in practical engineering. Person A wants Person B to do something. The hardest part of the process is getting Person A and Person B into agreement on what, exactly, the "something" is. Almost inevitably, both sides have information that the other side needs but the person with the information doesn't realize the other side needs it -- in fact, the side that needs it often isn't aware that they need it!

This is what I call "the fog of engineering" and stems from the fact that if Person A knew everything that they needed to convey to Person B, then chances are they would know enough not to need Person B in the first place (now, that's a huge oversimplification, but you probably get the point).

And this is why the focus on interfaces is so important and valuable. If we can break the design into a bunch of black-box modules then we can each focus on the insides of the black boxes we are responsible for and as long as we adhere to the interface constraints to other modules, then those other modules should be insensitive to the details of how we have implemented the guts of any of the others.

The more time spent up front defining the interfaces the less time spent down the road dealing with the issues that come up because the modules don't behave adequately. But no matter how clearly you get everything defined up front, there will usually be things that creep up along the way that require refining/revising the specs. Those tend to be more costly, so minimizing them up front is the preferred way.

So let me go off and take the information you've provided and come back with a shot at an interface spec that I think will capture your needs and concerns. We can then hash away at it some more as necessary. It'll probably be tomorrow sometime before I get around to it.
 

Thread Starter

rougie

Joined Dec 11, 2006
410
No problem WBahn, take your time!

Anyways tomorrow I will take some time off and experiment
with op amps....

thanks
 

t_n_k

Joined Mar 6, 2009
5,455
Perhaps this is self evident ....

It's somewhat puzzling that one would embark on such a comprehensive experimental study employing this circuit without a clear appreciation of the resulting IR diode electrical parameter response in relation to the three control input signals.

To what extent do the experimental results and the conclusions drawn from those results depend upon a precise knowledge of the overall transmitter electrical behavior? Surely one would want to be abundantly clear on that matter. But the OP seems to have arrived at a realization of this critical issue rather late in the process.

It seems to me this is a tantamount to "putting the cart before the horse". The resulting experimental data in relation the driving parameters have apparently been compiled in the absence of any clear knowledge of the IR transmitter current response in relation to the driving signals. I would assume for instance, one would like to know before undertaking the extensive experimental program, what the IR transmitter current waveform looks like for an indicative range of control input settings. Surely, there's something "missing" from the initial experimental design.
 

WBahn

Joined Mar 31, 2012
30,062
In all fairness, we all tend to assume that the only issues that we have to deal with are the ones we know about. We often need others to point out the myriad issues that we have to deal with that we didn't know about -- and we have to just get bit by the rest and figure them out as we go. There are a number of other issues that I think have been ignored out of ignorance. Again, not unusual and not necessarily a criticism.

For instance, how sensitive will the IR LED output be to temperature changes, both overall ambient temperatures and also individual component temperature changes due to power dissipation. How important is it that a given unit produce the same output as another unit? How important is it that a given unit produce the same output a month from now that it did today?
 
Top