Hello, I have made a basic anemometer ( wind speed ), mostly from parts salvaged from CD ROMs! There are 3 cups which rotate in the wind. To keep the inertia down, I used half ping-pong balls. Seems to work OK. To get the speed of the wind, I attached an optical disk from a mouse and used a basic photo-interrupter. The rotating cups therefore generate a stream of electrical pulses which I clean up with a comparator.
Initially I then used a mono-flop to produce fixed pulse-width pulses such that the faster the thing went the more of these fixed-width pulses there would be in a second. These pulses drove a moving-coil meter which integrated them. I calibrated the thing by mounting it on the roof of the car!
Now, I want to move on. I have a '328 ( with bootloader) in a standalone arragement ( I program it and get data via a MAX232 ). But how to deal with the output from the 393 comparator? I tried various schemes, none of which worked ) Finally I got some readings from the pulseIn() command. In general, the HIGH period is slightly shorter than the LOW period, but it does vary a lot, which puzzles me. Sometimes the LOW is shorter than the HIGH. If the wind is moderate I get a TOTAL period of, maybe, 10 to 20 msec; sort of the figure I would expect. Occasionally, I get readings of around 2-5 usec which is baloney. It would take Hurricane Sandy to do that.
All I can think is that the wind had dropped to zero and the thing has stopped ( it does that a lot ). But, surely the reading should be zero due to the 'timeout' feature? Is there a better way of doing this?