optical rotary encoder

Hi,

Sorry if I write under wrong topic, but, is there anyone who can help me with some hints about the following?

I want to measure wind/water speed/flow and I'm trying to build a flowmeter using some optical IR components from an old mouse. I think one for TX and one for RX. I also took the toothed wheel that interpose it's "teeth" between these two IR's, and by rotating creates, I think, something like ON/OFF signal.

Now is it possible to take this On/Off signal and transform it into, I don't know, speed or something like this?

Any hints, links, advices are more than welcome.

Many thanks in advance. BR, CC

Hi Richard,

Thanks for the reply. In fact I've already mounted the toothed wheel and IR devices, now I need some hints on how to code the idea :) I'll try to think what you've already told in your post. In the mean time I'm waiting replies with related projects or links to devices already manufactured, 'cause it's very possible that I'm trying to reinvent the wheel with this ....

BR, CC

now I need some hints on how to code the idea

There are two ways of measuring speed from this sor of input:- 1) Count the number of pulses in a set time. 2) Measure the time between two individual pulses and work out the speed from that.

For rapid movement method 1 is the best, method 2 is the best for slower movement.