storm clouds above a modern city landscape

How to realize a weather station to protect awnings from wind with Archimede

(This article has been published on the online magazine Elettronica Open Source)

How to realize a weather station to protect awnings from wind with Archimede

storm clouds above a modern city landscape

Not long ago we told you about one of the prizes in our contest Review4U 2.0, Archimede, and we had presented as a starter kit born and grew up wanting to become a platform for home automation. Today we see it at work in an application really interesting: a weather station.

If you had had the curiosity to see him at work, this is the article for you.
Today Archimede will be used to build a prototype of the weather station. It will work on many fronts: from the acquisition of the normal parameters such as temperature, humidity, pressure as well as wind speed and direction, even amount of rain, control and drive the motors of awnings.

 

It would seem trivial but the application comes from a consideration quite simple: if it rains there is no sun. And like all great ideas, Archimede aims to become a platform for automation of a process which of course we all understand it as indispensable to close the awning when not in use and avoid getting wet.
There is another circumstance in which it is essential that the closing of awnings occur when there is too much wind and risk of tearing. We, therefore, going to run the motors control movement of the awning to pull it back in time and protect it from the weather.

To do this we can simply write a routine like this:

 

// If the wind is stronger than 25 km/h or it's raining

if(anemometer.WindSpeed > 25 || pluviometer.RainQuantity > 0)
   {
        // I pull back the awnings generating a pulse of a second on the relay
        awning.On(1000);
   }

Of course the time indicated in brackets is equal to a second time interval and this is certainly at the discretion of the programmer, and must be adapted according to the type of awning we are talking about. We must also consider the size and power of the awning’s engine.

Certainly here is a hypothetical example which, however, can be expanded and also adapted to the individual needs of the specific problem.
The basic concept of this kit, but also of this post, is to demonstrate how it’s possible a systemic approach to different problems thanks to the use of a very versatile kit.
The user begins to interact with the real world using the object-oriented programming in C #.
Not bad, right?

The project, and we’re talking about software, is, as we will see shortly, a program that contains the logic of the operation, Program.cs, some utility function (utility.cs) and a class that implements a digital I2C bus (softwareI2C.cs).

In fact, in the attached files that complete documentation of the project, we have three very important elements. A *.zip file named WeatherStation_VS2010Project.zip, and two image files, respectively pinout.jpg and rain gauge.jpg.

If the first, as you can easily understand from the name, contains all the files needed to run the project in Visual Studio environment; the attached images are used to demonstrate the pinout of the card, and then make the simplest connections to be made, especially to newcomers, and show how is realized the sensor that will measure the amount of rain fall. Of course the latter has a physical limitation, its size. It won’t make a scan of an area as large as desired but, appropriately placed and made to work together with the anemometer, it will certainly contribute to a successful data collection.

An added bonus, isn’t it?

Here is a picture that lets you see a sensor that indicates the direction of the wind:

 

direzione vento

In this picture we see the anemometer:

velocità vento

This is the SHT15 sensor:

SHT_15

This is the digital barometer, about which we talked before:

The project, in addition to using the standard libraries of the framework, refers to the library Seletronica.NETMF.UPC.ddl. It contains the definition of the pins on the card Archimede and others that allow immediate use. The source of this library can be freely downloaded from the download section of the site.

What you will find is a fairly well documented and commented code that will make, we are sure, a great base for any future development.

The entire project is designed to be carried on the basic kit of Archimede and therefore uses only the resources available on the card, without the need to purchase add-ons and then, apart from the weather sensors – that are not supplied with the kit – you won’t need more.

The sensors involved are:

  • digital barometer MLP115A connected on the I2C bus;
  • SHT15 digital sensor with the function of hygrometer and thermometer connected on the I2C bus;
  • anemometer;
  • rain gauge;
  • wind direction sensor.

The anemometer is, in fact, a reed switch that opens and closes at a frequency that is proportional to the wind speed. The wind direction sensor utilizes a series of reed switches to make feel to the card a resistance change. To better understand this we recommend reading the following post.

If you need indications on how to find the sensors, you can take a look at the following links for the barometer or hygrometer or even for the anemometer, wind direction sensor and rain gauge that are included in common weather stations like the one you can find here.