Variable voltage bench supply with current limiting

bench_power_supply

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.

bench_power_supply_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.

bench_power_supply_pcbAs 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.

bench_power_supply_pcb_solderedLM317 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.

  1.  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.
  2. 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.
  3. I initially used an IRF640 mosfet as the switch. It got very hot even with a reasonably good heat sink. IRFZ44N was much better.

Attachments

power_supply_v3_pcb

power_supply_elektor_v6_english_circuit_wizard_design

Parts list

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
LM317 regulator eBay 0.14
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
1N4148 diode eBay 0.06
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
  Total: 7.03

8 thoughts on “Variable voltage bench supply with current limiting

  1. hello sir
    your circuit looks great,i would like to use but in my case, can this circuit handle 40V dc input and if i change 7815 with lm317 or lm723 for variable output and add 8pcs 2n5038 more amps can this works??
    will appreciate your help
    kostastekerlekis@hotmail.com

    1. Hello Kostas,
      I think that would not work. The LM358 opamp only goes up to 32 volts. You can google for the spec sheet. And you should also check the operational voltages of all the other components if you want to go higher than the original 24V that the Elektor article had.
      Best regards,
      Jari

  2. Hi Jari, Could you please share the scaled pcb without the jumpers and writings? (so I can use it to make the board). It will be nice if you can make another one that works to a higher voltage, like 24 or 30V, then I can use it as a laboratory power supply! I look forward for your reply. Many thanks. Best Regards. Marcelo

    1. Hi Marcelo,
      Thank you for your comments! I have attached a pdf with the PCB design to the post. I hope that helps!
      The original power supply still works so well for me that I doubt that I have a need for another with a higher voltage. It would need to be a totally new design as this one assumes the use of a steady power supply such as a laptop charger. Those don’t go that high in voltage.
      Best regards,
      Jari

  3. Dear Jari, Thanks for the PDF. I am thinking of using 2 laptop chargers in series if necessary but I am not sure of what else needs to be changed in order to get higher voltages at the final output. Did you actually get 1,7 amps with this design? What design software did you use for the PCB? How good is the precision when adjusting the voltage and current with that potentiometers? Many Thanks. Best Regards. Marcelo

    1. Hi Marcelo, I am not sure if higher voltages are feasible with this design. The LM358 is specified up to 30V so anything higher than that is likely to blow it. I’m sorry but I am not able to advise on an opamp that could be suitable for higher voltages.
      The max current depends on voltage. On smaller voltages I have been up to 1.7A, but this is not a powerful current source, so I would not expect to get there with more than a few volts.
      I used an elementary design tool called Circuit Wizard that was available to me at the time. These days I’m using KiCad.
      This is not a high precision instrument either. 🙂 I am using cheap Chinese voltage and current meters as part of the design and they probably have an error margin of 10% or more. This is still sufficient for basic tinkering. I can always measure the actual current or voltage with my multimeter.

  4. Hi Jari, Could you please share the file/s with this schematic for Circuit Wizard and Kicad? Have you simulated the circuit? I draw it using ISIS Proteus Professional version 7.2 (you can see it here https://ibb.co/c2kL25d), but it gives me errors with the power supplies when I try to simulate it (instead of the voltage regulator+capacitors+resistors I just placed a 19V DC supply where your unregulated markings are located and a 15V DC supply where your regulated markings are located). Then I draw it again using National Instruments’ Multisim version 14.2 (you can see it here: https://ibb.co/42Mtx1P), but it also gives me errors when I try to simulate it. Could you please put some powerful 12V lamp as a load and increase the current to the maximum and tell me the readings of voltage and current when doing that (a 10 watts lamp should be enough I think). 30V are enough for me so please tell me if you think that the rest of the circuit will be fine if I put a regulated 30V supply at the input. Many thanks. Best Regards. Marcelo

    1. Hi Marcelo,
      I got 1.57A and 13.1V with both dials maxed with a 12V 20W halogen bulb. But I noticed that both the LM317 and the IRFZ44N got quite warm even if I was only doing full power for just long enough to be able to read the multimeter. I have a 4cm piece of L shaped aluminium profile as the heat sink on the LM317 (you can see it sticking out at the top of the pcb in the photo above).
      I don’t recall having simulated the circuit. I’ll post the Circuit Wizard file in the post but I have never drawn this with Kicad. I took that to use only later.
      The original Elektor article mentions that this design is only suitable for small loads. The heat could also become an issue if you wish to draw more power out of this one.
      If you wish to use higher voltage then you’ll need to adjust the LM317 resistors to turn up its output voltage. Otherwise it will turn the extra voltage to heat and probably burn. Other than that I think the design can handle a higher voltage. Without analyzing it further and just by looking at the resistor values one could see that those do not seem to be tuned for a particular voltage. They are just standard common values such as 10k or 1k. And the semiconductors can handle up to 30V.
      I’ll email you the article so you can have a look at that also.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Due to comment spam from robots and from spammers who try to sneak in their links disguised as comments I had to take comment moderation in to use. Comments that have any links will come to me for moderation. Please do not submit your comment twice -- it will appear shortly. Thanks for your understanding. Jari.