Introduction: Arduino Weathercloud Weather Station
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.
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!
Question 2 years ago
hey so im trying to make a dyorama that has live weather conditions. is there a way to integrate weather cloud with the arduino so i can take live data from somewhere else and use that to try to replicate those conditions in my enclosure?
2 years ago
Hi. I think delay sentence dont work inside irq. I have seen It in wind meter. Just this. I'm making a awning close system with esp8266 (to handle with phone) and wind meter to send via 433mhz close Code. I Will use your esquema conection to wind meter. Thank you very much.
Question 3 years ago
Searching for weathercloud api documentation to how push data there.
Something like weather underground have there https://support.weather.com/s/article/PWS-Upload-Protocol?language=en_US
Answer 2 years ago
Hi, sorry for the late reply.
As far as I know, there is no documentation. It was really hard to get the info, I got it from a friend who supposedly has it from some russian forum.
But it's simple, you just use a GET request and structure the data as I have it in my code. If you have a problem with that, please let me know.
3 years ago
What happened to this weather station? I dont see it reporting data anymore. I still think is or was a greap project.
Reply 3 years ago
Oh. Let me explain. I was designing this a long time ago. Most of the stuff is correct and there is a lot of ideas/inspiration you can gain. But there is a rather big issue which I've come to realize later. The length of the cable. That's the main problem of this station. I have a 15m data cable and the Arduino just can not handle that. It does a mess on both the power and data lines. I tried for months going around this but without special modulation and drivers it's very hard. The second problem is that most of the Wi-Fi and/or Ethernet modules seem to not work properly after some time. It's probably due to overheating of the internal core. This is a issue on both of my stations.
It worked well, but only for 3 days or so. When I rebooted it after that period, it continued to work fine for another 3 or 5 days. I think that all of this can and will be resolved with a simple timer circuit. Now with my better knowledge of electronics, multi-layer PCB design and SMT components, I think that I can resolve this issue. I have some clients from airports who want me to design a new weather station. It should have Wi-Fi/LoRaWAN connection, ultra low power modes and optional solar power. So there probably will be a new Instructable about this. But I have to finish a satellite for the national aeronautical agency first.
One last thing. Some people who built my station (I'm talking about the ESP32 one now) didn't seem to complain about this at all so it is probably working for them. It seems to be just an issue of disturbance and overheating of the core processor.
Reply 3 years ago
Thank you very much for your reply. I too developed a personal weather station (PWS) using the Particle Photon, SHT31, BME388, etc. I am attaching some pics so you can have an idea. It has been stable since it was installed last November.
Right now I am uploading data to weathercloud.net, and I am using part of your code. Thank you for sharing your code.
My PWS is using a solar panel. Even though it's right in my backyard, it was less expensive and less troubles powering it up this way. Since it's located in the backyard, the WiFi 2.4Ghz signal is good there.
If you need some ideas, let me know, I can help you putting something together. I have strong electronic background, no so in programing.
Have a great day,
3 years ago
chlapec nám kopíruje a lže. Když se podíváte na fotky tak to nejsou prsty 8 - letého kluka a nebo video o výrobě štítu na teplotní čidlo
Reply 3 years ago
There is no option to downgrade this comment, I would do so otherwise. I strongly disagree with your attitude. I happen to know the school that the author attends and his efforts are genuine and admirable for a student his age. If you do not have something constructive or at least something nice to say, shut up. Btw, a (then) eight-grade student would not be eight years of age, would he.
Reply 3 years ago
Thanks, I really appreciate that!
Reply 3 years ago
Dobre tak ešte raz a posledný krát, toto je otvorená komunita. Môžem sa inšpirovať a veľa ľudí sa inšpirovalo týmto projektom. Nie sú tu žiadne smerodajné profesionálne informácie.
Čo je to prosím vás za pokryvená logika? Aké prsty? Čo tu vyšetrujeme? Ako sa mám fotiť so zrkadlovkou počas toho ako niečo brúsim? Vy to dokážete?
Nie som si istý o čo vám ide. Ak budete mať niečo k veci, som tu pre všetkých a na všetko odpovedám. Ale ďalšie nekonštruktívne nezmysly, ktoré nemajú hlavu a pätu budem ignorovať. Vážne by sa hodilo trochu rešpektu. To je všetko.
Question 3 years ago
Just an ideia, why not add a wind direction sensor?
Very nice project, congratulations.
CT1CVL / Luis Santos
Answer 3 years ago
That's a good idea. Because of the structure of the station, it would be hard to add a wind direction sensor now. But I'm currently finishing a brand new station which I've been working on for the past few months. It will measure air temperature, ground temperature, heat index, dew point, humidity, atmospheric pressure, wind chill, rainfall, solar radiation, UV index, wind speed and wind direction as well. The Instructable will be published in about a month so stay tuned!
Thanks, I'm glad that you like it.
Reply 3 years ago
I will make also a weather station, i was following your project, but now i will wait for the new one! Keep the good work, i'm learning a lot with you, thank you,
Reply 3 years ago
Lets get right on it then!
Tip 4 years ago
Hey Jakub, great job on this project. I am a professional weather network technician, so I've seen some funny things out there in weather land. I like your various solutions to collect all of the weather variables you are after.
I saw somewhere in the comments that a reader was concerned about your temperature sensor placement. I am also concerned about that. To make your temperature/relative humidity sensors work better and give you more accurate measurements, you should move the primary shielded sensor to the North side of the building. It matters less where on the building you put it (height wise), except out of the sun. So the North side is the best. Put it where the moss and algae grow on the wall. There is no sun there. Since this is a naturally aspirated shield, you should extend the mount so it is about ten (10) inches or more away from the wall. That will give you better air flow. Or install a small fan to pull air through the shield past the sensor. You will get better temperature readings, but if the fan fails, you will get very high, inaccurate readings. We don't use power aspirators currently.
I noticed that you don't have wind sensors. There are some good, cheap three-cup anemometers out there and simple wind direction vanes that will connect directly to your Arduino. The one I am thinking of is sold by Adafruit.com. If you put them in, you should put them as high up as possible on the top mast with nothing but a lightening rod above. Oh, and you really should put in a lightening rod! Make sure the entire mast is grounded to the earth with a healthy (read thick) wire. It will keep you from having a mass of melted sensors and will also give you steadier readings.
Your UV sensor should stay at the top of the mast, but move it to the the South side of the platform so it does not get shaded.
If you are ever thinking of changing the wire for your connections, Campbell Scientific sells a really good wire that is insulated with Santoprene which is UV stable/resistant. I use it on all of my stations and I don't have to replace it often, maybe after about 10 years. It comes in all kinds of configurations (1 TP no GND, 2TP w/drain, etc).
I've attached a photo of one of our research-grade weather stations. I manage and maintain about 60 of these. The station in the photo has RH/T, Wind Speed & Direction, Solar Insolation, Volumetric Water Content, Soil Temp, Precipitation in 0.01" increments, Snow Depth in Winter, Barometric Pressure, and it communicates via cellular modem. It is powered by a 20W solar panel and a 26AH battery. We take a sample every 3 seconds and report back to our servers every 5 minutes in "real time". Our website is www.deos.udel.edu
Again, great project and fantastic work!
Reply 4 years ago
That's a really long comment. Thanks for all of the tips. I'll try to use them while building my second station. I'll try to reposition the temperature sensor. I have a wind speed sensor already (it's the one from Adafruit), I'm working on it. It should be added to this page in about a week. There should be some lightning rods on the roof, I'll check it. The UV sensor is already south. I know nothing about how UV rays affect cable insulation. Could you explain? I'm using a shielded data cable with PVC insulation. WOW, that's a really nice station. The page looks nice too. Again, thanks for your time and all the tips.
Reply 4 years ago
Glad to read that you are going to install some wind sensors. That will will make a fairly complete station.
Answering your question about UV degradation would certainly take up too much space here, but Wikipedia has a pretty good explanation of photo oxidation (the technical term for UV damage), here https://en.wikipedia.org/wiki/Photo-oxidation_of_...
Generally, any polymer that is left out in the sun will photo degrade. It will become cracked and brittle, some even fade to white. This becomes a problem if the cable moves around or is attached to a vibrating or moving part. The insulation cracks, and water gets in and corrodes the wire or shorts the wires. Sometimes a bit of moisture gets into the cracks, you can't see it, then winter comes and when the water freezes, the cable insulation splits and the next rain/snow event causes a short and loss of data. If it happens to a power cable, you can cook the sensor or even the computer/datalogger.
The PVC insulation is not UV protected usually. Even the "outdoor" cat5e cable is recommended to be buried in conduit. Besides, cat5e cable is about 32awg which is too small for most power applications. The smallest wire I use is 24awg. And if you look closely at my station photo, I still put some of my cable in CPVC conduit to protect it, more from weed trimmers and critters than from the sun. I put the cable on the West or North side of the center post to keep it out of the strongest UV rays.
Reply 4 years ago
Thank you for the information.
4 years ago on Introduction
Very nice project. Would be absolutely perfect if you could implement a remote display, in order someone could read the current weather data.