Variable Power Supply

boxedUpI’ve been focusing on power supplies and related equipment lately because I don’t have a lot of bench gear. On one hand, I would like to build equipment from scratch, but on the other, it would be crazy not to look at some of the building block modules available on eBay and other outlets. I could not beat these prices, even if I built just about entirely from scrap. Using modules rather than homebrewing down to the metal seems like cheating, but it not only saves time and money, but often yields better performance and miniaturization.

So, this project consists of building a bench top power supply from three modules: a switching power supply that puts out a constant voltage, a DC/DC converter, and a combined voltmeter/ammeter. The combination is based on a youtube video by GreatScott that made use of a cheap DC/DC converter based on the LTC3780 that is being sold by various vendors  at a bargain price on eBay. Some of the same vendors are also selling a red and blue volt/ammeter. There are a few variations of the meter, I selected one rated for 100V and 10A and which did not require an external shunt resistor for current measurement.

I ordered one converter board and one display from two different vendors. The body of the two meters was identical, but the wires were slightly different in gauge and color. The two DC/DC converter boards were apparently identical except for placement of the heatsinks and the shunt resistors, as noted below.


The switcher power supply that I ordered was a commodity item, again available from many vendors on eBay. I went with 12V/5A. For this application, it doesn’t really matter whether the voltage is terribly accurate, but it is desirable that it not be noisy.

The DC/DC converter board is reviewed in detail on the beyondlogic wiki. That site provides some information from the chinese datasheet and reverse engineers some of the control features. The board is said to tolerate input voltage 5-32V, outputs 0.3-30V, and in continuous operation can handle current of 7A and total power of 70W.

There are three small potentiometers on the DC/DC converter board; with the input voltage on the left, they are at the bottom of the board, from left to right: low voltage cutoff, current limit, and voltage output. I adjusted the low voltage cutoff to the extreme low end of its range to get it out of the way.

The voltage output adjustment pot is about 500k ohm. Configured as a rheostat. On the high side, it is connected to output voltage, and the lower end is the upper half of a voltage divider. A 14k resistor serves as the lower half. The divider voltage is sampled by the Vo(sense) line of the LTC3780, which will adjust output to keep the Vo(sense) at 0.8V.

One important implication of that design is that adding a larger potentiometer could destroy the chip. The formula for output voltage is 0.8V * (1 + potentiometer/14k). With a pot much larger than 500k, the output voltage would be driven out of spec trying to compensate for the voltage at Vo(sense).

I had a 500k pot on hand, but found that it was difficult to make fine adjustments. One solution would be to replace it with a multi-turn pot, but the only ones I had on hand were 10k and 100k. I went with the 100k one, but to keep the voltage divider in the right range replaced the 14k SMD (0805) resistor with a 2k8 one. By calculation, this should yield a maximum output voltage of 29.3V, which turned out to be the case.

The one other feature that I wanted was current limiting. The middle 200k potentiometer sets the current limit such that if a load draws more, output voltage drops. This circuit is built around a shunt resistor and an LM358 configured as a non-inverting amplifier. Voltage above the shunt resistor is the positive input, and the potentiometer and other resistors in the feedback loop set gain. When the shunt voltage times the gain exceeds 0.8V plus a diode drop, that voltage is fed to Vo(sense), and the LTC3780 starts dropping its output voltage.

resistorBoardTo make practical use of the supply, I wanted to be able to set a known current limit without having to hook the supply to an electronic load each time. Two approaches came to mind: 1) replacing the potentiometer with a microprocessor-controlled one, working out calibration and implementing the control in firmware; and 2) selecting fixed resistances for a few useful current limits. The first approach would require a microprocessor, display, rotary encoder, and a digital potentiometer. That seemed like overkill. On the other hand, I had a multiposition switch in my junque box. It was originally double ganged and wired to switch four inputs between three positions, but it did not take a lot to take it apart, rewire, and polish up.

I made a spreadsheet to calculate the resistances needed to obtain various current limits assuming that I would switch in a resistance between the 1k resistor on the board and the 1M6 resistor at the LM358’s output. The junction between my added resistor and the 1M6 resistor went to the LM358 negative input.

I tried a few values, monitored the current on an electronic load and realized that the currents obtained were systematically off. I had measured the voltage drop across the diode between the op amp output and the Vo(sense), and the 0.8V value came from the datasheet, so the other possibility was the shunt resistor. On my board, the shunt resistor is labeled R008 (8 mOhm) versus the description by beyondlogic of 7 mOhm on their board. Working backwards, I calculated the total observed resistance as 9.3 mOhm, mostly the shunt resistor, but apparently also some contribution from solder, traces, wiring, etc.


Working with a revised spreadsheet that takes the real world resistance into consideration, I worked out a table of values. To be spot on, I used trimmer pots to adjust the higher values. I did not have a trimmer for the lower values, so I used fixed resistances. I could later add trimmers, but the low-end currents are not that critical for my applications.

The meter used has two leads to power its board; these connected to the 12V input of the DC/DC converter. The heavy red wire from the meter went to the positive output jack. The negative output from the DC/DC converter went to the heavy black wire on the meter, and the blue wire from the meter to the negative output terminal. The meter does care about polarity for the current measurement. I found the meter well-calibrated from the factory, with no need to adjust. The meter’s integrated ~50 mOhm shunt is a negligible load.


The supply was built in plastic case, with the AC input and switching power supply in the bottom half, and the DC/DC board, resistance board, and front panel on the bottom half. The only connection between the two halves is the 12V output from the switching power supply; the connection is made through powerpole connectors. In a pinch, the switching power supply can be bypassed, and any other DC source within a reasonable voltage range could be quickly plugged in via the powerpole connection.

Now the make the labels for the front panel…

24 thoughts on “Variable Power Supply”

  1. Hello Jack, I must say it’s a very nice project and you did a great job documenting the process. Especially I like the idea of using a rotary switch instead of a potentiometer for precise current limiting… unfortunately, I may be a little dense and I can not understand how to calculate the required resistances for certain limits. The fact that the link to spreadsheet appears to be down, doesn’t help either I suppose 🙂

    I would like to implement this in a very similar project, would be nice if you could help me out a bit.
    Thank you.

  2. Hi Dalius – Sorry about the broken link – I must have moved the file on the cloud drive while doing some “house cleaning.” I have uploaded it again; please let me know if you still have difficulty getting it to download.

    The trick in getting the right resistance is to make your best guess using calculation, but then experimentally put in a high precision resistor and see what kind of voltage you get. From there, you can work backwards to refine your guess about the resistance of the shunt resistor plus connections in its path. For me, I had a 8 mOhm resistor, but calculations worked out if I assumed it was 9.3mOhm, for example. Ultimately, you could fine tune the fixed resistances empirically.

    One drawback to this design is that the switch resistance may contribute a bit or change over time, but I think it’s a small factor.

    Good luck,


  3. The file downloads fine now, and it’s a big help. Thank you for taking the time to update the links.

  4. Thanks for publishing your project and have commenced a similar project with the intention of only using voltage control, however removing the 500k pot and reconnecting with a short length of cable for mounting causes the module to heat up and draw additional current once the output is higher than input of 12 volts with no load. This happens with both the new pot and original pot when connected by cable, replacing the pot back on the board restores all to normal. I tried shielding and twisting cable with no success.

    I was wondering whether you had this experience and how to overcome the problem.

  5. Hi Gordon, Sorry for the slow reply on this one – I’ve been traveling for the last few weeks. I agree, this is puzzling. I just ran about 10cm of straight wire to the pot that I used. I doubt the problem is with the pot, as you’ve used the original and a replacement. One other experiment you could try – replace the pot with a 270k resistor. If you have a 14k SMT resistor on the board to form the voltage sense divider, you should measure 16.2V at the output. You could try it on the board versus using a wire connector; if this works, it would be somewhat reassuring.

    You could also try testing using a small load and see if you observe the same behavior. I think it works without a load, but in my set up I have the digital display attached to it, so I suppose that would constitute a very tiny load, but a small load might help with stability. Try putting a small resistor and LED across the output.

    I think it’s more likely that the length of wire has something to do with it, perhaps picking up some nearby signal and throwing one of the op amps into oscillation. You might be able to sniff out such oscillation with an oscilloscope. Perhaps you could prevent it by looping the end of the pot cable nearest the board through a ferrite a few times.

    If you find a solution, I’d be curious to hear what you think the problem was.



  6. Hi Jack, thanks for your response. I had tried your suggestion of using a load on the board and the ferrite bead without success. In the end the solution that worked for me was to use a shielded cable earthed to negative on the board and to the pot case which stabilised the the board current draw and output voltage. So I am guessing that the cable is is affected by some capacitance or inductance.

    Another observation is the connection of the meter negative for the display. On the module supplied to me the display negative and the ammeter negative are connected. This gives a parallel path for any load currents back to the 12 volt supply which at higher currents could exceed the current rating of the thinner display wire. I am thinking that I will leave it disconnected so there is only one current path back to the supply.


  7. I’m little confused, the 14k smd resistor code is 143. Why you mention in the parenthesis 0805? Sorry for dump question 😛

  8. No problem – The “0805” refers to the size of the resistor. It comes from the size in imperial units, 0.08 inches by 0.05 inches. It is equivalent to metric size of “2012”, but for some reason, the older nomenclature seems more common.


  9. Thanks for you answer Jack. Please let me ask you one more question, where is this resistor located on the pcb? I’m looking some high-res photos of this board (since my parcel has not arrived yet) but i can’t find the 14K SMD resistor.

    Also, do you think using a 1? 50W resistor for testing the load & adjust the current limit rather than a multi-position switch is a safe choice?


  10. Hi,

    In this case, the resistor is marked “1402” instead of “143” — just a matter of specifying the resistance with three significant figures. I’ve enlarged one of the photos above and have put a box around it.

    14k SMD resistor

    In one of the photos of the completed project towards the bottom of the blog post, you can see a bit of red tape under my bodged modification of this resistor. – Jack

  11. I have a 200k and a 20k ohm 1/2w potentiometers connected in series used to coarse and fine voltage control over ltc3780 boost converter. If i put a 0805 6.2k ohm resistor replacing the 14k resistor used in the ltc3780 boost converter the voltage divider would be in the right range??

  12. Hi Marco – Yes, that sounds fine to me. Please let me know if it works. Cheers – Jack

  13. Hello Jack, I have to say NICE article!

    I have two questions.
    1. Can I instead the 200k ohm potentiometer (i.e., potentiometer for current limiter) use 20 kohm potentiometer ?
    2. Is it possible to connect a LED that would indicate that current limiter is active (i.e., current limiter limits the output current)?

    Thank you, Oliver.

  14. Hi Oliver – Sorry for the slow reply!

    1. Sure, that would be fine. With 200k, you would be able to set a larger range of currents; with 20k, the maximum current will probably be around 1.5 amps, which is still a decent amount for many projects.

    2. Yes, that would be possible. Take a look at the bottom schematic on the beyondlogic post. You could add another comparator, using the same inputs at the ones driving pins 2 and 3 of the LM358: the set point from your current-limiting potentiometer, and the voltage above the current sense resistor. When the current sense resistor voltage exceeds the set point, the comparator output will go high. Depending on what part you choose, you could probably drive an LED directly from the comparator output or use the comparator output to control an LED via an N-channel mosfet. If you had another LM358 on hand, for example, you could take the inputs to pins 2 and just like in the diagram, borrow some 5V rail power from the board to power pin 8, and put pin 4 to ground. Then, take pin 1 directly to the positive side of the LED, and connect the LED’s negative end to ground through an (about) 330-1k ohm resistor. The LM358 can output 20mA, and you probably need only about 10mA or less for most LEDs, so choose your current limiting resistor accordingly. If you had a comparator that could not source as much current, you could take its output to the gate of a 2n7000 or similar mosfet. That gate should be pulled to ground through an about 10k resistor. Then, put an LED and a small resistor as above between the 5V rail and the drain of the 2n7000. The 2n7000’s source would connect to ground to complete the circuit. This makes sense in my head — hopefully I’ve got it all right :-). Good luck on your project – Jack

  15. Hi jack,
    Would it make a difference using a 250k ohm potentiometer instead of a 200k ohm potentiometer or the current limit

  16. Hi – That should work fine, but it will mean that you’ll have relatively poor resolution — a little turn will change the cut off value a lot. I’m on the road right now, so answering this off the cuff, but judging by the photo of the resistors that I used to select different current limits, the resistance required to set cut offs between 1 and 5 amps ranged from 6k8 to 68k, so I would think most of the resistance above that point wouldn’t be that useful. You’ll probably want to stick a knob on the pot and determine empirically how knob position relates to current thresholds. Good luck – Jack

  17. Hey Jack, I’m a beginning electronics students who just built this project. When I turn the middle current limiting pot, the visible current on the screen does not change. Am I doing something wrong, or is my chip broken? I wired the screen and ltc3780 to a fan, but no matter how much I turn the pot nothing but the voltage can be changed by me. Help!?

  18. Nope, you’re probably not doing anything wrong. The current limit only kicks in when the device under test pulls current near that limit. When that happens, the voltage will start dropping. If you have an electronic load and stick an ammeter in line, you can test that your current limiter is working as expected. – Jack

  19. Hello Jack,
    I purchased an LTC3780 some time ago, it was laying in a box for too long now, want to put it in use and build a power supply, using components I already have:
    – single turn 200k or multiturn 10k pot for voltage
    – single turn 200k pot for current
    Do you think they could fit?
    Setting the current would be ok for me just putting some reference marks on the 200k pot, but I only need about 3A, so maybe a smaller pot would be better?
    200k single turn for voltage would cause difficult adjustments?
    Any suggestions on how to improve the heatsink (I have the upper model in the picture), coupling additional ALU heatsinks on top of the existing ones?
    thanks and regards

  20. Hi Rodolfo,

    Thanks for the comment. Here are some thoughts:

    * Voltage: Voltage output is a function of a resistive divider, the top of the divider is your pot, the bottom is a tiny fixed resistor on the board. The formula is voltage output equals 0.8 * (1 + Rpot/Rfixed). In my case, the bottom resistor was 14k. If that’s true for you as well, a 200k pot would give max voltage output of about 12.2V, which may be too low if you want to power some nominally 12V items that would normally run from a car battery. A simple fix would be to put a bit more resistance in series with the pot, if you are willing to trade off some of the lower voltage range. Putting a 56k resistor inline would give you a minimum voltage around 4V and max around 14.6V, covering the sweet spots of 5V for digital circuits and 13.8V for car batteries. A single turn pot may be a little fussy, but if you are willing to accept voltage plus or minus a fraction of a volt, that will probably be okay. I’d suggest building it this way and see if it is acceptable. You can always replace that pot later with a multiturn one.

    * Current: On my board, a 200k pot was what was originally used to control the current limit. If you want a current limit for safety reasons but don’t was to adjust it frequently, you could just use the one mounted on the board. It sounds entirely reasonable, though, to bring it to the front panel and use the one that you have on hand. As you said, you’ll need to calibrate it against a known load and make tick marks.

    * Heat Sink: Adding a heat sink would be difficult. I don’t think putting one on top of the existing ones would work well — I think it would be hard to couple them thermally. These converters are pretty efficient, but if you find that the device is getting hot (like over 60C) for the current you need, I would suggest adding a small, quiet fan.

    Good luck with your project!

    – Jack

  21. Hi Jack.

    Finally i’m implemented the power supply using the module.
    I use 200k and a 20k ohm 1/2w potentiometers connected in series for coarse and fine voltage with a 0805 6.2k ohm resistor replacing the 14k resistor used in the ltc3780 boost converter.
    In order to limit the amperage range i use a 20k ohm and a 10k ohm 1/2w potentiometers in series. It give me a total of 3.56A of power with this configuration.

    The strange thing i am having with the power supply now is that if i try voltages below 12v, output voltage is not stable, it varies (ex if i put 4.35v it goes from 4.20 to 4.40). One important thing is that output voltage of the internal power supply that feeds ltc3780 module is 12v.
    If i try voltages above 12v the output is stable.
    I dont know in which part is the problem. Hope you can help me. I will apreciate so much.

    Thanks so much. Marcos

  22. Hi Jack,
    I’m building a variable bench top power supply using this module ( I have the model with heatsinks on top of transistors, not the bottom) and I have two questions:
    1. For current limit, if I use a 100K precision pot instead of the stock 200K trim pot, what top current should I expect? What limitations for lower voltages for example?
    2. For voltage limit I’d like to use another 100K precision pot like you, but I’d like to use even lower resistance for the bottom part of the voltage divider, particularly I’d like to reach top voltage of about 36V. Is it possible, will it break the board?
    Thanks in advance,

  23. Hi,

    Hope this reply comes in time to be helpful – I hadn’t checked the comments on the blog in a while 🙂

    If you substitute a 100k for the 200k current limit pot, I don’t think it will matter much. The way I calculate it, the lower limit will barely change, but the upper limit will be roughly cut in half. I doubt that is an issue, since that upper limit would still be about the rated output current of the device.

    The LTC3780 boost-buck converter is rated for best voltage control between 4 and 30V with a maximum of 36V. I would suggest factoring in a little safety margin, and not pushing above 35V. I think it could kill the chip if the voltage divider value would push the chip to try to output more than its rated voltage, so be careful in either going with too large a value for the potentiometer or too small for the resistor on the bottom side of the voltage divider.

    Good luck!


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.