I would like to design an LED driver circuit that allows for simultaneous analog and pwm control. That is, I would like to set the the LED current using an analog signal and then be able to switch using another pwm signal. I have a design with the analog control shown below. Is there a simple way to add the pwm control to this circuit?
I realize that there are numerous high level components that solve this problem but I am using this as a test case to learn basic electronics and would like to solve it using low level components.
Best Answer
You can just add the control to the amplifier:
simulate this circuit – Schematic created using CircuitLab
Some notes:
The input common mode range of the amplifier must go all the way to ground.
The PWM control is inverted: A high on the PWM input will turn the LED off.
The PWM rate will be limited by the transient performance of the amplifier.