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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 89

  • @F111BMATHIS
    @F111BMATHIS 2 ปีที่แล้ว

    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

  • @LucasLGMarques
    @LucasLGMarques 4 ปีที่แล้ว +1

    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!

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Thank you. I am glad you found it useful.

  • @joelgalbraith7219
    @joelgalbraith7219 ปีที่แล้ว +1

    This video helped me with a school IoT project. Thank you.

    • @robojax
      @robojax  ปีที่แล้ว

      Glad it helped!

  • @kamilzdunczyk2245
    @kamilzdunczyk2245 3 ปีที่แล้ว +3

    excellent tutorial.
    You explain everything fantastically, thank you very much. I really like this channel

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Happy to hear that!

  • @Naif_Alsalem
    @Naif_Alsalem 11 หลายเดือนก่อน

    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

  • @2007xoxox
    @2007xoxox 4 ปีที่แล้ว

    You are the best.

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      Thank you . So are you.

  • @borsi99
    @borsi99 9 หลายเดือนก่อน

    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 🇨🇭

    • @robojax
      @robojax  9 หลายเดือนก่อน

      Just search my channel for LCD

  • @emretunc
    @emretunc 4 ปีที่แล้ว

    Hi bro;It is great tutorial,thank u so much !
    Where can I find library for BME280 ?

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      You are welcome. Under the video in the description There is link to library and other resources for this video.

  • @Ilikeridin
    @Ilikeridin 4 ปีที่แล้ว

    Great tutorial, thank you.
    The temp is reading 1 degree high. Is there a way to write code to always subtract 1 degree?

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      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 -

    • @Ilikeridin
      @Ilikeridin 4 ปีที่แล้ว

      Robojax thats brilliant, thank you. I’ll try that later as I’ve not managed to get it to work.

    • @Ilikeridin
      @Ilikeridin 4 ปีที่แล้ว

      I’m already using float as the project includes rf24 modules. Would it have to be a separate float command?

  • @maicomcoelholopes9032
    @maicomcoelholopes9032 4 ปีที่แล้ว

    excelente tutorial

    • @robojax
      @robojax  4 ปีที่แล้ว

      Thank you.

  • @rikiholic1
    @rikiholic1 4 ปีที่แล้ว

    @Robojax Hello coud you help me how to set oversampling at this gybmep chip thaks

    • @robojax
      @robojax  4 ปีที่แล้ว

      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

  • @alexandrefranca7445
    @alexandrefranca7445 2 ปีที่แล้ว

    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

    • @robojax
      @robojax  2 ปีที่แล้ว

      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

  • @juancarlosrelloso1302
    @juancarlosrelloso1302 2 ปีที่แล้ว

    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

    • @robojax
      @robojax  2 ปีที่แล้ว

      BME 280: th-cam.com/video/zqJRNGECAvw/w-d-xo.html BME+LCD th-cam.com/video/mXY_6LOekkw/w-d-xo.html

  • @marciliogr426
    @marciliogr426 4 ปีที่แล้ว

    Can we change the sea level preasure to increase the precision of altitude?

    • @robojax
      @robojax  4 ปีที่แล้ว

      You can. But remember altitude is approximate. I have provided the datasheet. Read that please.

  • @johnkg702
    @johnkg702 4 ปีที่แล้ว

    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

    • @robojax
      @robojax  4 ปีที่แล้ว

      Good day, I was not able to find : cjm cu8118

    • @johnkg702
      @johnkg702 4 ปีที่แล้ว

      @@robojaxgood day sir
      Pls search this text "CJMCU-8118 CCS811 HDC1080 Carbon Monoxide CO VOCs Temperature And Humidity Gas Sensor Module"

    • @robojax
      @robojax  4 ปีที่แล้ว

      I will get it but it takes 40 days for the module to arrive and then I will make video of it.

    • @johnkg702
      @johnkg702 4 ปีที่แล้ว

      @@robojax thank you sir for the kind consideration
      John

  • @raiyanamiruddin4741
    @raiyanamiruddin4741 3 ปีที่แล้ว

    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

    • @robojax
      @robojax  3 ปีที่แล้ว

      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

  • @conradsinsua7415
    @conradsinsua7415 4 ปีที่แล้ว

    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,

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      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.

    • @conradsinsua7415
      @conradsinsua7415 4 ปีที่แล้ว

      @@robojax by the way, I enjoy your videos, keep it up.( No need to wear the cap)

    • @robojax
      @robojax  4 ปีที่แล้ว

      LOL. Thanks. I will . stay safe. It is COVIT-19 time.

    • @conradsinsua7415
      @conradsinsua7415 4 ปีที่แล้ว

      @@robojax yes, we are on partial lockdown( Malaysia)

  • @ZUWWF
    @ZUWWF 3 ปีที่แล้ว

    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.

    • @robojax
      @robojax  3 ปีที่แล้ว

      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.

  • @hamasahmad8444
    @hamasahmad8444 ปีที่แล้ว

    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

    • @robojax
      @robojax  ปีที่แล้ว

      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.

  • @oussamasmaini7297
    @oussamasmaini7297 2 ปีที่แล้ว

    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.

    • @robojax
      @robojax  2 ปีที่แล้ว

      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

    • @oussamasmaini7297
      @oussamasmaini7297 2 ปีที่แล้ว

      @@robojax thanks. It's just bme won't work on my board for some reason.

    • @robojax
      @robojax  2 ปีที่แล้ว

      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.

    • @oussamasmaini7297
      @oussamasmaini7297 2 ปีที่แล้ว

      @@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

  • @ascuber4650
    @ascuber4650 4 ปีที่แล้ว

    702 is not a regulator, it is a Dual N-Channel MOSFET for i/o logic level shifting from 5v to 3.3v.

    • @robojax
      @robojax  4 ปีที่แล้ว

      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

    • @ascuber4650
      @ascuber4650 4 ปีที่แล้ว

      ​@@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.

    • @robojax
      @robojax  4 ปีที่แล้ว

      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.

  • @uttamdutta3664
    @uttamdutta3664 2 ปีที่แล้ว

    is it possible to measure the altitude by bme280

    • @robojax
      @robojax  2 ปีที่แล้ว

      I have provide the link to datasheet. Check that out. I have new video on bmp380 where you can measure appropriate altitude.

  • @VANTABL4CK
    @VANTABL4CK 3 ปีที่แล้ว

    Hey, I don't know why but it seems they removed readHumidity from the newer version of this library

    • @robojax
      @robojax  3 ปีที่แล้ว

      I always save the library and provide it as zip. So try getting that then.

  • @norielhurtado1082
    @norielhurtado1082 4 ปีที่แล้ว +1

    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

    • @robojax
      @robojax  4 ปีที่แล้ว

      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.

    • @norielhurtado1082
      @norielhurtado1082 4 ปีที่แล้ว

      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

    • @lorenzodefinis832
      @lorenzodefinis832 3 ปีที่แล้ว

      @@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

    • @bmansan
      @bmansan 3 ปีที่แล้ว

      @@norielhurtado1082 Just rename the library, his code is wrong. Before download, try to compile

    • @norielhurtado1082
      @norielhurtado1082 3 ปีที่แล้ว +1

      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

  • @iniinfoboss3463
    @iniinfoboss3463 ปีที่แล้ว +1

    Can hpa be changed to pa?

    • @robojax
      @robojax  ปีที่แล้ว

      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.

    • @robojax
      @robojax  ปีที่แล้ว

      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

  • @batticha462
    @batticha462 4 ปีที่แล้ว +1

    At 10:40 "Cuctom Code Explained" and of course you mean Custom Code Explained :)

    • @robojax
      @robojax  4 ปีที่แล้ว

      Thank you for letting me know. I can't do anything about it except to clip that portion out.

  • @byc4611
    @byc4611 4 ปีที่แล้ว

    Hi, sir. Where can I find the head file?

    • @byc4611
      @byc4611 4 ปีที่แล้ว

      Thanks a lot, I've found the head file in Github and successfully implement the code.

    • @robojax
      @robojax  4 ปีที่แล้ว

      You are welcome.

  • @m.anwrs59
    @m.anwrs59 2 ปีที่แล้ว

    ur voice too low, louder pls

    • @robojax
      @robojax  2 ปีที่แล้ว

      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

  • @andrewmcallister3529
    @andrewmcallister3529 3 ปีที่แล้ว +1

    No idea what you're trying to say.

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      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

    • @robojax
      @robojax  3 ปีที่แล้ว

      Did you start the 30 min course? It will change your life

  • @caribbeanchild
    @caribbeanchild 4 ปีที่แล้ว

    does not work

    • @robojax
      @robojax  4 ปีที่แล้ว

      Which part? please post the error you are getting here.

    • @caribbeanchild
      @caribbeanchild 4 ปีที่แล้ว

      @@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

    • @caribbeanchild
      @caribbeanchild 4 ปีที่แล้ว +2

      @@robojax Ahhhh.... I have the BMP280 and not the BME280. I didn't realise there was two different modules. Sorry for wasting your time.