Uncategorized

BMP180 / BMP280 Notes

Asked 
Active yesterday
Viewed 27 times
0

At the moment I am trying to get readings of pressure from a BMP180 on a Raspberry Pi (OS : Noobs)

So far, I have been successful with connecting the device with the pins and the I2C is detecting the BMP180.

When I check using i2cdetect this is shown:

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- 77 

which most likely means that the BMP180 is connected properly and I successfully enabled I2C.

However when I try to run the example code of the Adafruit_Python_BMP on the github page this error is shown:

Traceback (most recent call last):
  File "simpletest.py", line 37, in <module>
    sensor = BMP085.BMP085()
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_BMP-1.5.4-py3.7.egg/Adafruit_BMP/BMP085.py", line 69, in __init__
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_BMP-1.5.4-py3.7.egg/Adafruit_BMP/BMP085.py", line 72, in _load_calibration
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.4-py3.7.egg/Adafruit_GPIO/I2C.py", line 202, in readS16BE
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.4-py3.7.egg/Adafruit_GPIO/I2C.py", line 179, in readS16
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.4-py3.7.egg/Adafruit_GPIO/I2C.py", line 166, in readU16
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO-1.1.5-py3.7.egg/Adafruit_PureIO/smbus.py", line 224, in read_word_data
OSError: [Errno 121] Remote I/O error

The tutorials/websites I used were these: https://learn.adafruit.com/using-the-bmp085-with-raspberry-pi/using-the-adafruit-bmp-python-library https://www.instructables.com/id/Raspberry-Pi-Weather-Station-3/

Diagram that I used as a guide to connect the BMP180: Diagram

Please note that I did not solder the pins but they are embedded in the breadboard and the wires are connected as shown in the diagram.

Am I missing something or is there a solution to this please?

share  edit  follow  close   flag
 New contributor
  • 1
    Welcome to the forum. NOOBS is a loader not the O/S – You can tell the version of the O/S by the command cat /etc/os-release. Did you run the test program using sudo or just as Pi? – Andyroo yesterday
  • 1
    Check your connections and add clear photos. The error is a typical symptom of loose or erratic connections. – joan yesterday
  • 1
    @Andryroo I ran both sudo using the terminal and pi and both yield the same errors. – GarXik yesterday
  • 1
    @joan This can be the problem since I did not solder my BMP180. As for the pictures I will include a diagram that I used as a guide and edit the post. – GarXik yesterday
  • 1
    Have a look at stackoverflow.com/questions/52735862/… – different device but possibly a similar problem… – Andyroo yesterday
  • 1
    @Andryoo I will try this out tomorrow and let you know how it goes. However, I doubt it has to do with that. Any bus modifications should be handled by the Adafruit modules installed but I just yield loads of errors from the modules for some reason. On a seperate note, can the pins of the BMP180 be directly connected to the Raspberry Pi Pins using F-F wires? Maybe the connection is better like that? – GarXik yesterday
  • 1
    Yes you can connect without the breadboard but given the device is detected at the correct address I’m not convinced it’s a hardware issue. – Andyroo yesterday
  • This Errno121 Q&A might help: Rpi Python I2C IOError: [Errno 121] Remote I/O error Problem. How to fix it? Asked 2010apr28 Viewed 173 times raspberrypi.stackexchange.com/questions/97995/…. Good Luck. Cheers. – tlfong01 yesterday
  • One more thing, you might be using a too old (Wheezy or older) or too new (using Circuit Python) AdaFruit BMP180 library, or a not too Rpi compatible Circuit Python library. You might like to search for “non Circuit Python” Library. These two Q&As might help: (1) “BMP180 Interface Problem”: stackoverflow.com/questions/60274562/…, (2) CJMCU-8128 … BMP280 Problem” raspberrypi.stackexchange.com/questions/112496/…. Cheers. – tlfong01 yesterday
  • 1
    @tlfong01 Yes this can be possible, I might give the Pimoroni BMP20 library a try and see how it goes. I can’t seem to figure out adafruit at all. – GarXik 11 hours ago
  • And in case you have no luck on Pimoroni BMP280, you might try SparkFun. I usually try AdaFruit first, then SparkFun, then Pimoroni, and lastly WaveShare: (1) “SparkFun BME280 Python Library sparkfun/Qwiic_BME280_Py (Latest commit edb3f31 on Jul 16, 2019) – 2019”: github.com/sparkfun/Qwiic_BME280_Py, (2) “SparkFun sparkfun/Qwiic_I2C_Py (Latest commit f4dba48on Dec 14, 2019) – 2019”: github.com/sparkfun/Qwiic_I2C_Py, (3) “SparkFun Qwiic_I2C_Py Docs – 2019”: qwiic-i2c-py.readthedocs.io/en/latest/index.html. Good Luck. Cheers. – tlfong01 34 secs ago   Edit
.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: