Introduction: SODAQ Solar Powered Autonomous Rain Observation Station

This is the first in a series of tutorials we will write in the next couple of weeks on the use of the SODAQ board for autonomous, outdoor solar powered sensor stations. 

We use the SODAQ, an Arduino compatible solar powered board ( to which we connect a tipping bucket rain sensor.

A tipping bucket rain gauge consists of a funnel that collects and channels the rain into a small seesaw-like container. When this container fills up the seesaw tips and a magnet is moved past a reed switch and the reed contact close momentarily. This corresponds to a certain amount of rainfall. For the rain bucket we use in this tutorial it corresponds to 0.3mm rain.

We use the SODAQ board to register this rainfail and send the information hourly to the Internet.

There are various systems where we can send the data to like:

Weather Underground

After uploading the data it can be displayed in for instance a bar chart.

Step 1: Materials Need

We start by collecting the materials that we need:

Solar Panel
Fine Offset Rain Funnel
Waterproof Casing OBO T-100
2 Pipe clamps
Grove screw terminal
Grove Cable
Jubilee clamps

To get the SODAQ board please visit this Kickstarter page.
The GPRSbee, Antenna, Solar Panel and Battery can be bought from SEEEDstudio or for instance in the Netherlands at

In this example we use a 0.5W panel and a 1000mAh battery.  The SODAQ board uses very little power and will be sleeping most of the time. Only when the rainbucket tips it wakes up to record and every hour when it switches on the GPRS module to send the data to the Internet.
Depending on where you are located and the sunshine hours you have, you however may need a bigger panel and or battery. 

We have used the OBO T-100 junction box, which we think is good value for money and has the right size. You can of course use any other waterproof container you have lying around. For durability it is best to use a UV stabilized plastic. The OBO T-100 comes in two varities, the UV stabilized one is a bit more more expensive though.

You can use any tipping bucket like the Davis Rain Collector II but for this tutorial we have chosen for the widely available and cheap sensor produced by the Chinese Manufacturer ' Fine Offset'.  This rain bucket is often sold in a set forming a complete weather station under various brand names like Alecto, Watson, Elecsa, Ambient Weather and Tycon.

You can for instance buy the rainbucket here for less than $10.
Sparkfun sells the rainbucket as part of their Weather Meters set for $69.95.

Because we want to have the lowest possible power consumption we make our system sleep most of the time. When sleeping it draws less than 50 µA. There are only two conditions under which we want the system to be awake:

- when the tipping bucket tips
- once every hour to send data to the Internet

Microcontroller board like the SODAQ can use so called interrupts to be woken from the sleep condition.

The SODAQ has two interrupt lines. One we will use for the Rainbucket (port D3) and other one for the on board Real Time Clock (D2). 

Step 2: Fit the Solar Panel

We now can start assembling the station. We first glue the solar panel to one side of the junction box. 
We use a hot glue gun, but you can also use an acrylic glue/sealant.

First we punch a hole through we feed the wire. Next we apply glue to the panel and fix it to the side of the box making sure it also seals the hole we fed the wire through.

We use the long side of the box for mounting the panel. When fitting the panel to the pole it sits under a nice 60 degrees angle, perfect for countries like Holland and the UK. If you are closer to the equator you might be better of glueing the panel to the short side of the box, which will allow you to position it in a 30 degrees angle.

Step 3: Fit SODAQ Board in the Case

We can now fit the SODAQ board in the case.
The OBO box has quite a few mounting points. We use the two mounting holes of the SODAQ board to carefully screw it down in the box.  As you can see in the picture we have used two small screws. These are actually too small for the standard holes that the OBO box has. To solve this we filled the holes with some hot glue and after glue has hardened we screw the board down. 

We connect the wire from the solar panel to the port marked 'SOLAR' and connect the GPRSbee with the supplied jumper wire to the Battery port.

Step 4: Fitting the Clamps

We can now fit the two pipe clamp diagonally to the box with 4mm (M4) bolt and nuts.

We can then clamp the box to the pipe as shown in the second picture.

Step 5: Rain Bucket

The rain bucket will be fitted to the same pipe. It has a long wire and RJ11 connector.  You can cut the wire to the right length and feed it into the box.

Step 6: Bucket to Grove

We need to connect the rain bucket to the SODAQ board using a grove connector. The easiest is to connect the cable from the rain bucket to a grove screw terminal. Just cut off the RJ 11 connector and screw the green wire to the GND and the red wire to D2.

The grove cable then plugs into the D2/D3 connector on the 'Always On' row on the SODAQ board.

We punch another hole to feed the cable from the rain bucket into the OBO box.

Make sure to seal the hole in the box with hot glue or acrylic sealant as we want the box to be completely water proof.

Step 7: Final Assembling Steps

We now fit the battery, which we also glue to the inside of the box.
We also install the GPRS antenna on the GPRSbee. As the OBO box is made of plastic and doesn't obstruct the wireless signal we can have the antenna inside the box.
In areas with poorer reception you can also choose to use an external antenna with higher gain.

The next step is to load the software! Stay tuned, we are adding the software pages shortly.

Step 8: Weather Underground

In our example we will upload the collected data hourly to the Weather Underground.

To be able to do this you first have to create an account at Weather Underground. You can create your own Personal Weather Station (PWS) here:

If you follow the process described there you will end up with a Station ID.

You can use this station ID to upload data. IN this setup we use the mobile phone network and the GPRSbee module to hourly upload our rainfall.

Uploading the data to the weather underground is quite simple. It is just a single line that you could send through your browser URL bar. The syntax is as follows:<ID>&PASSWORD=<PASSWORD>&dateutc=<DATE>&rainin=<RAIN>&action=updateraw

In the above line we have four variables:

<ID>                    = your Weather Underground ID
<PASSWORD>  = your Weather Underground Password
<DATE>               = The current date and time in UTC (GMT)
<RAIN>                = Amount of rain over the last hour in inches!

You could try this out manually in your browser, before you implement it with the SODAQ board.
Note that the DATE may be a bit confusing. The format for the date is:


for example:

2013-10-17 10:32:35

But because this has to be written as A URL, the space and colon characters are not allowed and these need to be replace. This process is called URL encoding.

To learn more about URL encoding check this page:

You will see that  2013-10-17 10:32:35 will have to be written as:


The next step is to load the software on the SODAQ board.

Step 9: Setting Up Your Computer to Program Arduino Boards

If you have been working with Arduino you can probably skip this step. 

First you will have to download the Arduino software here:

Please select and install the right software for your system (Windows, Mac, Linux). We recommend to use version 1.0.5.

On the above page the getting started section helps you finding your way around the Arduino software.

You can now hook up your SODAQ board to the USB port of your computer. You computer may ask for USB drivers. These drivers can be downloaded here:

Please install the drivers for your system.

You can the start the Arduino software. In the main menu you need to choose which port your SODAQ is connected to and select the board type.

For the board type select: Arduino Pro or Pro mini (3.3v 8MHz) w/ ATmega 328

You are now ready to load the software onto the SODAQ board.

The software can be found in the examples folder in our GIThub repository: