Hello all,

we have a small test of accelerations by using XDK, namely the sensors BMA280 and BMI160 (only for acceleration). But the problem was, from the data record, we found a huge difference (+/- peak values) between two sensors, especially when forces were changing very fast (e.g., z-axis, as shown in the attached figure). How could we choose the more accurate results from the measurements?

We configured the logger.ini file as following:

-----------------------------------------------------------------------------------------

[bma280]
; Sensor enabled? [0, 1]
enabled=1
; Sensor Sampling Rate in Hz: [0.0001 - 1000]
sampling_rate=1000
; Sensor Range in +- g: [2, 4, 8, 16]
range=16
; Sensor Bandwidth in Hz (or unfiltered): [7.81, 15.63, 31.25, 62.5, 125, 250, 500, unfiltered]
bandwidth=500

[bmi160]
; Sensor enabled? [0, 1]
enabled=1
; Sensor Sampling Rate in Hz: [0.0001 - 1000]
sampling_rate=1000
; Accelerator Sensor Range in +- g: [2, 4, 8, 16]
range=16
; Accelerator Sensor Bandwidth in Hz (or unfiltered): [7.81, 15.63, 31.25, 62.5, 125, 250, 500, unfiltered]
bandwidth_accel=500
; Gyroscope Sensor Bandwidth in Hz (or unfiltered): [32, 64, 12, 23, 47, 116, 230, unfiltered]
bandwidth_gyro=32

-----------------------------------------------------------------------------------------

Could anyone please provide some help?

Thanks a lot in advance!

0 (0 Stimmen)
RE: Acceleration Measurement from BMA280 and BMI160
Antwort
27.09.18 14:14 als Antwort auf Peilin.
Hello Peilin,

first, I would like to welcome you to the XDK community.

I assume you used the Data Logger demo to conduct your tests with the BMA280 and the BMI160?

The Data Logger demo is limited to a sampling rate of 500 Hz and is not able to sample two sensors at a resulting sampling rate of 1 kHz. This would explain why you are not able to sense fast acceleration changes.

The differences in the acceleration could be caused by the constant offset, you have between the sensor values of both sensors.

To decrease this difference, I recommend to implement a constant offset compensation and then to compare them once more.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
+1 (1 Stimme)
RE: Acceleration Measurement from BMA280 and BMI160
Antwort
08.10.18 07:32 als Antwort auf Franjo Stjepandic.

Hello Franjo,

Thanks a lot for your reply! Please see inline:

Yes, this is correct. I am using Data Logger demo to conduct the tests. One further question would be, from the hardware side, do we need to calibrate the sensors by ourselves? If yes, how?

The following shows the setting of the enabled sensors, we did set the sampling rate to 500 Hz, maybe something else is not right?

 

[bma280]
; Sensor enabled? [0, 1]
enabled=1
; Sensor Sampling Rate in Hz: [0.0001 - 1000]
sampling_rate=500
; Sensor Range in +- g: [2, 4, 8, 16]
range=16
; Sensor Bandwidth in Hz (or unfiltered): [7.81, 15.63, 31.25, 62.5, 125, 250, 500, unfiltered]
bandwidth=500

[bmi160]
; Sensor enabled? [0, 1]
enabled=1
; Sensor Sampling Rate in Hz: [0.0001 - 1000]
sampling_rate=500
; Accelerator Sensor Range in +- g: [2, 4, 8, 16]
range=16
; Accelerator Sensor Bandwidth in Hz (or unfiltered): [7.81, 15.63, 31.25, 62.5, 125, 250, 500, unfiltered]
bandwidth_accel=500
; Gyroscope Sensor Bandwidth in Hz (or unfiltered): [32, 64, 12, 23, 47, 116, 230, unfiltered]
bandwidth_gyro=32

 

Thanks a lot for your help, again! And we will try to make a constant offset compensation, to see if it works better.

 

Best regards,

Peilin

0 (0 Stimmen)
RE: Acceleration Measurement from BMA280 and BMI160
Antwort
09.10.18 14:29 als Antwort auf Peilin.
Hello Peilin,

Thank you for providing more information on your issue.

The two main sources for the difference in the sampled values lays in the Zero-g-offset of both sensors, which can not be changed since it is a specification for both sensors and is bound to their physical behavior.

In addition to that, there is also a difference in the used resolution of both sensors. The BMA280 has a resolution of 13 Bit, while the BMI160 has a resolution of 16 Bit.

On that behalf, it depends on the requirements of your use case about how much the sensor values can differ in their accuracy and if an calibration is actually necessary.

In that regard, embedding an offset compensation should definitely a helpful first approach in calibrating the acceleration sensors.


Furthermore, could you go more into detail about your use case and the required accuracy. Maybe I can provide some assistance regarding further compensation.

Please let me know if this was helpful, and do not hesitate to ask further questions.

Kind regards,
Franjo
+1 (1 Stimme)
RE: Acceleration Measurement from BMA280 and BMI160
Antwort
10.10.18 11:30 als Antwort auf Franjo Stjepandic.

Hi Franjo!

Thanks a lot for your reply.

Our use case is, that we want to measure the accerlaration forces (in three dementions) of a moving object from point A to point B. On the way from point A to B, there might be an elevator, a bumpy/shaky process, and so on. We want to measure the forces and later we could use the data to analyze the path. The requirement of the resolution is not so high, but the accuracy of the MAX and MIN values should be maintained.

Our main purpose was not to calibrate the sensor, but to choose a more accurate sensors from BMA280 or BMI160 for our tests. By couristy, we enabled both, then we found that this huge measued difference. Maybe it is better to use one of the sensors, which is more reliable/accurate?

Thanks a lot!

Best regards,

Peilin

 

 

0 (0 Stimmen)
RE: Acceleration Measurement from BMA280 and BMI160
Antwort
10.10.18 14:27 als Antwort auf Peilin.
Hello Peilin,

Thank you for going more into detail about your use case. I would agree to use only one of both acceleration sensors. For your purpose, the accelerometer of the BMI160 should suit best for your use case, since it has the higher resolution. As mentioned in my last post, the main difference also lies in the three additional bits of resolution of the BMI160. The other specifications of both sensors are more than less equal.

Furthermore, since you are only requiring exact min and max values, I guess that only a compensation of static influences will be necessary. These would be for example the zero-g offset and other absolute errors, which may come into account.

For that, I recommend making further tests with only the accelerometer of the BMI160 and an external acceleration sensor, which you use as reference sensor to determine the maximal static influences.

These you then can simply compensate by integrating a static offset into your XDK application.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: Acceleration Measurement from BMA280 and BMI160
Antwort
29.10.18 09:31 als Antwort auf Franjo Stjepandic.

Dear Franjo,

thanks a lot for your reply!

Maybe also for your information, it seems that this BMI160 sensor limits the acceleration range of the value to +-2000mg, regardless of the settings from the logger.ini file. For instance, I set the acceleration range to +- 16g, but the measurement would alway be in between +- 2g, which seems like a filter. I am really wondering why this happens. Could you please check and help?

Thanks and Best regards!

0 (0 Stimmen)
RE: Acceleration Measurement from BMA280 and BMI160
Antwort
30.10.18 16:01 als Antwort auf Peilin.
Hello Peilin,

I tested the behavior with the Data Logger demo and the 16g range setting. I was able to reproduce it. Furthermore, I set up an isolated application, while showing the data coming from the accelerometer of the BMI160 in a live graph and also with the 16g range setting. There, I observed higher acceleration than 2g. As such, there is no issue regarding the sensor itself, but with the initialization in the Data Logger demo itself.

Please note since there is a new Data Logger application available in the Bosch IoT marketplace , the Data Logger demo, you are using is no longer available for download and as such no longer supported. Applying fixes to it would need to be done by yourself.

In that regard, you can either use the free version of the new Data Logger or apply fixes to the old one. For the fixes, I recommend analyzing the process, where the configuration is read out from the SD card. I assume, that the issue is buried there, why only the 2g range is applied.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)