DIY hand held Hall Effect tach with Arduino

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Lloyd-ss

Well-Known Member
HMEM Supporting Member
Joined
Mar 8, 2019
Messages
856
Reaction score
731
Location
Charlottesville, VA
(EDIT) More Details and Video added in post #2
ArduinoHallTach.jpg
Coming

Just finished is this NJK-5002C Hall Effect/Arduino tachometer. Details coming shortly. It works like a charm. Just tape a magnet to a rotating object, press the button on the side of the tach and it displays the rpm.


BUT, as happens sometimes when working too late at night on a project, I crammed the project between 2 pieces of 13mm bamboo flooring with a cavity neatly milled out. I knew the project was working so I glued the 2 halves together. Perfect!
No.
I had calibrated the tach with a hand drill, but now, checking a 1725rpm bench grinder the tach reads 1938rpm instead of 1725. Fixing that is just a number change in the little Arduino code. Only problem is I can't get to the USB connector on the Arduino!!! Oh well, I will pop the 2 halves apart and carefully calibrate it. Embarrassing.
Lloyd
 
Last edited:
I am curious on how you programmed the Arduino.
Hi Timo, You might be sorry you asked because I could talk about this all day, LOL. Also, I don't know what your experience with small electronics projects or micro processors (like the Arduino and Raspberry Pi) is, so I will just give the basics for you and anyone else who might be curious.

The Arduino is basically a stripped down computer with no display, keyboard, power, etc, but with the capability to interface with and control a multitude of devices.
The picture shows all that is needed to get started.
First is any laptop. You download all the free programming software and examples that you need from the Arduino website onto the laptop.
Next is an Arduino micro processor (computer, cheap) that comes in a mind boggling variety of capabilities and prices.
Last is a USB cable to connect the Arduino to the laptop. This provides the communication and power to the Arduino.

The programming is all done on the laptop. The software (the Arduino IDE) that you download to the laptop has built in example programs that you can upload to the Arduino. For example, the Arduino has a couple of LEDs on it that you can program to blink, etc, without needing any other materials. There is a button (virtual button) in the IDE that you press to upload the program to the Arduino. If it works, great, if it doesn't, you modify the program and upload it again until it works. Once the program is in the Arduino, the Arduino is a stand-alone computer (you have to hook 5 volts to it, though). You can also overwrite the program to make the arduino do something else. The Arduino can also send messages back to the laptop display if you program it to do so.

Now this is where the real capability comes into play. For my project, I needed a Hall Effect sensor to sense the rotating magnet. I also needed a little LCD display to show the rpm. Within the arduino IDE there are examples of code for both of those devices. You literally cut and past the appropriate pieces of code into the new program (they call it a sketch) that you are writing. Then you upload it to the Arduino and it works like magic. Ha Ha. Just joking. It will BECOME easy, but the first projects will be frustrating because they won't work and it might be just a misplaced comma. But you try it, then fix it, then try again, until it works. There is a very active on-line forum with helpful people to get you through the initial problems.

I could go on and on, but please let me know if I am being helpful with my answer for you.
Lloyd

ArduinoSetUp.jpg
 
Nicely done! I enjoy using the Arduino platform - very versatile, and inexpensive for a nano clone. I'm guessing you don't have more than about $5 in that project, unless the sensor is very expensive. And of course, $5000 of programming time, but hey, who's counting that, right? At least, I never mention that part to my wife when I am telling her how little I spent on my latest project ... :)

At the risk of "barging in" on this thread, but in case it is of interest: Lately I've been using an AT-Tiny84 for projects like this, and recently I worked up a design in KiCAD and ordered a PCB that allows an AT-Tiny84, rotary input, and 2-line LCD to be soldered directly to the board, making for a compact device that can do input and output while still having 7 pins available for whatever it needs to control or sense. With a slight modification to the board, it can also connect to a 4-line LCD display. I'm still testing the first unit that I soldered up - so far it seems to be working well with the first test program involving a simple PWM output, but I have not yet verified that all of the available GPIO pins are working as intended. If anyone is interested, I'm happy to post additional details ... and again, apologies for any distraction from the OP.
 
Nicely done! I enjoy using the Arduino platform - very versatile, and inexpensive for a nano clone. I'm guessing you don't have more than about $5 in that project, unless the sensor is very expensive. And of course, $5000 of programming time, but hey, who's counting that, right? At least, I never mention that part to my wife when I am telling her how little I spent on my latest project ... :)

At the risk of "barging in" on this thread, but in case it is of interest: Lately I've been using an AT-Tiny84 for projects like this, and recently I worked up a design in KiCAD and ordered a PCB that allows an AT-Tiny84, rotary input, and 2-line LCD to be soldered directly to the board, making for a compact device that can do input and output while still having 7 pins available for whatever it needs to control or sense. With a slight modification to the board, it can also connect to a 4-line LCD display. I'm still testing the first unit that I soldered up - so far it seems to be working well with the first test program involving a simple PWM output, but I have not yet verified that all of the available GPIO pins are working as intended. If anyone is interested, I'm happy to post additional details ... and again, apologies for any distraction from the OP.
Andy, no problem at all mentioning the AT-Tiny84. There are so many micro processors available now that making a choice on what to start with can be intimidating for someone new to the game. I just stumbled onto the Nano at an Amazon "Bin" store where they sell all of the Amazon returned items. I happened to see 3 of the little Arduino Nanos in an envelope and it was a $5 day, so the three cost me $5 total. and I think the Hall was from ebay 3 for $10. And the display was something I bought years ago. And if it left over from a previous project, it is free, right?

I started with a Parallax Stamp micro processor 15 years ago. Then dropped it for years. And then picked back up with the more capable Arduino a few years ago. They are an intimidating mystery if you've never messed with one, but once you are over the learning curve, it is a lot easier. Getting into the hobby can be very cheap, maybe with a project kit package with a bunch of cook book projects in it. Once the light bulb goes on it becomes pretty exciting.
Lloyd
 
Agreed! And once one has mastered the basic Arduino and related microcontrollers, one can use the same Arduino infrastructure with an STM32 or other 32-bit ARM processor, or an ESP32 or ESP8266 processor. All kinds of possibilities! :)
 
Hi there Lloyd-ss
Would you be willing to share the code by any luck? I’d also like to make one. Not a specific reason for one right this moment but seems like a nice little arduino project. No worries if not, thank you!

Chris

(this isn’t my first post. I joined many years ago as craynerd but can’t access my account!)
 

Latest posts

Back
Top