Sunday, March 29, 2015

A small power supply

As I mentioned in the previous post, I have been building a small bench power supply. It is loosely inspired by the instructable here. That design has a LM2596S module to convert from unregulated DC to regulated DC with voltage and maximum current controls, and a voltmeter/ammeter module for displaying the output levels. It also uses an Arduino to indicate whether the voltage or the current is limited. What I built omits this last part. I don't really see it as needed, as the module has a built in LED that conveys most of the same information. It's labelled CC/CV and is off when the voltage is limiting and on when the current is limiting; more on what this means in a moment. All I did was to unsolder the one that is built into the board and solder on an external LED, so I can bring it out to the front panel when I put it in a case. I did the same for the OK LED on the module. I also used a different meter. And finally, I omitted the on-off switch and the output on/off switch from the instructable design. So the final design looks like this:

(Image generated by MooseCAD).

The specific LM2596S module I used is this one, and the meter is this one. I bought both on ebay from a seller called nyplatform. Note that one difference with the original design is that the thin black wire (power for the display) does have to be connected or the display does not come on.

My input was a wall wart with a variable output that I had lying around. It has a 2.1mm connector. I have several other wall warts with fixed output, and an old Thinkpad power adapter with the same connector. Any of them will do. The weakest spot in the components I used was the 2.1mm socket from MCM Electronics, which doesn't make a very good connection and has to be jiggled sometimes to make it work. I'll replace this at some point.

Adapting the power module

The power module is designed to be used in a battery charger. If you follow the link, you'll see it has three adjustment potentiometers attached to the board, one for the voltage, one for the current limit, and one which sets the threshold at which charging is considered to be complete. We are only interested in the first two, and we want to replace them by free standing potentiometers. Unlike the instructables design, I used regular 270 degree linear ones, not 10 turn wirewound ones. The 10 turn ones are expensive and I don't think I need that level of control. You have to unsolder the adjustment pots from the board so you can solder on wires going to the free standing ones instead. Unsoldering the adjustment pots from the module turned out to be quite hard to do, and I ended up damaging one of the PCB tracks for the wiper of the current adjust. Fortunately, there is a small pad on the module PCB which it connects to, and I was able to solder a wire to it. For one of the pots, I soldered on a header, but after doing this I decided it didn't offer an real advantages electrically or mechanically, and so I soldered the wires directly to the board for the other one. I also removed the power and CC/CV LEDs and soldered on external ones instead. Note that if you remove the CC/CV LED, you must attach either an external LED or a resistor instead or you lose the ability to set a current limit. You can see why by examining the circuit diagram, which shows it is part of the feedback into the LM2596. The result looks like this:

I'll package it up into a box when I get one of a suitable size.

Controls

There are two controls, one for setting the voltage and one the current. The original instructables article is not very clear on how these controls work. Perhaps this will help. The module will provide output at the voltage you set, provided the load on it stays below the current limit that you set. If the load tries to draw more current than this, then the voltage will drop to keep the current at the threshold. When this is happening, the CC/CV light will come on.

For example, I connected a 10 ohm, 10 W resistor to the output and set the voltage to 5V with the current setting turned up to maximum. The meter shows a voltage of 5.02V and a current of 0.49A. Now I turned the current limit down. Eventually it reached the point where the current limit was below 0.49A. At this oint the CC/CV light comes on and the voltage drops. For example, with one setting I got 0.25 A and 2.61 V. Probably it's not exactly 2.5V due to the tolerance of the resistor. Note that I had not changed the voltage setting: it was just the current limit which was forcing the module to output a lower voltage.

The function of the other ("OK") LED is a little less clear: it is on when the current limit has not been reached and is off when it has been reached, but there is also a gap when neither is on.

I imagine in most cases when I am going to use this power supply, I'll just have the current setting on maximum, as I'm typically more interested in setting a voltage limit.

One last thing is to see how the output looks on a scope. Here it is:

Removing the DC and zooming in shows about 3mV oscillations for about 5V output:

When current limited the shape is slightly different:


No comments: