Back in late February I saw this post on the Raspberry Pi site.


They had created Raspberry Pi Weather Stations for Schools. I totally wanted one! But at that time (and I believe still as of writing this) they are not publicly available (you need to be in a select group of testers). Well, I wanted on and I didn't feel like shelling out hundreds of dollars for an existing 3rd party system.

So, like a good Instructable user, I decided to make my own!!!

I did a little research and found some good commercial systems I could base mine off. I found some good Instructables to help with some of the Sensor or Raspberry PI concepts. I even found this site, which was pay dirt, they had tore down an existing Maplin system:


Fast forward about a month and I have a basic working system. This is a complete Raspberry Pi Weather system with just the base Raspberry Pi hardware, camera, and some assorted analog and digital sensors to make our measurements. No buying pre-made anemometers or rain gauges, we are making our own! Here's it's features:

  • Records info to RRD and CSV, so can be manipulated or exported/imported to other formats.
  • Uses the Weather Underground API to get cool info like historical highs and lows, moon phases, and sunrise/sunset.
  • Uses the Raspberry Pi Camera to take a picture once a minute (you can then use them to make timelapses).
  • Has webpages that display the data for the current conditions and some historical (last hour, day, 7 days, month, year). The website theme changes with the time of day (4 options: sunrise, sunset, day and night).

All of the software for record and displaying the information is in a Github, I've even done some bug tracking, feature requests in there as well:


This project was a great learning experience for me, I got to really dive into the capabilities of the Raspberry Pi especially with the GPIO, and I hit some learning pain points as well. I hope you, the reader, can learn from some of my trials and tribulations.

Step 1: Materials



  • Raspberry Pi - I used the B+
  • Wireless adapter
  • Pi Camera
  • A solid 5V power adapter (this turned out to be painfully annoying, I eventually got the Adafruit one, otherwise the camera pulls too much juice and can/will hang the Pi, it's here: https://www.adafruit.com/products/501)


  • 2 Thrust Bearings (or skateboard or roller-skate bearings will work too), I got these on Amazon: http://amzn.com/B0034G64XE
  • 2 Waterproof Enclosures (I used an electrical enclosure from the local big box store), doesn't matter much, just need to find a good size enclosure that's going to have enough space and protect everything).
  • Some PVC Pipe and End Caps (various sizes).
  • PVC mount brackets
  • Couple sheets of thin Plexiglass (nothing too fancy).
  • plastic standoffs
  • mini screws (I used #4 bolts and nuts).
  • 2 Plastic Christmas Tree Ornament - used for the anemometer, I got mine at the local Hobby Lobby.
  • Small dowel
  • Small piece of plywood.


  • Dremel
  • Glue Gun
  • Soldering Iron
  • Multimeter
  • Drill
Hello. I need something similar for my greenhouse but I also need to measure ph of my water. Does anyone know of a sensor that can do that?
<p>So you're saying that the reed sensor can replace the optical sensor?</p>
Finally!!! I've been looking for something comprehensive that I could adapt for kite use! You've put it all together in one easy to read place!
<p>Great Instructable, I'm trying to build this weather station, but having a few issues with moving the files to correct locations, where to put API key, GPS ( had it working on pi, now i get connection refused) and an empty website, I can get it to display any data.</p><p>Has anyone managed to get this working on Raspbian Jessie and a pi3?</p>
<p>It's very cool! There is another useful board here,LoRa/GPS HAT </p><p><a href="http://wiki.dragino.com/index.php?title=Lora/GPS_HAT">http://wiki.dragino.com/index.php?title=Lora/GPS_HAT</a></p><p>and you can get the tutorial here<br></p>
<p>I am having a really hard time getting any of the software to work. I can use the getAPIData module to print out the data on the screen, but it won't update the database; the raspberrypiweatherstation.py program does the same, and the web page just comes up empty. Everything in the database shows up as &quot;NaN&quot;.</p><p>I tried using &quot;updatev&quot; to get more info on the update problem and I get 19 error messages, complaining about RRA AVERAGE, MIN, and MAX not found for every variable.</p><p>I've been reading the PHP and RRD documentation but still can't get anything to work. (I am a programmer, familiar with C, VB, mySQL, and ODBC on various platforms).</p><p>Can anyone provide comprehensive instructions on the software setup. the install notes are just too vague for me to follow.</p><p>Thanks,</p><p>Walt</p>
<p>Hello. I've design some parts for the weather station. Can be downloaded from here:</p><p>https://www.thingiverse.com/thing:1420582</p>
<p>hola soy novato en esto me podrias ayudar de urgencia nose ya instale todos los updates del el archivo notes-install.txt pero no se como hacer que se me visualize en esa pagina con la lunas osea todo creoq es una pagina web me podrias ayudar xfa muchas gracias</p>
<p>Hi there, chief. Started to get all parts/materials to build the station with my RPi2; I went through all files from zip archive (from Github) but would be really-really helpful for many interested in this beautiful project if some wiring/schematics would be posted. Any suggestions? Much appreciated, thx.</p>
Use an Arduino nano to get the analog data, then dump it as serial data to the pi. Would be the easiest way.
I just put the data from the Internet and then push the weather data to an LCD screen using i2c.
<p>hey man,</p><p>I've seen you had a tentative of dropping some schematics. great. can't wait for them as I'm in the middle of building it. I HOPE we'll have them soon. Thx.</p><p>on the other hand, this is what's on your notes regarding the BMP180/183 sensor:</p><p>&lt;&lt;&lt;&lt;&lt;</p><p>&quot;BMP138:</p><p>wiring pins 8,10,12,16:</p><p>self.SCK = 8 # GPIO for SCK, other name SCLK</p><p>self.SDO = 10 # GPIO for SDO, other name MISO</p><p>self.SDI = 12 # GPIO for SDI, other name MOSI</p><p>self.CS = 16 # GPIO for CS, other name CE</p><p>bmp works staright up with ./measure.py</p><p>&gt;&gt;&gt;&gt;&gt;</p><p>the problem I have is that on RPI2's GPIO pin8 is SPI_CE0; pin10 is SPI MOSI (not MISO which is GPIO pin9). Which ones are the correct ones to connect the sensor with RPI2 ? thx again</p>
<p>Very nice work dude. Thank you for sharing with use. </p>
<p>Excellant project! Thank you for sharing. Could you please provide a schematic or drawing of the wiring connections?</p><p>Thank you.</p>
<p>Thanks! I don't have one, but you're right, it would be helpful to see how all the connections are made. I'll try to get one done and posted, thanks for the feedback.</p>
<p>Very good project! Please send me the wiring diagram too (if you have it). Thank you!</p>
<p>Thanks. If I can help by taking your hand drawings and creating a cad schematic please let me know.</p>
<p>hi, I cant understand how to build wind anemometer. Can you briefly explain? thanks</p>
<p>Bulid in magnetic sensor, every rotation 'put' signal, rpi read signal and calculate (how many signals/min), worst part is calibrating </p>
<p>I would like to buy a kit from you please, do you have anymore left?</p>
<p>Pricing the parts from Amazon is around $125 w/o the Pi and camera.</p><p>Little steep for my taste. Guess I'll have to buy pieces over a few months.</p><p>Looks like a really good build and I intend on making this though.</p>
<p>Good Day! can i ask you sir how the data transfer in to a website? because that weather forecast is my thesis project. thank you hoping that you reply. </p>
<p>i have a question, can anyone tell me how could i trasmit the data over radio?</p><p>thanks</p>
<p>Nice project. I have one question - why did you connect the wind direction reed switches to resistors as in the original Maplin design, when there is enough GPIO on the R Pi to do this completely digitally? Since your other sensors are digital, you could have saved the need for an ADC.</p>
<p>Awesome instructable, thank you! Your style to present all the data is especially nice.</p><p>I just saw these on Adafruit.com today -- would make a super easy accurate rain guage I bet. That plus a tube and a Pi-controlled valve to dump the tube once per day or something like that.</p>
<p>Oops, URL! http://www.adafruit.com/products/463</p>
<p>very nice weather station dude, super pimp. I am also interested in the $25 Kits i will email you too. </p>
<p>Thank you sir! I am a little late in finding this one but I have been looking all over the place for some Weather Underground API setups. I have a weather station (Davis Instruments Vantage Vue) which pushes data to Weather Underground, CWOP, and WeatherBug - it runs through weewx on a Raspberry Pi. I wanted to have a living room display of my weather stations information, extracted from Weather Underground, rather than generating it at home and your code fits a lot of the bill. More info at http://rpiexperimenter.blogspot.com/search/label/Weather%20Station on what I am doing. Thanks for the instructable!</p>
<p>I may just be missing it but can you post the Gethub address?</p>
<p>Really great idea! Excellent detail on the mechanicals and software. <br>Thank you. However not sure how anyone can use this instructable to <br>build anything without a wiring diagram or schematic. Is it possible you can share? Could try to backward engineer this but a schematic or simple wiring diagram would be very useful and appreciated.</p>
<p>I Like It! Been Looking for a good way to make a weather station for months. this is the best i have found and.reading the comments here, I think other think the same as me. Once you have to drawings I am super interested. Also could you delve into the anemometer a little more with the bearing set up?</p>
How much did all of this cost roughly?
<p>I had a lot of the parts already, but I probably spent about $100 (some pieces took a couple builds as well before I found a good design so I wasted some materials) the most expensive pieces are the Pi, GPS, Camera. Everything else is like $5 here, $10 there, but it does add up. Sensors were relatively cheap between $2 (Reed Switch) to $10 (the BMP183). To start from scratch I guess it would cost somewhere in the $100 to $150 range (Just a PI, Camera and GPS puts you easily at the $100 mark though).</p>
<p>you have chosen quite sturdy and thus relatively expensive reed switches. Glass switches are a lot cheaper and once they are mounted they are protected enough I think, so yeah it is possible to cut down here and there.<br>For those who will just build it for their own place... indeed GPS could be omitted (and get a cheap RTC (DS3231) (but that would mean rewriting the code) <br>Anyway, really impressive</p>
<p>Great instructable.</p>
<p>Looks great! I would like to know how much time did it take you to build it? I've never worked with the rasp before, do you think it would be achievable for me?</p>
<p>Thanks! It took me a while, on the scale of weeks, it was my first dive into the Raspberry Pi and I had never worked with some of the sensors before, though I had decent experience with the Arduino. Though that's entirely why I did the project: it was a good dive in to the Pi as well as sensors with a clear end goal in mind, rather than just tinkering and learning. I think it's achievable for everyone, I don't think I did anything crazy or very advanced in the project, it was a lot of combining a bunch of little pieces and concepts into an end result. </p>
<p>Very nice project. I am doing something similar for my boat, and will be using many of the same sensors.</p><p>Why do you need a GPS? You wrote for accurate time and your location. But your location is fixed, so get it once and set it. And accurate time is available to you over the network via NTP.</p>
<p>Thanks! You are correct, in all reality you don't need the GPS, it's easily to get GPS coordinates off of Google Maps the one time you need them and as you said you can get time from NTP off the network. I like using the GPS because it makes the whole project self contained, it then doesn't depend on any outside resources/services, that's all.</p>
<p>Which GPS chip did you use? You link to SParkFun is for an FTDI cable, which I already have, BTW. I really want to try this one!</p>
<p>I have this one, I started out with it for testing and figuring it all out, which is the EM406: <a href="https://www.sparkfun.com/products/retired/10709" rel="nofollow">https://www.sparkfun.com/products/retired/10709</a></p><p>But for the project, I used just the chip off an old Pharos i360 GPS (which was a Bluetooth GPS I used with my Dell Axim (like a palmpilot) for navigation in the days before iPhones. It works fine, just less channels so it seems to take longer to acquire and can get a less accurate fix.</p>
Great project, I love weather stations, voted times by two! Ps. I've built a soil temperature probe for my weather station, which proved to be very useful.
<p>Thanks! I had heard about a soil temperature probe but dismissed it, I'll have to go check it out now. Thanks for the tip!</p>
<p>Cool! Really useful if you are growing vegetables like potatoes and carrots. I track the soil temperature from day to day with a graph to assess when planting is ok.</p>
<p>Do you have an Instructable for this? I am a weather geek, so I plan on making my own equipment</p>
Yes, Matt, here it is, it works very well:<br> <a href="https://www.instructables.com/id/Weather-station-aux-sensor-improvement-for-use-in-/" rel="nofollow">https://www.instructables.com/id/Weather-station-aux-sensor-improvement-for-use-in-/</a><br>
<p>Whilst you are to be commended for uploading all this information,</p><p>there are so many abbreviations, that, to be honest, I haven't a clue what you mean.</p>

About This Instructable




More by kkingsbury:Scrappy Science Caddy NOAA Satellite Signals with a PVC QFH Antenna and Laptop  Folding Project Table 
Add instructable to: