PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

Add BMP390

Open AlexKlimaj opened this issue 2 years ago • 2 comments

This PR adds the BMP390 barometer. The BMP388 is not recommended for new designs and instead recommends the BMP390. Comparing the datasheets, it appears that the BMP390 is a drop in replacement with better performance. The only difference I can find in the register set is the chip id is different and there is an added rev id in a previously unused register.

I'm not sure this sensor warrants its own driver. We could rename this driver to reflect that it works for both sensors.

https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp388/

https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp390/

AlexKlimaj avatar Aug 03 '22 01:08 AlexKlimaj

Sounds similar to the BMI088/BMI090L situation. Add to drv_sensor.h so we can identify it in logs?

dagar avatar Aug 03 '22 22:08 dagar

Sounds similar to the BMI088/BMI090L situation. Add to drv_sensor.h so we can identify it in logs?

Added the BMP390 to drv_sensor.h and update the ID if the 390 is detected.

AlexKlimaj avatar Aug 03 '22 23:08 AlexKlimaj

I have it running on the ARKV6X. It is detected and updated the device ID to indicate it is a BMP390 and not a BMP388.

nsh> listener sensor_baro

TOPIC: sensor_baro
 sensor_baro
    timestamp: 32948738 (0.036732 seconds ago)
    timestamp_sample: 32947797 (941 us before timestamp)
    device_id: 7239201 (Type: 0x6E, I2C:4 (0x76))
    pressure: 85727.2109
    temperature: 45.4300
    error_count: 0

AlexKlimaj avatar Sep 13 '22 01:09 AlexKlimaj