Go Down

Topic: 5940nt flickering (Read 1 time) previous topic - next topic


Commenting out the Serial data does not help the flickering. Lowering the frequency helped a bit but not to much and I don't want to lower to much because I will not get the same effect. My data lines are all 18 guage solid core wires with the longest being 2 1/4 inches long with none of the pwm lines near them. I'm trying to get this to work small scale on a bread board so I can eventually scale it up to control around 34Amps worth of LEDs all doing a pulse in and out at the same time. Currently there are just three red leds attached to the setup and they flicker pretty badly.


With the brightness issue I think I could just use the inverse square law to make it linear.
I have the formula but not entirely sure how to implement it. PWM=range/sqrt(2)^domain*sqrt(2)^x
The only value I know is range which would be 4095 but I have no idea what ^ means (unless that mean to the power of since we can't type the little exponent up there?) and what would I use for domain and ^x?


Solved the flickering issue, it seems the breadboard I got from adafruit is worthless... No matter what circuit setup I use on that breadboard I get problems.

Still would like to know about more about how I can implement the inverse square law equation or any other that would help with a linear fade from around 10-4095


Glad you got the flickering issue resolved, that sucks about the breadboard.

I use the same formula for computing PWM steps, but simplified & rewritten as

range * 2 ^ ((x-domain) / 2)

yes, "^" means exponent.

Range is the bounds you want to cover, in this case it's 4095 because you want values from 0-4095.

Domain is one less than how many discrete steps you want to take to cover the range. For example say you want 20 levels of brightness, use 19 for the domain.

X=0, brightness = 0
X=1, brightness = 8
X=2, brightness = 11.31
X=18, brightness = 2895
X=19, brightness = 4095

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.


Thanks for the explanation of that formula Chris, I will see if I can get that working in my sketchs.

I contacted Adafruit about the breadboard and they are replacing it for me, actually they have already shipped one out to me within a couple hours of my email to them. They are great over there and I would recommend them to anyone.

Go Up