I2C Anemometer cheap wind data logger

Posted on Feb 6, 2014

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. The DIP switch was not soldered thus the circuit will have the address 0G—27. After blowing the anemometer the green led was blinking and a scan on the i2c bus

I2C Anemometer cheap wind data logger
Click here to download the full size of the above Circuit.

showed that the PCF 8574 was correctly detected. It was time to put the anemometer on the roof: 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. samples 160, 140: freq 6. 667 Hz, wind speed 4. 156 m/s The transfer function between the anemometer is defined in the source. 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).

Leave Comment

characters left:

Related Circuits

  • New Circuits



    Popular Circuits

    Five-transistor amplifier
    Dimmer circuit
    Digital Radar Speedometers
    Timed Burglar Alarm N/O - N/C
    Automatic Light Dimmer
    Motorized Video Camera Mount
    Flight Computer Assembly Instructions
    AM band Transmitter
    Power Control
    Frequency counter hardware keys schematic