Thank you guys, you are awesome! Now answers
What type of circuit is drawing the load, and what does the input voltage look like?
Yeah, as you mentioned, it's a charge pump and the input ripple is about 6V. So, that is not that far from the specs, just I expected much better results... The load was an electronic load, something like this:
http://dev.emcelettronica.com/basic-design-of-an-electronic-load . I think I also measured with a plain resistor with the same results.
What is the ripple on the input?
I'd suggest adding 0.1uF ceramic caps between input and ref pin, and output and ref pin, as described in the data sheet. You might also need a capacitor across your trimmer (ie ref and GND). A 1uF-10uF works there.
Ripple is about 6V. There is plenty ceramic capacitance in the input. I also tried to add some ceramic to the output with no changes in the results. I'll try to add a capacitor accross the trimmer... Just I don't have many high-ESR capacitors.
8mV is not a great deal of signal level and it is clearly related to the mains frequency. I would be looking closely at the layout of the ground, in particular the path of the current that charges the 470uF. Is the measurement made on the output of the regulator or does it include a ground loop?
Hmm, it may be a ground issue, but then I'm screwed because I did my best to provide good ground: I chose protoboard with a ground plane and tried to make every ground connection as beefy as I could. The 470uF could be better connected, I thought this is not important, is it? I ensured connection only for LM317 and reference/output sections.
I have to check if that ground plane is really good, the ground connection is 2cm away from the LM317.
The ripple is at 50Hz. Then one of the rectifiers is not working because a fullwave rectifier should produce 100Hz then the filter capacitors will filter much better.
With the loaded LM317 connected, please post a photo of the input ripple and its DC voltages. Is the output actually 17V? Then the pot is set to about 3024 ohms, not 5k ohms.
If you built the circuit on a solderless breadboard then the resistance of the contacts might be causing a lot of the ripple.
It's a charge pump
. This is not obvious from the scheme, sorry. The output is set to 15V (although I tried a few volts lower as well). Pot is indeed set to 3k, sorry for confusion. On the scheme 5k specifies the pot itself, not the value it is set to (should I add a note to the scheme?). The scheme is build on a protoboard with a "ground plane". It does not ensure too much confidence, though (twin industries 8100-45). Breadboards "proved" several times they don't work for my power stuff
(. I'll post more photos.
Out of curiosity: hook up your scope leads to nothing but a 100K resistor, keeping them in approximately the same spot as when making your voltage measurement. Is there still ripple?
No, in this case no ripple. It only starts visible (>3mV p-p) after 30mA. I thought that my electronic load could create problems so I tried a plain resistor of as well, no ripple. But I didn't try to give it a real load because I already burned a few 1/4W resistors. Now I'm quite confident that the problem is not with the load, but with a regulator or my board. Or ground resistance higher than I thought.
Another idea: I'll try load more to see if the ripple scales linearly with the load. But with 470uF charge pump it can't give much more than 100mA. I designed it to give just up to 100mA, this is the worst-case expected current consumption.