Pages: [1]   Go Down
Author Topic: Noisy Speed Sensor causes spurious interrupts  (Read 699 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley


Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: