DIY Raspberry Pi Weather Station: How to Do It at Home?

raspberry pi weather station

Have you ever wondered how weather stations work? Or, have ever thought of building your own weather station at home all by yourself? If so, I’m pretty sure you love to seek knowledge.

When the thought of making a weather station at home hit my head, several questions also popped up in my brain as well. For example – how does the machine acquire data and display it? So, I started searching on Google for answers.

Among the DIY projects I found online, I loved the DIY Raspberry Pi Weather Station concept. And when I researched about Raspberry Pi projects, I found this post on their site. There are many tutorials available on YouTube too.

You can watch the following video if you want. It might help you understand how this weather station thing looks and works.

Already bored, right? Hell you are, I’m good at this. Lol.

Anyway, in this article, I’ll take you through a step by step process so that you can build your own Raspberry Pi weather station at home. What you need to do is becoming a good instructable user till the end of the article, got it?

Step 1: Register Your Weather Station

Register your school: The first thing you need to do is to register your school on the Raspberry Pi Oracle database. Go to the page and simply click on “Register”and fill up the form. After this, you’ll receive a confirmation email within 24 hours.

Now, go to Raspberry Pi Oracle database again and log in using your school name and password. After that you’ll have to use the activation code sent to you over the confirmation email.

Register weather station: After logging in, click on your school. Then click “Add Weather Station” to create your new weather station. At this stage, you’ll need to provide the probable location of your weather station.

Simply, visit Google map to find out the longitude and latitude of your area. If you click on your location on Google map, the first number is latitude and the following number is longitude. You’ll find these numbers at the bottom side of the screen.

On completion of all the necessary fields, you’ll be given a passcode. Don’t forget to write it down or save it somewhere. Without this passcode, you won’t be able to set up your weather station.

Step 2: Build the Station Part I

Set up Weather Station HAT: Once you get your hands on the weather station kit, set up the Raspberry Pi onto its acrylic (made from polymers) base. You should use the 8mm screws and hex spacers. Don’t forget to set the CN19895 receptacle over the GPIO (General-Purpose Input/Output) pins of the Raspberry Pi.

Now, you need to use two pliers to separate the air sensor board and weather board. Insert the coin cell battery into the weather board. Your weather board is now ready to be placed over the Raspberry Pi. Just make sure that the CN19895 receptacle pins aligns with the mount on the weather board.

What you need to do now is to attach the Raspberry Pi and weather board together using the 6mm screws. For ensuring a solid contact, you can use something like a credit card between the receptacle pins. Keep in mind that each row of pins is angled a little outwards.

Power it up: It’s time to plug your Raspberry Pi with mouse, keyboard, HDMI cable and Ethernet cable. Here, you need to connect the Ethernet cable, which is not included in the kit, with the two POE (power over Ethernet) adaptors.

Now, plug in the appropriate adaptor for power supply. Remember that one of the adaptors connects to the Raspberry Pi, while the other adaptor should be connected to wall socket and network point.

Step 3: Set up the Software

This is probably the most critical step. A little mistake can make you to do the whole work again. So, you need to be very cautious. In this step, the first thing you need to do is to collect all the necessary drivers and scripts required for communication among various sensors.

The complete process of the software installation might take a long time if you’ve a slow internet connection. So, if you’re planning to install the software outside your house, it’s better to download everything you need beforehand.

And, you can install your software in three different ways. It is needless to say that all the three procedures have their own advantages and disadvantages. Just go through all the three methods before choosing the suitable one for you.

Method 1: Pre-built SD card image

Although this is probably the easiest method, it has some disadvantages as well. The image is not updated for each new release and it is harder to diagnose hardware problems if there is any. So, if you face any problem you would have to diagnose it manually.

The pre-built image is usable only in Raspberry Pi 2 or Pi 3. Any other model older than these two models is not compatible for this image. Moreover, it doesn’t have LibreOffice or other graphical software. And you’ll have to configure all the installation process manually by using command line as well as editing text file.

Method 2: One-line installer

If you plan to go for this method, you should keep in mind that the SD card available with the kit is a very older version. So, it’s better not to use it. Instead, what you can do is to follow this guide on Raspberry Pi website. By following this guide you’ll be able to get the latest Raspbian for installation.

Two versions of Raspbian are available – Desktop version and a Lite version. The latter doesn’t contain any packages like Wolfram that are not necessary for operating the weather station. However, the Lite version doesn’t have GUI (Graphical User Interface). So, it has to be configured using command line only.

Method 3: Manual installation

Although manual installation is a very tough job and needs a lot of patience, it has its benefits too. If you follow this method, you’ll get to know all the sensors and how they work. Here is a step-by-step guide for you.

One more thing, this method of installing the software manually is recommended for those who want to play with command line interface. Through this method, you’ll be able to make some custom adjustments if you want.

Step 4: Build the Station Part II

The first thing you need to do now is to set up the air sensor board. Place the air sensor board on the acrylic base. You should use fixing screws, nuts and PCB spacers to attach the board. Then use the 10 mm screws to mount the air sensor board in its container.

Now, you need to attach the RJ11 of the soil temperature sensor and the loose RJ11 to the air sensor board. But, you’ll have to remove the grommets first. Then secure the box. Make sure that the sensors have air flowing around.

It’s time to set up other sensors. Remove all the cables from the mounted Raspberry Pi and set it up in the larger container. You’ll have to use the 10 mm screws. Also, remove the three grommets of this container.

Then cut a grommet using a sharp knife; just cut the smallest circle. Open the plastic nut of the water-tight fixing assembly attached with the RJ11 cable of the rain gauge. Then thread the cable through the grommet and firmly attach the plastic nut again to fixing assembly.

You can repeat the same procedure to connect the cable of the anemometer with weather vane. Then place back the grommets and tighten the assemblies. Make sure that a seal is formed around the cables.

At this stage, you’ll have to disassemble the large black fixing assembly. Then thread the RJ11 cable of the air sensor board through the last grommet. Remember that in this grommet you’ll have to remove two rubber circles.

This black fixing assembly is a comparatively larger. So, use duct tape to make the RJ11 cable compatible for the assembly before tightening it. Then simply affix the grommet into the container.

Following the same procedure, set the Ethernet cable through the other black fixing assembly. You might find it hard to thread the Ethernet cable through the fixing assembly. All you need to do is to trim the cable using a sharp scalpel. Be careful of not affecting the cable.

After that you’ve to connect the PoE adaptor, HDMI cable, keyboard and mouse. You might need to remove more grommets. Just make sure that all the cables are connected to their labeled ports. Now, it’s ready for software installation.

Step 5: Test the Station

Before you start installing the software, it would be a wise thing to test whether your weather station works perfectly. By testing I mean whether the station is recording data and uploading them on the Oracle database.

If start typing the procedures step by step to describe how to test a weather station, it would be a never ending article! Here is a shortcut. Go to this page and follow all the instructions carefully. Hopefully, you’ll be able to test your weather station successfully.

Step 6: Outdoor Installation

Congratulations! Your weather station is now ready for outdoor installation. Before you take your station outside, don’t forget to unplug the monitor, keyboard and mouse. Also, make sure that the main enclosure is perfectly watertight.

This is a very common question people ask at this stage of the process – what is the perfect place to install the station? Sad thing is there is no specific place!

However, it is better to look for these following issues while installing a weather station outdoor. You should look for a position where all the sensors of your station are exposed to their respective weather elements.

  • The rain gauge should be in a place where rain falls freely.
  • The wind vane and anemometer should be placed in open air where wind flow is sufficient.
  • The air sensor box must have adequate air flow around it.
  • The weather station must be within the range of the Ethernet cable and WiFi.

In case of WiFi connection, what you must do is choose a place where there are fewer obstacles between your station and transmitter. WiFi signal is absorbed significantly by metal and concrete structures.

If there are a lot of trees in that place, your WiFi signal is also likely to be interrupted. If you didn’t know, water is also capable of absorbing electromagnetic signal.

Just a little advice! Even if you don’t find a suitable place, please install the station at a place that is best available for you. In this case, although the readings wouldn’t be that accurate, you would be able to learn the ins and outs of a weather station.

Hopefully, you’ve found a suitable place to install your weather station. At this point, you need to construct a T-shaped mast. You’ll have to mount all the sensors like the anemometer, air vane, rain gauge on the mast. This mast will help you secure a higher position where the wind flow is adequate.

Some Tips to Keep in Mind

You might face with a situation where you’re unable to use a PoE cable to connect your station to the network. In such a situation there are two solutions:

  • a) you can manually upload data to the Oracle database by retrieving the SD card periodically,
  • b) you can take help of WiFi technology.

If your Raspberry Pi doesn’t have a built-in WiFi facility, it is very easy to use a WiFi USB dongle. In reality, if you can use a wireless device that has a large antenna, you could place your station at a comparatively longer distance. In that case, you must ensure a waterproof shed to position your WiFi dongle.

Talking about the antenna, there are loads of available products in the market. But you can be creative here as well. You can even build a ‘cantenna – an antenna for your WiFi transmitter using a food can made of aluminium!

Conclusion

By now, you’ve hopefully understood that there are indeed so many things to address in this topic – how to set up a weather station at home. Although it might seem a little complex to a complete newbie (in fact, it surely will), it’s much easier when you start working on it.

I’m sure that you’ll be able to make your own weather station at home if you follow all the instructions correctly and thoroughly. For that, you must also visit the links I’ve use inside this article as well. So, that’s all from my side and best of luck! Ta-Da!

Scroll to Top