pics :
This is the setting with the AMS117 module
I then tried to use the 5V output and regulate the power voltage with a AMS1117 module
(EB) (AMS1117-3.3V) (SME280)
GND ---- (- IN) (-OUT) ------ GND
5V ----- (+IN) (+OUT) ----- VCC
SDA --------------- SDA
SCL --------------- SCL
The AMS117 module is this one
Where I added a 100 uF cap on input and output + a ferrite bead (120 R) on the plus output.
This is the setting when you do not power the BME280 by the ESP8266 board, but by an external LiPO battery
(the data wires SDA, SCL, are unchanged )
(EB) (BATT) (SME280)
GND ---- (-) ------ GND
(+) ---- VCC
SDA --------------- SDA
SCL --------------- SCL
This is the BME280 with all necessary pullup resistors (10k) and decoupling caps
-------
And finally, this is the output
I am using the adafruit library for the BME280 , and blynk.
As you can see, before 18:00, which corresponds to the setting with the AMS1117, the data is corrupted. After 18:00, when powered by the battery, everything is fine.
Ensure the BME280 has nearby decoupling caps and some filtering on Vcc (0.1uF, 10uF w/100R to Vcc) ok as part uses <1ma.
Ensure the I2C pull up resistors are 4k7 or lower. No idea what you are doing for VccIO, Vcc.
What speed are you running this at, experiment with lower or faster. It might be WiFi chirps corrupting the I2C transfers.
What are you using for a BME280 firmware? Some library routines have a bug for multi-byte transfers where they give an extra runt clock pulse every 8 bits, so a 16-bit transfer gets the last byte corrupted intermittently.
I got temperature readings 2-3C higher, depending on the BME280 software library I use. Bosch, Adafruit, RPi, Cactus etc. I think some bugs there reading the CAL coefficients.
The sensor is sensitive to light, and humidity sensor needs conditioning after PCB wash.
All these are excluded as the sensor behaves perfectly when powered by the battery, with the same data wires.
It is not either the EMI radiation from the power supply, as the wires in the Lipo setting can as well grab these EM
radiations, and obviously do not affect the data.
The problem seems to come from the VCC wire. If I power directly the BME280 module from the 3.3V output of the board,
(EB) (SME280)
GND ---- GND
3.3V ---- VCC
SDA ---- SDA
SCL ---- SCL
I have the same problem. This was my motivation from inserting the AMS1117 module. But it did not work.