Use current mirror to avoid variation in HFE?

Discussion in 'The Projects Forum' started by masked, Aug 2, 2010.

  1. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Greetings,

    I ran into an issue where my current regulation wasn't working as expected, and Markd77 pointed out that I was depending on my transistor HFE to be 100. (I tested the transistors, and he was right.)

    Anyway, I learned about current mirrors in the ebook here:
    http://www.allaboutcircuits.com/vol_3/chpt_4/14.html

    So I've replaced one side of my H-bridge with that. Both sides used to look like the red R8, and I made the change to the blue R7.
    I was hoping someone could review it, and make sure my understanding is correct.

    It looks like the benefit is that I can basically ignore the HFE and changes due to temperature when Q10 and Q7 are identical.
    ...and the drawback is that it takes 1 extra component and doubles the H-bridge current draw because the current is "mirrored" across R7.

    Does that sound right?

    Thanks,
    -masked
    [​IMG]
    (desired output is 2.63mA across "Out" leads, with polarity reversing every minute)
     
  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    What is the peak-to-peak voltage across the load?
     
  3. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Maybe I'm misunderstanding the question, but the voltage remains constant at 27V, reversing polarity at 1 minute intervals. So I suppose the peak to peak would be 54V, if you considered this as AC current running at .0083Hz.

    I'm using three 9V because Ohm's law says one 9v battery could only deliver the required 2.64mA at a resistance of 3.4k or less. (.00264A = 9V/3409Ω).

    Whereas, at 27V: (.00264A = 27V/10227Ω)
    So once I get down to 10.2kΩ or lower my circuit maxes out providing 2.64mA.

    Does that answer the question?
     
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I haven't read your other threads. What are you really trying to do? What is the load? Is it a constant 10227Ω?
    I suspect that your circuit is much more complex than it needs to be.
     
  5. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    The load is an electrolysis cell, so in many cases it will have very high resistance. If I start with zinc or silver electrodes, and distilled water with a drop of iodine then the inital resistance will be huge. As zinc or silver iodide forms, and as the metal ions fill the water, the cell becomes more conductive and the resistance will drop towards 10k and then well below (over the course of 30 minutes or so).

    Polarity reversal was just a way for me to minimize the deposits on the anode, and to learn about using an IC.
    The project is mainly to learn, so I'm happy rebuilding it as many times as will be educational. Please do let me know if you have alternate design suggestions.

    Thank you,
    -masked
     
    Last edited: Aug 3, 2010
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Here's how I would do it.
    The 39Ω resistors help compensate the current mirror for Vbe mismatches in the three PNP transistors. In integrated circuits, ballast resistors are usually not required, because all the transistors are on one die, so their base-emitter junctions can be area-matched and thermally matched. This is not the case with discrete transistors.
     
    Last edited: Aug 3, 2010
    masked likes this.
  7. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Very cool. So Q1 is always regulating either Q2 or Q3 depending on which is turned on, and that means I don't need a second "current mirror" for the other side of the bridge.

    Before, I go further, I want to get back to my original question:
    Using Q1 helps compensate for the Vbe mismatch I was experiencing, at the expense of making my bridge draw a few more milliamps (through R1 and R4), right?

    Then as far as operation...
    When the 555 is Low, it looks like:
    1) Q5 is off, so current cannot ground through the B lead.
    2) Q6 is off, so the current through R6 saturates Q4 allowing current to ground through Q4.
    - What I don't get is when Q4 is ON, it looks like current will flow both from Q2 into Q4 and also from Q3, into B, across the cell into A, and then to Q4.

    When the 555 is high:
    1) Q5 is saturated, allowing current to flow through Q3, past the B lead and out Q5.
    2) Q6 is saturated and will ground current from R6.
    - What I don't get is that it looks like Q4 will always be ON because of the current through R6. ..so it will always allow current from both Q2 and Q4 (across the leads). Does Q4 cut off for some reason when Q6 turns on?

    What am I missing?

    Thanks for your help,
    -masked
     
    Last edited: Aug 3, 2010
  8. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Also, In your schematic, Q1 base should be connected to Q1 collector, no?

    You can see it running at: http://www.falstad.com/circuit/index.html
    ..just paste the attached text. (Ctrl-V, or click "File", "Import").
     
    Last edited: Aug 3, 2010
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Both current sources are always on. One or the other gets steered through the load, while the other is shunted to ground.

    [​IMG][​IMG]
    I don't know about the Vbe mismatch you were experiencing.

    Exactly right. No harm done, except for 2.64mA being wasted. If this is a problem, the circuit will get more complex.

    When Q6 is saturated (Vce≈0.1V), it steals the base current from Q4. Q4 cannot be ON unless the base voltage ≈0.7V.

    I am editing the schematic I posted because I forgot that Q4 and Q5 are each drawing 5.3mA, not 2.64mA, as I mistakenly assumed. They needed a little more base drive.
     
  10. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I edited the circuit again because I had forgotten the connection between collector and base on Q1.:(
     
  11. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Oh! I think I get it now. Even though R6 allows current to both transistors, the saturated Q6 has less resistance than Q4b and current flowing that way doesn't allow .7v for Q4. (I was thinking in terms of Q4 has voltage or does not have voltage).

    I'm amazed that you guys can design these in your head so quickly!
    I learn a lot by seeing how someone else approaches the task.

    I was so worried about not "wasting" current and getting my bridge to run at 2.7mA, that I didn't see how much the design could be simplified by allowing R8, Q4, and Q6 to run to ground.
    The mindset of "only allow current to flow where absolutely necessary" made it much more difficult.

    So this confirms the original perspective that using a "current mirror" instead of my 1M bias resistor gives me much better function and takes a few more milliamps.

    Now I have to decide whether +5 days running time is worth the extra parts & soldering :)
    ...and there's still the option of dropping a current-limiting-diode before the bridge.

    Thank you so much for your help!
    -masked
     
  12. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Keep in mind that the entire circuit I posted will draw an average of about 3*2.64mA≈8mA from 27V, plus another milliamp or so from 9V, assuming you are using a CMOS 555 (it is a better choice for low currents).
    Do you have to use 9V batteries? A wall wart would be a much better choice, if you have access to AC power.
     
  13. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Yes I'm showing the bridge at a little over 10.2mA.
    If I build out the current mirror on both sides and keep Q3 & Q4 from my original, then I can get the whole bridge to run right at 6mA. Then adding the LEDs and timer brings the whole device to 9.5

    It's nice to start getting a grasp on what effects different design considerations will have.

    For now I'm using batteries, and once I get a thorough understanding of all the various approaches to what I have, I'll probably add a wall wart option.
    ...and then I'll be back asking you guys to review my voltage dividers :)

    I can't thank you enough for taking the time to step through this with me!

    Cheers,
    -masked
     
  14. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Hi Ron,

    I'm still running into the same issue I had before I used a second transistor to mirror current.

    Initially, without Q10, I needed bias resistors R7 and R8 to be 3.3MΩ instead of the expected 1MΩ.
    Now, with Q10 in place, I need the bias resistors to be 33kΩ instead of the expected 10kΩ.

    In either case, I'm getting 3 times the expected output, and need to triple the resistors to get the desired 2.63mA. The good part is that I can make it function either way. ...The bad part is that I don't understand what is occurring, and don't know how to diagnose it.

    I've checked the wiring about 50 times, and am certain it is exactly as in the diagram. Do you have any suggestions on how to diagnose it?

    Thanks again,
    -masked
     
  15. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    How and where are you making the current measurements?

    Attached is the I Load V Load graphs from 0.1 ohms to 12k ohms
     
  16. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    I'm making the measurements by either hooking my meter up between an output lead and an electrode or, alternately, to both "out" leads.
    Its DC voltage only rounds to the mA, so I'm getting a reading of .009 or -.009 depending on the timer.

    With the current mirror approach, I've also tested between Q10 and R7 with the same results.

    All that's with the 10k or 1M bias resistors. When I switch to 33k or 3.3M, then I get the desired (but unexpected) .003A.

    and...Wow! what did you use to generate those graphs? (thank you!)

    -masked
     
  17. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    Your not using DC current?

    your meter should have a milliampere scale. You might want to conduct the test in one direction by feeding a positive 9 V input to the 100k resistor (disconnecting the timer of course) for a short test. Then you could apply a ground to the same input to check the other direction.
     
  18. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Yes, I'm measuring DC. But every 60 seconds the timer flips and the H-bridge reverses polarity of the leads.
    My meter is an "ideal 360 series" brand for doing household wiring, so it only has 2 ammeter options: AC and DC.

    I have disconnected the timer and tested each side of the bridge independently. Both sides give the same results.
    When I lower the bridge voltage to 9v, ...
    [EDIT: new test results]
    My bridge output is slightly different. With Q10 in place and testing different values for the mirror bias resistor, I get:
    2.2k : .005A
    2.7k : .004A
    3.0k : .004A
    3.3k : .003A and oscillating up to .004A
    3.9k : .003A
    4.7k : .002A
    5.1k : .002A
    5.6k : .002A
    6.8k : .002A
    8.2k : .001A

    So where I would expext to use a 3.2k resistor, I'm finding that I need a ~4.7k
     
    Last edited: Aug 6, 2010
  19. masked

    Thread Starter Member

    Jul 1, 2010
    48
    1
    Am I making a newbie mistake and using the wrong transistors?
    Mine are from a radio shack assorted package, and labeled:
    2N3904 B331
    2N3906 H331

    The datasheets look okay to me...
     
  20. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    I wouldn't blame the transistors ... yet. I suspect they are fine.

    Put up your schematic with "Q10" in it and I'll post another graph.

    Get yourself another meter ... one with mA scales. You do realize the DC amp specification on that meter is 2.5% +4 or four counts. Typically it's the percentage plus or minus one count (at the least significant digit). All your desired measurements are at the least significant digit ... so your readings could be normal. 2.5% of full scale is 50 mA. Are you seeing the problem?

    Even this cheap meter at radio shack http://www.radioshack.com/product/index.jsp?productId=4214667 will make measurements as low as 2 mA full scale.

    Post your schematic diagram anyways .... find yourself a better meter ... (attached is your current meter's manual).
     
    Last edited: Aug 7, 2010
Loading...