Scott Baker Builds a Remotely-Controllable Programmable DC Load Powered by a Raspberry Pi
Controllable via network or using a clever front panel with VFD, Baker's DC load is a smart alternative to commercial options.
Dr. Scott Baker has published a programmable direct current (DC) load project with a difference: it's controlled by a Raspberry Pi.
"A DC load is useful for testing lots of different things," Baker writes. "If you have a power supply and want to make sure it’s able to deliver its fully designed potential, then you can use a DC load to test that power supply. If you have batteries and you want to know if they’ll provide their rated capacity, then a DC Load can tell you that. I’ve also used a DC Load for testing USB cables to see which cables perform the best. There’s a lot of possibilities, and it’s a useful piece of test equipment."
"I've built a few DC loads before, and I even own a commercial unit, a Kunken KP184. So why build my own? Well there are a couple reasons: I like Raspberry Pi based projects, because the Pi is a great platform to roll out a web server that can be used to operate the project from a desktop PC or a mobile device. There's the opportunity to build in data logging or graphic[s], or to set up custom ramp features for testing devices."
"Building the load yourself allows you to select the MOSFETs and pick a voltage/amperage range that works for you. Sometimes I work on high voltage projects and having a range that goes into the hundreds of volts may be useful. It’s a challenge and a learning experience. Even when you think something is simple, sometimes unforeseen complications arise and need to be worked through."
The resulting device takes a fairly common DC load circuit and replaces the potentiometer that would typically be used to adjust the load with a digital-to-analog converter (DAC) wired to a Raspberry Pi through the SPI bus available on its 40-pin general-purpose input/output (GPIO) header. Connections are also provided for amperage and voltage monitoring, through a four-channel 16-bit analog-to-digital converter (ADC) — allowing the Raspberry Pi to both request a target amperage and to read the actual amperage and voltage for monitoring.
Finally, the project is cooled through a heatsink and a 60mm fan — good enough, Baker estimates, for around 100W, with the caveat that the heatsink sits live at whatever voltage is provided to the DC load's source input — plus a vacuum fluorescent display (VFD), rotary encoder, and button inputs all housed in a 3D printed case printed in PETG.
More information on the project is available on Baker's blog, while the supporting source code can be found on the SB Electronics GitHub repository.