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

Discussion in 'General Electronics Chat' started by rougie, Aug 9, 2013.

  1. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    Hello,

    I still have difficulty with transistors... It is rather difficult designing on my own as it never turns out as expected LOL!!! This question was part of an older post concerning a bad design I did with a mosfet. For reasons out of my control, today I finally got the chance to work on this. Q3 was innitially a mosfet... but its threshold voltage was unstable from one part to another. So now I have replaced the mosfet with a transistor Q3.



    Can someone please give look and see what I am doing wrong...

    I sincerely thank all!
    r
     
    Last edited: Aug 19, 2013
  2. BobTPH

    Active Member

    Jun 5, 2013
    785
    114
    Why are you stacking 3 transistors like that? If you need an 3 input AND function, put this before the final driver stage which should have only 1 transistor.

    Also, if the voltages are as shown in your diagram, transistors Q1 and Q2 would be off becuase the base voltage is lower than the emitter voltage.

    Bob
     
  3. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,060
    I think your rate-limiting step is Q2, due to the 10k resistor on its base. It's throttling it's load current. You've marked "1.1V" on it, but I'm not sure what that means - that's ∆V between what two points? If it's compared to ground, then the transistor is off.
     
  4. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    old post not required anymore
     
    Last edited: Aug 19, 2013
  5. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    It isn't just the base voltage that's important, it's the base to emitter voltage. That must be around 0.7V to turn the transistor on.
     
  6. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,060
    Thanks for making a better drawing. It helps a lot.

    The voltage to ground for all 3 transistors' bases is irrelevant, since they are all in emitter-follower configuration. What matters is the base-emitter voltage drop.

    As you have observed, the current of ~30mA is flowing, producing about 0.3V on the emitter (and collector) of Q3. A base voltage of 1.1V means Vbe is 0.8V, and the transistor is on.

    Where is the voltage on the base of Q2 coming from? Is this reading just the meter reading, with nothing else attached? I'm surprised it's conducting at all with no base current.

    Q1 is throttled by the 10k resistor. Rule of thumb for operating a transistor as a switch is that you want the base current to be ~10% of the load. So you need about 5mA for 50mA of LED current. The voltage drop across the resistor is only 0.4V, so that 10k is way too big. Again, I'm a bit surprised you're getting even 30mA through it. Anyway it's not fully on.
     
  7. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    old post not required anymore
     
    Last edited: Aug 19, 2013
  8. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    Note that the IR LED and RE are NOT in series. You have the base currents from two transistors that go through RE but do not go through the LED. You diagram itself shows that the bottom transistor is in saturation resulting in significant base current in it.

    Instead of giving us a schematic and forcing us to try to figure out what you are trying to accomplish with it, why not tell us what it is that you are trying to do?

    For instance: I want to use a 3.3V logic signal to turn on and off an IR LED that is powered by 5V and have the LED have 100mA of current in it when it is on.

    Is that close?

    If so, then you do NOT want the bottom transistor acting as a switch, but rather as a current source.

    If you put a single transistor between the IR LED and RE and then drive the base directly from a 3.3V logic source, the IR LED will be off when the logic output is LO and when it is HI the voltage at the emitter will be about 2.55V (you will probably have about 750mV base-emitter drop at a collector current of 100mA). If you put a 25Ω resistor for the emitter resistor, it will have about 100mA in it. You will likely have a couple milliamps of base current that your logic source will have to supply. If your total supply if 5V and you drop 1.3V across the LED, then your transistor will have a Vce of about 1.2V, which will mean that it will be dissipating about 120mW. If you are using a TO-92 cased part, then your thermal resistance from case to ambient is about 200°C/W, so your junction will be about 24°C above ambient. If ambient is room temperature, then you have to derate the part by 5mW/°C above 25°C, so by about 120mW. Since the part is rated for 625mW, the derated operation would be at about 500mW, which is comfortably above the 120mW you will actually be running it at.
     
  9. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    @rougie

    One interesting point about your observations has to do with the measurement of current. To measure current at various locations in the circuit one assumes you had to open the circuit & insert a meter set to the mA range.

    Did it occur to you that there are potential anomalies that can arise? Consider the Q3 emitter observations. You have RE=5 Ohms. IRE=55.3mA. VRE=0.382V. Have you considered the conundrum of reconciling these measurements?
     
  10. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    V should of been 0.276v... I don't know why I measured 0.382V... could be a mistake...
    today I will measure again.
     
  11. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    old post not required anymore
     
    Last edited: Aug 19, 2013
  12. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,060
    One quick simplification I would make is to place the IR LED and RE up at the top, connected to 5V. This way, when all transistors are on, the transistors are close to being grounded at their emitters. At least Q3 can function as a normal switch then.

    Q2 is your throttle, so you'll need to control the base current. You haven't shown any resistor in between the op-amp and the base. Controlling the op-amp to deliver a controlled current - not voltage - will give you the control I think you want.

    Q1 is also acting as a switch and as long as you give it plenty of voltage, the current through the 100Ω resistor will be enough to saturate Q1 to turn it on, if the two other transistors are conducting.
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    Thanks for the explanation. It's very difficult to make suggestions and observations that are consistent with a project's goals and contraints until the goals and constraints are provided.

    So let's see if I've got this straight.

    You want a circuit that has three control inputs in order to achieve the following goal: Modulate an IR LED on-off at 38kHz with one 3.3V logic input, set the maximum LED current amplitude with a second 0V-5V analog input, and ramp the amplitude from 0% to 100% with a third 0V-5V analog input (which may only go between two voltage levels somewhere within that range). If that's a reasonable descriptin of the goals and constraints, then we can work at crafting a circuit that satisfies them.

    You mentioned a couple of times that the prior circuit had too much variation in the threshold voltage of the MOSFET. What behavior was this manifesting itself in that was unacceptable and what amount of that unwanted behavior is acceptable?

    Regarding the mismatch between the RE current and the LED current, there are two causes, both of which have been mentioned.

    First, Q2 and Q3 both have a base current that goes through RE that does NOT go through the LED. Hence, the LED current will be lower than the RE current. Notice that your own diagram indicates a Q3 base current of 12mA. This means that the LED current is at least 12mA lower than the RE current.

    Second, when you insert a ammeter into the circuit in series with RE, you have inserted an additional resistor, namely the resistance of the ammeter. With an RE of 5.4Ω, you say you are getting a voltage of 0.612V and a current of 85.3mA. Those numbers aren't consistent - a voltage of 0.612V and a current of 85.3mA implies a resistance of 7.2Ω. Now, that is assuming that the 0.612V is the voltage at the top of RE at the same time that the ammeter is in the circuit. If not, then there is no point trying to make heads or tails of the numbers because they come from two different circuits.
     
  14. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,060
    I'd also eliminate the 390Ω resistor below R1. It's nothing but an uneccesary load to the DAC. Even better, replace Q3 with a logic level MOSFET. Then you can eliminate both those bias resistors and control directly with the DAC.

    Another change you could consider is using Q3 to control the base of either of the other two transistors, or maybe even the input to the op-amp. Turning off either Q1 or Q2 accomplishes the same thing that Q3 is now doing. One less transistor in the current path. Of course setting the duty cycle of the PWM to Q1 to 0% would also turn it all off.
     
  15. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    old post not required anymore
     
    Last edited: Aug 19, 2013
  16. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    I'm not seeing the correction. What is different between what you have here and what I put together. I'm not seeing it.

    Where do the 0.531V to 1.1V numbers come from? Are these constraints that the design has to work with, or are they just the values that happened to work for on incarnation of the design?

    What do you mean that the signal applied to Q2 "constantly ramps"? What happens after it reaches full on?

    I'm accepting that you want/need three separate inputs for these functions, but am curious why you can't just use a single DAC to control the current and then shape the waveform however you want to in software? As I said, until you state otherwise, I will limit my recommendations to a three-input solution.

    But you just got done saying that you need the ramp to go from 0.531V to 1.1V, so having to go to 1.4V would NOT be what you want. Is it okay if you have to go to 1.4V? If so, then what are your constraints?

    Think of it this way. You are two people - a customer and a vendor (or think of yourself as the customer and us as the vendor). Make zero assumptions about what the vendor knows regarding what is acceptable to you. Make zero assumptions about what the customer knows about what is inside the black box that the vendor is selling you.

    It is the customer's job (working with the vendor, if necessary) to define what behaviors the block box has to exhibit at its interface in order to be acceptable. It is the vendor's job (working with the customer, if necessry) to put something inside a black box that exhibits the behaviors at its interface that the customer has said are acceptable.

    The interface is simple -- you have three signal inputs, one output, and ground. As it presently stands, the three signal inputs are all voltage inputs. The one output is the IR LED current. Think of the project as literally as a block box with a ground connection, three signal ports, and a socket into which you plug an IR LED. As the customer you neither know nor care what is inside the box. Limit your descriptions to what you will do to the box and what you need the box to do in response. As the vendor, you neither know nor care what is outside the box. Limit your description to what the box will do in response to the signals it sees applied to it.

    Any time you change any part the circuit will be different. Accept that. The question is how much difference is acceptable? You can't be qualitative about this. You've indicated that the variation in threshold voltage from one MOSFET to another resulted in an unacceptable variation in the IR LED current. Okay, how much of a change are we talking about? More importantly, how much change can you tolerate and still consider it acceptable? If 10% is tolerable, then there is a lot that cab be done cheaply. If 1% is unacceptable, then things are going to get a lot more spendy.

    How do you know that the LED current is higher than the RE current? Did you measure both currents at the same time, or did you put the meter in one place and measure the IR LED current and then move the meter to another place and measure the RE current? If so, then you are changing the circuit and comparing apples and oranges.

    Your reading with the meter in series with the IR LED is probably pretty accurate, but as soon as you put the meter in series with RE, you have changed the circuit significantly -- this topology is VERY sensitive to the emitter resistance.

    The best thing to do is forget that your meter can be used as an ammeter and use it strictly as a voltmeter (or ohmeter when appropriate). To find the current, measure the voltage across a known resistance and calculate the current through it. The "known" resistance can come from measuring the resistance with your meter out of the circuit -- as long as you aren't putting enough current to make it more than warm to the touch, you are probably fine.
     
  17. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    old post not required anymore
     
    Last edited: Aug 19, 2013
  18. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    Okay, so now it appears that whatever circuit you have must go from 0% to 100% as the input goes from 0.531V (not 0.51V or 0.56V) to 1.4V (not 1.2V or 1.5V). That, if you are given a circuit that would require you to apply a ramp that goes from 0.5V to 2.0V that you would deem this unacceptable, that it needs to go from 0.531V to 1.4V and nothing else.

    If this isn't the case, then what are the requirements?

    To get a handle on this, ask yourself what the lowest voltage is that your system that supplies this signal can go? Then ask what the highest voltage is that it can go. Then ask yourself the minimum voltage difference between the 100% signal and the 0% signal is. For example, if it went from 0% at 1.00V and 100% at 1.05V, this would probably not be acceptable. Your original system had a swing of 1.1V-0.531V=0.569V, so would a circuit that went 0% to 100% over a swing of 0.5V be acceptable, say from 0.2V to 0.7V or 1.8V to 2.3V?

    That may or may not be too easy. What tolerance parts are you presently working with, particularly your RE?

    Because, the base-bias network hold the Q3 base voltage at a particular voltage (assuming the part is not in saturation, which your diagrams show that it is). But whatever the base voltage is, the emitter voltage (unless the transistor is cutoff) is about 0.6V less than that, largely independent of what value of RE is (within reason). If RE changes by 10%, then the current changes by 10%. But above the transistor the circuit is reasonably insensitive to the insertion of resistance (again, within reason) as the collector voltage of the transistors will change to accommodate it and keep the current close to the same value.

    What is the rated accuracy of your meter on the range you are using?

    Look at your own diagrams! The one in Post #1 shows a Q3 base current of 6.9mA. The one in Post #4 shows a Q3 base current of 9.1mA. You diagram in Post #11 shows 12mA. Where are these currents going? The ONLY place they CAN go is through the base-emitter junction of Q3 and then through RE. Yet these currents are NOT going through the IR LED!

    If you want to keep the variation in the IR LED current to anything approaching 4%, then you CANNOT let Q3 saturate!

    Also -- and I shudder to even mention this -- the linearity of the ramp as the signal going to Q2 is probably not very good. But if you have determined that it is "good enough", that is all that matters.

    I'll throw together a circuit that I think may do what you are trying to achieve and post that and then we can discuss it.
     
    Last edited: Aug 11, 2013
  19. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    Consider the following circuit:

    [​IMG]

    Let's walk through it and see how it works.

    R1 and R2 form a voltage divider to produce a suitable voltage at the base of Q3. This holds the emitter of Q3 one diode voltage drop below that point, which then establishes the current that flows in RE. Thus, Vlevel controls the full scale current in the IR LED.

    Q2 and R3 provide a means to bypass Q3 and inject current into RE that does not go through the IR LED. Thus Vramp can control dynamically control the IR LED current. One thing to note is that the polarity of Vramp is the reverse of what you presently have, namely as the Vramp voltage goes up, the IR LED current goes down. If this is a problem, then there are ways to reverse the polarity to make it match what you presently have.

    Q1 is used as a switch and functions by either shorting out the IR LED or not. If Vmod is LO, then Q1 is turned on which turns off the IR LED. If Vmod is HI, then Q1 is turned off which turns on the IR LED. The purpose of R6 and R7 is to form a level shifter to go from the 3.3V logic you've indicated to the 5V level needed by Q1.

    The role of R4 and R5 is simply to take up some of the excess voltage to prevent the transistors from dissipating as much heat. They may be omitted if the transistor power dissipation is tolerable.

    The reasons why this topology was chosen:

    The signals that dictate the amplitude of the IR LED current, namely Vramp and Vlevel, are analog signals referenced to GND. Thus, we do not want to do anything that would result in changes in Vcc significantly affecting them.

    The signal that gates the IR LED current, namely Vmod, is a digital signal and thus we don't care too much about how changes in Vcc affect it since we intend to swing it enough to overwhelm any such changes.

    This circuit is designed to keep Q2 and Q3 active at all times -- though this is a bit contingent on not swinging Vramp to far in either direction. This is useful because it keeps the transistors responsive - it takes time to transition from either cutoff or saturation into the active region, though at 38kHz this is not too much of a concern.

    If this is of interest to you, we can walk through the sizing of the resistors so that the circuit is very insensitive to changes in transistor β. We can also identify which resistor values are pretty critical and which ones can be pretty loose.
     
  20. rougie

    Thread Starter Active Member

    Dec 11, 2006
    410
    2
    old post not required anymore
     
    Last edited: Aug 19, 2013
Loading...