Sync data from multiple sensors

Hi all, I'm working on a project which involves the delivery of fragile products by robots. The robotic work is completed and I'm handling the monitoring aspects of this prototype. My goal is to monitor the status of various parts of the robots and the below are the conditions that I have to monitor (i.e. implementing different sensors):

  • Temperature of different parts by DHT22
  • Stability of different parts by accelerometer and gyroscope
  • Moving speed of the robot (TBD)
  • Distance between robot and obstacle by TF mini LIDAR

Limitation and Struggling issue:
Due the the prototype design, we cannot install sensors connecting to one arduino, though we tried to connect as many sensors as physically possible, there are still many sensors have to be separated apart.

We need to monitor the stability of the robot and how nimble it is in reacting to obstacles. So that we put in LIDAR to detect obstacle around and measure the distance apart and time the safety distance and time used to react. In parallel, we need to monitor the stability of a few parts of the robot as it is holding some fragile item. So we need to compare if the storage platform is stable while the robot is avoiding obstacles. Since the sensors are separated, we are struggling to compare the data which needs to be accurate down to fraction of a second.

Assuming we can set the sensors the read data with the same frequency (printing serial with the same delay period such as by "delay100"), how can I synchronise the data in order to study the motion of the robot? We need to read the data in the exact same second across sensors to study its behavior.

Also wondering if accelerometer plus gyroscope is the best option for analyzing stability? Any better suggestions?

We are quite new to arduino and sensors, I hope I have explained it clear enough. Your help is much appreciated!

You won't read data at the exact same time with an arduino. It does one thing at a time. You will, however, be able to read 4 or 5 sensors in a fraction of a second. My understanding is that digitalRead takes about 5uS. Why are your sensors not all on the one board?

Thanks for your reply.

Sensors are separated mainly due to the fact that they have to be placed on scattered location. We thought of combining into a master board wirelessly but seems like coding gets complicated. Physical wires are not long enough unless we use 5/6 meter long jumper wires.

Would you have any recommendation over this situation? Do you think it is better to spend more effort on the coding and combine all sensors together onto a master board in exchange for reading all sensor data simultaneously or we shall continue to explore solutions to combine all data from separated sensors?

@jas20

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

you wont read the sensors simultaneously. how big is this robot? do you not have disseminated control systems eg 'fragile object carrying' stabilisation. I think there is insufficient information to give useful advice. You know far more about your project than we do.