Hi, I've made a variable voltage power supply with LM317 and I'm testing it.
The scheme includes two ranges, first connecting one and then two power supplies in series (two identical switching PSU for Laptop PC), to switch the input voltage to the LM317 between 20V and 40V and obtain outputs in the ranges 1.3-17V and 16.5-35V. To change the ranges, I use a switch that commutes the series connection of the power supplies on/off and sets/removes the short-circuit of two resistors (R2, R8) which are used to change the LM317 divider's ratio.
The anomalous behavior consists in the fact that if you set the minimum voltage of the second range (at 16.5V, i.e. with the input of LM317 at 40V) and then switch on the first range (at 1.25V), where only one power supply (20V input) is feeding the LM317, the output voltage instead of reaching 1.25/1.3V settles at 19V and remains there until you rotate the potentiometer a bit, increasing the value of R5. This only happens when the potentiometer is at the zero resistance and only by switching from high to low range. During this phenomenon I have a current of approx. 100mA on the branch of the divider (R7-R2-R8-R5), where in this position R8 is short-circuited and R5 is rotated to ground.
I have done other tests, putting a capacitor on the potentiometer and adding another one closer to the input of the LM317, there seems to be no oscillations but the situation does not change.
I have verified, however, that if I delete completely the "PCB 2" block (composed of TR1, TR2, R3, R9, see attached complete schematics), the above mentioned phenomenon does not occur, i.e. when switching from pos.2 to pos.1 at the minimum voltage the value settles correctly at 1.25V.
Someone would know where the problem could be?