Arduino compatible Electronic Load 19V/5A/18W

This the second revision of my electronic load. It is intended for testing DC power supplies, solar panels and battery capacity.

It is special because the hardware and software is open source, it is Arduino compatible and it is a cheap tool all hardware designers should have. The software is made by my brother Bertrik. The Arduino Nano was upgraded to a STM32 Arduino compatible board and as a result, the resolution to measure voltage and current has improved much. It works up to 19.8V, 5A and 18W. The load can be set to constant current, constant power, or constant resistance by simply typing it into the Arduino serial monitor. The constant current loop is implemented in hardware with an opamp, a mosfet, and a small current sense resistor. For setting the current a 16-bits timer is used to generate a PWM signal, that is low pas filtered to make it an analog input signal for the constant current circuit. The constant power and constant resistance mode is implemented in software. Load voltage and current are measured using a pair of opamp circuits and the STM32 12-bits ADC. Battery capacity is measured by loading the battery and integrating the current over time. To protect the battery against undervoltage the load is removed when the voltage falls below a configurable threshold. The device can also be used to simply log a voltage over time.


  • Current set range: 0 to 5A
  • Current set resolution: 10-bit,  4.88 mA/bit 
  • Current set accuracy : 5% in the range 0.25 to 5A
  • Current read range: 0 to 5A
  • Current read resolution: 12-bit,  1.22 mA/bit
  • Current read accuracy : 5% in the range 0.038 to 5A
  • Voltage read range : 0 to 19.8V
  • Voltage read resolution: 12-bit, 4.83 mV/bit
  • Voltage read accuracy: 5% in the range 0.015 to 19.8V
  • Max power : 18 W limited in software, overridable.
  • MOSFET: BTS133. It has ESD, thermal (150 Celsius), overvoltage, overcurrent, and overload protection
  • Heatsink thermal resistance + mosfet 5.9 Celsius/Watt
  • Heatsink power dissipation: 18 W by natural convection.
  • Microcontroller: STM32F103C8T6 ARM Cortex-M3 (blue pill)
  • Power supply: micro USB cable (not included)
  • Load connector: screw terminal 2 pins 5.08mm pitch for 24-12 AWG
  • Net Weight: 70 grams
  • Size: 79x53x49 mm, 3.2x2.1x2.0 inch (l x w x h)
  • USB cable is not included

Quik start

  • Connect power supply + and - to the electronic load
  • Connect USB cable to the computer
  • Start Arduino IDE
  • Select the COM port (115200bps)
  • Open Arduino Serial Monitor
  • Type any of the commands below into Serial Monitor
  • Every second the voltage, current, power and mAh are printed to the serial port

Serial Monitor Commands

  • Type CC 100 to set a constant current of 100 mA
  • Type CP 100 to set a constant power of 100 mW
  • Type CR 100 to set a constant resistance of 100 Ohm
  • Type limit v 1000 to set the undervoltage limit to 1000mV
  • Type limit p 15000 to set the power limit to 15W
  • Type help for more commands

Storing the data

Arduino Serial Monitor is not able to store the serial port data. I recommend using Realterm because it can store the data in a file and add a timestamp for further processing in other tools, for example in a spreadsheet.

Testing a power supply

Constant voltage power supplies can be tested by applying different loads and see how the voltage is affected. It may also be used to test a dc-dc converter efficiency under different loads. For example type cc 100 in the serial monitor and you will see the the current being set and the voltage updating at regular interval. Soon pulsed loads will be supported in embedded code.

Testing a solar panel

Solar panels generate most power at a certain voltage, the maximum power voltage, Vmp. The Vmp can be found in the IV-curve of a solar panel, which is the current versus the voltage. You can manually apply different loads but the solar radiation...

Read more »