Question about computing windspeed using...
deno
Posts: 242
Fascinating Electronics anemometer cups (that they sell this in kit form) and the BS2.· By the way, this is a nice simple design, mechanically.·
The data that comes with the cups gives a formula for computing the wind speed in MPH.· I am calculating a windspeed alright, but it appears to be about double of actual windspeed.· I am testing for windspeed· by driving down a "deserted" road and watching the speedometer on the car, and the readout on the LCD.·
Now,the formula given on the data sheet is:
················· MPH = OFFSET + (SCALE * COUNTS/TIME)
··················OFFSET = 1.758· 'given on data sheet..donot know how derived
···················SCALE = 2.121·· 'given on data sheet..donot know how derived
First question that comes to my mind, is the COUNTS / TIME.· There is 2 magnets in the rotating cup housing, that pass over the microswitch.· This, produces 2 counts per revolution (2 high pulses), not one.· Could this be where I am almost doubling the windspeed as compaired to the cars speedometer.· The TIME is set to 2 seconds, and the duration of my COUNT command is 2000 (units of duration for BS2 is 1 msec which equals 2 seconds).
It was suggested by the supplier of the anemometer cups to measure the length of a pulse to determine windspeed, but at slow windspeeds, the PULSIN command times out. (max pulse width for BS2 = 131msecs).
Has anyone written any code for the above anemometer from Fascinating Electronics, and do you think I should divide the above COUNTS command because of 2 magnets passing the pickup head. Why doesn't this 2 pulse per revolution show up on the data sheet formula...or am I just missing something here?
Thanks to all...
deno
·
The data that comes with the cups gives a formula for computing the wind speed in MPH.· I am calculating a windspeed alright, but it appears to be about double of actual windspeed.· I am testing for windspeed· by driving down a "deserted" road and watching the speedometer on the car, and the readout on the LCD.·
Now,the formula given on the data sheet is:
················· MPH = OFFSET + (SCALE * COUNTS/TIME)
··················OFFSET = 1.758· 'given on data sheet..donot know how derived
···················SCALE = 2.121·· 'given on data sheet..donot know how derived
First question that comes to my mind, is the COUNTS / TIME.· There is 2 magnets in the rotating cup housing, that pass over the microswitch.· This, produces 2 counts per revolution (2 high pulses), not one.· Could this be where I am almost doubling the windspeed as compaired to the cars speedometer.· The TIME is set to 2 seconds, and the duration of my COUNT command is 2000 (units of duration for BS2 is 1 msec which equals 2 seconds).
It was suggested by the supplier of the anemometer cups to measure the length of a pulse to determine windspeed, but at slow windspeeds, the PULSIN command times out. (max pulse width for BS2 = 131msecs).
Has anyone written any code for the above anemometer from Fascinating Electronics, and do you think I should divide the above COUNTS command because of 2 magnets passing the pickup head. Why doesn't this 2 pulse per revolution show up on the data sheet formula...or am I just missing something here?
Thanks to all...
deno
·
Comments
From what you say, I would guess that yes indeed you need to divide by 2. I took and old wind sensor and did what you have done to test it's speed. One thing I found was I needed to raise the sensor well above the car to get accurate readings. The disturbance cuased by the car was messing with the readings. Also, make sure its is completely calm when you calibrate, so the wind isn't adding or subtracting from your readings.
I suppose you also might try a scheme where if the PULSIN command times out, you imediatly issue another PULSIN comaand. Then add the two readings together, minus the small amount of time it takes to issue the command. However, I dont see why reading the number of pulses wont work. It might not have quite as good resolution, but the accuracy should be just as good.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
If you count for 2121 milliseconds, the reading should (apart from the offset) come out directly in mph:
COUNT 0, 2121, mph
I'm suspicious of the offset factor. There are two offset factors to consider in wind cups. One is the starting threshold, due to the static friction. The other is the formula offset, which you would get from extrapolating the readings you get at higher speeds back through zero. That formula offset is almost always less than the starting threshold, especially in cups with good ball bearings like the Fascinating unit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
·MPH = OFFSET + (SCALE * COUNTS/TIME)
··················SCALE = 1.758· 'given on data sheet..donot know how derived
··················OFFSET = 2.121·· 'given on data sheet..donot know how derived
I accidently reversed the SCALE and the OFFSET numbers.
I should think that the·SCALE would be divided into the·COUNTS to take into account 2 rotating magnets, thus producing 2 pulses per rev?
Anyway, driving around looking like a storm chaser, I have come close to the indicated speed on the speedometer by dividing the counts per unit of time, first,·by 2 then using the above formula.· Does anyone have a further thoughts on this, or does anyone have one of these anemometers from Fascinating Electronics that they have used with a Stamp?· Again, I think the anemometer is well made, it is just a question of getting the numbers right.
Thanks again to all readers...
Deno
PS...Tracy, I did have all the components in place that you mentioned in your post, but had to remove the .1ufd, as it was causing a clicking sound in the speaker that I have hooked to a LM386 which inturn is connected to the stamp for a FREQOUT tone for a "high gust" alert.· I am assuming this was the discharging of the .1 getting back into the power supply?
Matt Parnell, who used to be very active on these fora, had a project he called the weatherstamp, using the Fascinating parts. He does not seem to be active in that area now, but his project and Stamp code are still to be found on the Wayback machine...
web.archive.org/web/20030208043443/http://www.weatherstamp.com/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Are these bounces without the .1ufd so short that the scope will not see them, but the stamp does.· Maybe I have asked and answered my own question, as the scope is set up to see a 50 msec pulse, and the bounch pulses are much faster??
Anyway, I think I am reasonably close on the windspeed now, using the formula that came with the data sheet...listed above.· Thanks for everyones expertise...
Deno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
I suspect, that the problem (a small problem) is being caused by one of two things:· Thru the 5 volt power supply (even though I have proper filtering on the 7805) or because I managed to run the anemometer trace and the LM386 input trace right next to each other on the PCB, not knowing this would happen.
Thanks again for the input....deno
·