You will need some source of electrons for every project. It did not take long before I started to think about other power sources but the obvious batteries. My first power supply was a simple LM317 based one with a potentiometer to vary the output voltage. The one important feature that was missing was current limiting. I saw an old Elektor magazine article (Elektor 7-8/2008 p. 106) about a mini bench supply that seemed like just what I needed.
The schematic needed a little tweaking to match the components that I had at hand. This proved not to be the road to take as it lead to a disaster. At the end I finally got the supply to work as I wanted but only after a couple of iterations, as I will describe. I also wanted to add a volt meter to display the output voltage. The design is based on the idea that you should use a good quality 18 V to 24 V DC power supply as a basis, such as the ones that are used in laptops. I happened to have an old laptop power supply that I could use for this.
The Elektor design used a LM7815 regulator to convert and stabilize the input voltage to an intermediate supply voltage of 15V. I had some LM317 variable regulators in stock so I used those instead, together with suitable resistors to set the voltage to be close to 15V. The original design used LM324 opamps to regulate the voltage. I had some TS272 opamps that I thought I could use. Wrong. They just did not work as I found out later. I think I missed at least the fact that TS272 output only goes as high as 8.4V, and not even close to the positive rail of 15V. I later replaced those with LM358’s as shown in the finished schematic.
In the final schematic above, IC2a regulates output voltage by controlling the mosfet IRFZ44N (shown as IRFZ44 as that was the closest that was available in the design software). Desired voltage is set by the potentiometer VR1. IC1b acts as a buffer, isolating VR1 from the feedback loops around IC2a. The three parallel 1 ohm resistors, with combined value of 0.33 ohm, at top right measure the output current. IC2b detects the voltage drop over the resistors and compares that to the limit set by potentiometer VR2. If the limit is exceeded then IC2b output makes the mosfet 2N7000 to conduct and that compensates by lowering the voltage as regulated by IC2a. There are also some clever feedback loops around IC2a and IC2b to make the circuit more stable, as described in the Elektor article. I will not go into those, partly as I barely understand the details :-). Finally, IC1a detects if current limiting is active or not and lights either one of the leds accordingly. The leds are on top of the box. Red is lit when current limiting is on and green when only voltage limiting is on.
I wanted to make the power supply to fit in the same plastic junction box that I had used as the enclosure for my first power supply. That set the limits for the PCB dimensions. I was not sure if my modifications to the original design would work, so I fortunately made some provisions for alternative solutions.
As you can see, I like to use SMD versions of resistors and capacitors. They are easy to solder and with home made pcb’s they save me a lot of drilling and board space. I am using 1206 size because they are big enough to handle and still readily available. A kit of 40 resistor values, 100 pieces each, was 9 euros on eBay. The 0.33 ohm resistors (to replace the two groups of 1 ohm resistors in the schematic) are an exception. Through hole resistors are needed due to power requirements. The resistors should be rated over 1 watt if over 1.7A output current is required. I used 2 watt resistors.
There are pads in the design for attaching wires that are to connect to the two potentiometers. I did not solder the red and green leds directly to the board. I soldered wires to the led leads and the board and then glued leds to the top of the enclosure with hot glue. There are also pads for connecting a voltmeter. I just realized that its connection to the board is not 100% correct, but still ok in this setup. The “Volt meter -” pad is actually negative power supply for the meter and should therefore be on the 0V trace, on the other side of the “Optional ammeter” jumper wire. The voltmeter that I used is a 0 to 99 V digital DC voltmeter from eBay, 1.50 euros a piece.
There are two pairs of block connectors for connecting the output. One pair is for banana sockets on the case and the other one is meant for a 5.5mm power plug connector (shown in the first photo) that I like to use in my designs.
LM317 and IRFZ44N will both need heat sinks. Especially LM317 will get very hot with higher currents. I used a piece of L shaped aluminum profile (2cm*1cm cross section) for each (the other one is partly visible in the photo above, at the top). Remember to isolate the heat sink from the tab as both tabs have voltages. LM317 tab has 15 volts and IRFZ44N a little less (depending on current), so they can not even be connected together. In my first version I used an IRF640 mosfet and it got so hot that it melted insulation on some wires that touched it. IRFZ44N has much lower Rds(on) value, so it dissipates a lot less heat, but still needs a heat sink.
At center top there is a provision for an alternative voltage supply for the opamps. I was not sure if my planned TS272 opamps would work when connected to the 15V rail or if they require a higher supply voltage. The Elektor article states that the whole purpose of the voltage regulator is to provide a clean supply to the opamps. In my final version I take the opamp supply directly from the laptop power supply output. I guess mine is stable enough without a regulator. A second LM317 with resistors configuring it for higher than 15V supply can be added to this optional space. In that case the yellow jumper wire should be moved to its output and the optional 22uF capacitor added as well.
Finally a summary of the major mistakes and how I managed to fix them.
- I tried to use an opamp (TS272) that was not suitable for this design. With that there was no regulation at all. Complete failure. Replacing that with a rail-to-rail opamp (LM358) was better.
- LM358 still needs 1.5 volts higher supply voltage than input voltage. I believe this caused the observed fluctuation for a short time in voltage when current limiting switched on. That issue disappeared after I moved opamp supply directly to input voltage. As Elektor’s suggested LM324 has similar parameters than LM358 I suspect that it could have had this issue as well.
- I initially used an IRF640 mosfet as the switch. It got very hot even with a reasonably good heat sink. IRFZ44N was much better.
|Part||Origin||Cost in eur|
|Laptop power supply, Sharp, 19V 4.7A||Salvaged from an old laptop||0.00|
|2 pcs LM358N operative amplifiers||eBay||0.42|
|5 pcs SMD 100nF capacitors, 1206||eBay||0.10|
|2 pcs 0.33 ohm 2W resistors||triopak.fi||1.40|
|IRFZ44N N-channel MOSFET transistor||eBay||0.61|
|2N7000 N-channel MOSFET transistor||eBay||0.12|
|100uF electrolytic capacitor||eBay||0.04|
|22uF electrolytic capacitor||eBay||0.04|
|10uF electrolytic capacitor||eBay||0.04|
|18 pcs SMD resistors, 1206||eBay||0.04|
|2 pcs 5k potentiometers||eBay||0.38|
|2 pcd potentiometer knobs||eBay||0.50|
|2 pcs 3mm leds||eBay||0.06|
|a half of a 100×160 mm photosensitive PCB||www.tme.eu||1.40|
|3 pcs 2 pin terminal blocks||eBay||0.18|
|0 to 99v volt meter||eBay||1.50|