cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronise IIS3DWB sensors

TElle.1
Associate

Within a research project we are evaluating the IIS3DWB for measuring vibrations in hydraulic forging hammers for predictive maintenance.

The current application requires that two IIS3DWB sensors (which are connected to the same microcontroller) are synchronized. At least we should have some option to either start the timestamping on both synchronously or with a known correlation.

I'd like to mention that SPI-timing is not exactly predictable due to a linux operation system. We already got FIFO running to work around this at least for one sensor.

Now we need to correlaty two of them. Any ideas would be greatly appreciated.

If there are other devices which fit better, this may also be an option (we need 3-axis, SPI, high sampling rate, and if possible a higher max. g value)

Regards

Prof. Tobias Ellermeyer

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi Tobias, this is an interesting topic, indeed... do you need a trigger to start the acquisition simultaneously and keep the two accelerometer synchronized for the entire acquisition time, or you can just overlap and analyze the two acquisition in post processing, provided that you are sure to have acquired a synchronization event? Since the IIS3DWB ODR goes up to 6kHz, I believe you would desire a synchronization at least in the order of 1/ODR... The first (naive) suggestion could be to synchronize the two device CS (and to dispose the same track length from the processor to the accelerometers on the application board), to start the acquisition in the same time, after the register configuration.

But in case of SPI-timing issues, I believe you should synchronize the acquisition starting from a common detected external event (an impulse-like mechanical event) that can be recognized by the two sensors with enough accuracy. From that event, the two acquisition can be considered running together.

On other devices (such as for example the ISM330DHCX device) you could use the sensor hub feature, that enables you to connect sensors together and synchronize them. You can for example trigger the data write in the FIFO of one of the sensor sensor by the sensor hub data-ready signal. You can find here some C example code for the sensor hub feature usage.

Regards

TElle.1
Associate

Hi Eleon,

thanks for the quick response.

Within the application we are waiting for a electrical trigger event (processed by the microprocessor). When this occurs, a data set should be captured and send to a remote machine. The data set consists of approx 1 sec. data prior to the event (using a ringbuffer on the uP) and 2 sec of data after the event.

Aligning the data of both sensors therefore is possible if we e.g. now the timestamp difference (or have timestamps synchronously started).

Regarding the trick with CS: I had something similar in mind... There is a SPI command to reset the timestamp counters. If I send this to both devices it may work (both devices share MISO/MOSI and SCLK). For this special case I could control CS by software and hopefully change both CS within one command.

But using this "trick" activates MISO/SDO on both devices. Are these open drain drivers with pull up? I am a little bit unsure if these "pull-up" stuff in the data sheet is valid for both, SPI and I2C... If there is only a open drain it should be save to have both MISO/SDO active at the same time (as I don't need the device's response in that specific case).

The ISM330DHCX might also be interesting, but this is quite more complex, which makes programming and debugging a lot more difficult.

And does the 6.67 kHz ODR in this sensor specifies the per axis rate or total rate? We need each axis with a 3dB-bandwidth >2kHz ...

Regards,

Tobias