Hi all. Perhaps someone can shed a bit of light on this idea (if this idea is flawed in any way). Would it be possible to couple an Arduino microcontroller and a high power motor driver to create a cheap lab power supply? The Pololu motor driver is rated around 15A for $40 and I could purchase a 10A transformer for about $20. The Arduino MCU would simply control the motor driver output via PWM and would be controlled by the user via a rotary potentiometer. The motor driver is tiny and doesn't require a heat sink, which would make the power supply quite compact. Could even add in a current sense board and feedback into an analog input for current limiting functionality.
It's doable in theory, but you will need a large capacitor to smooth out the PWM waveform at the load. Depending on the desired output voltage and load current, the amount of ripple in the output could be really high unless you use a really large capacitor (>10000uF or so).
And you'll already be in $39.95 for the motor driver (I'm assuming you're going to get their cheapest one?) plus $29.95 for an Arduino....that's $70 for a "cheap" lab power supply? (never mind the cost of the transformer and really large capacitor).
Personally I'd spend the $70 on this 18V 3A supply and just let it sit on my bench without the complexity:
Thanks for the reply and tips RuggedCircuits. You're right, that driver might be a bit costly, might not need that kind of current anyways. Another option would be to use the L298 driver which can supply up to 4A continuous ($2.00), then use a ATmega328 with the Arduino bootloader ($6), and a left over laptop AC adapter (or buy one for $7 roughly on eBay). Extra parts may come to another $20 or so, so I would have a decent (take this lightly) lab power supply for ~$40, a very rough estimate. Could also get more current by putting multiple L298 in parallel (as seen in datasheet).
I agree still the best route would be to pick up cheap power supply like the one you linked, but this would be more for interest sake, kind of a neat Arduino project.
Well, who am I to stand in the way of a good education This would be a good project to work on for that purpose.
Though don't get me started on the L298 and "4A"....you're not going to get that without some serious heatsinking and/or forced air flow from this ancient device. It would be much better to go with a more modern MOSFET-based motor driver chip (check out Allegro's selection of DMOS motor drivers).
--
The Quick Shield: breakout all 28 pins to quick-connect terminals
Yep, 4A might be a bit of a pipe dream unsinked, but luckily I bought a couple of these sinks I could use: http://canada.newark.com/jsp/search/productdetail.jsp?id=34M8477&Ntt=34M8477 (I known, wrong package, but should work... and ther thermal resistance is quite nice). Also bought a couple 40mm axial fans that might help.
I haven't heard about these DMOS chips, any particular model you've tried that you would recommend?
Actually ST's L6203 goes up a little bit higher in current than the Allegro parts:
It will still require heatsinking but I think it will perform better than the L298.
Though, since you don't really need bidirectional control, you could just use a single PWM MOSFET and MOSFET driver to implement your power supply instead of an H-bridge chip. Choosing a MOSFET with Rds(on) of less 10mOhms means you shouldn't need a heatsink at all, even at 10A!
The PWM MOSFET is a great idea, will look into that for sure. Can't see an immediate need for negative voltages, unless I'm directly power DC motors to the lab supply. Thanks again for all the tips!