Go Down

Topic: Noisy Speed Sensor causes spurious interrupts (Read 999 times) previous topic - next topic


Hi Guys,

Figured I would go seek your wisdom on this one as im a noob with electronics and im finding I am not sure what terms to even google for.

Im building a motorbike computer (thinking in the direction of BMW iDrive etc) that would be running off something like a O2 Joggler. The Arduino would be providing the information stream from various sensors on the bike.

Anyway to the point. The motorcycle's main speed sensor is a seemingly a hall sensor that triggers every 90 degrees of wheel rotation producing a rising edge square wave. However its slightly noisy so when I put in some sample interrupt code to show me the arduino recognising it, I get 8 pulses per 360 degree instead of just 4.

Looking at it on the arduinoscope output, its going high and then going slightly higher possibly giving me my spurious interrupts.

Being the noob I am, im unsure as how I can resolve this one. Is there a way I can clean or smooth the signal or maybe set a trigger level on these interrupts?

Thanks guys and gals  :)


Are you sure you don't have your interrupts configured to sense both edges (rising and falling)? That would very nicely explain the double-than-expected rate.

Going high and slightly higher doesn't really sound like the root cause to me.

The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Go Up