I am working on a WordClock. First, I want to give you all the details needed and then I will ask my question. So, for this WordClock I used the Arduino with the FastLED library. I made a PCB (350 x 350 mm) on which I positioned the 90 Neopixels (WS2812B). I am using a DS3231 RTC for the time. Currently, I am testing all of this on a breadboard. Because of 90 LEDs I have two power injections: in the middle and at the end (and of course the one at the beginning). For the data line, I use two 220 ohm resistors in series and I have a 1000 uF capacitor on the 5 V and ground rails. I also use a 5 V / 2 A power supply (I have common round everywhere). The Arduino is powered from my laptop. When I turn on all LEDs, it works perfectly fine. Now, here is the problem: Say for example, it is 12 oâclock. For the word âtwelveâ to light up, the LEDs at the bottom should turn on. They do turn on, but they have this effect of flickering. See the video.
In short: The LEDS which are further from the data-input are flickering.
I did my research on this. First of all, I thought maybe the LEDs at the end do not get enough voltage (because voltage drop occurs). Therefore, I added two injections, at the middle and end, but this didnât help the problem of flickering. Then, I came across a lot of people with the same questions on other forums. Most of them solved the problem with these lines of code:
#define FASTLED_ALLOW_INTERRUPTS 0
#define FASTLED_INTERRUPT_RETRY_COUNT 0
But these also didnât help me.
Let me tell you how my code works now:
I made if-statements for each time and in the statements, I put which LEDs should turn on. I put all of these if-statements in a function called âtijdsWeergaveâ. Then in the loop, the first thing is to convert the string data from the DS3231 library to integers. After that, I call the âtijdsWeergaveâ function and add a delay of 1000 ms. It seems like, every 1000 ms it flickers. If I use 10000 ms, it flickers every 10000 ms. Does anyone know how I can fix this problem?
Here is my a part of the Arduino Code (I let you guys see a part, because it is all the same code over and over again. One picture of the setup and loop, and also one picture with an example of how all the if-statements work.
You can find my code here: https://codeshare.io/GABKYE
I hope I gave you all the information needed to answer my question.
I know this has nothing to do with KiCad, but I already asked a few questions here about the PCB I designed for this WordClock. And I didnât get any reply on the Electrical Engineering StackExchange.
Thanks in advance,
Hilmi