Some Ideas for the DIY DRO Project

Thursday, January 12, 2012
I bought my mini mill in January of the last year, and it didn't take long to realize that 16TPI lead screws with their silly 0.0625” per revolution were, to say the least, suboptimal. In other words dialing anything that involved more than one revolutions sucked really bad.
After some spelunking on the forums I was set on getting a DRO, but my puny toy budged wouldn't bear anything more than a Shumatech DIY DRO kit with a set chinese calipers. These kits are great value for the money, and with their new DRO-550 design running OpenDRO software they are simply a "cant's meow", but at that time Shumatech didn't have any in stock. Luckily one of the GrizHFmill goup members pointed me to Grizzly T23012 12" Digital Scale with Remote Readout scales. These work the same way as digital calipers, but have a remote display with a magnetic base (and are much easier to mount). Without a DRO box I ended up with a passable solution for a bit over $110 and that would be the end of it, but... Last month I started making a power feed for the mill and an idea crossed my mind: “why don't I make me a DRO/controller that can control my power feed...”. Basically I'm talking about a DRO with an integrated stepper motor drivers that can move the table to a set position etc, or in other words, have a rudimentary DIY CNC. At this point I don't have a definitive set of features, but as a minimum I'd like to have:
  • three axis position display (duh)
  • standard DRO functions, such as hole circle, center of the hole etc.
  • ability to enter a set of coordinates and a way to go to one coordinate at a time or run continuously ability to enter tool offsets/heights, feeds etc.

Optionally, I'd also like to have:
  • a rudimentary G-code interpreter
  • some way to upload the G-code into the controller (via serial port, LAN or SD card)
  • a way to record macros, i.e. “repeat what I just did”
  • spindle speed controller and an output for a fourth axis (rotary table)

I imagine as I start working on the actual implementation things will change, but this is a good starting point.


  1. How is that T23012 working out for you? I am looking to get one

    1. ZipSnipe,
      They work "good enough", I guess. You will likely need to shield the cables and figure a way to keep as much of the chips out. Other than that the scales are fast and accurate. In fact I just started installing a 35" version on my "new" lathe this week.
      If I win a lottery, I will definitely switch to glass scales, but for the money these are plenty good for all but aerospace work.

      Thank you

  2. Uploading G-Code into a DRO controller... I'm not sure I follow the logic of this particular requirement? Like, have a Play button on the DRO which will tell you how far to turn the handles until the operation is complete? I'm just trying to picture this in practical terms: by the time you write the code, you might as well just get up there and whip up the part - that's the beauty of the manual machine (if there ever was such a thing) that you can jump right in and adapt as you go (by looking at your DRO and your drawings). If you start thinking in terms of G-Code, you might as well be looking at getting it converted to "full" CNC.

    The LED DRO display turned out very nice, BTW!

  3. First of all, thank you.
    Well, here is why importing G-Code is useful for me: I often make one-of circuit boards at home. Etching is pretty easy, but on any non-trivial design geting the component holes to line is a bit frustrating.
    Most PCB design software output Gerber files, which are a form of G-Code. Drill files are a bit different format, but the parse would be pretty similar. This way I can make the firs prototype at home (before spending $$$ on professional fab).
    Basically the DRO will not replace a CNC conversion, but G-Code can be uses as one of the "workspace" import formats. It won't be a full set of commands (i.e you can't really make curves unless you are awesomely good), but a small sub set might be useable.
    As I stated, though, those are just "ideas". They might be completely silly...

    Thank you

    1. I think I understand where you're coming from and perhaps my confusion comes from not knowing details of the design of your DRO. But it looks like a simple MCU like Arduino's Atmega would be pretty busy processing all the interrupts from the scales (and adding the spindle RPMs is a great idea but that would require responding to even more very fast events). Properly parsing G-Code does not sound like a good task for a 8-bit MCU either. They are not all that good at text processing, and the missing hardware floating point is going to really ruin all the fun.

      Besides, I have a feeling that you cannot just go for a simplified set of codes - what if the code has tool offsets, tool changes (and travel to pick the new tool up) and all the other good stuff that influences the trajectory - in order to be sure that you know exactly where you need to be, I have a feeling you would need to be able to parse most of the commands.

      I guess you could up the processing speed by going for Raspbery Pi or simply a full blown PC, but then, again, you might as well just install EMC2 (LinuxCNC) on it and go full CNC.

      One other thought on this - drilling component holes in particular is one of those tasks that is just begging to be automated with CNC. There's just too darn many of them on a board usually to be done by hand - too much chance to mess it up, even with a great easily readable DRO like yours.

      Sorry, didn't mean to discourage you from creating the best DRO setup the world has even seen - if you feel good about it, by all means go for it! Besides, some of what I say, again, comes from me not knowing your hardware too well - I have browsed through a few pages about the project but choked on this G-Code import thing :)

      Once again, great job!

    2. Well, you are right, 8 bit Atmega won't be able to pull it off. The code used for iGaging scales doesn't use any interrupts: it's a ginal loop basically. Reading three standard calipers (that have to use interrupts, since the calipers provide serial master clock is basically maxing out the Arduino (even with heavily "hacked" code).
      This is mostly why I went with a split architecture, where the MCU does only the reading and an Android tablet (with gobs of processing power) does the heavy lifting. With G-Code it would be an one-pass deal: process the code, create a bunch of points and add them to a workspace.
      The issue with CNC conversion (for me at least) is not the software. I already have a EMC box left over from my last CNC adventure, but the cost of the proper hardware and the amount of work required to convert an X3 (in this case) mean that it's one of the "When I have a LOT of time and a extra money...". Adding a hobby DRO is less than $300, including a cheap tablet, scales and the Arduino hardware. That is about the cost of one decent ball screw (the "C7" ball screws from ebay don't count, as they have pretty large runouts). By the time you add 3 decently sized motors, Gecko drives etc. you are well over a grand into it, and that's if you make the rest of the stuff yourself.
      Don't get me wrong, the DRO is nowhere near a replacement for CNC, but it would get me some conveniences that I would otherwise not have...

      Thank you