Showing results for 
Search instead for 
Did you mean: 

I see large spikes in h3lis331dl output data that are happening at rare occasions, but frequently enough to cause problems.

Associate II

We are seeing something quite odd with readings.

We have the device completely static on a bench, at 1kHz, as initialised below. The readings bounce around as explained elsewhere, but occassionally we get what looks like a random sample that appears in our history.

We can run for 24 hours and suddenly, somewhere in the middle the readings will jump from 0.7 G in compeltely static state to 2.4G (after conversion).

This seems to be exacerbated by the HP filter. With it running the data varies much more frequently and will exceed 3G within a typical 10minute period, turning it off makes this less likely but not impossible.

Does anybody have specific experience with this?

Do note that we are polling the sensor periodically, and its my understanding that wiht the BDU feature turned on we should not see this effect due to polling.

here is my init code, with the filter enabled.

	h3lis331dl_boot_set(&gSensor_ctx, PROPERTY_ENABLE);
	/* Enable Block Data Update */
	h3lis331dl_block_data_update_set(&gSensor_ctx, PROPERTY_ENABLE);
	/* Set full scale */
	h3lis331dl_full_scale_set(&gSensor_ctx, H3LIS331DL_100g);
	/* Set Output Data Rate */
	h3lis331dl_data_rate_set(&gSensor_ctx, H3LIS331DL_ODR_1kHz);
	/* Configure filtering chain */
	h3lis331dl_hp_path_set(&gSensor_ctx, H3LIS331DL_HP_ON_OUT);
	h3lis331dl_hp_bandwidth_set(&gSensor_ctx, H3LIS331DL_CUT_OFF_8Hz);
	h3lis331dl_axis_x_data_set(&gSensor_ctx, 1);
	h3lis331dl_axis_y_data_set(&gSensor_ctx, 1);
	h3lis331dl_axis_z_data_set(&gSensor_ctx, 1);

Associate III

Hi @TWard.1​ , yes, the BDU should prevent data to be read before the output registers are updated. Are you seeing this issue randomly in time, or after a precise amount of time? And on how many samples? And which power supply are you using (2.5V is the value recommended by the datasheet). You should also be sure that the device is not disturbed by electrical shocks coming from ESD events or similar.


Associate II

Thanks for the response.

This is purely random. We are using 3.3V. We have managed to completely remove this if we poll the status bit (the issues we see are without polling the status bit); it seems that there is some timing for reading this that can cause corruption even if BDU is enabled.