Programmable electronic loads can be handy in many testing applications. It can be used to test power supplies, batteries or tuning other equipment. Practically speaking building controller based load isn’t that hard. All you need to do is to drive MOSFET at some point. This point can be maintained by reading voltage and current on the load. Jasper have built an Arduino controlled electronic load that can withstand 30V and 5A but max 15W.
Transistor Gate is with voltage that is set on MCP4725 I2C DAC. The opamp based circuit takes care of maintaining gate voltage at level so the current would stay at desired level. Current is measured with 0.1ohm current sense resistor. Resistor voltage level is amplified and then fed to microcontroller ADC. Arduino Nano is connected to computer through virtual serial port, so parameters can be read and set through terminal screen. Initial code is freely available, but there can be much more improvements made like pulsed load and different modes of operation.