I have had some problems with my "lab power supply" and I wanted to build another one, so I thought a DC load may be handy to have around.
The design is based around Dave's design shown in this video http://www.youtube.com/watch?v=8xX2SVcItOA, but with a couple more features, including:
-Voltage, current, power and temperature monitoring.
-CC and external in hardware modes and CP, Cr software modes.
-Over temperature, over power and over current protection (software)
It can handle around 4 amps and 24 volts, limited by the mosfet.
It's divided in two main boards.
* UI Board: houses the 7 segment displays (I know one is bigger that the others, just what I had aroud...) and the keyboard. The display is multiplexed using a shift register. In addition, the four buttons are read taking advantage of the transistors switching the comon anodes, requiring only one additional pin. Only the first digit had decimal point, so one led was added for the second digit and the remaining two were used as V or A indicators. One additional led indicates if the load is on or off.
* Analog board: Houses the arduino, the LM324 op-amp and other misc stuff. Current is set either by a 12 bit filtered PWM or by an external input from a function generator, allowing for dinamic or pulsed loads. Source is switched by a relay controlled from the arduino.
This is then divided by 10 and fed into the main op-amp, which drives the logic level MOSFET (again, probably not the best one, but what I had around.), mounted on a computer heatsink. A ntc temperature sensor is attached to the heatsink. A transistor drives the cooling fan, depending on the measured temperature.
Current is sensed with an 0.1 ohm shunt resistor made with some bent wire, amplified and fed into one of the arduino's ADC, whose reference is set to the internal 1.1 V. This gives a resolution of around 4 mA.
Voltage is sensed using a plain voltage divider. This measurements are calibrated in software.
Instead of an encoder, a dc motor is used for user input. One side is biased to 1.1 / 2 V and the other is fed into arduino's A3, clamped by some diodes. By measuring the voltage generated by the motor, speed and direction of the knob can be found. This works surprisingly well, although it can't beat a proper encoder.
The whole thing is powered by a 12 V wall wart.
The circuit was first breadboarded and then sordered on some perfboard. The enclosure was designed in fusion 360 and 3d printed in abs plastic, while the front panel overlay was designed in inkscape and printed on photographic paper.
All the code can be found here.
The EEVblog thread discussing this is here.
This project was featured in Hackaday. Thank you for the feedback. And yes, I did spell "dynamic" wrong, fixed that thanks to MS Paint.
And also on the Arduino website. They got the story backwards, this is not a power-supply retrofit, but thaks anyways.