Welcome to this Arduino Weather Station project with a BMP180 and a DHT11 sensor. In this video, we continue the ongoing project of building a weather station on Arduino. We now add the BMP180 sensor in order to measure barometric pressure in real time so we can predict the coming weather.

Intro to the Arduino Weather Station Project #2

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 weather 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 weather station. As you can see the 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.

——————–
WHERE TO BUY
——————–

1. Arduino Mega: https://educ8s.tv/part/ArduinoMega

2. Keypad Shield: https://educ8s.tv/part/KeypadShield

3. BMP180 sensor: https://educ8s.tv/part/BMP180

4. DHT11 sensor: https://educ8s.tv/part/DHT11

5. OLED USB Multimeter: https://educ8s.tv/part/UsbDoctorOLED

6. Small Breadboard: https://educ8s.tv/part/SmallBreadboard

7. Wires: https://educ8s.tv/part/Wires

8. Powerbank: https://educ8s.tv/part/Powerbank

Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

[adsense]

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 centimeter long and wide. This is the sensor here and these are some passive components needed for driving this sensor. There are four pins in the sensor, the VIN ground of course for power the SCL 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 to your project.

Now let’s connect the BMP180 sensor. I press it down here so that we 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. The third pin is SCL … and then SDA SCL pin from Arduino goes to the 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 on the LCD screen.

——————–
LIBRARIES
——————–

BMP180 Library: https://github.com/sparkfun/BMP180_Breakout

DHT11 Library: https://github.com/adafruit/DHT-sensor-library

Now let’s see this software side of the project. First of all, we have to download the BMP180 breakout library. 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 easier. 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 the 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.

——————–
CODE
——————–

 

 

 

 

——————–

SUBSCRIBE ON YOUTUBE

——————–

Never miss a video: Subscribe to educ8s.tv