+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Davis Wind Speed anemometer

  1. #1

    Default Davis Wind Speed anemometer

    I am trying to build a wind speed anemometer with the davis anemometer which uses a reed sw and the count command to measure the rpm (bs2sx). I have all the info for the sensor from the OWL2 page (26rpm for each mph wind speed).
    When the rotating cups stop near the point when the reed sw is closed i get very wrong data.
    The OWL2 page mentions this and sugests to use the swiched supply of 5.12V(?)
    Please help
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  2. #2

    Default

    I think Tracy Allen makes the OWL2 (if not, he has extensive experience with them), so he would be the best to answer your question. Meanwhile can you provide a link to the page where you are getting this information from? I attempted to locate it myself, but was unsucessful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  3. #3

    Default

    What sort of "wrong" data are you seeing?

    It is a good idea to include a debounce RC circuit, because the contacts in the reed relay will bounce, and that can fool the COUNT command into reporting a wind speed much higher than it really is. I've attached a debounce circuit.



    This uses two pins. Pin p8 is used for COUNTing the reed switch, and pin p9 is made HIGH to activate the pullup resistor, with the capacitor there for debouncing. You could tie the pullup resistor to +5 volts, if the current drain through the pullup resistor is not a concern for low power operation. The anemometer cups will often stop with the reed switch in the closed position. The purpose of the 270 ohm resisotors is to limit current from the capacitor in the Stamp and in the reed switch.


    The anemometer cups do not need a regulated power supply. The regulated power supply is for the wind vane, which is a potentiometer.

    http://emesys.com/OL2wind.htm <-- I need to edit that page. Davis is reporting that the windspeed constant is a little different than I have there. Now it is 0.4444 Hertz per mph. 60 Hertz in a 135 mph wind. 2.25 mph per Hertz.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	wind2.gif‎
Views:	1623
Size:	2.2 KB
ID:	38523  
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  4. #4

    Default

    Thank you for your reply and for the very good information you have on the internet.

    I was using the shematic from the count example (basic stamp editor help) and before I read your e mail I tried to pass the signal from the anemometer through a Schmitt Trigger (74HCT14) and it seems to work much better. I am going to test your schematic tomorrow...

    Now I have some trouble converting the scale to work with the BS2SX. I probably dont understand the timing of the count command. How did you calculate the 2.308 sec that will give a direct reading in mph?
    Please help.
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  5. #5

    Default

    The anemometer switch closes N times in a time interval of length T:

    N = T * mph / 2.25

    proportional to the wind speed (here in mph) with a conversion factor of 2.25. That is, iby counting for 2.25 seconds, you are left with,
    N = mph
    The count comes out directly in mph. I used 2.25 here instead of 2.308. That is because 2.25 is the figure that Davis is giving out now for the proper calibration factor for their anemometers, including the new Vantage Pro 6410.

    On the BS2 and BS2e, the command to get the result directly in mph is thus,
    COUNT 0, 2250, resultMPH ' BS2, BS2e

    On the BS2sx, the command is,
    COUNT 0, 5625, resultMPH ' BS2sx

    That gets the same amount of time, because the 'sx uses time intervals of 0.4 milliseconds instead of 1 millisecond, and 0.4 * 5625 = 2250 milliseconds.

    To get the result in other units, the equation is similar. Say, meters per second...
    N = T * mps / 1.00575
    COUNT 0, 1006, resultMPS ' BS2, 2e

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  6. #6

    Default

    Again thank you for your input.
    I did try your schematic for the anemometer today and it works fine.
    I am not sure if the Schmitt Trigger is better but since it works fine with just a capacitor, I quess there is no need to use the Schmitt Trigger.
    Another problem now is that when you use the COUNT command you slow down the hole basic stamp program which updades every 2.3 seconds or every 1 second if you use m/sec.
    I was wondering if there is a way to make it faster, use a different method like the PULSIN command in order to make it faster. Will it work with the Pulsin?
    Many thanks
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  7. #7

    Default

    In theory, PULSIN should work, but it may require more tweaking depending on the construction of the anemometer (like the duty cycle of the waveform seen must be accounted for, but with COUNT the duty cycle is irrelevent). Also the error will be larger with PULSIN, if the error is +/- 2uS for both PUSLIN and COUNT, that 2uS is spread out over the entire COUNTing period, whereas the error will be for each PULSIN, if you extrapolated the fact that many PULSINs will be called in the same amount of time as one COUNT, you'll see the error will be larger when using PULSIN.

    Now, will this be a serious issue? I don't know, but you can test the two different methods by placing the anemometer a fixed distance and position in front of a fan and compare the two to find out.

    <edit> Well it seems I stand corrected, see below post for an explaination why. Tracy is much more knowledgable in this than I am, so follow his advice. </edit>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10

    Post Edited (Paul Baker) : 8/11/2005 4:56:38 PM GMT
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  8. #8

    Default

    The debouncing is the most important thing, and the Schmitt trigger does not intrinsically do that.

    I know what you mean about the time it takes to COUNT the wind speed. To get a good picture of a gusty wind, you need to sample quite often and record the average and maximum. Infrequent samples tend to grossly underestimate windspeed. Note that the Davis weather stations do in fact update their readings once every 2.25 seconds. In a data logger, you could sample the wind once every 10 seconds, leaving plenty of time for other stuff or for power-conserving SLEEP.

    PULSIN by itself does not work, because the wind cups signal is frequently longer than the maximum PULSIN value (0.131 second for the BS2--corresponding to windspeed >17mph). The cups are often completely stopped. And you would have to measure both the high-time pulse and the low-time pulse, because the dwell time of the reed switch is not well controlled. You might figure out a way to do it with a program loop, but it gets messy.

    Now I often use an external counter chip to offload the windspeed and rain gage counting from the Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  9. #9

    Default

    Thank you for the help.
    You are upsolutely correct about the PULSIN command. It is too fast for the anemometer.
    Maybe for a fast tach aplication will work ok...
    The external counter that you mentioned is the frequency to voltage converter circuit you have on your internet page? Could you please explain how to use it with the bs2.
    Thank you in advance.
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  10. #10

    Default

    The external counter is based on a PIC chip programmed in assembly. It monitors the anemometer (and rain gage) and reports the total counts to the stamp on command at intervals.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  11. #11

    Default

    I would like to point out that because the maximum length for PULSIN is shorter than you desire, does not mean it cannot be used. I outline how to expand the length measurable by PULSIN in this thread. Since the anemometer maybe at standstill, you may want to limit the number of times PULSIN will be called. This is done by inserting "IF OuterCount > MaxRep THEN EXIT" after OuterCount has been incremented, where MaxRep is defined as the number of PULSINs will be called before assuming the anemometer is not spinning. There is some overhead to calling multiple PULSINs, so to obtain an accurate reading youll need to adjust the final count (increasing its amount to account for the extra time done LOOPing, incrementing etc).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  12. #12

    Default

    A while back, I saw an RTC that could be used as a 16 or 32 bit counter via spi or I2C. Instead of the crystal, you fed in the signal to count. I think it had a register to config it into this mode. I know this is not much help but maybe it somebody else knows of this IC. Another good IC that I did not bookmark! In the future, I would like to monitor meters with similar outputs and thought this would be a good way to offload the stamp.


    btw Hats off to your website Dr. Allen, it has been a valuable resource of the years!
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  13. #13

    Default

    I just wonder if...
    isn't all this switching unnecessary?

    There seem to be a lot of ways to build this device - DC motors, magnet on a shaft and a hall effect sensor, a cam driven switch..

    Wouldn't a DC motor and a generator provide a variable voltage according to wind speed? This could then be directly read by the BasicStamp through a voltage divider.

    If the motor requires a high rpm, one that is geared down might be useful.

    The only problem is that some DC motors have a diode inside to prevent reverse connect [a 12V computer fan motor for instance].

    I do realize that this would have to be calibrated. Once the electronics are right, maybe a ride in the back of a pickup truck on a calm day would do the trick.

    By the way, I have two 5.1 volt power supplies from old PDAs. The first was a Sony CLIE @2amps and the second was a Tungsten E @ 500mA. They are quite handy because you can insert a polarity protect diode in your project and a have near perfect 5volts from the wall wart.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  14. #14

    Default

    Orion, the Philips PCF8583 can be used in event counter mode. It is an I2C real time clock + RAM, but in the event counting mode the osc input becomes the event input. Maybe that is the one you saw.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  15. #15

    Default

    Thank you I'll check it out.
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  16. #16

    Default

    How about a stepping motor? Take one of those old IBM floppy drives apart, You can count the pulses for exact rotation
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  17. #17

    Default

    Another type of sensor that you can use that doesn't have as much bounce is a Hall Effect Transducer. Basically mount a magnet on the spinning anenometer and position the transducer (looks like a small transistor) close enough that it trips. Pretty nifty because there is no reed switch to wear out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  18. #18

    Default

    I was searching for a counter and found this scematic with the 74LS590 and the 74HC165.
    Can I use this as an external counter for the anemometer and if I can how i will modify it for the anemometer
    Thanks for any help
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	timer.GIF‎
Views:	231
Size:	13.6 KB
ID:	38652  
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  19. #19

    Default

    yes, the circuit can be adapted for your application. The annemometer's output once debounced feeds the clock signal (RCK, CCK) to the 165.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

  20. #20

    Default

    Could you please explain how this counter works?
    The counter will count each pulse from the anemometer and then I will retrieve the counts with the bs2. I need to know the number of pulses at a specified time interval. The counter will count for a specific time by itself? How i will specify the time interval?
    Thanks for your help
    Last edited by ForumTools; 09-30-2010 at 09:47 PM. Reason: Forum Migration

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts