I want to design a high side variable current source:

  • Power source (Vacc) is an accumulator whose output varies between 9V and 7V.
  • I need output DC current values between 10mA and 100mA.
  • I need it to be high side, so the load (RLOAD) is referred to ground.
  • RLOAD is between 1 ohm and 60ohm
  • Precision in current should be 10%.
  • Maximum output voltage should be as high as possible, ideally up to 6V.

To control the output current value I'm using a micro-controller powered at 5V, so I can have either a PWM, or a number of ports set to 0V / 5V. I can produce a control signal Vctl: - ground referred. - between 0 and 5V. - With a 1% precision.

I would like to have it built with basic components, if possible.

I tried this schema:

schematic

simulate this circuit – Schematic created using CircuitLab

The idea of the circuit is that the PNP transistor is providing current to the source so the voltage drop in R4 plus the Vbe is equal to Vc. Vc is the voltage drop in R2, which is supposed to be proportional to the current driven by the NPN transistor. I need this to translate the Vctl input, which is ground based, into a high-side reference. In the end it doesn't work because an uncontrolled amount of current is leaving the base of PNP transistor.

Can someone help-me?

  • 1
    Hint: Since your power supply voltage varies so much, you need some other kind of reference voltage to use to ratio your output current to. Could be an IC reference, could be something built in to an IC, could be a zener diode, etc., But you're not going to get 10% current accuracy if you ratio things off of a power supply that varies by 12.5% (8 +/- 1). – The Photon Jul 13 '16 at 16:08
  • True. The Vctl is quite under control, though. I can set it between 0 and 5v with an accuracy better than 1%. – jmgonet Jul 13 '16 at 19:45
  • You are showing the power source as an AC voltage source. True? Is its output sinusoidal or another wave shape? By "variable constant source" do you mean "adjustable current source"? Are you expecting an AC or a DC current to flow in the load resistor? – FiddyOhm Jul 13 '16 at 23:10
  • Power source is DC, and I expect a DC current to flow through the load resistor. Power has a slow variation between 9V and 7V because it is an accumulator. I mean variable current source because I can control it via the Vctl input, as opposed to adjust it with a potentiometer. – jmgonet Jul 14 '16 at 4:49
  • I've edited my question to be clearer on the questions in the comments. – jmgonet Jul 14 '16 at 4:53
up vote 1 down vote accepted

Your schematic is definitely good for simple with 10%; try placing a diode between R2 and Q2-collector. Most of your error is from Vbe of Q3. This will make V(R2) ~= V(R4). Then your entire error will be caused by the base currents. You can eliminate error from Q2 by switching to a FET with a low VGS threshold, (but you might get 10% with bipolars with high hFE). Your error will be approximately 1/hFE for the remaining transistor. You can use V(R1) to regulate since it will be proportional to V(R2), which is proportional to V(R4). The BC556 is small signal so don't expect too much current.

  • I've tried both of your suggestions. Adding a diode works very well in terms of linearity (as also demonstrated by V. Patron), but the control current along R1-Q2-R2 is a bit too high for my taste. Replacing Q3 by a FET totally fits my requirements rocks. If you could just add a schema of the FET solution, I would like to accept your answer. – jmgonet Jul 16 '16 at 17:51
  • You can replace Q2 directly with an N-channel mosfet with a low VGS threshold voltage. Attach the gate where your base pin is , the drain to the collector and the source to the emitter. You would then use the high side of R1 as your feedback voltage to your op amp. – John Birckhead Jul 18 '16 at 13:33

A simple approach is to sink a precise current and then mirror the current off the positive rail, perhaps with a multiplication factor. For 10% accuracy you may not need to use op-amps, but it still would not be a bad idea- it will allow you to get closer to the positive rail (more compliance).

So suppose you generate a 0-5V analog signal using your microcontroller (low-pass filter a PWM signal, for example). That will give you a signal that is as accurate as the supply voltage, so perhaps 5% worst-case.

Convert that voltage to a current (sink) using a simple circuit like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Then you need to mirror the signal off the positive rail. Something like this will work:

schematic

simulate this circuit

Because the LM324 has a common mode range that does not come close to the positive rail (1.5V to 2V), I've biased it downward with D1-D3 and R3. This limits the maximum output voltage to something like 5.5V. If you want to get more, replace the op-amp with a rail-to-rail input/output type and get rid of D1-D3 and R3 (just connect directly to the positive rail).

As shown the range is 0-100mA with the switch closed and 0-10mA with the switch open (with 0-1mA input current).

  • Thanks for your answer. Using diodes is a nice trick to solve the common mode range. However, shouldn't the +power of the operational amplifier be connected directly to V1? – jmgonet Jul 15 '16 at 5:26
  • @jmgonet Indeed it should, thanks, fixed. – Spehro Pefhany Jul 15 '16 at 5:43

This is the most straightforward implementation, same concept as Spehro, but I don't understand why he put a complicated circuit in. This is a simpler version. Basically, two V-to-I circuits with the second one "upside down" so it is referenced to your power rail.

Your 0 to 5V control signal drives a basic opamp Voltage-to-Current converter and turns it into a variable 0 to 1 mA current sink. R2 1k then converts this current sink to variable 0 to 0.5V but referenced to the Vdd rail so that now Vflw varies 7V to 6.5V. A second opamp V-to-I is "upside down" on the + rail and converts Vflw to 0 to 100 mA at Rload.

The small error (5 Vin = 98 mA out or about 2%) is due to bias current in the PNP base. You can replace with more expensive MOSFET to get very tiny error and max headroom capability. Hope that helps, -Vince

enter image description here

  • As I mentioned, the complicated circuit was to use a $0.10 op-amp rather than a $5 op-amp and to accommodate the two ranges. I would suggest C1, if used, should be across R2, the way you have it (to ground) you will get 1mA of noise on the output for every 10 mV of noise on the power supply (above a couple kHz). – Spehro Pefhany Jul 14 '16 at 16:35
  • Ah, I see. Very good points, Spehro. Hey, it seems to me he could use a hybrid solution to get around LM324 common mode limitation: use LM324 for first V-to-I, then use a PNP (or even PNP darlington?) for the second V-to-I. This would be still be fairly cheap, more accurate than pure discrete, and less parts than trying to use the LM324 for the second V-to-I, yeah? – Vince Patron Jul 14 '16 at 17:09
  • I've tested this solution and it works really well. Not only it is very precise, also the Vctl meets a very high impedance, making it very easy to produce with a couple of resistors. In my case, however, it is a bit of an overkill: has way more precision than needed, is a bit expensive (rail-to-rail op amps) and a bigger footprint than using a MOSFET. – jmgonet Jul 16 '16 at 17:57

Ok, here's another solution. It's really the same concept as your original circuit but implement's John B's idea. It is cheap, all discrete, no expensive op-amp solution but stable with supply voltage and Rload change. :)

The trick was to add Q2 to "linearize" the second current mirror (Q1). (You could use a diode for Q2 but using same transistor is a better match and why add another item to the BOM? 2N3906 is cheap anyway.)

Meets all requirements. Plot below sweeps the supply from 7V to 9V. C1 is optional. Hope that helps! -Vince

enter image description here

  • I've tested this solution and it works perfectly. True, it meets all my requirements. Its only flaw (my bad because I didn't stress it on my post) is that the control current through R2-Q2-R3 is a bit high, and I'm going to use this in an embedded application running on an accumulator, so loosing 8-10mA is important. – jmgonet Jul 16 '16 at 18:01

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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