I want to dim some LEDs, using the PWM output from a microcontroller. There are some more LEDs than in the schematic, already wired, so that they need nearly 12 V to give maximum light at about 50 mA.
The power adapter will give 12 V so I needed to minimize the voltage drop in the reference resistor R22. This is done with the voltage divider R24,R25. The 0 .. 5 V control voltage, generated by the uC's PWM is set down to approximately 0 .. 120 mV on R25.
Problem 1: For lower voltages, the LED's brightness won't be stable. When e.g. switching a devices with larger power consumptions near the circuit, the LEDs will flash very bright. I think this is a current induced somewhere in the regulation circuit and I will have to think about some filter.
Problem 2: When e.g. switching the status LED15 on, the brightness of the LED array is reduced for the whole time LED15 is on. This is a problem, I don't understand. The 5 V supply is a power supply for laboratory use. It shows a bigger current consumption when the status LED is on, but the displayed voltage does not change up to the digit for 0.1 µV. I don't think, there is no voltage glitch, but it should be stable at the same voltage as before after some time. But the LEDs are constantly darker when the status LED is on.
The question(s): (1) Does anyone find an explanation for the brightness change, when the status LED is on? And (2) do you know of approaches to make such a regulation circuit more EMI resistant?
Edit: I uploaded an erroneous schematic. The voltage divider is connected wrong. Added the correct schematic.
The correct schematic: