User Tools

Site Tools


projects:load

Electronic Load (Quick and Dirty)

Introduction

Sometimes one finds the need to provide a constant current load to a device under test (e.g. a power supply). Quite often a resistor is sufficient, but there are cases when the load current should be kept constant, even the voltage is varying. In such cases, an electronic load which can act as a constant current sink is usually used. Despite the fact that electronic loads are now available from China at low, low prices, some people are still too cheap to buy one. However, if the requirements aren't too demanding, these people can build their own electronic load (albeit much more crude and sorely lacking many features) with parts from the scrap bin.

Here is how.

Circuit

The circuit used is a simple textbook-style opamp constant-current sink, using a rather large MOSFET as the pass device. It sinks a current that is proportional to en externally provided control voltage, and works as follows: The load current passes through the MOSFET and the shunt resistor Rs, across which it develops a voltage. This voltage is fed back to the opamp, where it is subtracted from the control voltage (provided by J1). The output of the opamp in turn drives the gate of the MOSFET through a set of compensation devices (R1, C1). This control loop ensures that the voltage across the shunt resistor is equal to the control voltage, and hence the current drawn is $I = \frac{V_{control}}{R_{s}}$

Circuit diagram of the constant-current sink.

The table below shows the components and values that worked for me. I got a heatsink with the opamp and MOSFET mounted to it from the e-waste bin, so there is a fair chance that the component choice could be optimised.

Reference Part Notes
U1 OPA547 current limit not used, E/S pin left open, mounted to heatsink (not required)
Q1 TSD4M450V mounted to heatsink
Rs power resistor, e.g. 0.47Ω Could be mounted to heatsink
R1 1.8kΩ Compensation, determined empirically
C1 2.2nF ceramic Compensation, determined empirically
C2 10μF, 16V electrolytic opamp power supply bypass, could also do with additional ceramic
J1 BNC connector Control voltage input
ST1 Flying leads opamp supply and current input/return

In addition the the BNC connector for the control voltage, there are three leads connecting to the electronic load: Supply voltage for the opamp (+12V, pin 1 on ST1), current input (pin 2 on ST1), and ground for both the opamp supply and load (pin 3 on ST1).

Catches

There are several issues with this circuit.

First of all, the compensation is rather haphazard, and the massive MOSFET isn't helping with loop stability. The compensation components were found through trial and error, and there is likely great room for improvement. As it stands, the current sink is stable and produces a reasonably neat step response with minimal overshoots, so I'm not too worried. But if you decide to build the circuit for yourself, allow some time for tuning.

Then there is the trade-off between power dissipation in the shunt resistor and accuracy of the set current: In order to minimise errors due to the opamp's offset voltage and errors due to voltage drops along conductors, the voltage across the shunt resistor is ideally large. However, this means that power dissipated in the shunt resistor is also large. For example, if the shunt resistor is 1Ω, the load will sink 1A for every volt of control voltage. At 5A (quite a tame current for an electronic load), the power dissipation in the shunt will be then be 25W. Ouch! Of course, this could be reduced greatly by changing the shunt to 100mΩ, leaving a manageable 2.5W. However, in that case the voltage across the resistor will only be 500mV at 5A load current. Considering that the offset voltage of the opamp is a few mV, and the errors introduced from voltage drops along conductors are likely in the tens of mV or greater, the accuracy of the controlled current is greatly reduced. There is no real solution to this, but it's all about finding an acceptable trade-off for a particular use case. For me, this was picking a resistor that won't catch fire immediately, and monitor the current externally if accuracy is required.

The opamp offset voltage and input voltage range can also ruin your day when you want to have low currents or no current at all. The offset voltage might require a negative input voltage to achieve no output current, and likewise 0V control voltage would result in a slight current. If the opamp doesn't support input voltages close to or at its supply rails, turning the current off might also not be possible. The opamp used in this circuit is quite reasonable in that respect, and will work with its inputs at the negative supply rail.

Remember how a few paragraphs ago I said that for greatest accuracy, the voltage across the shunt should be high, and hence the shunt resistor should be large? Well, apart from power dissipation, there is another reason why you might want to keep your resistor as small as possible. Say for example that you want to test a USB charger, which can deliver 10A at 5V. Let's assume further that you don't care about power, and picked a 470mΩ resistor, which will burn a toasty 47W at 10A. Apart from that no problem, right? Wrong! The voltage drop across the resistor will be 4.7V already, and the particular MOSFET on this device has an $R_{DS(on)}$ of around 100mΩ, bringing the total voltage across the load at 10A to 5.7V. Which would be more than the 5V provided by the charger, which means that we cannot actually draw 10A at 5V from the charger. The solution to that is to pick a smaller shunt resistor, and an opamp with a lower $R_{DS(on)}$ - but there will always be a limit to the current that can be sunk at a given voltage.

The list of potential issues with this circuit goes on and on, but these are the most prominent one. And I haven't even gone into problems stemming from wiring of the load (no clear separation between load and control grounds), but I might continue to add to this list in the future.

Future

As I think I made clear on this page, this circuit is a very crude tool, but it does come in handy occasionally. I'm not really planning on doing much more work on it, because it is quite adequate for my current needs, and building proper electronic load features (e.g. constant power / resistance modes) would be terrifically over-the-top. If I should ever need such features I will get myself a proper electronic load. But in the meantime, I'll keep using this and will update this page should there be any new developments.

projects/load.txt · Last modified: 2016-04-06 14:45 by robert