Shop OBEX P1 Docs P2 Docs Learn Events
Program to measure wind speed — Parallax Forums

Program to measure wind speed

838838 Posts: 2
edited 2012-03-30 11:47 in BASIC Stamp
Hi All,

I’m 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

  • FranklinFranklin Posts: 4,747
    edited 2012-03-20 18:40
    I would like to write a program to measure wind speed
    First you need to have a sensor to convert wind to a signal the stamp can read. If you do let us see the datasheet.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2012-03-20 21:18
    Hi 838,

    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.
  • ercoerco Posts: 20,256
    edited 2012-03-21 09:59
    It would be slick to make a solid state hot-wire anemometer. IF you have plenty of power, thermistors, ADCs and boatloads time to calibrate and temperature compensate.

    Come to think of it, stick with Tracy's cup anemometer and reed switch approach! :)
  • 838838 Posts: 2
    edited 2012-03-27 16:21
    Hi All,

    Thank you for your time!

    I’m 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

  • Mike2545Mike2545 Posts: 433
    edited 2012-03-30 07:33
    erco wrote: »
    It would be slick to make a solid state hot-wire anemometer. IF you have plenty of power, thermistors, ADCs and boatloads time to calibrate and temperature compensate.

    Come to think of it, stick with Tracy's cup anemometer and reed switch approach! :)

    or just spend the $17 on this http://shop.moderndevice.com/products/wind-sensor
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2012-03-30 11:47
    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}

    @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,
    [FONT=courier new][SIZE=1]wind var byte
    COUNT wpin,2250,wind     ' the BS2 counts for 2.25 seconds[/SIZE][/FONT]
    

    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.
Sign In or Register to comment.