Because i’m a glutten for punishment, or simply because i like doodads, and lights and blinkie bits…
I made this board… It fits the 52mm spindle, and has mounting holes that match those of the spindle.
X-Carve (Because Photoresist is too boring!)
Eagle, or other board design software capable of producing GCode for milling traces, and drilling holes.
1x Arduino Nano V3 (I personally like the CH304 version over the FTDI, but that requires a seperate driver)
1x 20x4 LCD with I2C Backpack (Explained later)
1x A3144 Allegro Hall Effect Sensor
1x 10kΩ resistor
1x 0.47µf @50v Capacitor
1x PCB Drill
1x PCB Trace Mill (i used a 10º bit)
1x PCB end mill (I used 1/8" 2 flute end mill)
1x 10mm x 10mm x 2.5mm / 5mm
High Strength Epoxy
Using a hall effect sensor, and a neodymium magnet, accurately calculate Spindle RPM’s and display them on an LCD in a pretty way (Because who doesn’t like shinnies!!)
Pin 1 of the A3144 is 5v DC VCC
Pin 2 of the A3144 is GND
Pin 3 of the A3144 is Signal
We use the capacitor to decouple the power, to remove unwanted distortion or oscillations in the circuit because we have a common power supply powering both the GRBL arduino, as well as an arduino nano for this circuit
The 10kΩ resistor is connected across the signal, and the 5v line as a precaution. These devices are designed to sink current, and output current. So a pull up resistor is required (1k - 100k is typical)
and finally, we need a way to connect this confounded thing, so we’ve added a 3pin 90º header. [not shown] (because we don’t want the header pointing straight up at the spindle now do we?)
So now we need to design the actual production board so it fits our spindle, and functions like our prototype…
You’ll notice that the Capacitor is closer to the header, and the resistor is closer to the hall effect sensor… This was done to ensure that the resistor and the rest of the circuit are able to receive the required VCC, while shunting the decoupling feature off to the side of the circuit… (i did this just so i could use the word “shunt” in this post… srsly… i know… i need a hobby… oh wait… )
Now it’s time to mill, drill, and carve some stuff up…
Now we need to make sure a couple of things are correctly positioned…
You’ll notice that the capacitor pad has a normal pad, and a square pad… The square pad is for (-) voltage, so make sure the capacitor is oriented correctly (Most electrolytic capacitors have a stripe going down one side, this is usually the (-) pole. )
(Edit: The square pad is for normally for +5v DC, in these images, i have this traced incorrectly, that is why i’ve instructed you to reverse the capacitor. the updated, and fixed version of the board is in post 2)
The Hall effect sensor must also face the correct way… the chip has a beveled side, and a flat side… the beveled side is what faces towards the center.
Now solder things with heat, flux, and solder, and try not to bridge any traces with errant twitches and unsteady hands… (I probably shouldn’t have drank that 4th pot of coffee… )
All done? Didn’t burn yourself did you? GREAT!!
Now to wire things up…
Due to pin limitations on the Arduino Nano… We need our LCD to have the I2C interface… Most don’t have it natively, but some do, if you can find one, great!, if not, shmeeebay is a good place to find the LCD’s and I2C modules… We’ll not cover this here, as it’s been discussed ad nauseum on a plethora of arduino based forums.
Connect the I2C VCC to the nano’s 5v Pin, and the GND to the nano’s ground.
Connect the I2C SDA To the Nano’s A4 pin
Connect the I2C SCL To the Nano’s A5 pin
Connect the Tach VCC Pin to the Nano’s ICSP pin 2 (ICSP is the 3x2 pin header on opposite end of the USB)
Connect the Tach GND Pin to the Nano’s ICSP pin 6
Connect the Tach Signal Pin to the Nano’s D2 pin
We’re all done connecting wires, now it’s time to program this beast
Here’s the Sketch i used, if you’re using a different LCD, or signal pin, you’ll have to edit the code:
Hall_RPM_2.ino (2.1 KB)
Basically… it does things…
The sketch uses all 4 lines, edit as desired, bake for 35 - 45 minutes at 1850º…erm… wait…
I2C Address is located in line 19, make sure to use the proper address or it will just stare at you blankly…
Hall pin is set to 2 witch means Nano’s D2 pin… it can be edited on line 21 of the sketch
LCD Line 1 is filled with branding info i.e. Raul’s RPM Readout, it can be edited on line 78 of the sketch
LCD Line 2 Simply says “Spindle Speed” It can be edited on line 80
LCD Line 3 will have “RPM:” followed by the calculated RPMS, Lines 84 and 86 respectively
LCD Line 4 is basically just a “progress bar” the faster your RPM’s the more the bar fills up! (MOAR BARS!!!)
It basically counts how many times the magnet passes the sensor in an alotted amount of time, does some math wizzardry, and spits out an averaged RPM on line 3 of the LCD
Once you’ve got it all programmed, and wired up, test it out with your magnet… If all is good, you can go ahead and epoxy your magnet to your spindle shaft (be sure it doesn’t get in the way of actually using your spindle)
When mounting this to your spindle, be sure to use a plastic / non-conductive material as a stand-offs so that the screws or spindle housing doesn’t inadvertently bridge the traces on the back side… Also, you want to make sure the hall sensor gets as close as possible to the magnet, without touching it. if you left enough of the leads above the board, you can bend them to bring the sensor closer to the magnet.
And finally, my Eagle Files… Please feel free to improve upon it, just please keep my name, and URL in place, you can update the board version as well.
(I already have plans to add high powered LED’s because you know… it’s nice to see the cuts without shadows being a nuisance)
Spindle Tachometer.zip (86.5 KB) (Removed, see 2nd post for updated version)
Hope you’ve enjoyed this project, and please let me know if’ you’ve built one yourself, or improved / added features to the design…
Proof of concept
(Not sure how to embed youtube videos into posts here, hopefully a mod can send me a link, or instructions on how to do it)