Program to measure wind speed
838
Posts: 2
Hi All,
Im new to PBASIC language, I would like to write a program to measure wind speed, do you have a basic program to measure wind speed using PBASIC language? Thank you!
838
Im new to PBASIC language, I would like to write a program to measure wind speed, do you have a basic program to measure wind speed using PBASIC language? Thank you!
838
Comments
Welcome to the forums!
You might find something useful at this URL. What anemometer do you have? Cup anemometers commonly have a reed switch that closes once or twice for every rotation of the cups, so the interface requires only a couple of resistors and a capacitor. The Stamp has to count the number of pulses that happen during a known interval of time.
Come to think of it, stick with Tracy's cup anemometer and reed switch approach!
Thank you for your time!
Im going to use the following tools to build a firmware to read wind speed.
1. Model 7911 Anemometer from Davis Instruments (please review attached file for more details)
2. Model Davis Vantage Pro2 (please review attached file for more details)
3. Target: BASIC Stamp 2 {$STAMP BS2}
4. Language: PBASIC 2.5 {$PBASIC 2.5}
My goal is to build a firmware to read wind speed using PBASIC 2.5, any advice (step by step instructions how to build this firmware or sample firmware) is greatly appreciated!
Thank you!
838
or just spend the $17 on this http://shop.moderndevice.com/products/wind-sensor
@838, there are two ways you could go with that. The direct to wind method uses item 1, but not item 2. The anemometer has a reed switch inside like I mentioned above, so if you tie the red wire to ground and the black wire to a stamp input with a pullup resistor, then the Stamp can count the number of pulses that occur in a fixed interval. For example,
That comes out in miles per hour, because for example, the 7911 in a 10mph wind makes 10 complete turns in 2.25 seconds.
The alternative is to read the Vantage Pro document and figure out which commands you need to send via SEROUT to their interface to elicit the data that you want, and have the Stamp capture it with a SERIN. As you see, there are lots of commands and information you can retrieve, not just about the current windspeed.