Using a hall effect sensor as Starliner suggested will be one way to interface with the wheel. Achim and Shutterdrone's suggestion to use a reed switch makes more sense though, given the supporting hardware a hall effect sensor requires to get a clean digital signal.
You might be able to pickup a magnet and sensor from a broken bicycle computer but if you can't, a local component store should have one of each in stock. The advantage of a recycled sensor and magnet is the you will already have the mounting hardware.
There is a page on the arduino wiki on ReadingRPM signals. To calculate the speed multiply the RPM value by the circumference of the wheel (2 * pi * radius [in meters]). The result will be in meters per minute.
Edit: I've notice that the linked code is for systems with two pulses per revolution. One magnet is sufficient for your task. Additionally, for a bicycle computer you'll probably want the result to be in KPH (or MPH if you live somewhere that still thinks that's civilised). I've made some (untested) mods to the code on the wiki to print out KPH and pasted them bellow.
volatile byte revolutions;
unsigned int rpmilli;
float speed;
unsigned long timeold;
void setup()
{
Serial.begin(9600);
attachInterrupt(0, rpm_fun, RISING);
revolutions = 0;
rpmilli = 0;
timeold = 0;
}
void loop()
{
if (revolutions >= 20) {
//Update RPM every 20 counts, increase this for better RPM resolution,
//decrease for faster update
// calculate the revolutions per milli(second)
**rpmilli = (millis() - timeold)/revolutions;** EDIT: it should be revolutions/(millis()-timeold)
timeold = millis();
**rpmcount = 0;** (EDIT: revolutions = 0;)
// WHEELCIRC = 2 * PI * radius (in meters)
// speed = rpmilli * WHEELCIRC * "milliseconds per hour" / "meters per kilometer"
// simplify the equation to reduce the number of floating point operations
// speed = rpmilli * WHEELCIRC * 3600000 / 1000
// speed = rpmilli * WHEELCIRC * 3600
speed = rpmilli * WHEELCIRC * 3600;
Serial.print("RPM:");
Serial.print(rpmilli * 60000,DEC);
Serial.print(" Speed:");
Serial.print(speed,DEC);
Serial.println(" kph");
}
}
void rpm_fun()
{
revolutions++;
}
Also, I've enabled 'community wiki' on this, which I think means other users can edit it. If my maths is wrong (and you can prove it!) jump in and fix it for me. :)
You might want to take a look at wide angle photodetectors.
For example, the OP993 has a viewing angle of 118 degrees and is fairly cheap.
If you look deeper on google and on online stores like mouse or digikey you might be able to find some with 180 degrees viewing angles.
This is just a guess, but I would avoid ultrasonic sensors since the vibration of the rotor/helicopter might be in that frequency range. Even if it is not, large non-ultrasonic vibrations could interfere with the sensor.
Best Answer
Many possible methods.
Zero position can provide a reset signal (microswitch or magnet and hall cell or reed) or ...
Cog teeth can be counted "there and back again". How depends on material.
If ferrous ("magnetic") they can use an inductive sensor and magnet or hall sensor and magnet or ...
Teeth of any material can be sensed optically.
Or capacitively in some cases.
Or sense inductive change in a coil in some cases.
Having two sensors offset by 1/2 a tooth pitch gives two quadrature signals which are 90 degrees out of phase so you can determine direction from pattern received. (See diagram and text below).
A stepper motor will allow turntable to be stepped N steps.
Count the steps - as long as no-slippage can be guaranteed.
Turntable can have coder tracks on inside rim or on under surface.
If this is a one off job or a small number the track(s) can be hand drawn with marker pen (and due care).
Wikipedia - rotary encoders
One track of 10101010... gives position change count.
The first diagram below shows radial marks of full radius length but they can be just a line of dark/light marks at the sensor location.
eg from this useful page
Two tracks offset 1/2 a mark (1/4 of a 1-0 cycle) allows direction and count and speed.
N tracks and sensors allows position determination to 1/N^2 of a revolution.
eg if you use 8 tracks and 8 optical sensors you can determine absolute psition to 1 part in 256 or 360/256 ~=1.5 degree steps.
The "obvious" method is a standard binary code.
Here the outer track provides 01010101 to give 8 positions around 360 degrees.
The next track in produces 00110011
The next 00001111
This gives standard binary code 000, 001, 010, 011, 100, 101, 110, 111, ...
HOWEVER, in places two bits change at once and sensor misalignment or noise can lead to false codes. eg at he boundary from 011 to 100
if the left hand bit changed early to give code 111 before the x11 bits changes to x00 then he codes sequence may appear to be 011, 111, 100 or in decimal 3, 7, 4.
Suitable software can deal with this, but an alternative and historical approach is to use codes that only alter 1 bit at any boundary. These are named Gray codes after Bell Labs scientist the late Frank Gray (1887 - 1969) who patented the concept in 1953.
The diagram below shows a 3 bit Gray coded disk in which only one bit changes at any boundary. The sequence here is (traversing anticlockwise, outer track = LSB):
000, 001, 011, 010, 110, 111, 101, 100, ...
or in decimal
0, 1, 3, 2, 6, 7, 5, 4, ...
And more ...