BMP280 temperature and pressure sensor on an Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 มี.ค. 2017
  • The smallest sensor on the smallest breakoutboard I've ever seen. You can measure temperature and air pressure. And it can be controlled via I2C and SPI.
    BMP280 - amzn.to/2mlMhFf
    Arduino Nano - amzn.to/2ut0Mvm
    Breadboard Set - amzn.to/2uGpU0Z
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @Belas_Photography
    @Belas_Photography 5 ปีที่แล้ว

    Thanks. Bought one of these on ebay and didn't have a clue on how to connect it up. Double thank you for the address check on the sensor.

  • @glynnmason8205
    @glynnmason8205 5 ปีที่แล้ว +4

    I was there scratching my head thinking what am I missing I even tried using a 3.3 voltage level shift then I watch this video was help full thanks

  • @mrdzejk
    @mrdzejk 6 ปีที่แล้ว +5

    Thanks, man!! The address fix I have not come across anywhere else.

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

    Thank you bro. No other place exlains the address issue. You rock!

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

      You're welcome!

  • @BhushanChaudhari22
    @BhushanChaudhari22 6 ปีที่แล้ว +4

    Thank You So much. I didn't knew about that i2c part where we have to add that hex code.. I thought for a moment that I destroyed the sensor or something. This Video saved my money and time too.
    Thanks for Uploading. :)

    • @nenioc187
      @nenioc187  6 ปีที่แล้ว

      My pleasure!

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

    Muchas gracias por realizar este video, muy claro e instructivo.
    Por fin pude programar mi BMP 280, pensé que estaba roto.
    Saludos desde la ciudad de Córdoba, Argentina.

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

    At the bottom of the code there's an adjustment to be made in hPa (/* Adjusted to local forecast! */) - search for a METAR reading in your local area and adjust the hPa value in the code to match this - should give a more accurate "Approx altitude"

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

      Thanks! I'll give it a try!

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

      IIRC, you can get even more precision by knowing the height above sea level of your exact location to calculate an even more precise hPa adjustment factor.

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

    I had the same Problem. Thank you that you showed that in your Video!

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

    My BMP280 came without the onboard level shifters. Meaning it runs on 3V3. I have a couple of options... 1) Provide two rails - 5 volts and 3.3 volts - and Include separate level shifters. 2) Is more interesting... Run the Arduino and the display on 3V3, too. Here's how to do it. The Arduino has an auxiliary 5V output pin. This output is after the Arduino's voltage regulator. Simply input (yes, input) 3V3 on this pin and the Arduino will run, happily. Next, use a 3V3 1602 Display. Or, convert a 5V unit. They (mostly) all use a common board which can be configured as either voltage. The 3V3 model uses a L7660 negative (yes, negative) charge pump to lower the 3V3 ground point to a net 5 volts = clever. All the needed vacant pads are already on most 5V PCBs. Just add the L7660 and a couple of caps. HTH.

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

    Brother you my Hero ! thanks a lot i two days try solve addres problem . 100 % good job ! keep going.

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

    Thanks for the video.
    I'm curious, is this sensor sensitive and fast enough to measure air speed differences when blowing on it through a small tube glued to the hole on the sensor? And also the tube itself will have a small hole to make it possible to blow through, like if when playing a flute.
    I'd like to use it for MIDI controller, but I'm not sure if it won't be too slow or not enough sensitive (not detecting enough levels of blowing).

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

      That would work! I have a similar use to measure wave height in the ocean (relatively) with it at the end of a tube.

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

    Quick question: on which side should we solder? On the side with the writing or the side with the components? I did the soldering on th side with the writing and I feel like this is why it didn't work. Looks like the copper wiring is on the other side and if the soldering was superficial it didn't make a proper connection.

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

    Arduino nano is compatible to 5 V, isn't it? Are two level shifters required to be added outside the bmp280 sensor (at scl and sda)? I have done all the steps and only zeros for pressure and temperature are returned. Any ideas?

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

    The Adafruit BMP280 library did not even detect my sensor (which was almost the same model, GY-BM ME/PM280, but it was detected with I2C Detect) so I installed I2C Sensor Lib and they include a BMP280 example that works (and you don't even have to type the 0x76 address in there)! Also, I believe the first variable is the elevation while not detecting small changes (average over time), am I right?

  • @bob-ny6kn
    @bob-ny6kn ปีที่แล้ว

    Why did you solder the header with the silkscreen (pin names) on the bottom side? Are the hole not through-holes?

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

    Subscribed all the way 😊☺️

  • @DesertVox
    @DesertVox 6 หลายเดือนก่อน

    Since this board can be soldered on both sides, you could've soldered the headers the other way around so that you can see the markings.

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

    Thanks. Very good!

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

    thank You Bro so much! for the usefull video

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

    Well done! Thanks!

    • @nenioc187
      @nenioc187  7 ปีที่แล้ว

      My pleasure!

  • @siddheshchaubal
    @siddheshchaubal 6 ปีที่แล้ว

    How & where can I connect an hose to this sensor in order to measure the under water pressure?
    My aim is to measure the under water pressure & to demonstrate that the pressure increases as the depth/height of water increases (Hydrostatic Law).

  • @useruser12348
    @useruser12348 10 หลายเดือนก่อน +1

    thanks! it's working.

  • @jannik8662
    @jannik8662 7 ปีที่แล้ว

    Is it possible to use more than one of this sensors at the same time? I think they have the same i2c adress, haven't they?

    • @nenioc187
      @nenioc187  7 ปีที่แล้ว

      I took a brief look in the datasheet provided by Adafruit. And it seems that you can change the I2C address by either connecting pin SDO to GND or SDO to VCC. So theoretically you should be able to attach up to 3 BMP280 sensors on one I2C bus.
      Although I haven't tested it - yet ;-)

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

      nenioc187 Ok, thank you!

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

    Good video, my friend. Could you describe how you discovered the correct address for I2C?

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

      There is an Arduino sketch, called I2CScanner. You can find it in the examples.

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

      @@nenioc187 Excellent. Thanks! New to Arduino & I2C, learning so much.

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

    Thank you for the video. I bought mine for 50 cent!
    By the way the it only supports 3.3v, is it safe to work with 5v?

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

      See my post, above, to learn what is needed to run on 3.3 volts.

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

    Ty 4 help

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

    as far as i know the arduino NANO have 5V logic voltage, does it safe when sda scl connect directly to NANO analog pin? or should i use voltage divider to 3.3V first? thank you

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

      See my post, above to learn how to run on 3.3 volts.

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

    Hi I messed around a few days trying to get it working, have the address in the if statement did the trick. Many thanks and I can confirm it does not work with 5V

    • @TheSateef
      @TheSateef 5 ปีที่แล้ว

      i just ordered a few of these without realizing they are 3,3v, bugger

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

    3:47 It's what you're looking for.

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

    Oh very good work. I'm really happy fro your video.
    Currently I'm trying to measure Blood pressure. I'm using resperry pi 3(it can only read digital sensors ) and therefore I like this sensor as it digital output. Could I use this Barometric Pressure Sensor for that purpose?
    If it does how to connect Air pump and Blood Pressure Cuff with sensor ?
    Please could you help me?

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

      That sounds like a great project! I'm not sure how much air pressure is reached within the blood pressure cuff. This is the thing you probably want to measure. The sensor can handle up to 1100 hPa.

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

    All the serial monitor says for me is the timestamp and "BMP20 test"
    The I2C detect doesn't detect anything. But it doesn't say to check the wiring, so the sensor must not be defective?

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

      If the I2C scanner doesn't detect any device, it might be because of wrong wiring, wrong supply voltage for the sensor, defective Pins on the I2C bus, or - as you said - defective sensor.

  • @julianrebor5394
    @julianrebor5394 4 หลายเดือนก่อน +1

    How can I found the adress for the sensor??

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

    Help! I cannot get this device working. Does it need logic level shifting with an arduino uno? Can't even scan it for an address, nothing. Thanks!

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

      I had once the case, that the sensor wasn't recognized. I2C scanner didn't find it either. The solution was: the sensor was defect. Replaced it and it worked fine.

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

      you can switch the adres for 0x76 put sdo-gnd for 0x77 put sdo to vcc

  • @mircotaraborelli696
    @mircotaraborelli696 5 ปีที่แล้ว

    I have connected the sensor using I2C transmission like in the video but nothing. I use some codes to define the I2C port but they don't find it, so I try every port from 1 to 128. I checked every connection 10 times and tryed the with 2 sensor. Ideas?

    • @nenioc187
      @nenioc187  5 ปีที่แล้ว

      Have you tried the i2cscanner?

    • @mircotaraborelli696
      @mircotaraborelli696 5 ปีที่แล้ว

      @@nenioc187 yes

    • @nenioc187
      @nenioc187  5 ปีที่แล้ว

      If the I2Cscanner shows no address, there is still plenty of possible errors.. there could be a wiring problem. Maybe the sensor is broken. Maybe one of the analog pins of the controller is broken (had this once). Maybe the sensor is broken. Have the controller and the sensor a common ground line?

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

      @@nenioc187 now the seller have told me the two bmp bought have a problem so he will refund me...

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

    do you really put the value 0x76 inside the code? im also having the same problem as you

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

      You can use the sketch I2CScanner to determine on which address the device is listening.

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

      @@nenioc187 i already did that and i got 0x77, so whats next? Do i hav to put it in the codes or else? Can tou email me your worked codes

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

      Instead of using bmp.begin(), use bmp.begin(0x77, &Wire) to initialize.

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

      @@nenioc187 ok ill try it thank youu

  • @DrLuc-lq8ls
    @DrLuc-lq8ls 5 ปีที่แล้ว

    I have the original Adafruit BMP 280 but when I try to do it it says "Adafruit_Sensor.h: No such file or directory"

    • @nenioc187
      @nenioc187  5 ปีที่แล้ว

      Have you installed the BMP 280 library with the Library Manager?

    • @DrLuc-lq8ls
      @DrLuc-lq8ls 5 ปีที่แล้ว

      @@nenioc187 Yes I did

  • @khanhtran-zv1mw
    @khanhtran-zv1mw 6 ปีที่แล้ว

    i want to ask that this sensor (BMP280) messure humidity, doesn't it?

    • @nenioc187
      @nenioc187  6 ปีที่แล้ว

      The BMP280 measures only temperature and air pressure.
      The BME280 measures also humidity.

    • @khanhtran-zv1mw
      @khanhtran-zv1mw 6 ปีที่แล้ว

      i have recently read datasheet of them. i understood. Thank you very much!

  • @hamizulfi1157
    @hamizulfi1157 6 ปีที่แล้ว

    can this pressure sensor measure the amount of pressure in the cylinder ?

    • @nenioc187
      @nenioc187  6 ปีที่แล้ว

      The sensor is made for weather stations. Not for high pressure you want to create in a cylinder.

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

    like good thank's verry much

    • @nenioc187
      @nenioc187  7 ปีที่แล้ว

      My pleasure!

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

    Do we need to solder bmp 280 with pins headers?

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

      You could also solder wires to it.

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

    Incoming data appears as "nan". How do I fix this problem?
    Temperature = nan *C
    Pressure = nan hPa
    Approx. Altitude = nan m
    Humidity = nan %
    like that

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

      NaN stands for "Not a Number". Maybe you are using the wrong I2C address? Or forgot to the VCC connection to the sensor?

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

    So the sensor is just completely inaccurate when it comes to the altitude?

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

      The altitude is calculated by the air pressure. And since the air pressure varies, the accuracy is rather low. You could increse it, by taking the current temperature and the air pressure at sea level at your location in consideration.
      If you want a higher accuracy, than a satelite based sensor, like GPS, would be a better choice.

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

      @@nenioc187 Ah Okay, I see. I'll need to look into GPS sensors and maybe even combining that sensor with the BMP as a backup. My altimiter will need to be correct, 100% of the time

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

    For me it's not working can you please help me

  • @MossyThomson
    @MossyThomson 7 ปีที่แล้ว

    🙌 if possible if you've got a mo the sketch file please mate

    • @nenioc187
      @nenioc187  7 ปีที่แล้ว

      Didn't write own code. Just used the examples from the Adafruit library.
      github.com/adafruit/Adafruit_BMP280_Library

    • @MossyThomson
      @MossyThomson 7 ปีที่แล้ว

      Thanks mate

  • @user-ci1pr9gb2h
    @user-ci1pr9gb2h 4 ปีที่แล้ว

    bme280 will more suitable, it can test humility

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

      That's correct! But the BMP280 was more common and cheaper, when I made the video ;-)

  • @flyinghigh2646
    @flyinghigh2646 4 หลายเดือนก่อน

    just a small issue, please do not use f word at 4:00, I was watching this video with my son

    • @nenioc187
      @nenioc187  4 หลายเดือนก่อน

      Sorry. Was the only time I was using it.

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

    pls send me all library thanks

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

    3:50 :P

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

    Fucking legend! Thanks a lot, I finally got it to work I had the same problem

  • @MesutTurancom
    @MesutTurancom 5 ปีที่แล้ว

    Can you share code ? Please send me email.

  • @RaadYacu
    @RaadYacu 7 ปีที่แล้ว

    did you have to curse? totally unexpected