Sunday, August 21, 2011

Tachometer Project is Complete! (kinda)

Since my last posting, a lot has happened.  I received the new tachometer board, populated it, programmed it, and then tested it.  Below is an image of the testing set-up.

Prototyped Tach Board in Test
In the image above, you can see the oscilloscope to the left which is hooked up to the photogate signal.  I have a motor spinning an incremental encoder wheel (a disk with slots on it) from an old ball mouse.  You can also see the RPM is being displayed on the serial display.

The current code works by counting the number of 'highs' within 250 ms (1/4 sec) and doing some simple math to compute the RPM.  Although the code is working and I can call this one 'completed', I'm not too happy with the accuracy.  It is slightly inaccurate because of the method I used (as described above).  The more accurate method involves measuring the time between 'highs' (or teeth in my case).  That way there are no rounding errors.

The current method rounds down, so if the chip has counted 55 highs and is 95% to the next high, just as the time ticks to 250ms, it only sees 55.  So the extra 0.95 high is not counted.  If your gear has very few teeth, the time between teeth increases and your error becomes bigger.  The high to high counting does not have this issue.

This whole project started off by wanted to provide an RPM measurement for my dad's Mini-Mill from Grizzly.com (the G0463).  Finally, the project is at a phase where we can integrate it to the machine and I can update the program later (if I get the energy).

The images below show the mini-mill's gears which I plan on hooking my magnetic tooth sensor too.

G0463 Mini-Mill with gear cover removed
Below are the spindle and drive gears with the number of teeth marked on each.  I will obviously need the number of teeth per revolution to program into the chip.  It was not obvious to me, at lease not right away, that after you know the number of teeth per revolution, it does not matter which gear, big or small, you place the sensor next too.  Ponder it... you'll figure it out. (it's not like belts and pulleys). 

G0463 Mini-Mill Spindle and drive gears
And next I had planned to include an image of the populated board and all of the external parts (display, tooth sensor, and battery clip), but apparently I forgot to take a picture before handing the assembly over to my dad.... well, you'll have to wait.

No comments:

Post a Comment