Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

BME280 on BeagleBoneBlack
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BME280 on BeagleBoneBlack

by dragon2 on Tue May 01, 2018 8:59 am

Hello All,
I have been trying to get a BMP280 working with my Beagle using i2c.
Connections are simple enough:
Beagle <--> BMP280
GND (2) <--> GND
+3.3V(4) <--> VIN
* I2c1 clk (18) <--> SCK
* i2c1 dat (19) <--> SDI

(* Note: These were previously attached to i2c2 (19,20) -- until I read through the posts (from this forum, "BME280 on BeagleBone Black Wireless"; url = viewtopic.php?f=49&t=115185&hilit=bme280+beagle&start=30 . Accordingly, the pins were reconfigured and the connections to the bme280 changed as per forum suggestions).

Now, when I run the simpletest.py programme, I receive the following response:

Code: Select all | TOGGLE FULL SIZE
root@beaglebone:~/Adafruit_Python_BMP/examples# python simpletest.py
Temp = 82.70 *C
Pressure = -4455646.00 Pa
Traceback (most recent call last):
  File "simpletest.py", line 50, in <module>
    print('Altitude = {0:0.2f} m'.format(sensor.read_altitude()))
  File "build/bdist.linux-armv7l/egg/Adafruit_BMP/BMP085.py", line 192, in read_altitude
ValueError: negative number cannot be raised to a fractional power
root@beaglebone:~/Adafruit_Python_BMP/examples#


my configuration is thus:
Code: Select all | TOGGLE FULL SIZE
root@beaglebone:~/Adafruit_Python_BMP/examples# i2cdetect -y -r 1
     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                         

(The bmp280 is the only i2c device connected -- as shown in the picture)
IMG_20180501_083117_scaled.jpg
IMG_20180501_083117_scaled.jpg (133.07 KiB) Viewed 491 times



Any ideas what I might be doing incorrectly?

(The temp and pressure are quite off!)

dragon2
 
Posts: 4
Joined: Sun Apr 29, 2018 9:10 pm

Re: BME280 on BeagleBoneBlack

by dragon2 on Tue May 01, 2018 9:06 am

Oops!

Got part of the issue sorted out: I had used the incorrect interrogation software. When changed, I get close values for temperature (higher than expected; by around ~2 degrees C) and pressure (lower than expected; but only by around 10 hPa), but not humidity (off by 65%).

Code: Select all | TOGGLE FULL SIZE
root@beaglebone:~/Adafruit_Python_BME280# python Adafruit_BME280_Example.py
Temp      = 21.147 deg C
Pressure  = 990.28 hPa
Humidity  = 0.00 %


Any suggestions welcome!

dragon2
 
Posts: 4
Joined: Sun Apr 29, 2018 9:10 pm

Re: BME280 on BeagleBoneBlack

by drewfustini on Tue May 01, 2018 1:36 pm

That is odd that you are able to read temperature but not humidity.

Is it possible for you to wire up the sensor to an Arduino and try the Arduino library?
https://learn.adafruit.com/adafruit-bme ... duino-test

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: BME280 on BeagleBoneBlack

by dragon2 on Tue May 01, 2018 9:45 pm

I agree it is rather odd.

Unfortunately, I don't have an Arduino.

I might have a Pi around, though. Would that help?

dragon2
 
Posts: 4
Joined: Sun Apr 29, 2018 9:10 pm

Re: BME280 on BeagleBoneBlack

by dragon2 on Tue May 01, 2018 9:59 pm

I took a quick look into the library ( Adafruit_BME280.py ) .

The raw value for humidity does not change -- even when the unit is exposed to humidified air.
Code: Select all | TOGGLE FULL SIZE
>>> sensor.read_raw_humidity()
27252

No matter the conditions or the iterations, the result is the same.

Could it be the wrong register is being interrogated?

dragon2
 
Posts: 4
Joined: Sun Apr 29, 2018 9:10 pm

Re: BME280 on BeagleBoneBlack

by drewfustini on Wed May 02, 2018 11:50 pm

Yeah, I think it would be useful to try reading humidity with a raspberry pi and see if the result is any different

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.