Current mirror not mirroring when voltages different

Discussion in 'The Projects Forum' started by analog_headache, Mar 8, 2016.

  1. analog_headache

    Thread Starter New Member

    Mar 8, 2016
    Hi everyone,

    I am looking for a bit of guidance on a little current mirror circuit. The attached circuit is a 4 transistor wilson mirror.
    I am looking to create a current mirror to power 6 LEDs. Due to an input voltage restriction, I need to power the
    LEDs in three branches. I want the current to be pretty accurate, 1-2mA difference when drawing 500mA.

    If I start off with a two branch configuration with 4 FETs, everything seems to behave. I have 'spiced' the
    circuit and it seems to behave correctly. If I short out transistors D4 and D2 in one of the branches, the circuit is pretty well matched.
    If I now add in a third branch (schematic attached), the currents seem matched. If I short out one of the LEDs in the third branch (D6).
    The currents get mismatched by around 10mA.

    1) Does anyone have any idea why this is happening?

    2) When I try and do a two transistor configuration current mirror i.e. missing out M3, M4, M5 and M6, the currents were not very well matched if I short out 1 LED. Why might this be happening?

    3) I am going to be using discrete FETs to build this circuit. Is it realistic to expect the currents to be matched to
    within 1% of the full scale current value?

    Your words of wisdom are graciously received

  2. crutschow


    Mar 14, 2008
    Not even close.
    The MOSFETs in you simulation all have the exact same Vgs(th).
    Real world MOSFETs will likely have at least a 2:1 difference in Vgs(th) between units (look at a typical data sheet).
    You can get better matching with BJTs in place of the MOSFETs but it's still unlikely you can get 1%.
    Why do you need such close matching?
  3. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    What is the purpose of R1 in the simulation?

    If you are running 500 mA per leg, there will be 1.5 A through R1. This means there will be 15 volts across R1 which will start to infringe on the voltage needed to light up the three LEDs in series.
  4. #12


    Nov 30, 2010
    You just found another difference between simulators and reality.:D

    "In theory, theory and practice are the same. In practice, they aren't."
  5. AnalogKid

    Distinguished Member

    Aug 1, 2013
    2 mA out of 500 mA is less than 0.5% tolerance. You could not achieve this with a full blown voltage or current regulator circuit, even if you used 0.1% tolerance resistors. A current mirror works inside an opamp chip design because a) the parts are only micrometers apart, on the same thermal platform, and grown at the same time (no batch-to-batch variations), and b) an actual current mirror circuit is more complex that what is shown on the simplified internal schematic on a datasheet. Bipolar current mirrors have a shred of a chance of working; FETs? - nope.

  6. analog_headache

    Thread Starter New Member

    Mar 8, 2016
    Thanks you all for your contributions so far. To answer your specific questions.

    crutschow: " Why do you need such close matching?"
    ans- I am driving these LEDs and they need to look uniform. They are being measured as to how uniform they are using a spectra radiometer. I am not doing a straight forward LED indicator. If I power them all in series, I get good results but I have this reliance on a higher voltage supply.

    Stayathomelectronics "What is the purpose of R1 in the simulation? "
    ans- It really was to limit the current. What is actually there in reality is a voltage controlled current sink made from
    an amp and an npn transistor. It is pretty accurate. I just put in a resistor in there to speed up simulation and simplify
    the problem.

    So FETs are out of the question. If I was to use NPN or PNP, could I just use a wilson 4 transistor mirror (actually 6 when using 3 branches) or do I need to add in emitter degradation? Using Bi-polar, has anyone got a handle on what might be achievable, matching wise? 5%, 10%?
  7. Bordodynov

    Active Member

    May 20, 2015
    Current2.png See only in LTspice

    Last edited: Mar 9, 2016
    absf likes this.
  8. Bordodynov

    Active Member

    May 20, 2015
    I suggest here that the scheme

  9. crutschow


    Mar 14, 2008
    You likely would get closest matching if you used an opamp constant current circuit for each string.
    If you use a low offset-voltage op amp, and MOSFETs for each transistor [the op amp eliminates any significant effect from Vgs(th) variations], then your matching would be basically a function of the matching accuracy of the source resistor resistances.
    MOSFETs are better than BJTs here because of the error caused by the BJT base-emitter current.
    Quad opamps are common so the opamp parts count wouldn't change and you only need one transistor per string.
    You could use a small pot (say 5% of the total resistance) in series with the source resistors to calibrate the currents to be identical within the precision of your meter, if you like.
    Last edited: Mar 9, 2016
  10. analog_headache

    Thread Starter New Member

    Mar 8, 2016
    Thanks for the advice Crutschow. Big thanks to Bordodynov for putting together those circuits. That is
    some tight matching there and a nice little circuit. Learning lots here. One little issue I have with the circuit though is
    that I can only have one pin going back to my current sink. In my original schematic I had a resistor
    to 0V. This represented my voltage controlled current sink. All of the parallel LED branches joined to
    1 pin. This is for architecture reasons as I would like the LEDs and current mirror to exist off board and
    connect to my current sink via 1 pin only (expect for VCC). The circuits shown rely on having a 0V connection.
    I could possibly connect the 0V connections of R1, R2 and R3 to my current sink via 1 pin but the amp needs a 0V connection.

    Also if I want to check out the worse case currents of these circuits(being npn), Is the biggest variable the Beta of the npn, so if I varied the Beta in the spice sim, this would give me pretty much the worst cases.

    I appreciate your help during this exercise. Some smart people here

    Best Regards

  11. bertus


    Apr 5, 2008

    @Bordodynov , Why do you use a reference voltage of 5 Volts?
    Now the 15 Ohm resistors (R1,R2 and R3) will dissipate 1.6666 Watts.
    When you lower the voltage to basic 2.5 Volts of the TL431 and use 7.5 Ohms resistors, the dissipation will be 0.8333 Watts.

  12. crutschow


    Mar 14, 2008
    Okay, so you want only one connection.
    You could still use a pot in the emitters of the transistors to balance the loads in case the current difference is more than you want.
  13. Bordodynov

    Active Member

    May 20, 2015
    Last edited: Mar 10, 2016