Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

BME280 sensor
Goto page Previous  1, 2
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
O-Family

Bascom Expert



Joined: 23 May 2010
Posts: 338
Location: Japan

japan.gif
PostPosted: Wed Jan 12, 2022 9:23 am    Post subject: Reply with quote

I think your program is working fine.
It is possible that the sensor is faulty and should be replaced.
Or maybe you purchased a BMP280.
Back to top
View user's profile Visit poster's website
matjazs

Bascom Member



Joined: 08 Nov 2016
Posts: 104

PostPosted: Wed Jan 12, 2022 5:53 pm    Post subject: Reply with quote

Thanks for the help.

Yes, modules can be defects. I bought them on Aliexpress and replaced all three I have - the same result.
I will also order the BMP280.
Back to top
View user's profile
matjazs

Bascom Member



Joined: 08 Nov 2016
Posts: 104

PostPosted: Wed Jan 12, 2022 7:55 pm    Post subject: Reply with quote

Interesting explanation.
https://goughlui.com/2018/08/05/note-bosch-sensortec-bmp280-vs-bme280-sensor-confusion/
Back to top
View user's profile
O-Family

Bascom Expert



Joined: 23 May 2010
Posts: 338
Location: Japan

japan.gif
PostPosted: Thu Jan 13, 2022 12:39 am    Post subject: Reply with quote

If the three modules have the same symptoms, I think the one you bought is the BMP280.
BME280: Temperature, humidity, and atmospheric pressure. (ID:60h)
BMP280: Temperature and atmospheric pressure. (ID:58h)
The prices of BME280 and BMP280 are also very different.
I think you bought it by mistake or the seller shipped it by mistake.
Back to top
View user's profile Visit poster's website
matjazs

Bascom Member



Joined: 08 Nov 2016
Posts: 104

PostPosted: Thu Jan 13, 2022 9:12 am    Post subject: Reply with quote

O-Family thank you.
Yes, you are right. My modules are cheap. That means I have BMP280 and not BME280.
This is also the reason that humidity don't work.

I change &H60 with &H58.

Code:
Temp(1) = &HD0                                              ' ID register address
I2creceive Slave , Temp(1) , 1 , 1
                                                            'ID BME280-&60H   BMP280-&H58
If Temp(1) = &H58 Then
     Print "Sensor found"                                   ' ID register must return $60
    ' Lcd_text "Sensor found" , 88 , 120 , Darkgreen , White
Else
    Print "Sensor not found"
    ' Lcd_text "Sensor not found" , 64 , 120 , Red , White
   Goto Not_exist
End If


so it can now recognize the module.
I will now order the BME280.

I have another question.
The pressure must be in the range of 10000 pascal. Which unit is mm? I read about 749 to 751.
Back to top
View user's profile
O-Family

Bascom Expert



Joined: 23 May 2010
Posts: 338
Location: Japan

japan.gif
PostPosted: Thu Jan 13, 2022 10:38 am    Post subject: Reply with quote

[mm] stands for millimeter of mercury [mmHg].
1 Pascal = 0.00750062 mmHg

If you omit the calculation below, it is the Pascal value.
Pressure = Press * 0.0075006

[XXXXXX]Pa -> [XXXX.XX]hPa
Back to top
View user's profile Visit poster's website
matjazs

Bascom Member



Joined: 08 Nov 2016
Posts: 104

PostPosted: Thu Jan 13, 2022 10:53 am    Post subject: Reply with quote

Thank you very much for your help.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum