BME/BMP280

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Q666
Posts: 6
Joined: Wed Jun 01, 2022 6:23 am

BME/BMP280

Post by Q666 » Wed Jun 01, 2022 2:42 pm

Hi

i have a problem with a BME/BMP280 that i order from AliExpress. (2 diffenrent sensor from same order)
I tested the sensor with BME280 libary and BMP280 libary.

With both I get OSError: [Errno 19] ENODEV
I testet it wiht ESP32 TTGO and ESP8266 D1 mini. To test the wiring i connected a BMP180 to the same spot on the breadboard, the wiring ist ok.

My question is the sensor broken or is the library out of order?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: BME/BMP280

Post by Roberthh » Wed Jun 01, 2022 3:19 pm

I know that this library works with a BME280: https://github.com/robert-hh/BME280
If that one does not work as well, there is a problem with the sensors. Which error do you get?

Q666
Posts: 6
Joined: Wed Jun 01, 2022 6:23 am

Re: BME/BMP280

Post by Q666 » Wed Jun 01, 2022 3:33 pm

I get the following errors:
>>> ♦Traceback (most recent call last):
File "<stdin>", line 9, in <module>
File "bme280.py", line 17, in __init__
File "bme280.py", line 74, in get2Reg
File "bme280.py", line 68, in getReg
OSError: [Errno 19] ENODEV

♦Traceback (most recent call last):
File "<stdin>", line 8, in <module>
File "bmp280.py", line 20, in __init__
File "bmp280.py", line 60, in get2Reg
File "bmp280.py", line 55, in getReg
OSError: [Errno 19] ENODEV

I'll test the biblitohke as soon as possible

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: BME/BMP280

Post by Roberthh » Wed Jun 01, 2022 3:37 pm

Looks like the pull-up resistors are missing or wrong components are built to the board. Do you have a picture?

Q666
Posts: 6
Joined: Wed Jun 01, 2022 6:23 am

Re: BME/BMP280

Post by Q666 » Wed Jun 01, 2022 4:13 pm

From the sensor or the controller?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: BME/BMP280

Post by Roberthh » Wed Jun 01, 2022 4:25 pm

The sensor.

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: BME/BMP280

Post by shaoziyang » Thu Jun 02, 2022 1:55 am

This library works normally. Please check your I2C settings, include pull-up resistors. I have test it with esp8266/esp32/stm32 in several boards.

You may try

Code: Select all

i2c.scan()
before use BME280.

Q666
Posts: 6
Joined: Wed Jun 01, 2022 6:23 am

Re: BME/BMP280

Post by Q666 » Thu Jun 02, 2022 6:51 am

Image
Image

When I come home I will test

Code: Select all

i2c.scan()

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: BME/BMP280

Post by Roberthh » Thu Jun 02, 2022 12:32 pm

Thank you for the pictures. I see a four 10kOhm resistor package and a dual transistor chip, which acts as level shifter and provide the pull-up resistors. I see as well, that the address selection bit is tied to GND. Therefore, the address if 0x76 hex or 118 decimal. i2c.scan() should return this address. if i2c.scan() returns many addresses, then probably the pull-up resistors are missing.

Q666
Posts: 6
Joined: Wed Jun 01, 2022 6:23 am

Re: BME/BMP280

Post by Q666 » Thu Jun 02, 2022 2:36 pm

i2c.scan() gives me nothing on the BME280, but on BMP180 gives me the correct adress
i think the sensor is trash ...

Post Reply