is it possible/how to synchronize the cocks of multiple teensy4.1

GeoffC

Member
Hi all,

Is it possible to sychronize the clock of multiple teensy4.1?

My project involves large amount of sensors and multiple teensy 4.1 will be needed. The sampling rate is 50+Hz. i.e., more than 50 readings/sensor/second. I want to start to take reading from all sensors on multiple teensy "simultaneous".



Thanks millions.

Geoff
 
You could have a master Teensy with one pin set as output (synchronise command) to input pins on each of the other Teensy's.
When the slave teensy's detect the pin change they set an elapsedMillis variable (say t) to zero.
Then when t % timeDuration == 0 take a reading.
Alternatively just take a reading when the line toggles.
 
You could have a master Teensy with one pin set as output (synchronise command) to input pins on each of the other Teensy's.
When the slave teensy's detect the pin change they set an elapsedMillis variable (say t) to zero.
Then when t % timeDuration == 0 take a reading.
Alternatively just take a reading when the line toggles.
Thanks. That is a brilliant idea. I will try it out.
 
LOL on the typo. ;)

Agree with the idea of sending a start signal to all Teensy. If they are all physically close (like on the same circuit board) you might do well to just put a 100 ohm resistor in series with the transmitting pin and route it directly to all the others. The 100 ohm resistor will help with signal quality issues from sending the signal over the wire.

If the boards will be farther apart, you might consider using RS485 chips, like MAX3485. Many similar parts are on the market. The older ones are all 5 volts, so look for a 3.3V part which is much easier to use with 3.3V Teensy. These 8 pin chips have 2 pins which configure whether it transmits and receives. Configure 1 chip as the transmitter and all the others as receivers. RS485 is designed to reliably transmit a signal to many receivers over long distance.
 
Back
Top