Lately I’ve been wondering if a wind-generator could help me lower my electricity bill (since my home server burns continuously some hundred watts per hour) in my town, Ponzano Romano. So I came up to the idea that wind data logging is absolutely a must for any further reasoning about wind – that is I need an anemometer. On internet prices for those devices may vary, but I was unable to find anything below 150€ which I think is a bit too much for what is just an experiment for fun.

From the very interesting forum energeticaambiente a post pointed me to the electronic italian magazine “Nuova Elettronica” that posted the following (relatively cheap) anemometer kit:

Nuova Elettronica Anemometer kit lx1606

The kit is fine but is not meeting my requirements for data logging, that is I have the need of a constant wind speed recording into my server; since it’s possible to buy only the anemometer (without the logic board) I went that way.

Moreover not so long time ago I’ve built some I2C circuitry (look at the post on this website), so I thought that a I2C wind logger interface to the anemometer from Nuova Elettronica (which costs 30€) would be easy and very cheap to build, bringing total cost of the solution to around 40€. In case you need to assemble even the I2C-to-Parport adapter, then you need to add few € for it, but the total cost should be no more than 50€.

This is the schema that I plan to build:

I2C Wind data logger architecture

For those who may be interested, there’s another cheap anemometer by APRS World which is for sale at $65.

(Update on 18 Sep 2010)

Finally I had some time to assembly the prototype board of the anemometer. Follows the schematic and the board layout:

The board is rather simple and is based on a PCF8574 providing to the I2C the output of a CD 4040 counter. A dip switch is provided to select the PCF8574 address and some leds for power on and wind activity.

Some photos of the prototype follow:

The DIP switch was not soldered thus the circuit will have the address 0x27. After blowing the anemometer the green led was blinking and a scan on the i2c bus showed that the PCF 8574 was correctly detected. It was time to put the anemometer on the roof:

(Update on 27 Sep 2010)

After the hardware, it came the time to write the software. Due to the disappointing I2C support of perl (CPAN couldn’t find Device::SMBus), I’ve decided to switch to C(++) to get the thing done using the i2c-dev interface available from Linux kernel. The program, named windlogd (wind-logger-daemon) reads the counter values and output the current speed, as show in the following:

[root@kynes windlogd]# ./windlogd -s 0x27 -d /dev/i2c-1
Thu Oct 21 10:53:56 2010: samples 108, 92: freq 5.333 Hz, wind speed 3.378 m/s  
Thu Oct 21 10:53:59 2010: samples 124, 108: freq 5.333 Hz, wind speed 3.378 m/s  
Thu Oct 21 10:54:02 2010: samples 140, 124: freq 5.333 Hz, wind speed 3.378 m/s  
Thu Oct 21 10:54:05 2010: samples 160, 140: freq 6.667 Hz, wind speed 4.156 m/s  

The transfer function between the anemometer is defined in the source (see the TF_* defines). The -d argument sets the bus to be used (defaults to i2c-0), while -s is mandatory and is the device address (can be expressed both in decimal and hexadecimal using the 0x prefix).

You can download the source (for Linux) here.