I have a working DMX-controlled, miniature moving light with;
an LCD display showing DMX values;
a TLC5940 controlling two hobby servos, and;
the TLC5940 PWM'ing an RGB LED via a ULN2803 Darlington array.
I absolutely love the ability to expand my Arduino/Boarduino/ATmega328 PWM outputs via the TLC5940 library and chip. However, I was disappointed to discover that activating the servo functions reduces the LED PWM frequency to 50Hz - definitely viewable as flickering to the eye and absolutely destructive to any attempt to video tape my creation.
I have most of the other Arduino pins occupied by an LCD display, otherwise I'd return the servos to the Arduino pins and continue the LED's on the TLC. (Perhaps, I'll upgrade to a bigger AT processor but I'm trying to keep the form-factor small.
Is there a way to increase the TLC servo frequency to improve PWM flicker rates? Any workarounds?
I've put that project aside for the moment but my next approach will be to use an ATTiny85 (which is used on the BlinkM Smart LED) with the GyzRgb firmware to drive my LED's. This separates the PWM and color ramping from my main Arduino to a second processor similar in the way I'm offloading servo PWM to the TLC5940.
Servos don't like high update frequencies. That drop in frequency for servo use is entirely intentional.
Since the Arduino is generating the grayscale clock for the TLC5940, all connected TLC5940's will run at the same frequency.
It would make more sense, to me, to continue to use the TLC5940's for LEDs, and come up with some other solution like an external microcontroller for servo control.
Hello!! Good evening, I write to request support.I am working with on arduino and one Tlc5940.
I need to work the pwm to a frequency from 2 to 4 Hz.
It´s a very low frequency for them 970Hz that come for default, I modifying the librery Tlc5940.h in the
part of tlc_config.h modifying the value of TLC_PWM_PERIOD and TLC_GSCLK_PERIOD but the allowed maximum is 65535 (decimal) = 4bits, and only I reach 122Hz.
A detail that I am called myself the attention is that on having modified the prescaler (at my sketch) the output is not employed adequately. Does someone know of some method to achieve this? THANKS!!!