Concerned with your project’s power consumption but don’t want to constantly leave an ammeter wired in series with your power supply? [Rajendra] feels your pain and has recently documented his solution to the problem: a variable-output bench top power supply that clearly displays load current consumption among other things!
Everything is wired up in a nice roomy enclosure that has front-panel access to ±5V and variable outputs, an adjustment potentiometer, and even an input for an integrated frequency counter. A PIC16F689 MCU runs the show and displays the variable output voltage and current on a 16×2 character LCD. Although clearly useful as is, the PIC has plenty of I/Os and muscle left for future expansion and a capacitance meter has already been hinted at as and addition for version 2!
The power supply itself is pretty straight forward and uses 7805 and 7905 voltage regulator ICs to provide ±5V DC output. A LM350 IC also provides a variable output of between 1.25V and 9V – limited to 3V below the input voltage, in this case a rectified 12V from a standard transformer.
In order to measure current, a shunt of low but known resistance is wired in series with the output. In high-current applications these shunts are typically made of alloys that maintain a fairly consistent resistance across a wide temperature range. Since the currents in this project will be limited to a few Amperes there shouldn’t be too much resistive heating going on, and a 5 foot length of 22AWG wire wound into a coil provides a convenient and low-cost alternative. The voltage dropped across this resistance can then be measured and is directly proportional to the current flowing through it as related by Ohm’s law. This voltage drop reduces the voltage presented to the actual load as compared to the output of the regulator IC where the voltage is being measured in this case, but is accounted for in the code before the value is displayed on the lcd.
Full source code and schematics are provided and plenty of time was devoted to explaining some of the trickier concepts such as amplifying or decreasing signal amplitudes to levels suitable for ADC input and how to use a prescaler to count high frequencies exceeding the PICs own 20MHz oscillator. Also, although this design limits the current sensing capabilities to 1.2A, alternatives to the op-amp stage are discussed that could increase this limit.
Overall this project should be very approachable to even novice hackers and is a great way to practice many basic electronic concepts. What makes it even better is that the end result is a useful tool for future prototyping.
16 thoughts on “Multi-Function Bench Power Supply”
Great, I’ve been looking for somthing to power my bech!
I wonder if Bech even has power:
HaD is alwas typo heavy, but the title, really?
“a 5 foot length of 22AWG wire wound into a coil provides a convenient and low-cost alternative”
So an inductor? Any thoughts on if this would adversely effect anything? From what I understand it would oppose the changing of current draw…
Should have used a switching supply for the variable side, then the wire inductor would be dual purpose :-)
Not bad but why the hell it’s green?
That’s what I thought initially too – but to DC (or sufficiently low frequencies) inductors are shorts. So 22 gauge AWG at 5 feet would be 0.0823 Ohms, and could handle an amperage of 4.42 A.
Come on, Jason Komp. At least let the guy have a BENCH power supply.
He doesn’t mention the fact that the wire will be cheaper than a regular shunt resistor.
In fact, where i live, a 5W resistor(good enough for this application) would be cheaper than that much wire…
Hey guys, terribly sorry about the typo. Having a problem getting in to edit it right now but I’ll make sure it is taken care of. In the mean time maybe we can all just use our imaginations?
A sensible addition would be double pole double throw switch that isolates the output of the supply. That way you can switch it out when your working on stuff and not worry about transient effects as the supply goes down / comes up.
“In the mean time maybe we can all just use our imaginations?”
Nobody faults HAD for a typo. People are human and they make mistakes. That doesn’t mean we will not give you a friendly ribbing however :)
@xrazorwirex: Inductors do function to counteract or oppose changes in current (by adding to or “charging up” the magnetic field when power is applied and releasing that energy back when it is removed) but I think this would be very transient in this case. Maybe it will take a few extra fractions of a second to fully ramp up/down when turned on and off? There might be other minor implications as well, but the author’s test measurements with a multimeter were in agreement with those on the PSU’s lcd plus/minus a few percent.
@chic: I think that a switch might be redundant since the outputs are spring terminals that can be hooked up / unplugged as easily as throwing a switch. If someone wanted to it sure would be an easy addition though!
@CutThroughStuffGuy: Thanks! I know I would do the same!
I would have just used actual resistors as a current shunt. I built the Tuxgraphics power supply kit and it just uses three 1.5-ohm resistors in parallel as a 0.75-ohm shunt. That coiled wire seems a bit dodgy.
Really Simon? 3 1.5R in parallel makes 0.75?
The inductance will increase the supply’s output impedance at higher frequencies. This might matter; load currents aren’t often going to be constant, but it really depends on the inductance of the coil. Often these currents would be delivered by a local decoupling cap anyway, if the frequencies are high enough. Anyway, it’s not really desirable, but for a hobbyist bench it’s pretty unlikely to be a problem.
IMO a bench supply isn’t very useful without current limiting. Maybe I just blow things up by accident too often…
Frequency counter is a great idea. Maybe add reciprocal counting to handle low frequencies, trivial to do with a micro.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)