I've been studying this schematic that I found while searching the web. I understand the point of PWM - it allows us to vary the average voltage fed to the op-amp precisely. The filter R1,R2 and C1 integrate the PWM waveform.
But what is the point of the op-amp? It looks like a non-inverting amplifier to me, with the gain set by R6 and R7 - if I'm not mistaken. But why does the integrated DC voltage need amplification?
Perhaps, I don't understand that part because I don't understand how the Lm317 is working in conjunction with the MCU. I understand that LM317 drops a reference 1.25V between the OUT and ADJ pin (which should be across R5 in reference to the circuit) and the Vout is defined as 1.25(1 + R2/R5) + I(adj.) * R2. (from datasheet)
Since the only variable is I(adj) in the above equation, am I correct in my understanding that the integrated DC voltage is actually changes the current and hence the output voltage?
Any insight would be appreciated.