587,443 active members*
3,252 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > Open Source Controller Boards > DIY CNC Router - Arduino + GRBL - Question about accuracy - integer precision?
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2013
    Posts
    5

    Cool DIY CNC Router - Arduino + GRBL - Question about accuracy - integer precision?

    Hello All!

    This is my first post, so I should introduce myself a bit. I've been scouring the internet for the last couple months hoping to build my own CNC router. After many unsuccessful prototypes, I was able to successfully produce my first part on new years day! What a sense of accomplishment!

    The machine itself uses Arduino + GRBL controlling 3 EasyDriver 4.4 stepper drivers and surprisingly small yet powerful steppers I picked up from All Electronics in the San Fernando Valley (a great store). I'm certain there's warp in the Y axis lead screw... the first set I picked up from a hardware store (3/8" 16 tpi) and unfortunately invested a great deal in anti-backlash lead-nuts and couplers from Dumpster CNC (Thanks Tim!). The second set I ordered from McMaster Carr (also awesome) and those have warp in them as well. I'm certain it would be a different story if I had purchased ACME.

    Either way. I'm able to produce parts at small scale, but once I try making anything around 10"+ I'm not getting accurately sized pockets, etc. Like a 1/2" hole is not quite there... just a bit too small.

    I'm suspecting it has something to do with the GRBL calculations regarding steps per mm. I've grounded the MS1 + MS2 pins to produce single step pulses and and utilizing a 1.8 /step motor I'm looking at 200 steps per revolution. Their math dictates that one should take the steps per revolution multiplied by the microstep mode (1) and divided by the mm per revolution (which in my case would be 1.5875 mm per turn at 16 tpi rod). This would suggest entering values of 125.98425197 which are truncated to 125.984. Is this causing the miscalculations? If I set the N-decimal setting higher than 6 I get really weird results and have to clear the eeprom.

    Sorry for the wall of text!

    Thanks for reading!

  2. #2
    Join Date
    Jan 2010
    Posts
    2141
    Quote Originally Posted by vitaminrad View Post
    If I set the N-decimal setting higher than 6 I get really weird results and have to clear the eeprom.
    I don't have an answer, but I do have a question.

    What or where is that N-decimal setting?

  3. #3
    Join Date
    Dec 2013
    Posts
    5
    Howdy,

    It's available through the console as a general setting. Sending '$$' will produce a list of settings in eeprom and using $N = X where N is the variable and X is the setting to apply new data.

    In GRBL version 0.8c it's:
    $12 = 3 (n-decimals, int)

    If I set it to anything higher than that it'll crash Arduino with all sorts of random junk text.

  4. #4
    Join Date
    Jan 2010
    Posts
    2141
    OK, thanks, I didn't recognize that as one of the console settings.

  5. #5
    Join Date
    Aug 2011
    Posts
    388
    6 decimal places is plenty--that's not the problem. Lots of things can cause inaccurate parts: slop, backlash, flex, heavy cuts, lead screw not the exact tpi, etc. I'd suggest some simple tests to narrow the problem. For example, to check:

    Slop and Backlash: put a dial indicator between the table and each of the axes. Drive the axis forward a bit, then back to the start, then the other way and back to the start. A good machine will repeat to 0.001". 0.002" should be achievable. 0.005" is sloppy.

    Lead screw accuracy: same dial indicator setup, but drive 0.500" or some set amount and check the dial reading. Do this at 3+ locations down the lead screw. With threaded rod, that 16 tpi will likely not be very accurate, but usually it is pretty consistent down the length of the rod. You can tweak the steps/mm to fine tune.

    If those look good, then try some cuts to check for flex. With a 1/4" cutter, make at a short cut at X=0.0. Then the same cut at X=6.0". Check the 'part' length with a caliper: it should be 5.750". Then, try a light finish pass at X=0.010", then at X=5.990. Check length again (5.730"), and 0.020" shorter. The finish pass cuts will likely be more accurate than the roughing cuts -- this shows how much the machine is flexing during rough cuts. You may be able to stiffen the machine, or just do finish passes when more accuracy is needed.
    David Malicky

  6. #6
    Join Date
    Dec 2013
    Posts
    5
    Thanks David!

    I was Googling my problem with where and how to ground pins ms1 & ms2 (to enable single stepping) and found this thread and only now realized you've responded! So weird. I tried wiring them all directly to the ground coming from the motor power supply and got some wild results so I cut an hours worth of soldering and heat shrink rather quickly. I don't suppose GRBL has any options to set a arbitrary pin low or high?

    I've discovered *much* more accurate results after finding a Bosch Colt router and a 1/8" strait routing bit with a 1/4" shaft. (1/8" Double Flute Straight Bit - Rockler Woodworking Tools). Much less high frequency noise, which I imagine is due to a larger shaft and more horse power.

    I'm using the machine to make better parts for itself and it's slowly evolving.

  7. #7
    Join Date
    Jun 2012
    Posts
    182
    You could try lapping the leadscrew to improve the accuracy. Here's a before and after of some 6mm stainless allthread purchased from a hardware store.
    Attachment 217786
    Attachment 217784

    The lap was made using cast polyurethane and was about 3" long.

  8. #8
    Join Date
    Dec 2013
    Posts
    5
    Good god man, that photo is like porno to me...

    That makes a lot of sense. I noticed the leadscrews I had delivered from McMaster Carr were a bit oily and had accumulated a bunch of grime. I spent a while cleaning them with a soft cloth and would notice how the cloth would catch and rip on the tiny burrs - they could definitely use some "lapping".

    Thank you!

  9. #9
    Join Date
    Aug 2011
    Posts
    388
    Welcome! Cnczone can also send an email when there are replies to your posts (subscribe). I like it, since there many fora here and it's hard to keep track.
    I recall there was some recent discussion on github about changing pins high v low. Check both the open and closed issues: https://github.com/grbl/grbl/issues?...d&state=closed Or try your question there.

    Yes, stiffer tools are quieter. The Colt probably has much better runout at the collet, which will be more accurate and quieter. And its brushes are probably designed to be quieter.

    elfrench, nice pics!
    David Malicky

Similar Threads

  1. Which pp to choose for arduino grbl?
    By CptanPanic in forum Post Processors
    Replies: 2
    Last Post: 03-08-2021, 11:05 PM
  2. Anyone have GRBL running on Arduino Nano?
    By hondaman900 in forum Open Source CNC Machine Designs
    Replies: 11
    Last Post: 04-20-2015, 08:10 PM
  3. Solidcam Post-Processor for Arduino GRBL
    By jlcorzo in forum SolidCAM for SolidWorks and SolidCAM for Inventor
    Replies: 2
    Last Post: 11-13-2013, 09:36 AM
  4. Should I use LinuxCNC or grbl/arduino?
    By CptanPanic in forum LinuxCNC (formerly EMC2)
    Replies: 3
    Last Post: 04-23-2012, 07:06 PM
  5. Kress Router Spindle Accuracy Question
    By gunlocators in forum Benchtop Machines
    Replies: 2
    Last Post: 11-08-2008, 09:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •