Monday, October 27, 2014

Mill: Arduino DRO Tachometer

Please read the complete article:

The Arduino sketch for the Android TouchDRO has supported a tachometer for a while now. In fact, it supports two tachometers so TouchDRO can tell which way the spindle is turning. Between not realizing it had this capability and reluctance to try and build an optical sensor had delayed this project for a while.

At first I had tried using a prepackaged optical sensor for Arduino (available on Amazon), but switched to a Hall effect magnetic sensor since they're easier to use and for this application tend to be just as accurate. I was able to buy them already mounted on a psb with a LS393 comparator. The comparator allows you to have an essentially digital signal with it either on or off. 

I already have a belt drive installed, so I drilled two holes at opposite ends of the top pulley and JB Welded in small neodymium magnets. 

Magnets on the pulley. The black sections were for the optical sensor.

The top of the Hall effect sensor psb was covered with epoxy putty to protect it from swarf. Then it was attached to the pulley cover using foam tape and a mounting screw. The sensor itself hangs over the back of the cover and directly over the path of the magnets.

The Hall effect sensor covered with epoxy putty and mounted on the pulley cover.

I added a 3.5mm stereo headphone jack to the Arduino's case for the tachometer interface. If I get around to repackaging the Arduino I'll change it to another interface since the 3.5mm jack will short power to ground as the connector is inserted or removed, so you need to power down the Arduino before doing so. It's not a show stopper, but it is annoying. I've hot glued the connector so it can't accidentally pull out while in use.

Be sure to add a 10K pull down resistor to the sensor output.

There were issues with TouchDRO reading 20-40 times too low on the tachometer. After some time spent on the TouchDRO Google+ development forum I changed the Arduino sketch to one being developed by Ryszhard and the tach immediately started working. I checked its readings against my laser tachometer and they match to within 20 RPM. 

 Ryszhard's sketch:

No comments:

Post a Comment