Building a Constant Current/Constant Power Electronic Load

A while back I built a simple constant current electronic load using an aluminum HDD cooler case as the heatsink. While it was sufficient for a few amps’ load under low voltages, it could not handle load much higher than a few dozen watts at least not for a prolonged period of time. So this time around, I decided to build a much beefier electronic load so it could be used in more demanding situations.

One of the features a lot of commercial electronic loads has in common is the ability to sink constant power. Constant power would come in handy when measuring battery capacities (Wh) or testing power supplies for instance. To accommodate this, I decided to use an Arduino (ATmega328p) microcontroller.

The schematic below shows this electronic load design. To make the schematic less cluttered, I had deliberately omitted the filtering capacitors and decoupling capacitors. I also omitted the microcontroller circuitry as it is rather standard. All the connections to the standard Arduino board are clearly marked for easy references. The Arduino source code can be downloaded towards the end.

ElectronicLoad

At a first glance, the circuit here seems a lot more complicated than the simple one I built before. But the core power stage portion is actually quite similar.

I used 6 IRFP150N‘s to handle the load. These 6 MOSFETs’ are divided into three groups: each group consists of two MOSFETs paralleled together with independent gate driving resistors. The three pairs are then driven independently via three Op Amps. This design ensures equal distribution of the load current among these three groups of MOSFETs. With this configuration, the maximum power this electronic load can dissipate is at least 200 Watts for a conservative estimate.

In the circuit above, IC1A forms a voltage follower, which buffers the DAC output and the inputs of the three driving Op Amps. An LM324 is used here for the four Op Amps. Of course, the choice of the OpAmps here is not critical and you can substitute with pretty much any general purpose ones. The DAC I used is Mcirochip’s MCP4921. MCP4921 is similar to MCP4821 which I used before. The main difference is that MCP4921 uses an external references whereas MCP4821 has a built-in 2.048V reference. This is also the main reason I chose MCP4921. By varying the external reference voltage, we can strike a balance between the maximum current allowed by the electronic load and the current adjustment resolution.

In my design, the reference voltage to the DAC is provided via a resistor divider from the voltage reference IC TL431. The DAC’s external reference is configured as buffered input for high impedance so that the DAC reference input does not affect the accuracy of the reference voltage set by the resistor divider. When the external reference is set at 0.5V, the load current can be adjusted up to 15A (0.5 V / 0.1 Ohm * 3). MCP4921’s output voltage can be adjusted to upwards to either 1 x Vref or 2 x Vref, so the current range can be doubled via a software command without the need to change the reference voltage. If you do not need such a high current range, you can lower the reference voltage, it will give you a better current resolution (Vref / 4096 per adjustment step).

An encoder is used for current adjustment. By default, the current can be adjusted at a resolution of approximately 1mA/step. By pressing the encoder button, this resolution can be changed to 10mA/step and 100mA/step respectively. This makes it easier to to coarse adjustments.

Constant power mode is achieved by calculating the desired set current via the measured load voltage.

Here are some pictures showing the construction of this electronic load. The heatsink I used is a huge piece of aluminum block I got at a local auction. The original owner builds audio equipment and he used these heatsinks for his class A amplifiers. Anyway, the size of the heatsink is probably an overkill, but it certainly works nicely even without forced air cooling.

MOSFETsHeatSink MOSFETSBoard

The entire control circuit is built on a protoboard. I used the Arduino board I made earlier and used headers to mate it onto the main board.

CircuitBoard1 CircuitBoard2

Here is a picture showing the finished controller board:
CircuitBoard3

As I mentioned earlier, the heat sink I used is ridiculously huge, here is a picture putting everything into perspective:
ElectronicLoad

This picture shows the electronic load operating in constant power mode, absorbing more than 200W of power at more than 60 Volts.

ElectronicLoad200W

Because we are using a microcontroller here, we can add other features easily. While I did not include in my firmware code, you could easily add in a constant resistance mode for example. Or you could enable the data logging capability by writing out the current and voltage at a present interval.

The following is a short video, demonstrating the functionalities of this electronic load:


View on YouTube in a new window

Download

ElectronicLoad.tar.gz

Be Sociable, Share!

110 Comments

  1. Rob B says:

    First of all a huge thanks for publishing this design. I have already purchased the major power components to build my own. I am also trying to spin up a PCB and have it fabbed up in one of the online board houses. While waiting for all the components to arrive I have had a play with your code on an UNO with the ADC, encoder and reference connected. The problem I have is the rotary encoder seems to be totally ignored. The encoder I have is this one http://image.dhgate.com/desc_398209987_00.jpg The pins are labeled +v, gnd, SW,CLK and Data At first I thought the switch was faulty or incompatible but it seem to work OK with the basic test sketch provided in the library (Teensy PJRC) I tried removing the encoder from the PCB to use it ‘naked’ also with a Arduino Mega to with no improvement. I would greatly appreciate some help getting this to work.
    Thanks
    Rob

    • kwong says:

      Hi Rob,

      These encoders typically have 5 pins. I am not sure how the board is routed, but the one side with three pins are the side for the encoder, with right pin being common and first two pins for the gray code output. The other side with the two pins is the switch. Could you trace those pins and see if the connection is correct?

  2. Rob B says:

    Hi again Kerry. It looks like I have found the issue with the rotary encoder. I have spent the last two days wrestling with this issue only to find the problem lies with the newest release of the Arduino software. By recompiling with 1.05 the encoder now works. I tried this approach after reading a comment from the encoder library author that using the polling method is highly dependent on a fast main loop time. I suspect with all the latest ‘improvements’ the compiler is not as well optimised as older releases. To test this theory I might try the code on my DUE or Teensy3.1 Actually if the Teensy was localy available here I would simply embed that as it has a native DAC so it might be possible to eliminate the Vref and external DAC needed for the Uno
    I would be interested to see If you have any luck using the latest Arduino software.
    Thank you again for the time and effort in creating and sharing these projects.

  3. theslowdiyer says:

    Hi Kerry,

    Very interesting article/build, thanks for publishing it. You mention that you have omitted some capacitors from the schematic, is it only the standard supply decoupling caps on the opamp/DAC/78L05 and the LCD that are missing or is there something else? Otherwise is it as simple as hooking up the Arduino and loading the code?

    Seriously considering laying out my own PCB for this design :-)

    BR,

Leave a Reply