Hi! I came across this problem while designing basically a linear voltage regulator using an op-amp and a logic level N-channel mosfet as a series pass element for a project i'm currently working on. I need this circuit to software control the brightness of around 20 LED-s and the LED backlight of a 16x2 display using PWM generated by a uC. The problem with this circuit is that it's not stable enough with the load. The maximum load is around 300mA, which is not that much. Otherwise the circuit works pretty well, if i set the PWM-s duty to 50% i get spot on 2.5V (open load) on the output (input is 5V) but when i add a 300mA load, the output drops to around 2.3V which is unacceptable for me because i can clearly see that the LED-s get dimmer. Also it seems that the op-amp used matters alot, the first time i was playing around with this circuit i used a generic tl072 or 082 and the output was ok-ish but then i swaped the op-amp with a MCP6022 and the output was much stable. Am i missing something obvious? How can i improve the circuit's load stability? Or is there a better way of dimming my LED-s using PWM? Please share that with me whereas it's the first time i'm designing something like this.
Thanks a lot!
NOTE: - The components in the attached schematic are not the one i will be using.