I want to obtain depth measurements from multiple (~30–50) dToF imagers (e.g., SparkFun Qwiic Mini dToF Imager - TMF8821). In addition to depth measurements, I also want to determine the orientation of each dToF imager using an accurate IMU sensor (e.g., SparkFun 9DoF IMU Breakout - ISM330DHCX, MMC5983MA) attached to each imager. My goal is to collect both orientation and depth measurements from multiple sensors simultaneously.
I believe I will need multiple microcontrollers to handle these measurements. Using one microcontroller per sensor may be inefficient. Additionally, since these sensors will be placed on moving objects (e.g., robot vacuum cleaners), a wireless connection will be necessary. Therefore, the microcontrollers should be compact and support Wi-Fi or Bluetooth. I may also need multiple batteries for wireless connectivity.
Here are my questions:
What components are necessary for this project?
Could you recommend compact, wireless microcontrollers (perhaps the SparkFun Thing Plus - ESP32 WROOM (USB-C)?) suitable for this project?
How many sensors can be connected to each microcontroller while ensuring simultaneous depth and orientation measurements?
Please explain what you mean by taking measurements simultaneously.
A processor reads one sensor at a time and it takes time to store or send the data elsewhere. If using several processors, each with one sensor, then you have a synchronization problem.
One way to obtain measurements from multiple sensors might be to use a single microcontroller for each sensor, collecting data at different times. However, this is not what I want. I want to obtain measurements from all sensors simultaneously.
In theory you can connect many sensors to a single ESP32. The problem is that many sensors have either a fixed i2c address, or a limited number of configurable addresses. For example, the TMF8821 has a fixed address at 0x41. You could connect two sensors to a single ESP32 using both i2c busses, but to get to more than 2 you either need multiple ESP32s (in which case you have a timing/synchronization problem to solve if you really need simultaneous readings), or you can use something like a mux (TCA9548A) to get up to 8 sensors with the same address on a single bus. The mux can be cascaded, but you can only read from one sensor at a time. So it really depends on your definition of “simultaneous”. If you mean reading several sensors within e.g. around 1 millisecond, you can cascade all you want. At 1 microsecond the problem gets a lot harder to solve.
The same question applies to orientation. If you need orientation accuracy with 5-10 degrees, then a BNO086 will probably be the simplest solution (and it’s used in robot vacuums already), but if you need more precision, then there’s a lot more work involved. There are some excellent libraries for IMUs, but they require careful calibration to work well, and their fusion algorithms can consume significant MCU CPU cycles.