# LM317 - bringing down to 0 volts (with a uC)

I am wanting to build a custom power supply for myself, and am having trouble understanding how to drive the adjust pin with a microcontroller.

The datasheet for it is here: http://www.ti.com/lit/ds/symlink/lm117.pdf

The issue is that I can make a pseudo? DAC with a low pass filter to get 0-5 volts from my PWM output, however Vout is formed by $1.25+V_{adj}$ , meaning, I can only get 1.5-6.5 (or 0-5 if negatively offset) with my solution as is.

My questions are: How do I offset -1.25V? A negative regulator (i.e. LM337) seems a little overkill, however I have never seen a solution with my own eyes and it could be very normal. Are there any quick ways you can think of to offset it?

And more importantly, how do I drive the ADJ pin from ~0-12V if my uC can only output 0-5 with PWM? Is there an indirect method of doing this? A simple building block I can place in between to map this range?

I am quite open to alternatives, however fixing this has piqued my interest and there are not many similar adj. regulators available to me (LT3080 with ~0 offset not available on Mouser at the moment)

• You should have a look at this video series about just the same thing you want to do: eevblog.com/2011/11/28/… – 0x6d64 Mar 11 '12 at 12:54
• Actually, @0x6d64, the designer ends up simply living with the offset in that series. He has another project, however, that uses a battery for offset: alternatezone.com/electronics/ucurrent/uCurrent%20Schematic.png – tyblu Mar 11 '12 at 16:44
• Well, he uses the LT3080 in that project, which OP specifically mentioned wasn't a great choice atm. The LM317s in the first video are both replaced before the end of it. – exscape Mar 11 '12 at 17:15
• If you drive the adjust pin with a microcontroller, the regulation is only as good as your microcontroller. (and built-in microcontroller references are usually lousy.) – markrages Mar 11 '12 at 17:57
• I watched the eeblog video series on this regualtor. It goes off the rails early, when Dave fails to acknowledge that he's using the pricy LT3080 as an expensive power transistor. Once you have an external reference and control loop, why not just use a PNP darlington or P-channel FET? – markrages Mar 11 '12 at 18:04