Hi everybody,
The project:
I am looking for some hardware advice with the following situation: We currently have multiple teensy-based data loggers that we want to arrange in a grid. This arrangement is used to gain knowledge about the spatial distribution of the logged signal. We currently use an 8 channel audio board to record the voltage on 8 electrodes for each microcontroller unit. Using at least 8 of those 8-electrode units, should in the end result in a grid of at least 64 electrodes, spaced approximately 50 cm apart, resulting in a grid of about 3.5 x 3.5 meters. In summary: 8 microcontrollers with 8 data inputs each. The controllers and audio boards will be enclosed in a waterproof housing and submerged. Recording takes several days, problably resulting in timing differences in the datasets of the loggers when combined.
The problem:
One of the biggest challenges is thus keeping the 8 units in sync. Wireless is not an option since they will be submerged. The current approach we came up with sounds simple: Use a master teensy that is connected to the 8 slave loggers using some kind of bus, which stops and starts them all at the same time in a regular interval. The master unit should be above the surface to be able to indicate if all of the loggers are still active and to synchronize them. Hence we need a wired connection to all slave units across at least 10 meters. It should also provide the power for all units. Hence we need at least 3 cables, ground, power and data.
Our approaches thus far:
(1) The DIY-bus
First idea we had was to use a simple data wire that switches state (i.e. input to output and vice versa) according to the current status. Every slave could send a "finished" signal to the master after x time has passed and once the master receives the signals of all slaves, it could switch the input to an output pin and send the reset signal to all units. This would be simple but limited in distance and very sensitive to noise. Additionally, every unit would need its own cabled connection to the master.
(2) The I2C bus
The second idea we came up with would be to use the I2C bus (we are aware that the distance we are talking about are much too large for the official use cases of this bus). This should (?) theoretically work if we dramatically decrease the frequency. But we have not tested it yet over long distances. The advantage would be, that we could daisy-chain the units, hence reducing wiring, which is desperately needed at the scale of this project.
The question:
We are looking for advice on how to achieve this as simply and reliably as possible. I already came across e.g. the RS485 bus to transmit data over longer distances but did not find any useful examples that implements this using a teensy. We would be very grateful for any advice or hints about this issue.
The project:
I am looking for some hardware advice with the following situation: We currently have multiple teensy-based data loggers that we want to arrange in a grid. This arrangement is used to gain knowledge about the spatial distribution of the logged signal. We currently use an 8 channel audio board to record the voltage on 8 electrodes for each microcontroller unit. Using at least 8 of those 8-electrode units, should in the end result in a grid of at least 64 electrodes, spaced approximately 50 cm apart, resulting in a grid of about 3.5 x 3.5 meters. In summary: 8 microcontrollers with 8 data inputs each. The controllers and audio boards will be enclosed in a waterproof housing and submerged. Recording takes several days, problably resulting in timing differences in the datasets of the loggers when combined.
The problem:
One of the biggest challenges is thus keeping the 8 units in sync. Wireless is not an option since they will be submerged. The current approach we came up with sounds simple: Use a master teensy that is connected to the 8 slave loggers using some kind of bus, which stops and starts them all at the same time in a regular interval. The master unit should be above the surface to be able to indicate if all of the loggers are still active and to synchronize them. Hence we need a wired connection to all slave units across at least 10 meters. It should also provide the power for all units. Hence we need at least 3 cables, ground, power and data.
Our approaches thus far:
(1) The DIY-bus
First idea we had was to use a simple data wire that switches state (i.e. input to output and vice versa) according to the current status. Every slave could send a "finished" signal to the master after x time has passed and once the master receives the signals of all slaves, it could switch the input to an output pin and send the reset signal to all units. This would be simple but limited in distance and very sensitive to noise. Additionally, every unit would need its own cabled connection to the master.
(2) The I2C bus
The second idea we came up with would be to use the I2C bus (we are aware that the distance we are talking about are much too large for the official use cases of this bus). This should (?) theoretically work if we dramatically decrease the frequency. But we have not tested it yet over long distances. The advantage would be, that we could daisy-chain the units, hence reducing wiring, which is desperately needed at the scale of this project.
The question:
We are looking for advice on how to achieve this as simply and reliably as possible. I already came across e.g. the RS485 bus to transmit data over longer distances but did not find any useful examples that implements this using a teensy. We would be very grateful for any advice or hints about this issue.