💬 Atmospheric Pressure Sensor
-
Which altitude did you enter, or at which sealevel do you live (in meters)?
const float ALTITUDE = 688; // <-- adapt this value to your own location's altitude.The pressure of 728 hPa is a bit strange as it should be around 1000 hPa. In my eyes you threw out the code to correct the pressure depending on the sealevel of your home. See the code from my sketch:
float pressure = bmp.seaLevelForAltitude(SEALEVEL, absolutePressure);Here you can download the sketch I am using:
https://github.com/windkh/mysensors/blob/master/WeatherStationSensor/WeatherStationSensor.inoThe forecast will be unknown for at least 30minutes, because the sensor needs that time to detect a weather trend.
-
@bgunnarb you are find the problem, i think i have arduino pro mini 3.3V but it's 5V. Thx very much it's work better now :)
-
Where do the pin assignments live?
-
Where do the pin assignments live?
-
@gohan it appears as though I need SLC and SDA for the sensor it will prevent me from using a second SLC/SDA device. I was assuming that they were utilizing the analog input. My comment may be deleted as it is clearly not applicable
-
OH cool. I guess I have tons more to learn thank you for your help
-
The initial description on this page refers to BMP085.
The 'Example' states it is for BMP085 with Adafruit library (linked for dowbload).
The sketch uses a BME280 with library from Embedded Adventures.
The Datasheet is linked for a BMP085.
The shopping guide links to a BMP180.????
-
The initial description on this page refers to BMP085.
The 'Example' states it is for BMP085 with Adafruit library (linked for dowbload).
The sketch uses a BME280 with library from Embedded Adventures.
The Datasheet is linked for a BMP085.
The shopping guide links to a BMP180.????
Sorry for not noticing your post earlier @skywatch
The example was originally designed for BMP085. When the BMP180 became widely available, the buy link was updated to the newer version with the note "replaces the old BMP085". Both use the same library.
At a later stage, a MySensors user suggested changes to the example sketch to use the BME sensor instead. I don't know why this change was made, but my guess is that the user liked the BME sensor better. I don't know why the change was accepted without updating the build page, but my guess is that since the commit doesn't mention the change of sensor and the amount of code changed is quite large (369 additions and 252 deletions) nobody noticed that a new sensor was used.
I'm trying to address the sensor change in https://forum.mysensors.org/topic/9801/bmp-e-atmospheric-pressure
-
Heads-up: I've observed my sensor trying to sleep for 4 billion ms when running the sample code:
60082 MCO:SLP:MS=4294967214,SMS=0,I1=255,M1=255,I2=255,M2=255That's 2^32-82. So I think there's an underflow with this line:
unsigned long sleeptime = BME280measurementSleepTime - (quicktimecheck - previousBME280Millis);Not sure where exactly though. I've changed my code to simply sleep for a constant 60s.
-
Sorry for not noticing your post earlier @skywatch
The example was originally designed for BMP085. When the BMP180 became widely available, the buy link was updated to the newer version with the note "replaces the old BMP085". Both use the same library.
At a later stage, a MySensors user suggested changes to the example sketch to use the BME sensor instead. I don't know why this change was made, but my guess is that the user liked the BME sensor better. I don't know why the change was accepted without updating the build page, but my guess is that since the commit doesn't mention the change of sensor and the amount of code changed is quite large (369 additions and 252 deletions) nobody noticed that a new sensor was used.
I'm trying to address the sensor change in https://forum.mysensors.org/topic/9801/bmp-e-atmospheric-pressure
@mfalkvidd I've just started to look into this sensor and the main page is still quite confusing as already stated by @skywatch
It seems the choice at present is between the BMP280 or BME280. the latter also includes humidity.
Maybe the title could say Temperature/Pressure/Humidity? I just ordered a replacement Si7021, not realising there was another all in one sensor available.
It is clear that most ebay sellers are also confused and are wrongly listing BMP devices as BME.
I found a good summary to the confusion here https://goughlui.com/2018/08/05/note-bosch-sensortec-bmp280-vs-bme280-sensor-confusion/
Hope this helps someone - Think I'll be going for a BME280 here as it as some positive reviews https://www.ebay.co.uk/itm/Breakout-Temperature-Humidity-Barometric-Pressure-BME280-Digital-Sensor-Module/401513062540 -
I have now had my delivery of the above ebay sensor. Everything looks good. It is a BME280 and reports temp, humidity and pressure.
I have used the sketch on the build page and it has worked without any editing. I just had to install the BME280 library as given in the example sketch. Everything is shown nicely in Domoticz.
Interesting to note that when compiling in arduino IDE I get the following error : Low memory available, stability problems may occur.
Wonder if there will be enough room to add my battery level monitoring code?
-
I have now had my delivery of the above ebay sensor. Everything looks good. It is a BME280 and reports temp, humidity and pressure.
I have used the sketch on the build page and it has worked without any editing. I just had to install the BME280 library as given in the example sketch. Everything is shown nicely in Domoticz.
Interesting to note that when compiling in arduino IDE I get the following error : Low memory available, stability problems may occur.
Wonder if there will be enough room to add my battery level monitoring code?
-
@mfalkvidd Thanks for that. This is going to be my outside weather node running off a 12V solar charged battery. I started wi a DHT22 but it failed after a few months.
-
@mfalkvidd I've got it up and running now on the bench complete with measuring voltage. I found that removing all the serial print statements also free up a lot of memory. Thanks to all those involved for the provided code.
-
When using BME280 breakout https://lowpowerlab.com/shop/product/185 with Embedded Adventures library, life is easier if addrBME280 is set to 0x77 (it is set to 0x76 in BME280_MOD-1022.h)
-
Weird question, but has anyone dealt with thermal isolation of the BMPx8x modules?
To increase the WAF, I have one, together with a BH1750 and an rf-nano in a small, aesthetically pleasing, 3D printed custom housing. However, the temperature is stuck at 26.2°C, which I assume is due to the radiant heat from (mostly) the Arduino and the nRF24L01+
So I am looking for ways to keep the BMPx8x cooler, so it can correctly measure the temperature (and therefore also the pressure, as the warmer chip means the barometric adjustment will be off)...
-
Weird question, but has anyone dealt with thermal isolation of the BMPx8x modules?
To increase the WAF, I have one, together with a BH1750 and an rf-nano in a small, aesthetically pleasing, 3D printed custom housing. However, the temperature is stuck at 26.2°C, which I assume is due to the radiant heat from (mostly) the Arduino and the nRF24L01+
So I am looking for ways to keep the BMPx8x cooler, so it can correctly measure the temperature (and therefore also the pressure, as the warmer chip means the barometric adjustment will be off)...
-
@Fear-na-Boinne how about calling sleep() between measurements? That will pus the Arduino and the nrf24 in sleep mode, where they won't generate heat.
@mfalkvidd Didn't think of that... I can try changing the delay() to a sleep() and see how much that impacts the temperature...
(But I still am open to ideas to help insulate the sensor, and am now also wondering whether creating extra vent holes on both sides of the rf-nano might be a good idea, even if it means more dust can come in as well...)
-
Weird question, but has anyone dealt with thermal isolation of the BMPx8x modules?
To increase the WAF, I have one, together with a BH1750 and an rf-nano in a small, aesthetically pleasing, 3D printed custom housing. However, the temperature is stuck at 26.2°C, which I assume is due to the radiant heat from (mostly) the Arduino and the nRF24L01+
So I am looking for ways to keep the BMPx8x cooler, so it can correctly measure the temperature (and therefore also the pressure, as the warmer chip means the barometric adjustment will be off)...
@Fear-na-Boinne I don't know how your device / enclosure is built, but it's good practice to place environmental sensors as close to an opening in the enclosure and keep the dead volume around it as small as possible. Ideally, you'd put it in a separate chamber and move it as far away from other electronics and possible heat sources to minimize their influence to the measurements. If you're worried about dust, you could use thin cloth or something like that around the openings as a dust filter.
That being said, the BME/P sensors tend to report too high temperatures (just google for "BME temperature too high" or something like that - you'll find tons of topics), partly due to self-heating depending on how you use it, e.g. with oversampling enabled. IIRC, using forced mode, oversampling at 0 for pressure and 1 for temperature (and humidity) and filter turned off, is the prefered way for simple weather measurements with minimal current draw according to the datasheet.
If you have one of those 5V modules, the voltage regulator on board might give off some heat aswell.
The "easiest" fix would be to offset the temperature reading in software by a few degrees, if the reported temperature is off by the same value over the whole relevant temperature range (assuming 15 - 30°C for room temperature in your case).