Skip to main content

Arduino Based Electronic Load




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:

    -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.

Comments

  1. 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.

    ReplyDelete
    Replies
    1. Thank 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.

      Delete
  2. cool project and awesome enclosure. love the printed front panel overlay... is there anything covering/protecting it?

    ReplyDelete
    Replies
    1. Thanks! 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.

      Delete

Post a Comment

Popular posts from this blog

A4 Pen Plotter

This is a pen plotter capable of printing on A4 paper sheets. It is intended to be similar to the Aritma Amagraph pen plotter, be as compact and robust as posible as well as reliable.


It is controlled by means of an arduino with a grbl shield, wich drives the x and y motors, and the solenoid used for lifting-lowering the pen in response to g-code generated in inkscape and sent through grbl controller.  Here is a video of it working:



More info & files here: https://www.thingiverse.com/thing:2504587


3d printed BB-8

This is a working, 160 mm diameter BB-8 model. The whole thing is 3d printed, including the ball. It uses a counterwheight to drive itself fowards and backwards, and as a "momemtum wheel" to steer.
It is driven by two standad sized servos modified for continuous rotation, and one micro servo for the head, which is held in place using magnets.

An arduino nano, conected to a motor controller and a bluetooth module acts as its brain. Later on I plan to add an IMU (Inertia Measurement Unit) to increase stability and a sound module to play some sounds. The ball got some drawings and I paint job, but I can't find more photographs at the moment.
Instructions and files here: https://www.thingiverse.com/thing:1376731 Head files are from the BB-8 builders club, scaled down.