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

    Crossfeed Headphone Amplifier
    Clock Input Frequency Divider
    Power MOSFET Bridge Rectifier
    Fun Game Circuits
    how to build digital step km counter
    24v 7ah lead acid battery charger
    30w class ab amplifier circuit with
    ir sensors
    Proximity Detector Circuit Using NE555 PCB
    24 Second Shot Clocks
    Quadraphonic Amplifier
    RC coupled self-excited multivibrator circuit
    Simple high-frequency signal generator circuit diagram