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.


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.


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:

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

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


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



Be Sociable, Share!

237 Thoughts on “Building a Constant Current/Constant Power Electronic Load”

  • Kerry,

    Thank you for your work with this project. The only part I seem to be struggling with is understanding how the potentiomenter at the voltage reference works as the “reference voltage” is placed at the “wiper” of the potentiometer in the schematic. What setting should this be at or how does it effect the DAC? Im sorry, I’m still new to this stuff, but I did manage to recreate the project although I have yet to upload the code and provide power for fear of an incorrect setting. Please advise as to how the divider on the 10K pot works at the TL431.

    Thank You,

  • Please help. Did anyone find a way to get any display via lcd. I have rebuilt the circuit 3 times to ensure all hardware is correct (it is). I ran “Hello World” code to double check LCD and connections “within” circuit, and still it seems to be going through the code with no display.

  • If anyone is still struggling with uploading code with newer arduino, this should help.
    find these 2 lines (line 45 and 48)
    int buttonReadings[3];
    long lastDebounceTime[3];

    change number 3 to number 4.

    I found out that using 0,1ohm sense resistors result in high oscilations. at 5V 3A load, i get something around 0,5V… increasing load voltage decreases oscilations, but then again, increasing current increases oscilations.
    lowering sense resistors reduces these oscilations. I used 0,003 ohm, and there is almost none at 5v 6A.

    • Consider placing the opamp cap from output to neg input. Maybe change cap value to 4.7 or 10nF. Also consider adding a 500 ohm resistor in series with positive input. This allows for input currents to balance. Physical PWB layout is critical. You need good if not excellent bypass caps and decoupling. If nothing else, try changing the opamp. An inexpensive one was used. If you want good to great performance, try a LT1496

    • After additional study, Mr. Wong’s design has a lot of beef in the output MOSFETs. So much so that trying to adjust for a light load, 3 amps with 6 devices causes a seeking problem, thus oscillations. A solution would be to add a range switch to control which or how many devices are enabled. The simulation shows oscillations with 6 devices however with one 1 device, works to 8 amps no problem

  • Hi Kerry
    In your software : DACGain = DACGain == 1? 0 : 1; what does this mean? Please advice

  • Have tried to compile the code only to find a compilation error.Some mention made of the encoder.h file ? Is this due to a file being missing in my library files within the arduino libraries ? Other than this I have enjoyed building the project and look forward to using it,as soon as possible. I enjoy working with and constructing projects utilising microcontrollers but don’t enjoy problems when the code won’t compile or upload successfully !! No pain no gain .

  • Hello Mr. Wong,
    My question is: “Why not measure the current by summing the 3 FeedBack voltages and reading the value via an ADC pin on the Arduino? This takes out the value of the ref voltage in the equation so a REF is not required. Your Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *