Go Down

Topic: testing reliability and speed on 433 RF modules (Read 302 times) previous topic - next topic

cattledog

#15
May 23, 2020, 07:30 pm Last Edit: May 23, 2020, 07:33 pm by cattledog
I am thinking of ways to keep this simple for you.

First, can you tell us how you trigger the frames in the current program? How are the frames themselves coded? Do you ever use delay()? Do you know if the loss of synchronization is due to the slightly different running times of each frame, or the shifting of trigger time independent of the frame running?

Quote
I am displaying light patterns with led strips at a rate of 30 frames per second. Normally, not having any kind of synchronisation, when I start the different systems at the same time, after some minutes (15, 20 minutes) they are already out of synchro. This is very inconvenient since the installations are normally working every night during several days in each different location.
Do you know how many frames offset it takes to create a problem?

Do you currently have Arduino's which you are using? What model?

My first thought would be that an Arduino with a crystal oscillator (not the ceramic resonator) might be good enough to stay in sync.

Leonardo and Micro have a 16Mhz crystal oscillator. Some uno clones have a cyrstal oscillator instead of the resonator. You need to look at the images and consult with vendors.
There are custom "uno" boards like the Freeduino, Ruggeduino, and  mega 1284 based boards with crystal oscillators.

A second approach would be to use the DS3231 as a clock source. I would use the square wave output set for 1024 Khz, count the pulses with an interrupt, and trigger the frame every time the count went to 34. This will provide a more stable trigger than using millis() or micros() based on the internal clock.

Finally, there is the master/slave approach with the wireless trigger which we have been discussing.

Do you have a video of your light shows you can link? Especially one which shows the in and out of sync performance. This sounds like an interesting project.









MrMark

I am displaying light patterns with led strips at a rate of 30 frames per second. Normally, not having any kind of synchronisation, when I start the different systems at the same time, after some minutes (15, 20 minutes) they are already out of synchro. This is very inconvenient since the installations are normally working every night during several days in each different location.

So the idea is: first arduino writes a frame in the led strip, and send a signal to the second arduino. the second arduino only writes a line when a signal is received. If there are missing signals, this would also affect synchronisation in the long run.

I somehow still have the felling that sending a signal after each frame is written is the best synchronization method here. I like the recommendation done in #9 (RF 69HW / Adafruit Feather / Anarduino / Moteino) although they are costly...
If I understand correctly, you've tried a solution where each node is preprogrammed with the light sequence, they're started at the same time, and then drift out of sync over some period.

From this baseline, the options are 1) better timekeeping on each node (as some have suggested above) or 2) somehow bringing them back into sync periodically.  If you keep the original approach, but have a master node transmit a sync message periodically, say once per second, and use that to correct slave node's time drift, that would keep them in sync.

The slave nodes would expect a sync once per second, so upon receiving one, it could check the interval since the last one to recognize that it has missed one or more.  The advantage over the originally proposed scheme is that missed messages don't matter much as long as it gets one every minute or so.

Go Up