No Script, No Fear, All Opinion
RSS icon Home icon
  • EEVblog #221 – Lab Power Supply Design – Part 1

    Posted on November 28th, 2011 EEVblog 37 comments


    Dave shows you how to design a simple constant current and constant voltage lab power supply that can be either software (PIC/AVR et.al microcontroller) or traditional pot controlled.
    Starting with the venerable LM317, and ending up with an LT3080 solution, and the some thought processes that go into it all.
    Part 1 is the conceptual design.

    Be Sociable, Share!
    • Peter

      Thanks Dave, I really appreciate this type of design lesson. Can’t wait for part2!

    • Jakeypoo

      Yes, Dave! You read my mind.
      This has been on my project list for the past few months.

    • Michael

      Fantastic run through. I particularly like the refactoring of the design – brilliant!

      Bring on part 2!

    • Michael

      Just an aside – I too have been thinking about power supplies lately except not building a linear bench supply rather troubleshooting and repairing switchmode ATX style PC power supplies. I build and refurbish PCs on the side and have collected up a pile of these supplies over the years that all seem to have the same issues. It seems that the +12V output on them tends to go bad over time and the supply becomes unusable at that point. In the past I’ve just replaced them and figured one day I’d spend a spare Saturday going through the bad ones and seeing if I could get them working again. Well that day came last week when one went bad that I couldn’t readily replace because of its rather unique form factor so over to the repair bench it went. While I was working on the bugger I thought this would make a great EEV blog topic. A complete run through of the typical ATX ~300W PC power supply including how they work and some typical problems they have and how to fix them. So what do you think Dave? Care to take it on?

      • Michael

        In case anyone wants to know, the issue I had with the one I needed to fix was crappy electrolytic caps on the outputs. Noticed the typical bulge on their tops right away. This seems to be a recurring problem. I’ve restored countless LCD inverters, stereo amps and power supplies due to cheep caps. What gives?

        • Steve

          Not necessarily cheap caps (although that may be it).

          Capacitors have a limited life and as such can come to the end of it.

          Filter capacitors on switch mode power supplies have quite a hard life.

        • Bob

          The whole “bulging caps” thing apparently owes itself to a bit of bungled industrial espionage by China.

          http://en.wikipedia.org/wiki/Capacitor_plague

          http://www.badcaps.net

          • Michael

            Thanks for the links Bob. I knew about the Badcaps site but the Wiki article is very good and has a lot of detail.

      • http://www.eevblog.com EEVblog

        Sorry, I have no interest in repairing ATX power supplies.

        • Michael

          No problem Dave. Frankly neither do I hence the reason I’ve let them pile up in my workshop so long. Just figured it was a topic that would work here. Can’t wait for the next installment in the power supply design. Keep up the good work!

    • Keith

      Dave – Fantastic!! I never fail to learn when i’m watching the EEVblog. In addition to power supplies, I hope you consider future projects such as frequency counters, function generators maybe even logic analyzers. Thanks.

    • John

      Excellent description without over-complicating the issues. Another nice thing about this explanation, Dave, is that I can see how to try out this design with discrete parts (Buying an LT3080 is impossible where I live).

      Thanks for the great blog.

      • http://www.eevblog.com EEVblog

        Yeah, roll your own, no need to use an LT3080. I just like it and can get it, so I’m using it.

    • Pingback: AE EP#18 Super Simple Constant Current Source | The Amateur Engineer

    • AnonymousCoward

      It figures you’d post this after I just purchased a bench supply this weekend :(

      A function generator build would be very cool if you’re looking for ideas.

      • http://www.eevblog.com EEVblog

        I already have two simple function generator designs published on the web.

        • AnonymousCoward

          Thanks. I was aware of the MAX038 build, but the chip is impossible to find.

          I did some searching and found the other, AD9835, build. Looks like I’m going to have to watch the surface mount soldering tutorial again :)

          http://www.alternatezone.com/electronics/dds-art.htm

          • Farley

            AD9850 modules are on Ebay dead cheap, oscillator and filters on board, connections are 0.1″ . No SMT soldering required.

    • Zizzle

      With the current limit transitor on, won’t there be 0.6v on the collector – the input to the LT3080?

      So you won’t be able to get the output current down to milliamps? Or will the LT3080 eat up that 0.6v?

      Also, since most cheap micros have onboard ADCs these days, I was hoping to see a design that used those.

      • http://www.eevblog.com EEVblog

        The final design will probably use a micro based LCD based panel meter that uses the ADC’s powered from the same reference as the power supply.

        • Zizzle

          I guess I was thinking along the lines of getting rid of the analog current limiting part of the circuit and doing it in software.

          No op amps needed.

          Just the one current sense resistor, darlington output transitor and PWM low-pass filter.

          http://tuxgraphics.org/common/images2/article10051/detailpower_idea.gif

          • http://www.eevblog.com EEVblog

            Opamps work much faster.
            Unless you have a specific need to do it in software, it is not the best solution.
            As always, YMMV.

            • Zizzle

              A reduced part count would make it easier to build and lower cost.

              But I’d be interested to see more about the techniques and limitations involved.

              Old school linear regulation has been done to death and not that interesting.

              Just out of curiosity what do you think is a good a enough response time for implementing software control?

              You are looking at adding a filter cap on the reference pin of the LT3080 to stop CC from oscillating, surely that would affect response time too?

              Maybe in the review of the final circuit, you should use one of your DSOs to look at the response of the circuit to switching in a 1 ohm load? i.e. is there a brief over current situation?

              I just took a look at the Atmega168 data sheet. ADC: 13μs – 260μs conversion time. But it also has an analog comparator which could drive an interrupt which could be useful.

              The MSP430 value lines looks like the conversion rates may be a little faster.

              But I think that might be a more interesting blog technically.

              Besides how fast a response is needed, how good is the internal reference on the ADCs? How may bits precession is needed? Noise? PWM vs DAC.

              A shootout between an old school linear design and a low part count software lab supply?

              How does a design like this work in practice?

              http://tuxgraphics.org/electronics/200707/bench-power-supply-unit.shtml

              “The ATmega8 has an AD-converter which is more than fast enough but it has at first glance no DA-converter. It is possible to use pulse width modulation and an analog low pass filter to get an DA-converter but this is much too slow to implement the short circuit protection in software. How to build a fast DA-converter? “

    • Lestro

      Uau!!

      Really fine explanation Dave.

      Thanks for this great blog!

    • WestfW

      I’ve wanted to build a “lab” power supply using multiple 317s, putting together multiple app-notes that I haven’t seen combined. 317 for the voltage regulator, 317 for the current regulator, 317 for the current source to negative voltage needed to get 0V. 317 for a switching pre-regulator. multiple 317s for increased current capability, etc.

      It’s probably just that box of 100 317s I bought on eBay some time ago :-)

    • Dror Wald

      hi Dave
      episode 221 was very good!
      i can not wait to see part 2.
      usually when you make this kind of videos
      i can’t stop the video all the why to the end.
      and the i play it again!!!
      pure joy and learning!
      thank you very much.
      Dror

    • peet

      better than any lecture i had so far (5. Semester) ;)

      thank you for telling me stuff about the stuff i actually study!

    • http://morganradio.net Jon Leclanche

      Well done David. You are a really good teacher. I have noticed that there are a good few Australian electronics techs around. Now I fancy a nice cool larger…..

    • Andreas W

      Hey Dave,

      nice work, I really like the way you explain the stuff, but I have a question to your explanation of the constant current circuit. Why do you assume, that the top voltage (Vo) is alway 10 volts? Especially when shortening the output to Ground, I can’t get the reason why there should be 10 volts to be measured.

      Thanks!

    • Niels V

      Hi Dave

      First of all thank for this great blog! Your easy to follow and enthusiastic video blogs are great. As an analog IC designer I haven’t got that much experience with discrete design, but you have reminded me why discrete design is so great and given me the motivation to start learning and working with with it again in my sparetime. And building a lab supply is a great project. I remember that we build one when I started at the university, to get a feeling of soldering and assembling electronics. I’ve just ripped it open to have a look at our old design, and sure enough it uses the LM317 :-D

      Now a question: you spec that you want your supply to go all the way down to 0V, but what do you need this for? For a battery application 1.25V should be low enough.

      Looking forward to hear your answer, and once again: Great blog!

      Greetings from Denmark
      Niels

      • http://www.eevblog.com EEVblog

        To simulate a single cell alkaline battery for example requires a supply to go down to 0.8V at least.

    • Michael P

      Hi Dave,

      I second Andreas W’s question concerning the 10V assumption in your explanation of the constant current circuit. I follow everything else, I just don’t quite understand where the 10V (or other arbitrary reference voltage) is coming from. Could you clarify that? Thanks!

    • Pingback: LM723 Current Limiting Questions

    • Pingback: How to start off in microcontrollers? - Page 2

    • thuong

      i want to made a current regulator 3A only transistor.thanks

    • Atte

      Hi dave, this video, along with others, is great! i looked all over the web to find good but simple power supply videos, and this answered my CC/CV questions, and with bonus, can be done with discrete components, no microcontrollers reguired, i prefer transitors/opamp, i’m that much nostalgic :D. but, thanks, and keep it up :)

    • Pingback: Link Roundup: Power Supplies and Dummy Loads | Atom Hackery