opamp to drive a led

Started by Dimitree, August 03, 2016, 12:33:28 PM

Previous topic - Next topic

Dimitree

hi everyone
I was designing my own pcb for the Boss CE2, adding some features

I have 1/2 unused opamp IC, so I thought, why not using it to drive the led that indicates the LFO speed, and remove the transistor that should do it?

Is it possible?

ps. R21 is coming from the LFO output




ysba

You can do something like this:



In this circuit the LED current will track the LFO signal. R must be defined based on the LFO voltage, since this voltage appears on it. You must define the maximum LED current and then measure what is the maximum LFO amplitude, so you calculate R.

Yuri

Dimitree

many thanks!
out of curiosity, why the LED is inside the opamp loop and not after? would it be the same?
and why R21 is not needed anymore? how do we prevent loading the LFO out without it?

sorry for the ignorance  :-X

ysba

#3
Because this is a current control. The LED is fed by the opamp, which generates only the enough voltage to keep R voltage equal to the non inverting input voltage.

I don't think R21 is needed because it is connected only at the non inverting input, which must have a high impedance. It actually depends on each opamp type. Since it is a low frequency signal I think that it's ok. But as you are making a layout, you can keep the resistor and test if it makes difference.

PRR

Both plans will work.

LED outside the loop "simple style" will jump as it comes off of zero V. (The transistor job also does this.) Inside the loop, an ideal opamp will keep LED current exact proportion to control voltage. However real opamps have their own voltage-jumps near zero V. LM324 can do well, but is not a great audio chip, so may not be found "spare" in an audio toy. And if you only want to know how fast the LFO is hopping, little brightness jumps may not hurt, may even clue the eye better.
  • SUPPORTER