Go Down

Topic: hall effect sensor as a rpm mesauerment device (Read 20651 times) previous topic - next topic


Thanks for the quick response.  I'm pretty sure the sketch is being sent.  I have the NG board so i've been pressing reset then sending the sketch to it.  I added  Serial.println("this is high"); to the statement to see if it was going through the loop properly and it does not print out....am i missing something?

Thanks in advance,



Are you seeing any serial output? Have you tried the  ASCIITable serial example to verify that download is working and you can see serial data from the arduino?

If that works then try adding code to the ASCIITable sketch to read your inPin and output something indicating the state. (Don't forget to set inPin to input).

If that doesn't work then recheck your switch, resistor and wiring. A voltmeter is a big help for projects that involve external components. It's worth getting if you don't have one.


Oh, this topic is interesting...


So you're listening to the RPM from a hall effect sensor, but you also want to ouput info to a serial LCD or save info to a USB thumb drive (serial) or send information via wireless (probably serial) to some other device (another arduino?) and you want to listen, or at least post for button inputs because you have a few user inputs... yeah how?  How many things can you have interrupts for?

Could you make a simple device to take in the hall effect reading and output an analog signal based on that reading?  say at like 1hz reading every second (really slow RPM) vout = 0v and your limit of 100hz vout=5v.  You're going to have your "speedometer"

Then Arduino wouldn't really have to listen,but rather post for it.  Assuming you don't have any really long loops, you'd probably pick up the vout at least every 100hz...  It'd be like a rolling average, but it couldn't ever be too far behind, at least as far as mechanical things go...  The problem with hall effect sensors is that they can't really read 0rpm, it has to be assumed.

That's still something I'm having trouble getting my head around as a mechanical guy playing with electrical stuff... 16Mhz is extremely fast for me, 16million operations every second?  wow... hard to believe you couldn't pick up something running at 100hz, the issue of course is not if you can pick it up or not, but if you miss the signal, like the hall effect sensor trips when you're not posting for it so you only pick up say 99hz when it's really 100...  how much of a difference does it make in the end?

In reality, if you wanted Arduino to collect a lot of data, just how limited are you?

Yeah I'm just sort of thinking out loud, this is something I see myself running into within the next year...


Post you code. There are several ways to kill a serial print response.


hi all,
this is my first post so go easy on me ;-)

regarding this sample code at the following link...

can anybody tell me why the last line of the below function says "that each rotation, this interrupt function runs twice"
i am a noobe and it is not readily obvious

Code: [Select]
void rpm_fun()
  //Each rotation, this interrupt function is run twice


Go Up