I'm trying to build a POV clock (also known as an HD clock because scavenged hard drives can be used to build them).
The first stage of my project is to build a working RPM sensor for the arduino.
I'm using a home made IR bream break sensor and Instead of a hard drive, I'm using a CD drive motor and a CD with a notch cut in one side. Whenever the notch passes between the IR emitter and detector, the IR lights shines through, onto the detector, producing a voltage that triggers and interrupt on the Arduino.
I'm following these two tutorials :
http://playground.arduino.cc/Main/ReadingRPM
I'm using the same circuit as the one in the first link. The authors of the tutorials seem to have been successful but I've run into a problem. Whenever the notch passes through the detector assembly, it triggers multiple (about 20) interrupts instead of just one.
What can I do to fix this?
Hi,
May be that the signal coming from the sensor is not clean? (I'm having a similar problem with an encoder: I guess it has to do with 'noise' -see in google 'electrical noise' - images-).
If the 'edges' of the signal are not clean the arduino 'sees' several 'RISING' (or 'FALLING') interrupts every turn.
(By the way: what is a POV clock?)
Regards
Thanks for the suggestion..
Do you think I can use something like a voltage comparator to "clean up" the signal? I found a Voltage comparator lying around.. 
(BTW: POV stands for persistence of vision.. here's a demo. http://www.instructables.com/id/Hard-Drive-Persistence-of-Vision-HDPOV/)
Hi,
A question: I can see that the POV effect is something similar to an stroboscopic effect (is it?). Such a case: I've understood that you use the CD with the notch as a clock signal for the arduino. Is that the case or the CD you are using is the CD that makes the POV?.
In any case: you are using the signal coming from the notch as an interrupt to do something, so you have to solve the problem . . .
Comparator (use of): of course, it depends on the signal you get form the CD/notch system. In general terms, YOU CAN eliminate the noise problem by means of a comparator; sometimes a simple RC (resistor - capacitor) circuit will do . . I need to know 1) what is the speed of the CD (rpm)? and 2) what is the width of the notch?
I adjoint an image to illustrate the effect of the noise (why it generates a number of interrupts) an another one whith a standard comparator circuit (just to make sure we are talking about the same thing).
Regards


Thanks for your reply. 
In reply to your question, the POV effect is similar but not the same (I think) as the stroboscopic effect. It works because the human eye sees very high frequency pulses of light as a single continuous light. (This mechanism is used by old CRT monitors and TVs where the screen draws one line at a time)
The CD generates the POV effect.. it's primary purpose is not to generate a clock signal. However, the LEDs lighting the disk have to be turned on an off at specific times, which depend on the RPM. That's why it's important to accurately trigger interrupts.
The notch is about 1 - 2 mm (the width of a normal hack saw blade since that's what I used to cut it.
)
Unfortunately, I don't know the exact RPM of the motor. It's a normal DVD drive motor and I'm powering it off of a 3.3V supply.
I tried using a voltage comparator (just like the one in your images.. it's an LM339) and that certainly does reduce the magnitude of the problem. (less interrupts generated) but it does still generate multiple interrupts for each passage of the notch through the detector.
How does an RC circuit work? Would that be useful here?
Hi,
A RC filter is formed by just a resistor and a capacitor. It removes the higher frecuencies while leaving the bass ones to pass: maybe it will help in your case, but I'm pretty much sure it's not going to solve it completely (there will remain several shoots every pass).
As I understand the (laser?) light passing trough the notch hits a sensor that generates the electrical impulse. OK: try liming (polish) the edges of the notch as the laser could refract on them and generate "secondary" beams (maybe painting the CD black will help too; I know that this maybe incompatible with your project but, by the moment, I would concentrate on solving the interrupt multitriggering problem).
If the problem persists you have to ask for somebody to analize the output of the sensor with an oscilloscope.
The good new is that the output circuit (form the sensor to the arduino) is (or, at least, could be) electrically isolated from the CD motor circuit, for it is optilcally coupled.
Regards.
The light I'm using an an infrared LED.
I'll try your suggestions abut darkening the CD. I wonder how the guys who made those tutorials did it.
Would using a hall effect sensor instead of an IR sensor solve this problem?