Electronic – LED driver circuit with both analog and pwm control

constant-currentdriverledpwm

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?

LED driver with analog control

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:

schematic

simulate this circuit – Schematic created using CircuitLab

Some notes:

  1. The input common mode range of the amplifier must go all the way to ground.

  2. The PWM control is inverted: A high on the PWM input will turn the LED off.

  3. The PWM rate will be limited by the transient performance of the amplifier.