Op Amp help (I think) - Page 1
Forum section: electronics / beginners

author: Tom18991
author_rank: Contributor
timestamp: March 18, 2020, 01:42:11 am
content: I have a small 3 watt light bulb that normally gets 11 volts DC when fully lit up. It's attached to a dimmer pot that trims the voltage down to about 8 volts, at which point the light is very dim. I've replaced the old lamp with an LED (with resistor) and it works like a champ, but the existing dimmer doesn't do much because the LED is nearly as bright at 8 volts as it is at 11. It dims it some, but not that much.So, any ideas on how I can take the existing signal (8 volts varying up to 11 volts) and remap it so that it goes from 0v (or close) up to 11? I can't change the dimmer pot because it is used for other lamps, so need a circuit that will output 0 to 11 vdc as the input varies from 8 to 11v. I started doing it with an Arduino, but working with over 5 volts makes an already inelegant solution even worse.Seems like this is a job for an op amp, but I can't find any sample circuits that do this, so not even sure if that's the right starting point?

author: james_s
author_rank: Super Contributor
timestamp: March 18, 2020, 02:01:15 am
content: Do you mean there are multiple lamp types on the dimmer at the same time?LEDs are driven by current, not voltage. The series resistor will turn the varying voltage into a varying current, you might get away with just fiddling with the resistor value so that the overall current is lower, low enough that the LED is appreciably dimmer with the dial down. The max apparent brightness is likely to be pretty similar as you have already found.

author: gbaddeley
author_rank: Regular Contributor
timestamp: March 18, 2020, 02:07:38 am
content: LED brightness is better controlled by current rather than voltage. You need something that takes 8 V up to 11 V and sends 0 mA up to fully brightness mA through the LED. A simple solution is a zener diode (say about 6 V) and smaller resistor in series with the LED, but the power dissipation in the diode could be fairly high. It’s possible to boost a low power zener using a power transistor.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 18, 2020, 02:43:42 am
content: You can do what you want to do with a circuit like the attached but that likely isn't what you really want, as the others have said. You really want to convert the voltage into a current.

author: Tom18991
author_rank: Contributor
timestamp: March 18, 2020, 04:14:58 am
content: Thanks all. Current, not voltage. Got it. Any suggestions on how to produce a variable current based on the variable voltage I have available?

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 18, 2020, 04:28:58 am
content: Quote from: Tom18991 on March 18, 2020, 04:14:58 amDo you know the maximum amount of current that the LED will allow? What its forward voltage (Vf) is? (If you don't know that, what color is it?)Also, what voltage sources are available? Is there a voltage source other than the one from the dimmer pot available?

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2020, 09:25:17 am
content: Use PWM, which will work both with incandescent and LED lamps.

author: Tom18991
author_rank: Contributor
timestamp: March 18, 2020, 03:37:57 pm
content: PWM is where I started with the Arduino, but after adding parts to read the 11v input signal, and adding parts to control the 0-11v output signal, it started feeling like their had to be a better solution. Now I'm not so sure....

author: rrinker
author_rank: Super Contributor
timestamp: March 18, 2020, 05:01:47 pm
content: You don't need anything on the output - if you are using the PWM output to drive an LED, you don't need it to go to 11V. a 5V PWM signal is just fine - you just need a smaller resistor on the LED.Even the input is pretty simple. A simple resistor divider should work to lower the 8-11 volts to something less than 5. Add a 5.1V Zener diode to clamp the voltage input to the analog input of the Arduino and then it's just a matter of using the map() function to map the range of inputs you get to a usable range of outputs to the PWM pin. There are PWM examples provided in the Arduino IDE to build from.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 18, 2020, 05:13:42 pm
content: For an op amp solution, search the forum for dummy load circuits. This is a type circuit that converts a voltage to current. Dave actually has a video on them. Don't use his circuit, as-is, however since it has stability issues.

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2020, 07:39:02 pm
content: Quote from: Tom18991 on March 18, 2020, 03:37:57 pmPWM is generally considered to be the best way to control the brightness of LEDs. Varying the voltage doesn't work, since LEDs have a fairly sharp turn on threshold. Varying the current is better, but it can alter the colour of some LEDs and isn't perfectly linear. PWM gives excellent linearity and doesn't affect the colour. The only downside to PWM is it can cause a noticeable flicker and stroboscopic effects when things move, but that can be mitigated somewhat, by using a high enough frequency.Forget the 555 idea. Connect a logic level MOSFET to the output of the Arduino, via a low value resistor. The IRL540 (not to be confused with the IRF540 which won't fully turn on with a gate voltage of 5V) as I suggested in the schematic above is cheap and widely available, but there are better alternatives.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: March 18, 2020, 07:52:28 pm
content: To keep it simple:Instead of a single LED with a big series resistor, use 3 or 4 LED's in series with a smaller series resistor. Each LED needs about 1.5 to 3V, depending on it's color, so depending on the LED's you can make something that is just lighting up at 8V, and then choose a resistor that gives the wanted brightness @11V. (Within limits of the chosen LED's of course).

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2020, 08:57:33 pm
content: Quote from: Doctorandus_P on March 18, 2020, 07:52:28 pmGoing from the original post, it appears that's how it's currently wired up.

author: Tom18991
author_rank: Contributor
timestamp: March 18, 2020, 09:14:30 pm
content: Thanks all. When using PWM to control the brightness, is it better to just use a very high frequency that goes unnoticed to the naked eye, or should I smooth it out with a low pass filter? I guess I'll experiment on that, but curious if there is a "correct" way.I've love to just use the 5v Arduino output, but the resistor for the LED is buried in potting material as part of a retrofit kit and is too big for a bright LED at 5v...I had ordered a few IRL520's from Mouser over the weekend, so guess I'll go back to square one and try them with the Arduino when they get here.

author: Mr. Scram
author_rank: Super Contributor
timestamp: March 18, 2020, 09:51:33 pm
content: Quote from: Tom18991 on March 18, 2020, 09:14:30 pmTypically the PWM signal is unfiltered but this can indeed cause flicker.

author: Zero999
author_rank: Super Contributor
timestamp: March 18, 2020, 10:09:14 pm
content: Quote from: Tom18991 on March 18, 2020, 09:14:30 pmJust use a high frequency. If you try to filter it, you'll be back to having a variable voltage again.

author: Tom18991
author_rank: Contributor
timestamp: March 18, 2020, 11:24:25 pm
content: That's funny. I was filtering my earlier PWM efforts to eliminate flicker, which caused me to go down the voltage path. I'll scrap the filter and increase the frequency.I'll be back when I get the MOSFETs and start floundering with it... Thanks all... !