One of the problems with common 3-terminal regulators is that the internal reference, normally 1.25 V, makes them always start from this voltage in their operation. Thus, common sources with these circuits range from 1.25 V up to a certain value, not starting from zero. With the configuration shown in the figure, suggested by National Semiconductor, it is possible to make a power source that goes from 0 to 30 V, even using a regulator of this type. The secret of the circuit is in the application of a negative voltage of 1.2 V in the reference terminal so that it cancels the reference voltage which then becomes 0. In the circuit the reference used was an LM385 integrated circuit, but it is possible use zeners or even associated common diodes to obtain this reference voltage. R2 adjusts the output voltage and the input must be made with a voltage of 35 V. You can work with a lower input voltage, also obtaining a lower maximum output voltage. The LM350 integrated circuit supports equivalents. With it we can obtain a maximum output current of 3 A, but the LM317 can be used for a maximum current of 1.5 A. Likewise, the 10k resistor next to the zener can be changed if another negative voltage is used as a reference.