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 Jone's design shown in this video, but with a couple more features, including:
-Arduino controlled.
-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.
DC-motor! Yeah!Easy infinite-turn pot/scroll-wheel from parts on-hand, and only one uC pin. Great hack. Definitely going in my toolbox.“But can’t beat a proper encoder” (from his page) I beg to differ. This idea definitely has its places. A) obviously works in a pinch, B) Detents aren’t always desired, C) cheap encoders wear out, quality optical detentless encoders often have a lot of drag, or none D) great bearings/bushings, E) side-loads? F) analog=>resolution=>non-linear (software)… e.g. ignore anything below +-0.1V (pseudo-detent), scale quadratically from there G) some DC motors do have sorta ‘detents’. H) Panel-Mount screws, I) momentum/speed….I also dig the LED-hacks, multi-purposing of uC pins, and there’s a function-generator input, for fancy load-testing.
ReplyDeleteThank you for the feedback! I had some problems with the motor as an encoder, as I had to zero it out at power up, and it sometimes drifted so the load ended up adjusting itself (resulting in an almost-burt DUT and definitely-burnt finger tips). And increasing the "dead zone" to a extent this never happened made it less usable. It worked fine for a while, but I finally fitted an standard encoder in its place, just to stay safe.
Deletehi! possibile solution: for safe of safe, if your nano have disponibile one Data pin, you can use with a push switch pulled up, for a new function. ”LOCK”, so - no any future risk.
Deletecool project and awesome enclosure. love the printed front panel overlay... is there anything covering/protecting it?
ReplyDeleteThanks! I had the front panel overlay printed at a copy shop on glossy/photo paper. There's nothing over it, although you could laminate it or spray it with lacquer as I have seen some people do.
DeleteWat een interessante en informatieve website over Arduino-gebaseerde elektronische belasting! Het is geweldig om te zien hoe jullie de mogelijkheden van Arduino gebruiken om praktische toepassingen te realiseren.
ReplyDeleteAls jullie ooit overwegen om jullie online aanwezigheid uit te breiden of een nieuwe website te laten maken, dan kan ik jullie zeker aanraden om contact op te nemen met [Naam van jouw bedrijf]. Goedkope website laten maken Wij zijn gespecialiseerd in het maken van betaalbare en professionele websites. Ons team staat klaar om jullie te helpen bij het realiseren van jullie online doelen.