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.

  • \$\begingroup\$ if the OP-AMP you choose allows suficient inout range ypu couldl just put pwm input onto the non-inverting input of the op-amp. \$\endgroup\$ – Jasen May 22 '16 at 6:43

You can just add the control to the amplifier:


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.

  • \$\begingroup\$ I tried the proposal but I have som problems in the off state. The voltage on the + input on the op-amp goes to 20 mV and not to zero. The current through the LED is around 1 mA when the analog signal is at its maximum and it is enough to get light. I wonder if it would be possible to have the pwm-input between the LED and the npn-transistor... \$\endgroup\$ – Freja Dev May 23 '16 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.