Arduino Weather Station Project with BMP180 and DHT11 Sensors

Arduino Weather Station Project with BMP180 and DHT11 Sensors


Dear friends welcome to another video. Today we continue the building of the
weather station. In the last video we had
implemented the temperature and humidity
measurement using the DHT11 sensor. Today we add pressure measurement in our whether
station as well, with the BMP180 sensor. As you can see in the display we now have temperature humidity and pressure in Pascals. Let’s compare those
readings with one professional on weather station. As you can see temperature is almost
the same humidity we’re off 4 percent and pressure is exactly the same as you can see. Our little weather station is very accurate so far. Let’s see how to
connect the BMP180 sensor to our project. The sensor is very small as you can see it is almost one centimetre long and wide. This is the sensor here and these are some passive components
needed for driving this sensor. There are four pins in then sensor, the VIN ground of course for power the SCL and
and SDA. This sensor, this breakout board uses the I2C protocol so we only need four pins in order to drive this sensor. I have soldered four header pins in order to be easy to connect it to our breadboard. So let’s see how to
connect it. I have already connected the DHT11 sensor, you can watch the previous video of this series to see how to connect it in your project. Now let’s connect the BMP180 sensor. I press it down here so week can connect it. The first pin from the left is the VCC so I get five volts from the breadboard here and connect it five Volts goes in, the next pin is ground so ground goes here. Now the third pin I have to remove it to see. Third pin is SCL … and then SDA SCL pin from Arduino goes to third pin here and the other to the SDA of the Arduino. That’s very easy to connect so let’s power it up again and see if it still is working. OK. Perfect temperature 24 because we were touching
the sensor and humidity 55 percent and pressure 1018 Pascals. Now this little sensor here has embedded a very accurate
temperature sensor as well so we are not measuring temperature with
the DHT11 which is not accurate we are measuring temperature with this sensor and we display it in the display. Let’s see. If I press the sensor you can see in two seconds the temperature will rise see how accurate this is. So we are measuring temperature and pressure from this sensor and humidity from this sensor. All the data are displayed in the LCD
screen. Nom let’s see this software side of the project. First of all we have to download the BMP180 breakout library You can be download it from the link you
can find in description of the video below. When you enter this website all you have to do is to press download zip from here. Now that the download has been completed we have unzip this file. In here we can see three folders and some other files, all you
have to do is to go to software Arduino – libraries unzip this folder here and rename it to something more easy. not we’ve got this folder and pasted in the Arduino libraries folder. Now we are ready to use it in our project. I have here a project named
weather station you find the full code of the
project in the description of video of course. Now this is the complete code of the project so far. First of all we
have to include the BMP180 library Then we create a pressure object of type BMP180 We declare a float temperature which is a variable public and
accessible from everywhere in the code then this is important that we have to
define altitude in order to have correct measurement of the barometric
pressure so here we entered the altitude of our location in meters. For me in Sparta, Greece its 216 meters the altitude. The code here it is the same as the previous video the only we have to do is to add pressure.begin to initialize the pressure
sensor. Then I read humidity and add 10 percent in order to calibrate the reading of the sensor to my professional weather
station I have seen that my humidity sensor the DTH11 is off about 10 percent all the time. So I manually add 10
percent to the reading in order to be closer to reality.
Then I read pressure and temperature from
BMP sensor. Let’s see what this function does. This is the code of the function… all it does is read temperature and save it to the public variable temperature we had seen the beginning and then it reads pressure from the
sensor and it returns the value. So this function returns pressure which is then saved in this variable and sets this public variable temperature. Then I convert all those readings, temperature, humidity and pressure to string variables and I print them out. Very easy. Download the code use it and modify to your own needs. Now
that we have completed the first version of our weather station let’s see how
much current it draws, the power consumption of this
project. The power consumption as you can see is very high it now draws 80 and at few times you can see up to 90 mA. the power is 0.38W So let’s make some calculations if I run this project from this
power bank which has a capacity of 2,400 mAh this project will draw this power bank empty in just over and one day so what we will have to do if we want our project to run for months or for weeks? We cannot use this project. We have to find some ways to reduce power consumption and we will do that in the next videos. The first thing is to replace this power hungry screen and of course put Arduino in sleep when not needed to run so in the next video we will replace
the screen of this video with this low power screen of a Nokia 5110 which draws very little power and then we will see we can put Arduino to sleep and see if we can make it draw less current. And the last think of course is to shrink our project to an Arduino pro mini in order to use the minimum power we can. So all this stuff in the next videos. Thank you
very much for watching please subscribe to our channel if you want
to see our next videos and press like if you like our projects. Bye

48 thoughts on “Arduino Weather Station Project with BMP180 and DHT11 Sensors

  1. και εμένα μου λένε οτι απο την προφορά καταλαβαίνουν οτι είμαι έλληνας…

  2. Πολυ ωραιο βιντεο, ειμαι στην αρχη ενος τετοιου project και πιστευω θα βοηθησει!

  3. Friend this incredible project, I have to do a similar project, but wanted to know if I can use the SHT15 sensor instead of the DHT11, I would not know how to do it

  4. make code for DHT11,DS18B20,BMP180…
    Nhận làm mạch nguồn, đồ án 1, đồ án 2.
    Nhận viết code, vẽ layout.
    Viết code cho cảm biến: DHT11,DS1307,DS18B20,BMP180,BMP085……
    Giao tiếp onewire, I2C…..
    Chỉ làm giới hạn trong kỷ thuật số, PLC, vi điều khiển AT,PIC….
    Ai cần làm hay có bạn bè cần làm thì pm mình nhé!
    01649614416

  5. Hello!
    First of all, thank you very much for this video. It was really helpfull. But, I still dont understand where i need to put SCL and SDA pin from bmp180 on my Arduino. By the way, I am using an Anrduino Uno.
    Thanks!!!

  6. Thankx for your great tutorial,I successfully implemented it in my project ,I have seen your other tutorial regarding RTC ds3231,Please help me combining the code of Ds3231 with this weather station,so that in loop for 4 seconds it shows wheather & for 4 seconds it shows date & time continuously,please help,I am trying for 2 days but can't figure out how to do it,I don't have any programming knowledge but still trying,I will be very grateful if You help a little.

  7. Hey There, I find your tutorials very helpful. In the future could you have a tutorial setting up a wireless weather-station, either RF or xebee. I'm new to Arduino and this would be very helpful. Thanks

  8. Hi if I don't have any arduino experience at all can I buy those exact parts and use them to make this project?also what are you using to power it as it does not look like a computer?
    Thanks for the great tutorial!

  9. Hi, I wonder if that sensor is sufficiently accurate for an barometric altimeter, i am learning paragliding and it wold be a very fun project, and interesting code for displaying altitude, verical speed and that sort of stuff.

  10. nice video.
    do you have a link for the usb voltage tester, you use at the end to show the consumption?

  11. Great videos, very easy to grasp,
    Just on the DHT11, they all seem to read 10% less with humidity, would you be able to add on the BMP 180 on your weather station project, making case statements for screen selects to display all the information ?

  12. καλησπερα! εξαιρετικη δουλεια, δουλευω πανω σε ενα παρομοιο project για την πτυχιακη μου. Θελω να κανω μια ερωτηση, εχω μια lcd οθονη (20×4) και θελω να ανοιγει ο φωτισμος της μονο οταν υπαρχει σκοταδι.
    Πως μπορω να το κανω αυτο; πηρα μια φωτοαντισταση αλλα δεν ξερω πως να την συνδεσω και να την προγραμματισω σωστα!

  13. Do you have the LCD screen and the BMP180 on the same I2C bus? Im just wondering because im trying to do the same thing with a BMP180 and LCD 772 but with an arduino uno instead of a mega. If you know how this could be done, it would be much appreciated.

  14. The code from your first video works fine. However, when I upload the code for this video, the DHT11 doesn't display the humidity reading. Do you know why this is happening?

  15. thank you, this is the most complete tutorial that i can found with the use of bmp180, dht11 and arduino mega…..i use it with a lcd shield, this is the only way that i can run it because i dont have another lcd with less electrical drainage.

  16. I'm having real problems with voltage drop affecting my temperature readings. I'm using the temp to switch a relay to turn on/off a heater, but the relay draws enough current which dims the display and the temperature instantly changes by 1-2 degrees. The voltage drops from 5.2v to about 4.6v depending how many resistors I use on the relay. Please can someone help me regulate a constant 5v so my readings don't change. Do I need an optocoupler or regulator?

  17. καλο ειναι να εχεις και υποτιτλους στα βιντεακια σου…. συγχαρητηρια παντως! πολλη καλη δουλεια!!!!

  18. I am really enjoying going through these with my son. I do have a question about the sketch though. What does the code "DHT dht(DHTPIN, DHTTYPE);" mean?

    I realize that DHTPIN and DHTTYPE are variables defining the sensor type and pin that is being read, but what are "DHT" and "dht"? I thought "dht" would be considered a function, but in the case of functions is not the first item in the function code the expected output (like "INT" for integer)? Is "DHT" considered the function output in this line of code?

    Thanks again for your great videos!!

  19. As All Your Tutorials , these one is great . THANK YOU .

    P.S. you must be very proud to be from Sparta . I was all ways fascinated about Ancient History . I sow the "300" and "300 Rise of an Empire movies" !!! couple times .

  20. Hello such, a very good taste congratulate your project but I'm interested saver that would be added to the schedule for altitude, which is not included in your programming. Could I answer as before possible. thank you very much from Argentina

  21. Hi, I need help.. I have connected my OLED Display to SDA and SCL pins, so I can't connect pressure sensore, what can I do?

  22. hello sir, im a new user of arduino and im really enjoyed watching ur video. really good and easy to understand. u help me a lot learning this stuff. i just want to ask if i could replace the BMP180 sensor to BPW34 sensor (irradiance measurement) for photovoltaics monitoring.

  23. just FYI, relative humidity is not a very useful measurement. it would be more meaningful to output Dew Point temperature. there is a very "quick and easy" calculation you can do to get Dew Point.

    DewPoint(C) = Temp(C) – (100 – RelativeHumidity) / 5.0

    true dew point temp is a more complicated calculation involving logarithms, barometric pressure, altitude, and partial vapor pressures of water at altitudes. but the "quick and easy" method was described by Mark Lawrence in the 2005 Bulletin of the American Meteorological Society. He proved it is accurate for relative humidity values above 50%

    for more information on why Dew Point is meaningful and Relative Humidity is not so much, google up "Dew Point vs. Relative Humidity". it's quite interesting.

  24. hello friends i am a new user, I connected the setup as same and uploaded the code but it doesn't display anything; display is just blue in colour please help me to solve the problem

  25. where are you located man ? 😀 😀 all the calculations I did based on your air pressure and temperature says you are under the level of the sea … I can only think of the (dead sea) or some submarine 😀 😛

  26. I can not understand the meaning of this project. Why do you use the DHT11 sensor for temperature reading, when the BMP180 has a temperature sensor on board?

  27. hello, im using Arduino mega and sparkfun Si 7021 Temp sensor and MPL3115A2 Humidity sensors.
    i have code and run perfectly on my PC
    But i want LCD display connect to it. Please help me how to connect my Arduino with Nokia display
    i use some code from internet but its not working

Leave a Reply

Your email address will not be published. Required fields are marked *