Electronics > Projects, Designs, and Technical Stuff
Help with possible I2C interfarencde
cmumford:
Hi there:
I'm working on a simple project with an ESP8266 (Arduino) talking to a BME280 (Thermometer) via I2C. It works fine on a breadboard, but when I stuff it into it's 3D printed case, which is quite small, I start having problems. I get readings from the BME280, but the values are wildly incorrect. I suspect EMI is the cause. I have 2" un-shielded wires inside the case. Does it sound like EMI might be the cause? If so, any advice would be appreciated. thx.
DrG:
Are you following the mounting recommendations (Section 5, https://www.bosch-sensortec.com/media/boschsensortec/downloads/handling_soldering_mounting_instructions/bst-bme280-hs006.pdf
Can you provide a picture / schematic?
cmumford:
I don't have a schematic, but it's pretty simple, 3.3v, GND, SDA and SDC to the sensor. Attached is the breadboard photo (where it always works 100% of the time - for days), and the case, where it can sometimes work. Things seem to work better if I pull the sensor away from the case with as much wire as possible (sort of like the Case.png photo). When I stuff the wires in then the values start getting wonky. I just plugged it in and got 7 readings that were good, and then the sensor starts reading bad values.
temperature=76.69,humidity=45.5,altitude=241.50,pressure=1004.44
temperature=76.69,humidity=45.2,altitude=242.24,pressure=1004.41
temperature=76.60,humidity=45.1,altitude=241.39,pressure=1004.44
temperature=76.60,humidity=45.0,altitude=242.92,pressure=1004.39
temperature=76.60,humidity=44.9,altitude=241.68,pressure=1004.43
temperature=76.68,humidity=45.0,altitude=242.57,pressure=1004.40
temperature=76.71,humidity=44.8,altitude=242.72,pressure=1004.40
temperature=-225.24,humidity=100.0,altitude=-4277.97,pressure=1179.98
temperature=-225.24,humidity=100.0,altitude=-4277.97,pressure=1179.98
temperature=-225.24,humidity=100.0,altitude=-4277.97,pressure=1179.98
temperature=-225.24,humidity=100.0,altitude=-4277.97,pressure=1179.98
temperature=-225.24,humidity=100.0,altitude=-4277.97,pressure=1179.98
temperature=-225.24,humidity=100.0,altitude=-4277.97,pressure=1179.98
DrG:
I am wondering if you are getting self-heating. Seven good temps and then it goes bad. Can you use an extra long delay (a couple of seconds) between readings and see if that makes a difference?
From the referenced data sheet with the smartphone mounting example...
The sensor should be not more than 10% in the active state to avoid self heating, please check the datasheet for more details how to minimize the power consumption at a particular resolution
Still can't tell how the sensor is mounted. If it is inside the case, I am wondering how you get valid measurements for RH with no air circulation. Apart from that, no pullup resistors? Are they on the BME board? I have a couple of those boards (BME280) and can't remember, but they worked fine for me when I tested them - so these are just some thoughts.
cmumford:
At present the sensor is pulled away about an inch (see attachment), and is being sampled once per minute: (see https://github.com/cmumford/EnvironSensor/blob/master/EnvironSensor.ino). The sensor is definitely cool to the touch, but haven't measured its surface temperature. Yesterday it ran correctly for 90 min. before returning bad values.
Navigation
[0] Message Index
[#] Next page
Go to full version