0
\$\begingroup\$

Let me start with that I'm new to current mirrors and my idea may be conceptually wrong. Feel free to ask any clarifying questions.

I'm designing a dual "LED lamp" with very finely tunable brightness including very dim levels. The control loop for the brightness is only for a single lamp, with the second lamp added to double the max brightness possible, and this is where I use the current mirror (I want the second lamp shine as brightly as the first). I don't have the second LED string yet, so I've substituted a 5W 220ohm resistor. The relevant part of the schematic is:

schematic

simulate this circuit – Schematic created using CircuitLab

A MCU is controlling Vgs of the MOSFET, and sensing the actual current via the R3 shunt. The current mirror PNP pair is a single-package device - BC807DS,115, a SOT-457 part. The LED string is "cannibalized" from a commercial mains-voltage LED bulb. Only the LED PCB is used, where it has just the +/- terminals, and the LED string needs ~29V for full brightness.

The problem

If I slowly increase the gate voltage, to the point that the left leg conducts 5-10mA (measured at R3), the second leg starts conducting close to 100mA (measured at R4), more than 10 times more. However, if Vgs is 0, then both legs don't conduct. Also, at higher currents, the mirror sort of works, with both legs conducting relatively similar currents (yet not perfect).

Example at low currents, where the problem is most pronounced: Low current example Left leg is yellow, right leg is cyan. Both traces are 50mA/vertical div.

At higher currents the matching is closer (about 110mA for the left leg, 130mA for the right): Higher current example Same settings for the traces.

Question

Is a current mirror really a good approach for this task? Any idea why does mine fail so miserably? I know, of course, that you can alternatively wire both led strings in series. That would require 60+V supply which starts to be somewhat dangerous for the intended application of the device - I strongly prefer the 31.5V solution.

\$\endgroup\$
3
  • \$\begingroup\$ At 10 mA your emitter resistors drop about 20 mV which is about 3% of a Vbe drop. I do not know if this is in fact an issue but at least temporarily increasing them to same tens of Ohms would give you somewhat more "command authority". [Your 10 mA/100 mA imbalance is larger than I'd expect notwithstanding. ] \$\endgroup\$
    – Russell McMahon
    Commented Dec 5, 2019 at 11:56
  • \$\begingroup\$ This is a conceptually bad design. You need to review and change everything. In short, don't use a current mirror - it serves no purpose. Just go with direct pwm only. \$\endgroup\$ Commented Dec 5, 2019 at 20:36
  • \$\begingroup\$ @Soldersmoke, I don't want to use direct PWM for several reasons, one of which is the huge dynamic range hinted in the question. I want to be able to go really, really dim. \$\endgroup\$
    – anrieff
    Commented Dec 5, 2019 at 22:45

2 Answers 2

1
\$\begingroup\$

Consider the two transistors in the current mirror. With only 1.8R emitter resistors, any 1mV difference in Vbe between both transistors will cause a difference in current of 0.55mA.

This transistor's hFe stays above 200 even at 100mA, so base current is not the main cause of your current mismatch.

The two transistors are in the same package, but the datasheet does not say anything about them being Vbe-matched, so you can expect maybe 10-20mv Vbe mismatch at the same Ic and Vce. So, with such a small emitter resistor, you won't get a good current matching. This will be more apparent at low current (as you noticed) -- with 5-10mA current mismatch, setting it to a low current like a few mA won't work.

Even if you could get matched transistors, their temperatures and Vce will be different, and this will cause a change in their Vbe also.

Basically, a current mirror can be reasonably accurate with high value emitter resistors and/or precision matched monolithic transistors. But in your case, that won't work.

I'll suggest solutions, without current mirror.

1) Wire both LED strings in parallel, with an additional resistor in series with each string. The resistor will help balance current between both LED strings. If your LED strings have 30V Vf, consider dropping at least 3V on this resistor. You can check if the current is well balanced by measuring voltage on the resistors. This should work well if both LED strings are at the same temperature (same heat sink) so their Vf will track.

2) Use PWM ; high-frequency if you want it flicker-free.

3) Duplicate the FET, current sense resistor, and use a dual opamp (one opamp per FET) so each LED string is driven independently. This won't cost much more but it will save lots of hassles of both LED strings are on two heat sinks at different temperatures.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thanks! I ended up implementing something similar to your suggestion #3, only one opamp, but still - the task of equalizing the currents to the two lamps is done via the opamp, not by a current mirror. Thank you for the detailed reply, now I understand the theory better and will know the current mirror caveats in the future. \$\endgroup\$
    – anrieff
    Commented Dec 6, 2019 at 0:24
1
\$\begingroup\$

You are missing the base currents of Q1.1 and Q1.2: they all go through the LED string, so your mirror is unbalanced at low currents.

\$\endgroup\$
1
  • \$\begingroup\$ Hmm, is there any way to fix it? \$\endgroup\$
    – anrieff
    Commented Dec 5, 2019 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.