cancel
Showing results for 
Search instead for 
Did you mean: 

In case a system has up to 20 different sensors (temperature, pressure, etc) and you need to read the value of each sensor exact at the same time what is the best way to tackle this. What is the best controller and system topology.

JVerb
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @JVerb​ , well for a full synchronization (nano-second level) you should use an application processor with 20 independent SPI or I2C peripherals... However, please consider that sensors are limited in terms of output data rate (ODR), which is directly related to the internal processing of the sensor electronics, and to the data available at the digital output. For example, a pressure sensor or a temperature sensor monitors environmental parameters, so they can slowly vary without significant changes, and the max ODR for these kinds of sensors in ST portfolio is below 100Hz; a magnetometer has a max 1kHz ODR; a motion sensor such as an accelerometer or a gyroscope runs max at 6kHz; finally, a microphone sensor is more "problematic" than the previous ones, and you should use a dedicated interface because the master-clock can run up to 3MHz.

For all these reasons, you can use the same SPI for a group of sensors (3 or 4), for example at 4MHz speed, driving only the CS separately with a microcontroller. I suggest you to use an MCU with a proper number of interfaces / peripherals, such as an STM32F4 or STM32H7 family MCU, which has 6 SPI interfaces for motion sensors, 4 I2C for temperature/humidity/pressure, 3 I2S for microphones etc. To get a full parallelism you will set properly the interfaces in your FW, but the MCU runs at 480MHz so I think you should be able to get a satisfactory parallelism. For STM32F4 you can find examples of lot of different sensors acquisition in the online available FP-SNS-ALLMEMS1 package. Regards

0690X00000As8feQAB.png

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @JVerb​ , well for a full synchronization (nano-second level) you should use an application processor with 20 independent SPI or I2C peripherals... However, please consider that sensors are limited in terms of output data rate (ODR), which is directly related to the internal processing of the sensor electronics, and to the data available at the digital output. For example, a pressure sensor or a temperature sensor monitors environmental parameters, so they can slowly vary without significant changes, and the max ODR for these kinds of sensors in ST portfolio is below 100Hz; a magnetometer has a max 1kHz ODR; a motion sensor such as an accelerometer or a gyroscope runs max at 6kHz; finally, a microphone sensor is more "problematic" than the previous ones, and you should use a dedicated interface because the master-clock can run up to 3MHz.

For all these reasons, you can use the same SPI for a group of sensors (3 or 4), for example at 4MHz speed, driving only the CS separately with a microcontroller. I suggest you to use an MCU with a proper number of interfaces / peripherals, such as an STM32F4 or STM32H7 family MCU, which has 6 SPI interfaces for motion sensors, 4 I2C for temperature/humidity/pressure, 3 I2S for microphones etc. To get a full parallelism you will set properly the interfaces in your FW, but the MCU runs at 480MHz so I think you should be able to get a satisfactory parallelism. For STM32F4 you can find examples of lot of different sensors acquisition in the online available FP-SNS-ALLMEMS1 package. Regards

0690X00000As8feQAB.png

Ozone
Lead II

>... and you need to read the value of each sensor exact at the same time ...

Define "exact the same time".

Ambient characteristics as temperature and pressure have very small rates of change, a once-per-second sampling rate would be more then sufficient.