How to use BME280 Temperature, Humidity and Pressure sensor with Arduino
ฝัง
- เผยแพร่เมื่อ 15 พ.ค. 2024
- My Arduino Course on Udemy: robojax.com/L/?id=153 Learn Arduino from a proven instructor who write his own codes and libraries.
The module is explained fully with wiring shown and code explained and demonstrated. The link to the code is below the timing.
The best thank you for me is to not to skip ads and Subscribe 🔔 to my channel, like 👍 the video It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe and enable the bell 🔔.😊
00:00 Start
00:32 Introduction
04:02 Wiring explained
04:49 Code Explained
09:29 Demonstration of basic code
13:38 Custom code explained
14:55 Demonstration of custom code
Download the code and library for BME280: bit.ly/rj-bme280
**** Purchase BME280 from *****
Amazon USA: amzn.to/2PMz6zb
Amazon Canada: amzn.to/3rzdEMh
Amazon Europe (all europe): amzn.to/3tbKMKp
***** Purchase Authentic Arduino Uno from ***
Amazon USA: amzn.to/2KApAwK
Amazon Canada: amzn.to/37LZ8sW
Amazon Europe (all europe): amzn.to/3t7KS5O
******Purchase this LCD1602 I2C from:*****
Amazon USA: amzn.to/3rBaFTw
Amazon Europe (all countries): amzn.to/38ryLsk
Amazon Canada: amzn.to/2N3B8tM
Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
Tutorial by Ahmad Shamshiri form Canada
****************************
Get early access to my videos via Patreon and have your name mentioned at end of very videos I publish on TH-cam here: robojax.com/L/?id=97 (watch until end of this video to list of my Patrons)
****************************
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
If you want to learn Arduino from proven instructor on **Udemy**: bit.ly/rj-udemy
Follow me on Facebook robojaxTV
Follow me on Twitter: / robojaxtv
Follow me on Instagram: / robojax
Tutorial by Robojax.com
Get other projects code and learn Arduino
robojax.com/learn/arduino
#robojax #robojax_temperature - วิทยาศาสตร์และเทคโนโลยี
I had given up, but then came back and tried again :), finally working. I have the blue sensor and the pins don't match, but swapping A4 & A5 worked this time. A4 = SDI, and A5 = SCK
My god this dude is thorough! I stated whatching expecting just another "basic" tutorial without much information and now I know how wrong I was... Congrats for the teaching skills!
Thank you. I am glad you found it useful.
This video helped me with a school IoT project. Thank you.
Glad it helped!
excellent tutorial.
You explain everything fantastically, thank you very much. I really like this channel
Happy to hear that!
Great video, Ahmed, thanks.
Is there a way to visualize the data while it is being collected? For example, imagine this sensor is flown on a drone and collecting data. Is there a way to validate / visualize the data to make sure they are of good quality? It would be sad to go on for a flight collecting data and once you unpack the SSD card you find nothing.
Many thanks
You are the best.
Thank you . So are you.
Thanks for your video which are always interesting. Please could you show how to put out the values on LCD 20x4? Most time you are showing serialprint only. Thanks a lot✌🏼Boris 🇨🇭
Just search my channel for LCD
Hi bro;It is great tutorial,thank u so much !
Where can I find library for BME280 ?
You are welcome. Under the video in the description There is link to library and other resources for this video.
Great tutorial, thank you.
The temp is reading 1 degree high. Is there a way to write code to always subtract 1 degree?
You are welcome. Yes you can change the value. find this line: float temp = bme.readTemperature();// read temperature
and immediately under that put: temp =temp + 1;
this will add 1 into the "temp" which is the variable holding the temperature. or subtract with -
Robojax thats brilliant, thank you. I’ll try that later as I’ve not managed to get it to work.
I’m already using float as the project includes rf24 modules. Would it have to be a separate float command?
excelente tutorial
Thank you.
@Robojax Hello coud you help me how to set oversampling at this gybmep chip thaks
Hello Richard, The sampling is defined here github.com/adafruit/Adafruit_BMP280_Library/blob/master/Adafruit_BMP280.h in line line 124 to 136 in library and you have work within that range. I have provided basic example. The range is shown in the datasheet on page 8 here ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMP280-DS001.pdf
Hi there. I accidentally burn the capacitor connect between VIN& GND befor the 662 voltage regulator while soldering. Do you know the value of this capacitor so I can try to change it and see if the BME 280 is still working? thanks in advance. Alexandre
Hi, the capacitor value should not be critical. it is is just a filter. most of the modules are replica from Adafruit or Sparkfun. you can see schematic here cdn.sparkfun.com/datasheets/Sensors/Weather/SparkFun_BME280_Breakout_v10.pdf
Hola tus videos son muy buenos estoy interesado en el BME280 y me gustaría ver el video en "Español" es posible ?. Muchas gracias
BME 280: th-cam.com/video/zqJRNGECAvw/w-d-xo.html BME+LCD th-cam.com/video/mXY_6LOekkw/w-d-xo.html
Can we change the sea level preasure to increase the precision of altitude?
You can. But remember altitude is approximate. I have provided the datasheet. Read that please.
Good day sir
Very informative viedio. A request for you sir, can u pls make a. Viedio for sensor cjm cu8118 sensor for co2 and temp humidy sensor. I am planning for making air quality monitor
John
Good day, I was not able to find : cjm cu8118
@@robojaxgood day sir
Pls search this text "CJMCU-8118 CCS811 HDC1080 Carbon Monoxide CO VOCs Temperature And Humidity Gas Sensor Module"
I will get it but it takes 40 days for the module to arrive and then I will make video of it.
@@robojax thank you sir for the kind consideration
John
Hey I have one question I am trying to find one sensor that can detect human presence from like 3-6 feet do you know any sensors that can fulfil this task
Hi, very hard topic. detecting a living thing can be done by temperature, motion, shape and many oher factors like breathing etc. this product sold in this video is called body motion detector th-cam.com/video/h9JDlQXpi2w/w-d-xo.html you look at .But for proper detection, you need motion sensor and thermal sensor to combine and get about 60% accuracy. for 90% accuracy or higher, you need camera to detect shape. then thermal camera and motion sensor get assurance that the object is human. Good luck
thanks for the video, i hv a similar sensor but had a close look on the sensor and it doesn't have the same marking on the sensor, mine has 807ur, reason for asking is i bought 2 and i got one to work and after one hour it stop working,
You are welcome. Did you check if yours is 3.3V? if you connect it to 5V it will die. Check it or connect the other at 3.3V and if it works, then keep using only 3.3V.
@@robojax by the way, I enjoy your videos, keep it up.( No need to wear the cap)
LOL. Thanks. I will . stay safe. It is COVIT-19 time.
@@robojax yes, we are on partial lockdown( Malaysia)
Good day
Would you still be able to assist me with some of the coding - I am a noob to this and i am busy designing something for my school.
Good day. I am sorry other than replying to comment if time permits, I have no time to do or work on projects. Good luck.
Is there any way we can save the data?
Also can u tell me about any software where we can simulate this to check this ?
Thanks
Salaam alaikum, here is how to save on microSD card th-cam.com/video/TduSOX6CMr4/w-d-xo.html I don't know any simulator.
Hi. I have the same module that you have. But are those extra 3 pads for. I bought it as bmp. And you saying its bme. Which one is right. Because i need bmp for my project.
Hi, I have video both on BME280 and BMP280 with code. the best option would be follow both video and upload the code and see which one works. Just pay attention to the wiring so you don't mix the GND and VCC. Here is how to find Specific TH-cam Video in a channel bit.ly/findTH-camVideo
@@robojax thanks. It's just bme won't work on my board for some reason.
If you do proper wiring it should work . It uses I2C communication and just connect it to A4 and A5 watch the video and try both projects. Run first I2C scans to see if you get the address.
@@robojax ok. Thanks. I'm going to use it on a flight controller that has no barometer. It only reads bmp. I'll try and see. Thank you
702 is not a regulator, it is a Dual N-Channel MOSFET for i/o logic level shifting from 5v to 3.3v.
Hi, Thank you for pointing that out. I just check it and could not find anywhere the 702 as mosfet. Adafruit uses two MOSFETS BSS138 for level shifter on the module and shown on the schematic here learn.adafruit.com/assets/26693 (datasheet for BSS138 www.onsemi.com/pub/Collateral/BSS138-D.PDF) and if you open the schematic on separate tab cdn-learn.adafruit.com/assets/assets/000/026/693/original/sensors_sch.png?1437773082 you will see a 5 pin chip MIC5225-3.3 which is a 3.3V regulator where you can see the datasheet here cdn-shop.adafruit.com/datasheets/mic5225.pdf
@@robojax Hi, I'm not talking about Adafruit board but about board you're reviewing. At 2:42 the 6 pin SOT-363 chip on the right marked 702 is the dual MOSFET. Datasheet is here (marking is on the page 2): www.gs-power.com/db/pictures/modules/PDT/PDT060207001/DS_GSM7002T_Rev1.2.pdf Thanks.
thank you. yes you are right. it makes sense at 2:43 at the middle you see the 103 x3 resistors that is used with the logic level converter. I'll see if I can remove that portion . thanks for the comment and pointing the error.
is it possible to measure the altitude by bme280
I have provide the link to datasheet. Check that out. I have new video on bmp380 where you can measure appropriate altitude.
Hey, I don't know why but it seems they removed readHumidity from the newer version of this library
I always save the library and provide it as zip. So try getting that then.
Hi
I have a problem with this kind of sensor. When I use the I2C scanner it return me the address 0x76. But When I use your sketch or any other that use this sensor, returns this "BME280 test
Could not find a valid BME280 sensor, check wiring!
"
I don´t know if I have something wrong or simply the sensor is broken.
Please help me.
Regards
it seems you have not installed the library. or the wires are loose. check it again. Thank you for not skipping the ads and keep watching it. This will help me a lot.
Robojax the library bme280 is instaled an the jumpers are connected in the respective port of the arduino. Do you have any idea of what is happening.
Regards
@@norielhurtado1082 I have this same issue. Except when I run the I2C scanner, it doesn't return an address. No idea how to fix, someone please help
@@norielhurtado1082 Just rename the library, his code is wrong. Before download, try to compile
Ok here is what I was done yo dix this
In code line number 44
Status =bme.begin();
You must write the sensor address, in my case the address is 0x76. If you aren’t sure of which is your sensor address first run an i2c scanner sketch to get your sensor address.
Returning to the main code the line 44 change to this:
Status =bme.begin(0x76);
And the sensor began to send the measuring data.
I hope it works for you people and continue learning arduino like me.
Regards
Can hpa be changed to pa?
1 hPa = 100 Pa, so if ou want it in "pa" just divide it byh 100. it is very sijple. let' say we have a variable "age" and it has value of 10 and you want to divide it by 2, simply write age = age/2; or age /=2;
now age will be 5. Do the same in this code.
if you want to learn about variables, there is my video which is part the course th-cam.com/video/n0z6fjww8eA/w-d-xo.html
At 10:40 "Cuctom Code Explained" and of course you mean Custom Code Explained :)
Thank you for letting me know. I can't do anything about it except to clip that portion out.
Hi, sir. Where can I find the head file?
Thanks a lot, I've found the head file in Github and successfully implement the code.
You are welcome.
ur voice too low, louder pls
Wrong video . See the video with wiring diagram which is part of my new Arduino course th-cam.com/video/zqJRNGECAvw/w-d-xo.html
No idea what you're trying to say.
Yes. this is for people with some knowledge of the field. if you are not familiar with electronic or programming terms, it would be hard to understand. Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
Did you start the 30 min course? It will change your life
does not work
Which part? please post the error you are getting here.
@@robojax Hi... sorry to take so long to get back. I moved on to something else. I seem to have exactly the same 4 pin module but cannot get a humidity reading. It's always 0.00. Thanks for taking the time to reply.
Temperature = 24.43°C 75.97°F 297.58K
Pressure = 1009.92 hPa
Humidity = 0.00%
Approx. Altitude = 27.99 m
@@robojax Ahhhh.... I have the BMP280 and not the BME280. I didn't realise there was two different modules. Sorry for wasting your time.