In this Arduino Project video, we build a simple Weather Station using a DHT22 sensor, a BMP180 sensor, and a Nokia 5110 LCD display. It is a very easy DIY project to build. It won’t take us more than 5 minutes! Let’s build it!

Intro to the Arduino Weather Station Project

Dear friends welcome to another video. Today we continue building the weather station that we have began in the previous videos. Please check those videos out in order to see more details. The weather station that we have built, as you can see now displays its data in a Nokia 5110 display. Please check out the Nokia 5110 display tutorial in order to see how to connect it to your project. So, in the display, we now have backlight we have temperature measurement, humidity, and pressure. Now, humidity and temperature measurement are done via the DHT22 sensor, this sensor here. We have removed the DHT11 sensor, this sensor here because it was not really accurate and we wanted better accuracy. This sensor costs about one euro, but this one is a lot more expensive it’s about seven euros, but we have greater accuracy. As you can see, we can have greater accuracy in temperature and of course in humidity.

Of course we use the same pressure sensor, the BMP180 sensor, check out the video to see how to connect it to your project and we have added another capability, a photoresistor an LDR resistor and with this resistor we can check whether we have light or not, whether it is night or day and so we can turn off the display if we are not using it. For example, we can turn it off at night. Our project is now powered by a simple battery pack this is a simple four AA batteries holder with a switch it is very cheap you can buy it for less than a euro and you can directly connect it to your Arduino Mega input Vin the red wire goes to Vin and the black wire goes to ground. This way you can have a very cheap and nice power supply for your Arduino. If we turn off the backlight the power consumption of this project goes back now to only thirty mA.

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

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

2. Nokia 5110 LCD display: https://educ8s.tv/part/NOKIA5110

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

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

5. A photoresistor: https://educ8s.tv/part/Photoresistors

6. A 100KΩ resistor: https://educ8s.tv/part/Resistors

7. AA battery holder: https://educ8s.tv/part/BatteryHolderAA

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

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

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]

In our previous video, you can remember that the power consumption was about ninety mA. Now the power consumption is only 30 mA the batteries that I have placed in the power bank have a total capacity of 2400 mAh so if we run this project continuously it will run out of batteries in about three and a half days. But since we have added the LDR capability the project can detect night and when it is night, it can power off its display. Let’s check it out. I will cover the LDR sensor here and the display will go off in a second. That’s it. Now we draw less current, we have minimum power consumption and when the light is back the display will automatically light up again. This is a clever trick to reduce the power consumption. So, let’s see the code of the project and talk a little bit about the future of the project at the end of the video. Now let’s look at the code. The code is very similar to the code that we use in the previous video. We have made some changes of course.

First of all, we have included the LCD5110_Graph.h library, in order to drive the Nokia 5110 display. Please check out the previous video the Nokia 5110 display tutorial in order to see how to use the Nokia 5110 display in this library. Next, we will change this line here, this one here, because we are now using the DHT22 sensor. Before, we were using the DHT11 sensor, so we have to make this change here This is the only change we have to make in order to use the new sensor the wiring as we have said before is exactly the same, no changes on the wires. The only thing we have to change is to declare that we’re using DHT 22 sensor, not the DHT11.

Next some variables here. Now the setup function is very straightforward. We initialize everything and the LCD, the sensor for the humidity and temperature and the pressure sensor and we print a message on the display. Next, in the loop, we declare our variables here we read humidity pressure and temperature very easy and we read the light intensity from the sensor. Don’t forget to check out the video about the LDR, in order to see how to use it. We have made a tutorial on this. Next, we clear the screen and convert everything every variable, humidity, pressure, and temperature not light intensity.

We convert those variables into strings because we want to display them in the display.And then we check if the light intensity that we have read from the sensor is less than ten, it’s very dark 10 percent, this is percent, the value in percent then we sleep, we turn off the display. Else, if the light intensity is greater than 10 percent, we disable sleep we turn off the display. We print everything in the screen and of course, we have two functions, one readPressure which returns a value of float, the pressure now and we have a function readLightIntensity, which returns a value in percent of the light that is falling in the photoresistor Very easy. You can download the code from the link you can find in the description of the video. Now let’s see the future of the project. We are running this project with four simple AA rechargeable batteries, with a capacity of 2,400 mAh. Our goal is to have this project up and running with those batteries for over a month, but as we are now it only runs for about 3 and a half days with fully charged batteries. So in order to accomplish this, we will do the following: first of all, we’re going to remove the Arduino Mega because it draws a lot of power, and replace it with an Arduino Pro Mini like this.As you can see this is an Arduino Pro Mini that runs at 8MHz and not 16MHz Then, we are going to put Arduino in sleep when we are not sensing the environment, but more about this in the next videos.

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

 

 

 

——————–

SUBSCRIBE ON YOUTUBE

——————–

Never miss a video: Subscribe to educ8s.tv