Monday, October 27, 2014

Lathe: Arduino TouchDRO

Please read the complete article:
http://benchtopmachineshop.blogspot.com/2017/04/lathe-touchdro_12.html


After finding myself with an extra iGaging digital scale I decided to convert to the lathe to use the Arduino and Android powered TouchDRO. I had already installed an iGaging scale on the Z axis (see previous blog post) and adapted a cheap Chinese caliper to the cross slide. Going to an Arduino powered TouchDRO meant replacing the caliper with the iGaging scale.

The scale's read head needed 1.5mm machined off the cover's mating surface. A new bracket holding the scale needed to be made as well. While I was at it I added a second mounting screw for the read head to insure it won't wiggle on a direction reverse as the scale's guide wear.

New iGaging scale mounted to cross slide.

 Unlike the mill's Arduino, I constructed this one using a prototype board. It's much cleaner and easier and I highly recommend it, even though it added $8 to the build. I used standard USB A connectors for the scales' interface since both connectors and cables are much easier to find. This forced me to change the cables on both scales, but that didn't cost much. The tachometer's plug is also USB to avoid the issue I had using a 3.5mm headphone jack for the tach on the mill. Everything was mounted in an old Dell laptop power supply brick's case I had on hand. Neodymium magnets were glued to the case's top for mounting on the back of the lathe.

The tach, like the mill's, uses a Hall effect sensor since they're much easier to set up than an optical sensor and are just as accurate in this application. The lathe previously had a spindle extension installed, and for the tach's magnet I drilled a hole on the extension and used JB Weld to mount a small neodymium magnet in it. 

Spindle extension with magnet mounted.

The tach's sensor was mounted to the outside of the lathe's gear cover. I considered mounting on the inside but space would have been an issue and it works perfectly well on the outside. I covered the top of the sensor with epoxy putty to protect it and keep any swarf from shorting it out. If you look closely you can see I've bent the sensor itself up and away from the spindle; that's to provide a more optimal orientation to the magnet. The sensor's USB cable is run down the back of the lathe to the Arduino's case.

Hall effect sensor mounted on gear cover.

I'm using a HTC Incredible 2 phone as the Android device running the TouchDRO application. Since the lathe only has three readouts (X,Z, and tach) the phone is adequate. It's currently mounted to the top of the headstock using a bracket I fabricated. 



Mill: Arduino DRO Tachometer

Please read the complete article:
http://benchtopmachineshop.blogspot.com/2017/04/mill-touchdro.html



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: http://www.rysium.com/rysium.docs/