|
||||||||
|
||||||||
| Cette page est aussi disponible en français | ||||||||
| Introduction | [cacher] |
I wanted to build a measuring instrument which must be placed outside, exposed to the
natural elements. Some of my goals in doing this was to see how it would resist our
very cold canadian winter (sometimes -40 Celcius/Fahrenheit, not including
with wind, and yes, it did resist) and to learn from my
mistakes if something goes wrong.I chose to build a cup anemometer ( link to wikipedia's anemometer entry ). This instrument has some electronics to keep track of the rotation speed and these components must be protected from water (Otherwise, oxydation would cause problems). Also, the mecanical parts must be able to resist strong winds, and cold temperatures. Moreover, the rotating part must offer the least resistance possible in order to be able to measure light winds. |
| Construction | [cacher] |
| Installation | [cacher] |
| Controller | [cacher] |
| Logiciel | [cacher] |
| Microcontroller: The microcontroller I used is an Atmel ATmega128 (Yes, it's overkill). It is programmed to calculate the time each revolution takes. Each time a revolution is completed, the time it took, in milliseconds, is transmitted to a computer via an rs232 link at 9600 bauds using the following syntax: delta: xxxx\nWhen nothing is happening (no revolutions for more than 10 seconds), a message is sent to the computer so it can log that the wind has stopped: status: stopped\nHere is a file containing the source code: (compiles with gcc and avr-libc) windmon_avr.tar.gz And if you want to look at the code right here: main.c usart.c usart.h Logger: On the computer, at each second, a program records the last 5 minutes average and the last 5 minutes top speed. Here is the source code of this program: windmonitor.c And some related scripts: Configures the serial port and starts windmon-run in background: windmon-init Starts windmon with a specified log file and redirects the serial port into windmon stdin: windmon-run Remote retrieval of the data: I use snmp to remotely retreive the most recent values. Here are the lines I added to my snmpd.conf file for this: exec windspeed /usr/local/bin/windmon-getlastaverage exec windspeedmax /usr/local/bin/windmon-getlastmaxAnd here are the scripts: Returns the last 5 minutes average speed: windmon-getlastaverage Returns the last 5 minutes top speed: windmon-getlastmax Graphing the data: I use mrtg to generate the graphs from the snmp source. Here is the relevant par from my mrtg config file: Target[wind]: 1.3.6.1.4.1.2021.8.1.101.1&1.3.6.1.4.1.2021.8.1.101.1:public@cola SetEnv[wind]: MRTG_INT_IP="xxxxxxxxxxxxx" MRTG_INT_DESCR="ping" Title[wind]: Wind speed MaxBytes[wind]: 2000 AbsMax[wind]: 2000 Options[wind]: gauge YLegend[wind]: Revolution Per Minute ShortLegend[wind]: rpm PageTop[wind]: <H1>Wind speed</H1> <TABLE> <TR><TD>System:</TD> <TD>ND</TD></TR> <TR><TD>Maintainer:</TD> <TD>Raphael Assenat (raph@raphnet.net)</TD></TR> <TR><TD>Description:</TD><TD>Wind speed in rpm </TD></TR> <TR><TD>Max Speed:</TD> <TD>2000 rpm</TD></TR> </TABLE> The results: ![]() 5 minutes average, image updated hourly. Click image for weekly, monthly and weekly graphs. Anemometer is located in St-Hubert, Quebec, Canada. |
| Conclusions | [cacher] |
| I have not taken the time to calibrate my anemometer before installing it, so I cannot
map it's rotation speed to wind speed. However, I'm able to see how the wind fluctuates. In the future, I will add more components to my weather monitoring system to gather more data such as wind direction, humidity, temperatue, lightning detection, rain detection, luminosity, air pressure... Once I will have installed my other sensors, I will try to find relations between the wind speed and other measures. (eg: how does fast temperature changes influence the wind's speed?) Meanwhile, I can't wait to see how my homebuilt anemometer will fare this winter. |
Coded manually using
|