- - - Updated - - -
R2 IS 220R NOT 120R PLEASE MAKE SURE...
interesting circuit. However here's some thoughts i had --
1) why do you need the R2 resistor at all ? It serves no purpose except to feed an additional fixed current into the opamps output. The output of the LM317 will simply be Vadj + 1.25v always
2) your opamp uses strange resistor values, is setup as non-inverting with a gain of 5. I suppose so that 5x5=25 which is above your max desired voltage. You could use any combination of R3, R4 for this gain. Or even a slightly different gain (use PWM period mods to get your step size & voltages correct).
3) The lm324 with a +24v supply might have difficulty reaching (23 - 1.25v = 21.75v). You should design for a bit more headroom.
3a) similarly the lm317 needs more than ( 24-23 = 1v) differential to operate properly at the high end.
4) since the lm317 is simply behaving as current amplifier with voltage determined by its Vadj pin, why not simply replace it with a higher power NPN bjt? As in all conventional power supply designs ? Additional benefit is the the Vbe drop is smaller too, and you can get better current output.
5) as is, the output ripple will be as bad as 4x the residual ripple on your pwm RC filter and no better.
5a) you could use a small cap on the opamp output, and take advantage of the cap-multiplier effect. As long as the voltage changes are not too fast, the opamp should be able to handle it... maybe add a current limiting resistor.
6) on the lower end, i don't see how you achieve 0v (??). Lm324 output can go close, but not exact 0. But worse .. don't forget the 1.25v addition by the lm317 ! You
could use some strategic diodes to offset this...
Fragrance's schematic in post#17 does all of this...