Monday, June 17, 2013

Mill: Android DRO

Please read the complete article:

First off, all credit to Yuriy Krushelnytskiy of

While poking around the internet for information on the X2 mill, I stumbled on Yuriy's blog. What really intrigued me was his DRO application for the Android:

He was using iGaging digital scales, which most X2 owners end up using when installing DROs, connected to an Arduino, which interfaced with an Android via Bluetooth. The DRO app he wrote took the input from the digital scales and displayed it in a nice interface. Just that alone had my attention since the included iGaging remote LCD displays were a little hard to see. However, since all the work is being done in software, it'll be easy to add new features to the DRO in the future. Additionally, since it's open source, you can always add a must have feature yourself. Now that Androids have gotten cheap enough and powerful enough, it makes a lot of sense to do in software what traditional DROs did in hardware. Doing it in software is just much cheaper and much more flexible.

The app is already available in Google Play Store.

Since I had my old HTC Incredible 2 Android phone sitting around I decided to use that instead of a tablet. However, Android DRO needs at least Android v.3 to run, so I needed to root the phone and load a newer Android version. Additionally, once you have Android DRO loaded, if you're using a 4" screen or smaller you'll lose the buttons on the right. To fix this the app needs to be recompiled using Eclipse, which is included in the free Android SDK. You'll need to download the source code and import the project into Eclipse, fix the broken link in the build path, add "Android 4.2.2" and "Android Private Libraries" to your build path, and then drill down to res>values>dimens.xml and change font_lcd from 100dp to 85dp. Then go to "Android Tools" and save it as a signed APK. Go through the wizard, and then use ADB to install the APK file.

I also wanted to reduce the digits displayed. Currently the app shows 0.0001" and 0.001mm, which is greater than the resolution of my iGaging scales, therefore it just clutters the screen with unusable information. Plus, good luck getting 0.0001" precision out of a mini mill. To change it I went to res>values>strings.xml and changed inch_mask to "88.888", inch_format to "00.000", mm_mask to "888.88", and mm_format to "000.00". Since I removed a digit, I was able to cheat the font bigger again, and set font_lcd to 95dp. I again saved it as a signed APK and installed it on the phone.

For the Arduino I bought the Leonardo model which comes without headers, since I like soldered connections. HOWEVER, I learned the hard way the app does NOT like the Leonardo. The app would connect, and then immediately lose connection. Once I switched from the Leonardo to the Uno R3 everything started working beautifully. The Uno R3 comes with headers, so I needed to cut them off and de-solder the pins so I could solder the leads in place.

Uno R3 with the headers and pins removed.

The iGaging scales connect to the remote readouts via mini B USB connectors. I couldn't for the life of me find a cable with a female mini B USB connection on it, so I settled for adaptors instead. I opened up the end opposite from the mini USB and soldered my leads directly to the pins. Once everything was soldered and tested I covered all the connections with epoxy.

Demo moving the X and Y axis

I bought a small project box from Radio Shack, and aside from the very annoying issue with the Leonardo, the hardest part was installing everything inside the box.

No comments:

Post a Comment