measuring wind speed using optocoupler sensor (anemometer)

Support, advice and resources for the Raspberry Pi Oracle Weather Station for schools

4 posts
by ilman » Mon Mar 20, 2017 6:48 am
hello, i have a project to build an anemometer using raspberry pi. sensor that i plan to be use is optocoupler sensor. i've read a lot of references but all heading me to arduino. could somebody tell me about a python script to use optocoupler sensor in my case. i really appreciate to your answer. :)
Attachments
sensor-anemometer.jpg
this is the hardware
sensor-anemometer.jpg (34.96 KiB) Viewed 203 times
Posts: 10
Joined: Wed Mar 08, 2017 5:08 am
by DougieLawson » Mon Mar 20, 2017 7:45 pm
https://github.com/raspberrypi/weather- ... _daemon.py
https://github.com/raspberrypi/weather- ... _client.py

The daemon counts ticks on GPIO05 with a 9cm anemometer which I think does two ticks per revolution.

The client program gets the data from the interrupt daemon.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 26790
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by willip5 » Mon Mar 20, 2017 7:51 pm
Can you post a link to the data sheet for this item, it looks quite interesting. An optocoupler is essentially an electronic reed switch probably driven by a coded disk of some kind. If the output is a series of pulses then it will just mean a slight modification of the Python script used for the RPi Weather Station.

The Vaisala WAA151 outputs 14 pulses per revolution rather than the 2 pulses for the Maplin item.

Pete
Posts: 41
Joined: Wed May 29, 2013 11:55 am
Location: France
by ilman » Wed Mar 22, 2017 7:04 am
willip5 wrote:Can you post a link to the data sheet for this item, it looks quite interesting. An optocoupler is essentially an electronic reed switch probably driven by a coded disk of some kind. If the output is a series of pulses then it will just mean a slight modification of the Python script used for the RPi Weather Station.

The Vaisala WAA151 outputs 14 pulses per revolution rather than the 2 pulses for the Maplin item.

Pete


optical sensor which i used is MOC-70T3. here the link related to datasheet http://www.datasheet.hk/download.php?id ... &file=0381\moc70t2_3777154.pdf
thanks for your help buddy. can you post an usual script to using optocoupler sensor for measuring wind before.
Posts: 10
Joined: Wed Mar 08, 2017 5:08 am