My problem at the moment is that the current limiting isn't working properly. It seems to be very intermittent and always pulls the output to .2v or so (not 0). The voltage adjust pot is a very nice Vishay spectrol wirewound, but the current one is a cheap ebay thing from china (a fake Bourns one) - I need to replace it, but I don't see why it should cause too much of a problem at the moment because there isn't much current going through it. I don't know, but I suspect it's a 10-turn trimmer in a wirewound housing.
I need to know how I can work out what the current limit is based on the non-inverting input of op-amp A - it doesn't seem to directly relate to the limit which is applied.
Is there something I'm missing here? My PCB layout was pretty sketchy, but it seems to be OK (all components tested linked to correct places). The components should be decent quality (apart from the current set pot). The trace widths on the pcb are plenty wide. Input is just over 40v pk-pk, rectified to 20v. I have noticed that if I set the voltage adj pot to its minimum, the output is -0.4v.
Would I be better off just starting again with the pcb? I can attach pics of it if needed.
First, I wouldn't worry too much about not getting precisely 0V when the voltage is at min; this depends on the forward voltage of LED2. It needs to match the 1.25V reference inside the LM317. You could replace LED2 with a VBE-multiplier (one small-signal transistor and a resistor, and a pre-set resistor) if this matters to you.
Regarding the current control circuitry, I see how it is supposed to work, but I'm slightly worried about the fact the op-amp is powered from 0V, and it expects to work with the inputs at 0V. Yes, I know the LM358 is supposed to work with the inputs at 0V, but even so, I personally would have preferred to power the op-amp from the -2V rail. Of course, the 555-generated -2V rail might not be able to supply the current; it would need testing. Indeed, when I built something like this many years back, I derived the negative rail from the AC input directly. Much simpler...
As the op-amp's output can't get to 0V, that's why the current on this PSU can't be adjusted right down to 0mA.
To debug, break it down. Does the voltage at "IOUT" seem sensible? As mentioned, it should be 1V per amp. This will be there all the time, so I'd lift one end of D3 so that the current limit can't affect the output, then try varying the load (use some chunky resistors). If you can borrow a second DVM, you can measure the actual current while monitoring the voltage at IOUT.
Once you're happy that's working, check that the voltage at "ISET" varies smoothly as you adjust the control. It should vary between 0 and ~1.6V (depends on the LED, of course). If that looks good, reinstall D3, and see what happens. Use your 'scope to see if the op-amp is oscillating when it enters current limit mode...
Oh, and the current limit circuit won't be able to pull the output right down to zero - you have whatever the op-amp can do when the output is saturated against its negative rail, plus the drop of D3, plus the 1.25V of the LM317. Don't expect lab-grade performance from such a simple supply; but that said, this ought to be pretty good when working, so it'll be worth the effort. Taking the time to figure out how it should be working will give you invaluable experience for the future
And watch the temperature of the LM317. I wouldn't expect 1.5A at low voltages from a single one of these. In the future, you might consider strapping a beefy transistor around it to share the load...
Good luck,
Mark