Tuesday, 25 April 2017

Lab power supply

My new power supply.

For quite some time I have been wanting an adjustable power supply. Both for convenience and hacker credits. Unfortunately, a really good one with all the goodies that I would like to have (multiple outputs, measurements, current limiting, computer control) is somewhere in the €4-to-500 range, which I find a bit too much.

But I still want my fancy power supply!! So I started thinking about making my own. Unfortunately I have no real experience with designing these things. Because of that it seemed a good idea to start with building some kind of kit. This would give me some experience, and possibly give me something to tinker with to see what works and what not.

After some browsing on the Internet I found this kit. It had favourable reviews, and a nice set of features: 0-28V, 0.01-2A, current limiting, short circuit protection,  digital display, current and voltage measurements, all for less than €20!

Of course, I needed to add some other stuff to make it a fully working PSU. A case, heat-sink, fan and banana plug terminals I found on eBay, and a mains switch, mains connector, knobs and a toroidal transformer I bought on-line.  A fuse holder, stand-offs and miscellaneous bits of wire and fasteners came from the well-known pile-of-stuff-that-I-might-need-in-the-future.

Assembling the actual kit was the most straightforward part of the exercise. All parts where there, all through-hole, so no worries at all. The design consists of two boards: an analog board that contains the rectifier, filters and power transistor, and a digital board that has an ATMEGA8, LCD, and two rotary encoders. A ribbon cable connects the two boards, and carries power, two voltage signals coming from the analog board that represent the output current and voltage, and one voltage signal going into the other direction that controls the power transistor. All regulation is done in software, so the ATMEGA monitors the output voltage and current, and adjusts the signal to the power transistor to maintain the correct output. The concept seems very similar to this.

The more involved part of the built actually was the mechanics. Getting a proper case for it, making the right holes in the case, and finding a way to mount everything safely and securely inside. The first case I bought turned out to be a bit too small, so I had to order a new one. As it turned out, that one was actually the same model as in the pictures of the seller of the kit.
First attempt at mounting stuff. In the end I added some stand-offs to the fuse-holder, so it no longer sits directly against the back panel. And I put a bit of anti-slip netting for the transformer to help it to stay put.

For mounting I tried to limit the number of holes in case, for looks, but also very much because any metal parts sticking through the case could potentially carry a large potential in the electrical sense. So I glued some stand-offs behind the front panel of the case to attach the digital board and display. To fix the transformer to the case, I stuck a metal bolt through the plastic lid (of a peanut butter jar), and glued that to the bottom. For glue I used two-component epoxy, which seemed to work reasonably well on the materials involved.

On the back of the case I added a mains connector, and a fuse holder on the inside. The fuse itself caused me some problems. I initially figured that a ~200mA slow fuse should be sufficient. Unfortunately, even 500mA fuses kept blowing during power-up, most likely because the large filter capacitor draws quite some current initially when charging. At the moment, I am using a 1A fuse, which should be good enough to prevent fire, but might not be good enough to prevent the transformer from getting damaged if ever the electronics fail catastrophically.
Everything on the inside. The digital board sits in front, the analog board on the left side, and the transformer on the right.The fan on the heat-sink is triggered by a temperature sensor, and draws air through in the bottom of the case. 

The power supply is able to deliver up to 2A at up to 28V, and can be used in voltage limiting or current limiting mode. It constantly shows the set maximum voltage and current, and what is currently actually delivered. The two rotary knobs change the voltage and current set-points, and pressing a knob stores the set-point as a default. The fan occasionally switches on (triggered by a temperature sensor on the heat-sink), but at least during my typical usage it is hardly ever  needed. So far I am very happy with the power supply. It is especially convenient to be able to see the output current when powering something.

As the ATMEGA8 had two unused pins, it should be possible, in principle, to add a serial interface for controlling it from a computer. This would involve moving some signals around to free up the UART pins, but that is hardly a problem.  Other things on my wish list would be a output enable/disable switch, a mode where the supply switches off when exceeding the current or voltage set-point, and set/used power  (in Watts) on the display, next to current and voltage. I think most of this could be implemented in software, but I would have to start from scratch. Unfortunately, the AVR came already programmed, and the flash memory was locked, so I could not download the software for hacking. I decided to leave these possible improvements for another day,

Anyhow, at the moment I am more than happy enough with the supply as it is. So for now I will spent my time on other projects.

Another view from the top.

No comments: