Arduino based Tachometer

Re: Arduino based Tachometer - Incomplete Script?

Your script file(TachSimple2.ino) appears to end after the switch debounce code (at line 97) - no interrupt management, call to rpm_fun, or LCD output. Is there a page or two missing from loop()?
 
Re: Arduino based Tachometer - Incomplete Script?

Your script file(TachSimple2.ino) appears to end after the switch debounce code (at line 97) - no interrupt management, call to rpm_fun, or LCD output. Is there a page or two missing from loop()?

The rpm_fun function contains the calls to lcd. At line 54 is the code to connect rpm_fun to the appropriate signal/interrrupt.

Code looks complete to me.

Gerrit
 
Re: Arduino based Tachometer - Incomplete Script?

Your script file(TachSimple2.ino) appears to end after the switch debounce code (at line 97) - no interrupt management, call to rpm_fun, or LCD output. Is there a page or two missing from loop()?

Gerrit has pointed out that rpm_fun[ction] performs the LCD output.

The call to this function is initialized by attachInterrupt(0, rpm_fun, FALLING); is the Setup() function.

It might be an improvement to move the LCD functions out of the rpm_fun interrupt handling routine but I've been using the sketch as is since I posted it and haven't seen a need to do this.


In using this tach for six months or so, I have found that the relationship between the magnet and the Hall Effect Sensor is more sensitive than I'd like. I had hoped that I could put a magnet on the chuck or spindle or wherever and then position the sensor while holding it in my hand. This method gives inconsistent results. Or maybe, consistently bad results. I now put the Hall Effect sensor in the vise and then carefully position it near the magnet. I have tried a couple of different style magnets but haven't gotten around this positional sensitivity. Once the positioning is set, the tach gives consistent results and meets my needs.
 
Re: Arduino based Tachometer - Incomplete Script?

Gerrit and Arlo - thank you for the feedback. I was misunderstanding the code. I'll be interested to see if I experience the geometry sensitivity that Arlo reports.
 
Re: Arduino based Tachometer - Incomplete Script?

Gerrit and Arlo - thank you for the feedback. I was misunderstanding the code. I'll be interested to see if I experience the geometry sensitivity that Arlo reports.

If you don't have experience with the Arduino IDE [Integrated Development Environment], the programs can seem a little odd at first. The use of Loop() and Setup() and the lack of Main() are not what C programmers expect to see.

I'd appreciate your comments and, especially, criticisms. I'm sure the tach can be improved.

If you have software problems I'd be glad to help.
 
We shoudl have an electronics or embebded section to post usful stuff like this in :) nice case.

Stuart
 
Back
Top