I made a weather station connected to internet. It measures temperature, humidity, pressure, rainfall, wind speed, UV index and it calculates few more important meteorological values. It then sends this data to weathercloud.net, which has nice graphics and UX. It also has a weather webcamera. It cost me around 140€. I made this station as my school project. The station is mounted at my school in Bratislava, Slovakia. Here is the current data.
Photo credit: Mimo magazín. Used with permission.
Note: I've been working on this project for over two years now. This instructable is bassicaly just a reupload of an instructable that I published one year earlier, but there have been so many changes that I decided to make a new instructable. Also, no one ever looks at one-year-old instructables.
UPDATE 14.12.2018: Hey there! I added an annemometer (wind gauge) to my station. There is some new text and photos so be sure to check that out.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Weathercloud
First of all, what is Weatherclud? Weathercloud is a large network of weather stations reporting data in real time from all over the world. It's free and there are more than 10 000 weather stations connected to it. Firstly, I had my own HTML website where all the data were sent but making your own website and graphics is hard and it's much easier to just send all the data to a big cloud platform which has nice graphics and stable servers. I searched how to send data to weathercloud and I found that you can accomplish that easily by a simple GET call. The only problem with Weathercloud is that with a free account it lets you send data only every ten minutes but that shouldn't be a problem for most uses. You'll need to make an Weathercloud account in order to make it work. Then you'll need to create a station profile on their website. When you create your weather station profile on Weathercloud, you are given the a Weathercloud ID and a Weathercloud KEY. Keep these because the Arduino will need them to know where to send data.
Step 2: Parts List
ESTIMATED PRICE: 140€/150$
Step 3: Tools
These tools could come in handy:
tree drill bit
Step 4: DS18B20 Solar Radiation Shield
A solar radiation shield is a very common thing used in meteorologic stations to block direct solar radiation and therefore reduce errors in the measured temperature. It also acts as a holder for the temperature sensor. Radiation shields are very useful but are usually made from steel and they are expensive so I decided to build a shield of my own. I made an instructable that shows how to make a radiation shield like this. Here is the instructable.
I also found a video thats shows the exact same procces so you can use that:
Step 5: Terminal Box
The terminal box is the center of the station. The main 14-core cable connects it to the server box. The cable from DS18B20 goes into it. The cable from the UV box goes into it. It also hosts the humidity and pressure sensor. When you're selecting a terminal box, you can use any IP65 plastic junction box that has over 10x5x5cm (4"x2"x2").
Step 6: UV Sensor Box
The UV sensor box hosts the UVM-30A UV sensor and it's also a middle point between the main terminal box and the rain and wind gauges. The UV sensor box can be any plastic IP65 box with a fully transparent cover.
Step 7: Weathercam
Weather webcams (or weathercams as I like to call them) are used to record or stream image of the actual weather conditions. From the image you can determine the light intensity and cloudiness. I went for cheapest wifi camera available but you can use any wifi camera of your choice. This cheap camera works just fine but there is one problem with it. You need to have a computer running a streaming software constantly. That wasn't a problem for me because there already is a server running website in the network so it can take care of the streaming as well. But if you don't have a computer like this in your home network, then I recommend buying a Raspberry pi and a Raspberry pi camera. It's more expensive (25$ vs 70$) but you don't really have another option if you want a webcam. In both cases you need to put the camera in a weatherproof box. You can use the same box as for the UV sensor. I made my own box from a regular plastic box and plexiglass but that's unnecessary. The battery for the camera will need constant recharging. You can do that by striping down a USB cable and connecting the + and - wires to the 5V power output for the sensors. When you have your camera weatherproofed you can just mount it anywhere where is good wiew with zipties.
Now let's take a look at the software. This part requires some advanced coding skills. You have to have a 24/7 running computer (can be a Raspberry pi) in your home network in order to do all this. So the first thing you need to do is to connect your IP camera to your home Wi-Fi network Then you need change the username and password in script according to your username and password on the camera interface. You also need to change the camera IP adress in the script. Then you need need to setup a task scheduler to run the included script every 5 minutes or so on your server/computer. The script should now take a screenshot of the camera's image every 5 minutes and save it to the preset folder. The folder has to be public so you can look it up on a search engine like this: example.com/username/webcam.jpg. Weathercloud can then take this image from the public folder and put it on it's webpage. You can see the "live" (updates every 5 minutes) feed here.
Step 8: Top Sensors Holder
The top sensors holder is a steel componet that holds the top sensors (UV, rainfall and wind speed) on the roof. The part that you see on these pictures fits only our building. You can mount these sensors any way you want. This is just an example. We already had a steel pipe mounted on the roof, so it's been easy to mount the holder.
Step 9: Shield Compatibility Problem
There is a simple compatibility problem between the ethernet shield and the protoshield. You can't put protoshield on top of the ethernet shield because the ethernet connector just won't let you. And you can't put the ethernet shield on the top of the protoshield because the ethernet shield needs to have a direct connection to the arduino through the ICSP connector but the protoshield doesn't have one. Well, a simple problem, a simple solution. I just cut a rectangular hole in the protoshield so that the ethernet connector can fit in.
Step 10: Rainfall Measurement
The rain gauge that I ordered works just fine, but there is one big problem with it. It doesn't have any communication interface like I2C or RX/TX. There is just a simple switch that switches ON for 60 microseconds every time it rains more than 0.28 mm/m2. The arduino can easily catch that when it's not doing anything else but measuring rainfall. But when it has other tasks to do (like measuring temperature and sending it to cloud) there is a high probability that the arduino's processor will be busy at the time of the switching on of the rain gauge. This will cause an inaccurate rainfall reading. That's why I added a second arduino - an arduino nano. The nano's only task is to measure rainfall and send it to the master arduino through I2C. That way the rainfall readings will be allways accurate. I made a PCB which holds both the arduino nano and the RTC module but you can solder it to the protoshield too. I know that this isn't the simplest and cheapest solution but I like it and it's very neat and organised.
Step 11: Wind Speed Measurement
This step is very similar to the previous one. I made a board that measures wind speed and then sends it through I2C. Just repeat the previous step without the RTC. I tried to put both boards into one but it didn't work out.
Step 12: Server Box
It's always a good idea to hide all the electronics in a small, organised box. And that's exactly what I did with the server box. The server box hosts the Arduino UNO, the ethernet shield, the protoshield, the 5V regulator, the main data cable terminal and the rainfall measurment board. One note about the Arduino: the code of the station uses about 90% of the Arduino UNO memory and that can cause some problems. You may or may not need to use Arduino Mega.
Step 13: Connections
Just connect everything according to the included schematic.
Step 14: CODE
This is the final part, the part we've all been waiting for - testing, if it works. You need to change the IP adress, the Weathercloud ID and the Weathercloud KEY according to your home network and your Weathercloud account. You're then ready to upload it to your arduino. You also need to upload the I2C rain sender code onto the Arduino nano on the rainfall board and the I2C wind sender onto the Arduino nano on the wind speed board.There is also the index.php script, more information about that is in step 7.
Step 15: Instalation
Making your weather station work in your workshop is one thing, but making it work in the real-world harsh conditions is another. The installation procedure depends very much on the building you're mounting your station on. But if you have the solar radiation shield and the top sensors holder it shouldn't be so difficult. The temperature and humidity sensor can be placed really anywhere on the building, but the UV sensor and the rain gauge have to be on the top of the building. The UV sensor can't be in shadow and the rain gauge can't be near a wall otherwise when there's strong wind the raindrops won't fall into the gauge and the readings are going to be inaccurate. Here is a picture showing how you can mount the station on a typical house. You should be very careful when mounting a station on the roof and you should have a powerful drill that can drill trough concrete.
Step 16: Done
Congratulations. If you did all steps correctly, you have a fully operational cloud weather station. You can see the data from my station here. If you have some questions or suggestions, I would be happy to hear them in the comment section below.
I am planning to build a similar station using ESP32 Wi-Fi board and some additional sensors (wind speed/direction, solar radiation, soil humidity) but more about that later. Enjoy!