How does the Nano 33 accomplish 100Hz sample rate (accelerometer)

Data in my project has been obtained directly with Edge Impulse with the Arduino Nano 33 BLE Sense. During data acquisition, the platform asks for the sample rate, where the only options are 50Hz or 100Hz.

The board features an LSM9DS1, and table 68 of the datasheet, among others, lists the available sample rates for the accelerometer sensor. The closest one is 119Hz.

My question is, how does Edge Impulse actually sample at 100Hz?

I need this to implement my own feature provider inside my project(I’m not using the Arduino libraries and I’m using custom blocks so this is not generated).

Of course, I can work with 119Hz(~120Hz) and upsample and downsample the features to achieve the desired sample rate, which shouldn’t be too complicated with the help of the processing sdk.

Still, I might be missing something or this is already implemented somewhere.

For future readers:
You can implement this with the help of functions from the SDK like ei::spectral::processing::butterworth_lowpass_filter or arm_fir_interpolate_f32 from the CMSIS DSP library

Hi @PHAN, we sample at 119Hz then (sort of) downsample. We do this so we can normalize over multiple accelerometers, 100Hz is safe (e.g. ST does it at 102Hz).

We have a collection loop that fires every 10ms. then grabs a value, so not directly downsampling, but rather that way.

So we could say there is no interpolation involved right? Just taking the closest (previous) sample.

Good to know this, I will implement it the same way then. I want the data distribution during inference to be the same(or closest) as the one during data acquisition.

Thank you.

1 Like

@PHAN, the example here: https://docs.edgeimpulse.com/docs/cli-data-forwarder#example-arduino does this.

1 Like