2
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\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\$ May 22, 2016 at 6:43

1 Answer 1

2
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\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, 2016 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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