Hi all,
I am using Mh 281, uni polar hall effect sensor, which switches on in the presence of magnet and switches off in the absence of magnet, and I am using the code
volatile byte half_revolutions;
unsigned int rpm;
unsigned long timeold;
void setup()
{
Serial.begin(9600);
attachInterrupt(0, rpm_fun, RISING);
half_revolutions = 0;
rpm = 0;
timeold = 0;
}
void loop()
{
if (half_revolutions >= 20) {
//Update RPM every 20 counts, increase this for better RPM resolution,
//decrease for faster update
rpm = 30*1000/(millis() - timeold)*half_revolutions;
timeold = millis();
half_revolutions = 0;
Serial.println(rpm,DEC);
}
}
void rpm_fun()
{
half_revolutions++;
//Each rotation, this interrupt function is run twice
}
//------------------------------
, I got this code from arduino playground, and my doubt is, what is the maximum rpm which can be detected using this hall effect I tried reading datasheet but in vain,
i.e. how many pulses can hall effect detect per second? I am using this for the measurement of crank shaft of two wheeler..