I have a bmp388 sensor that works perfect when plugged directly into the main board, using i2c
But I have a sensor board with external power module with other sensors with a separate power source, I have no way to make it work.
I have a bmp280 module on the same sensors board, (using the gnd, vcc, sda, scl pins) it works, replacing it with bmp388 and changing the code to bmp388 doesn't work. This module with bmp380 has worked for several years
I have left the sensors board without sensors, only the bmp388 and it still does not work
If I connect the vcc pin of the bmp388 module to the one on the main board, it works.
All running 3.3v, SDA and SCL with 2.2k pull-up resistors.
I have checked the voltages and everything is correct. (3.3v)
Any idea?
Does the bmp388 have to be powered on in some special way?
Is there any way to hard reset the bmp388?
Same problem with Adafruit bmp388 library.
Thank you in advance
Code:
///////////////////////////////////////////////////////////////////////////////
// BMP388_DEV - I2C Communications, Default Configuration, Normal Conversion
///////////////////////////////////////////////////////////////////////////////
#include <BMP388_DEV.h> // Include the BMP388_DEV.h library
#define SENSORS_VCC 9 //external power source pin
float temperature, pressure, altitude; // Create the temperature, pressure and altitude variables
BMP388_DEV bmp388; // Instantiate (create) a BMP388_DEV object and set-up for I2C operation (address 0x77)
void setup()
{
pinMode(SENSORS_VCC,OUTPUT);
digitalWrite(SENSORS_VCC,HIGH); // power on external module 3.3V
Serial.begin(115200); // Initialise the serial port
bmp388.begin(); // Default initialisation, place the BMP388 into SLEEP_MODE
bmp388.setTimeStandby(TIME_STANDBY_1280MS); // Set the standby time to 1.3 seconds
bmp388.startNormalConversion(); // Start BMP388 continuous conversion in NORMAL_MODE
}
void loop()
{
if (bmp388.getMeasurements(temperature, pressure, altitude)) // Check if the measurement is complete
{
Serial.print(temperature); // Display the results
Serial.print(F("*C "));
Serial.print(pressure);
Serial.print(F("hPa "));
Serial.print(altitude);
Serial.println(F("m"));
}
}