# Eliminating negative output voltage in a LM317-based power supply adjustable down to 0V

I've been looking to build a linear power supply with current limiting and output adjustable down to 0V and I found this circuit in a LM317 datasheet.:

So I've built it on a breadboard with minor changes. I used J111 JFETs as current sources, with 1k resistors between source and gate to limit the current to about 6.5mA. Negative voltage rail is provided by a 555-based charge pump, outputting about -13V at this load level. And while this works and regulates down to 0V, it can be adjusted even to negative voltages. When using in CV mode, it can go down to negative few-hundred millivolts, consistent with 1.25V minus the voltage drop across D3, D4. When the current limit is set to minimum and voltage to maximum, I can get the output to go as low as -4V!

I think this should not be the case, since the design above uses a polarized tantalum cap on the output. Even if it's expected, I would like to eliminate it because I don't want my circuits damaged from negative voltage when I turn the pot too far. So far I thought about using a more precise shunt reference below 1.25V in place of D3, D4 and/or adding fixed resistors in series with the pots to limit their regulation range.

So to sum up my questions are:

• Is this supposed to happen or am I doing something terribly wrong?
• What is the best way to limit regulation to positive voltages/currents only?

EDIT: Schematic of the full circuit below as requested, exactly as I have it on the breadboard.

• When you get -4 V out what is the voltage at the bottom of D4? We're probably going to need the schematic of the circuit you actually built. – Transistor Sep 23 '18 at 15:27
• The minimum load current for the LM317 is 10 mA worst-case. My guess would be that you should increase the current through Q1 to at least twice this value (20 mA) in order to maintain regulation. (Q2 as well.) – Dave Tweed Sep 23 '18 at 15:53
• @DaveTweed Good point though to meet the requirements you really need to drop the 240 Ohm resistor to 125 Ohms ...I'd suggest you'd actually use 120 Ohms. – Jack Creasey Sep 23 '18 at 16:27
• The major problem is that the two 1N4001 diodes DO NOT provide a voltage reference. You could replace these diodes with an LM185 and get very close to zero volts output. Care should be taken that the Q2 current should not exceed 20mA. Also be aware that the LM317 reference voltage is not exactly 1.25V it is designed to be constant, but the accuracy was never really the major concern in this application. Notice in the datasheet the ref voltage can be 1.2 - 1.3V which is a big range. – Jack Creasey Sep 23 '18 at 16:44
• @MateuszDuchalski I see no way to make the current limiter as shown in the application work reliably. It will always force the voltage regulator on the output into a low voltage dropout. Using a shunt regulator for the reference will work well with your 555 -ve generator, shunt regulators have immense PSRR, so noise should not be a problem. – Jack Creasey Sep 24 '18 at 1:01

Considering the circuit was designed decades ago, the performance is OK. However if you want to accurately regulate down to zero volts, it is not the best design.

The current limiter does not work since when it reaches its limit it will always force the voltage output 317 into an under voltage condition (its Vin drops below the minimum) and the output voltage will go negative.

There are lots of options to provide voltage regulation down to zero, I'll present only one of them here.
The negative reference needed to offset the LM317 reference can be created in several ways (in the comments I suggested an LM185 as a potential quick fix) but probably the easiest is to create an adjustable reference based on a good reference shunt voltage regulator.

simulate this circuit – Schematic created using CircuitLab

I've ignored the current limiter here to simplify the circuit.

The TL431 provides a stable -2.5V reference to the end of the R4,R5,R6 chain and I set the feedback R2 such that only 1.3mA is being sunk from the output.

Since you want to be able to set Vout down to zero it's hard to provide the minimum current load over such a large voltage range. If you try to set R2 to provide this then you need a higher power R1 pot. I chose in this case to use a BSS139 depletion mode FET to provide a constant load on the output. This will work in this case, but if you try to add a current limiter as shown in the original circuit, then this load would pull the output negative when U1 was below it's working threshold.

With the circuit I've shown here, you could do current limiting with an N-channel FET directly across R1 and use something like an INA219 to sense the output current of U1. If the output is never allowed over 25V this would work but would need a separate supply (a Zener or TL431) to provide its supply.

You might also read this design note on EDN which explores using a very simple CC source to drive the negative reference.

You changed the rules of the game, so no wonder it does not behave the same. You changed JFETs so the idle current is increased, and what was once a -10 volts is now -13 volts, just about matching the error you are getting.

Simple fix is to put a resistor of 50 to 100 ohms in series with your negative supply output, then add a 10 volt 1 watt zener diode to ground to get things back in the ballpark. Remember to get the zener black band pointed to ground.

Add a 1K trim pot below the voltage adjust pot and trim it so the most negative voltage you can output is maybe -.01, just to verify you can get down to 0.000 if you have to. If you want more stability replace the 10 volt zener with a LM431 or a TL431 with gain set to 4 - 1 (the ref voltage is 2.50 volts), to get a stable 10 volt clamp for both current and voltage regulation.

You should not have to tinker with anything else, though having the original JFETs in the schematic would have saved you some minor trouble. Remember that even though you can force the -10 volts to be just that, the change in FETs affects voltage at certain points because of a change in bias current. You may need a 1K trim pot on the current adjust as well.