Тёмный

BMP280 temperature and pressure sensor on an Arduino 

nenioc187
Подписаться 7 тыс.
Просмотров 88 тыс.
50% 1

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

Опубликовано:

 

17 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 98   
@glynnmason8205
@glynnmason8205 5 лет назад
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
@serenity8401
@serenity8401 4 года назад
Thank you bro. No other place exlains the address issue. You rock!
@nenioc187
@nenioc187 4 года назад
You're welcome!
@jefmundell
@jefmundell 3 года назад
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 года назад
Thanks! I'll give it a try!
@t1d100
@t1d100 Год назад
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.
@mrdzejk
@mrdzejk 7 лет назад
Thanks, man!! The address fix I have not come across anywhere else.
@BhushanChaudhari22
@BhushanChaudhari22 6 лет назад
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!
@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.
@t1d100
@t1d100 Год назад
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.
@Harm10412
@Harm10412 3 месяца назад
Nice! I'm originally from almost where you are located (always good to see familiar names on the map). As for the altitude: this should be corrected for QNH (so, like you're saying, the weather basically). I've seen tables for that in other sensor manuals; still gotta check this one.
@DesertVox
@DesertVox 10 месяцев назад
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.
@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.
@KAFA2020
@KAFA2020 7 лет назад
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 7 лет назад
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.
@xanpx4548
@xanpx4548 4 года назад
Brother you my Hero ! thanks a lot i two days try solve addres problem . 100 % good job ! keep going.
@camelCased
@camelCased 6 лет назад
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.
@julianrebor5394
@julianrebor5394 8 месяцев назад
How can I found the adress for the sensor??
@reb13262
@reb13262 5 месяцев назад
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.
@accanasa5213
@accanasa5213 4 года назад
I had the same Problem. Thank you that you showed that in your Video!
@tatkonerez
@tatkonerez 2 года назад
3:47 It's what you're looking for.
@stephenyoung316
@stephenyoung316 6 лет назад
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
@bob-ny6kn
@bob-ny6kn 2 года назад
Why did you solder the header with the silkscreen (pin names) on the bottom side? Are the hole not through-holes?
@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?
@nikosrm7697
@nikosrm7697 5 лет назад
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?
@ile.laviniu
@ile.laviniu Год назад
thanks! it's working.
@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).
@gianniragni4193
@gianniragni4193 7 лет назад
Well done! Thanks!
@nenioc187
@nenioc187 7 лет назад
My pleasure!
@arthurmead5341
@arthurmead5341 5 лет назад
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 5 лет назад
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.
@_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 Год назад
@@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
@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 Год назад
See my post, above, to learn what is needed to run on 3.3 volts.
@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 Год назад
See my post, above to learn how to run on 3.3 volts.
@divukman
@divukman 7 лет назад
Thanks. Very good!
@rick49
@rick49 4 года назад
Good video, my friend. Could you describe how you discovered the correct address for I2C?
@nenioc187
@nenioc187 4 года назад
There is an Arduino sketch, called I2CScanner. You can find it in the examples.
@rick49
@rick49 4 года назад
@@nenioc187 Excellent. Thanks! New to Arduino & I2C, learning so much.
@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?
@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
@manofmesopotamia7602
@manofmesopotamia7602 3 года назад
Subscribed all the way 😊☺️
@asdgjkdfb
@asdgjkdfb 5 месяцев назад
thank You Bro so much! for the usefull video
@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 лет назад
@@nenioc187 now the seller have told me the two bmp bought have a problem so he will refund me...
@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
@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 лет назад
nenioc187 Ok, thank you!
@flyinghigh2646
@flyinghigh2646 8 месяцев назад
just a small issue, please do not use f word at 4:00, I was watching this video with my son
@nenioc187
@nenioc187 8 месяцев назад
Sorry. Was the only time I was using it.
@ParitoshPotukuchi
@ParitoshPotukuchi Месяц назад
cool
@ikmalmd
@ikmalmd 4 года назад
do you really put the value 0x76 inside the code? im also having the same problem as you
@nenioc187
@nenioc187 4 года назад
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 года назад
Instead of using bmp.begin(), use bmp.begin(0x77, &Wire) to initialize.
@ikmalmd
@ikmalmd 4 года назад
@@nenioc187 ok ill try it thank youu
@khanhtran-zv1mw
@khanhtran-zv1mw 7 лет назад
i want to ask that this sensor (BMP280) messure humidity, doesn't it?
@nenioc187
@nenioc187 7 лет назад
The BMP280 measures only temperature and air pressure. The BME280 measures also humidity.
@khanhtran-zv1mw
@khanhtran-zv1mw 7 лет назад
i have recently read datasheet of them. i understood. Thank you very much!
@xxxxxx2576
@xxxxxx2576 4 года назад
Do we need to solder bmp 280 with pins headers?
@nenioc187
@nenioc187 4 года назад
You could also solder wires to it.
@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.
@sadhasivam5275
@sadhasivam5275 5 лет назад
For me it's not working can you please help me
@alexandrosevgenides8744
@alexandrosevgenides8744 3 года назад
3:50 :P
@RazekVit
@RazekVit 5 лет назад
Ty 4 help
@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 ;-)
@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
@uctoanngo9996
@uctoanngo9996 7 лет назад
like good thank's verry much
@nenioc187
@nenioc187 7 лет назад
My pleasure!
@mustafakayaduman6969
@mustafakayaduman6969 4 года назад
pls send me all library thanks
@MesutTurancom
@MesutTurancom 5 лет назад
Can you share code ? Please send me email.
@VANTABL4CK
@VANTABL4CK 4 года назад
Fucking legend! Thanks a lot, I finally got it to work I had the same problem
@RaadYacu
@RaadYacu 7 лет назад
did you have to curse? totally unexpected
@mauricecraft890
@mauricecraft890 7 лет назад
Made me laugh.
@unexspectedk1ll
@unexspectedk1ll 6 лет назад
You must be an American?
Далее
DHT22 temperature and humidity sensor
7:08
Просмотров 10 тыс.
Hacking a weird TV censoring device
20:59
Просмотров 3,1 млн
BMP280 Pressure Sensor Module - Arduino Tutorial
5:08
Просмотров 136 тыс.
DIY sonar scanner (practical experiments)
14:30
Просмотров 1 млн
4-20mA Industrial Pressure Sensor, Arduino IoT
29:34
Просмотров 41 тыс.
Air Pressure and Temp Sensor (BMP280) with Arduino
20:15