View Full Version : Fading LED without PWM?

01-29-2010, 01:48 AM
Greetings all, after some searching I can't seem the find any methods for Fading LED's in and out without using PWM. I am working on some lighting for a movie prop, and the PWM is causing noticeable flicker on camera (in the dimmer ranges). We are driving some powerful LEDs through a luxdrive.com buckpuck. The driver has a control lead that we can manually control with a 5k Pot. Any help would be greatly appreciated.

Thank you very much.

01-29-2010, 02:13 AM
The long way around is to rotate your existing pot with a Stamp-controlled servo.

"If you build it, they will come."

01-29-2010, 02:31 AM
Can't you use an op-amp as an adjustable voltage? Basically, you need a D-to-A converter (like a resistor + capacitor) to give you your desired output-voltage (for the wiper on the 5K pot) and an op-amp to buffer that voltage.

Somebody more knowlegeable than me will have to verify this.

01-29-2010, 02:53 AM
I'm not a big electronics person, I do ok at programing the logic. But when it comes to capacitor and formulas my head starts to spin. Could you explain to me how an "op-amp" works and how it affects this? I am guessing the resistor and capacitor are to smooth out the square wave?

01-29-2010, 02:58 AM

You could also use the digital potentiometer to control the LED. However, the digital pot that we have is a 10 KΩ; but you could control it with a microcontroller enabling you to program the LED. There is an example of using the AD5220 digital pot in What's A Microcontroller? text [chapter 9]. Here is a link for your review.

What's A Microcontroller? Text:


Joshua Donelson
www.parallax.com (http://www.parallax.com)

01-29-2010, 03:21 AM
looking from a different direction use the shutter function on your camera to compensate for the flicker

01-29-2010, 06:24 AM
Maxim IC has some 10k, 50k, and 100k dual digital potentiometers. you can request some free samples at this URL.

There is no problem that can't be solved with a suitable amount of explosives!

EOD Memorial (http://www.eodmemorial.org)

01-29-2010, 07:27 AM
so I have ordered some digital Pots from digi-key that should be here tomorrow. I bought some AD522's, however the Pot I'm trying to replace is a 5k. Soooo I also ordered some of these...


They seem pretty cool, they use serial to increment or decrement the wiper. And from what I can tell you can read the wipers location and set a specific location. But I am trying to figure out how I would wire it up and send commands to it. So that when they arrive I can dive right in and see if it is my flicker solution. So basicly I am asking if some of you fine folks could take a look at the datasheet and give me a nudge in the right direction. I am gettting confused with the memory location and errcmd bit settings.

01-30-2010, 03:31 AM
erco said...
The long way around is to rotate your existing pot with a Stamp-controlled servo.

Wow, that's awesome! So what if I want to use a ten turn pot???? http://forums.parallax.com/images/smilies/smilewinkgrin.gif

01-30-2010, 03:38 AM
Well, you could use a continuous rotation servo -- but when modified for 'continuous' use, you lose absolute positioning, so you'll need to measure the resistance or something to know when to stop turning.

01-30-2010, 03:56 AM
what make of camera is being used? using the shutter speed function would save any mods

01-30-2010, 05:03 AM
no Idea what camera it is, this is a prop for a major motion picture... ::coy:: and we are just the prop shop hired to make the props. On the topic of the digtal pot I got, I have to use ShiftIn and Shiftout to communicate with it but I can't figure out how to read what it tells me, am I capturing the right bits etc.

01-30-2010, 06:38 AM
What Allanlane said...


Did you see this thread? By applying a PWM command to the input of the RC network the capacitor gets charged to a voltage with 255 steps. or 8 bit. (At least with a BS2 it does...) Then the OPamp buffers that to provide current to the transistor which if you pick correctly could power your high power LED's. Maybe a darlington pair?

This code should then fade the LED in and out with no flicker...

FOR counter = lowlevel TO highlevel
PWM pin, counter, time

FOR counter = highlevel TO lowlevel
PWM pin, counter, time

Time needs to be established by the RC network as in the analog and digital parallax book as:
4 * R * C = time in milliseconds.

And the lowlevel needs to be put right where the LED starts to come on.

and Highlevel's max should be 255

Post Edited (Campeck) : 1/29/2010 11:44:45 PM GMT