Prototype Calibration Pattern (with G-Code)

Talk about all things CNC
JimHung
Posts: 31
Joined: Wed May 30, 2012 9:27 pm

Prototype Calibration Pattern (with G-Code)

Post by JimHung » Thu Sep 06, 2012 6:44 am

Hey everyone,

I've been experimenting with testing the accuracy of my ShapeOko with various test patterns, so I thought I'd post one here to see if anyone had any thoughts. I'm completely new to milling and CNC in general, so I'm trying to learn as much as I can about accuracy, tolerances, etc... as well as G-code and tool-chains. I included measurements to see how closely the unit measurements in the design applications measured up to realworld product (I was hoping 1:1!).

Here's my Prototype X/Y Calibration Pattern 0.1b:
ShapeOko_Calibration_Pattern_01b.jpg
ShapeOko_Calibration_Pattern_01b.jpg (95.14 KiB) Viewed 20666 times
The G-Code can be found here:
ShapeOko_Calibration_Pattern_01b.ngc
(94.19 KiB) Downloaded 4399 times
The tool-chain I used to create/test it is Inkscape (SVG) -> PyCam -> Universal G-Code Sender. The toolpath doesn't seem *that* efficient - is there a way of optimizing this? It currently runs for an estimated 17 minutes...

The source Inkscape SVG can be found here (for generating alternate CAM code):
ShapeOko_Calibration_Pattern_01b.zip
(2.76 KiB) Downloaded 1718 times
Some vital statistics:
Feed Rate: 500mm/sec
Estimated Running time: 20 minutes
CAM details: Engraving profile with 1mm diameter cylindrical tool, no offset. Intended for a pencil or pen.

2012-09-15 Update:
- I'll redesign this soon to be broken down into a series of self-contained tests that can be performed sequentially to make a larger test pattern such as this one (0.1b).

Full disclosure: During testing this, I identified that my drivers were overheating an causing artifacts in the drawing. I guess this test was good for that at least! I'm looking to add a fan and heatsinks (as per this thread), but until then I can't actually post a completed test! If anyone fancies a go and wouldn't mind posting the results, I'd be really grateful, I'd love for something to compare mine to when I fix my cooling issue. EDIT: I solved this issue and was able to complete the pattern successfully - see here.

Take care,

Jim

UPDATE: Updated with corrections to measurements. 01a -> 01b.
Last edited by JimHung on Sat Sep 15, 2012 8:30 am, edited 1 time in total.
Shapeoko #: 564

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: Prototype Calibration Pattern (with G-Code)

Post by Will Winder » Thu Sep 06, 2012 12:48 pm

This might be a good thing for the wiki, I know I would have used it after assembling when I was anxious to make the ShapeOko move but had no idea how to generate a gcode file. Maybe it could go at the end of the Run Your First Job page?
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

baz
Posts: 115
Joined: Thu Jun 21, 2012 9:02 pm
Location: Yorkshire, UK
Contact:

Re: Prototype Calibration Pattern (with G-Code)

Post by baz » Thu Sep 06, 2012 1:03 pm

Will Winder wrote:This might be a good thing for the wiki, I know I would have used it after assembling when I was anxious to make the ShapeOko move but had no idea how to generate a gcode file. Maybe it could go at the end of the Run Your First Job page?
Good idea, I second that.
ShapeOko #676, eShapeOko #11, Hardened MakerSlide, OpenRail, Steel v's, Misumi Extrusion, Kress 800
MakerSlide Europe Store

JimHung
Posts: 31
Joined: Wed May 30, 2012 9:27 pm

Re: Prototype Calibration Pattern (with G-Code)

Post by JimHung » Thu Sep 06, 2012 9:01 pm

Good idea guys - I was hoping that people would like that idea, one of the reasons I created it was because after I ran the Hello World quite a few times, I was kind of like 'now what?'. Once I'm happy my machine is together properly and reliably (thus the accuracy tests), I'll embark on a real project, but if my learning curve can help other new users out then I'd be over the moon.

I've updated the original post with a couple more details people might want/need to know. The ethos was to just throw as many different patterns that involved different kinds of movement as possible (X(+/-),Y(+/-), diagonals, circles, etc... and have regular measurements that you could test with a ruler to see if you get any variance across the test pattern, etc... during the course of the run.

If anyone's successfully run it from start to finish, I'd love to see the results!

Jim

p.s. Baz - just noticed you're from Yorkshire - I'm from Sheffield, S.Yorks myself, currently living in Los Angeles. Glad to see another Yorkshireman on the forums!
Shapeoko #: 564

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Prototype Calibration Pattern (with G-Code)

Post by cvoinescu » Thu Sep 06, 2012 11:43 pm

The pattern is useful, but, IMHO, it would be much more useful to handcraft the G-code, to test various scenarios. For instance, one way of detecting slop would be to draw smallish concentric circles, close together, but in opposite directions. Other tests: bunches of parallel lines close together, at several different angles and at several locations on the bed, done with all lines in the same direction and with lines alternating back and forth; also with lines following a movement from one direction and a movement from the opposite direction. Really small circles enclosed in a grid can also detect slop and backlash. You already have good stuff, such as a large square (to measure the squareness of the machine) and known lengths (to measure the dimensional accuracy).

When I get around to building my ShapeOko (next week, hopefully!) I will have to create such G-code, and I will post it here. I could even intentionally mis-adjust my ShapeOko to demonstrate what to look for in the patterns. But I need to build it first, which won't happen until I after I return from this trip.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Re: Prototype Calibration Pattern (with G-Code)

Post by edwardrford » Mon Sep 10, 2012 5:03 pm

Jim,

This is really great. When I first read the post I thought to myself "why didn't I think of that!" It's so much more helpful than the Hello World example.

would you mind posting the inkscape file for this? I'd like to run i through HeeksCNC and CAMbam to see how their toolpath optimization compares to pyCAM.

Thanks again!

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

glendresser
Posts: 38
Joined: Sat Sep 08, 2012 5:45 am

Re: Prototype Calibration Pattern (with G-Code)

Post by glendresser » Tue Sep 11, 2012 6:14 pm

This is a great idea.

My one suggestion would be to maybe break it into a bunch of smaller patterns. What I found, running it through, was that there were some parts that my machine did well on, and some that it sucked at (particularly the concentric circles). Overall it completely butchered the pattern, but I think it failed in just a few specific areas.

I'd like to be able to try making a few adjustments and then just run the concentric circles test again, rather than sit through the entire thing. I'll probably go into the code, isolate the part that runs the circles, and just run that code, but it would be nice to have each individual test isolated.

And like cvoinescu says, some hand-coded tests could probably be done in such a way to be more useful.

It would be great to develop a bunch of really useful tests complete with explanations for what various problems in running each pattern can indicate, and how you can go about fixing them. This is a great start toward that.

Just to offer a little more detail:
It starts by drawing about half of the grid lines for the inner boxes, and then goes and draws part of a '3' and a '6', and then returns to drawing some more grid lines, then works on the letters up top, then draws the final gird lines. In my case, it screws up on the 3 a bit and on some of the letters at the top, so when it goes back to drawing the grid, it looks misaligned. But I can't tell to what extent my machine is failing to draw the grid correctly, and to what extent it's just getting misaligned up on the numbers and letters. So even doing all of one particular box at a time would make it much more useful.

Aaron Seltzer
Posts: 46
Joined: Tue Apr 10, 2012 4:33 am

Re: Prototype Calibration Pattern (with G-Code)

Post by Aaron Seltzer » Sat Sep 15, 2012 4:24 am

glendresser wrote:This is a great idea.

...

Just to offer a little more detail:
It starts by drawing about half of the grid lines for the inner boxes, and then goes and draws part of a '3' and a '6', and then returns to drawing some more grid lines, then works on the letters up top, then draws the final gird lines. In my case, it screws up on the 3 a bit and on some of the letters at the top, so when it goes back to drawing the grid, it looks misaligned. But I can't tell to what extent my machine is failing to draw the grid correctly, and to what extent it's just getting misaligned up on the numbers and letters. So even doing all of one particular box at a time would make it much more useful.
Glen,

My Shapeoko is doing the same thing. There is a long scan from the second horizontal line (just over the concentric squares) over to the center vertical line. That is the exact spot mine messes up, repeatedly. The centerline, and everything after that is shifted left by about a 1/10th of an inch. Very repeatable. Not sure why yet. Have tried turning down the seek rate in GRBL but no improvement, but will work on it more tomorrow.

I think it might be an advantage that this test is done out of order. It is good to see the Shapeoko can come back to where it is supposed to even after being on the other side of the carriage. More do a backlash this this way.

Please let us all know if you get yours to print clean. I will do the same...

JimHung
Posts: 31
Joined: Wed May 30, 2012 9:27 pm

Re: Prototype Calibration Pattern (with G-Code)

Post by JimHung » Sat Sep 15, 2012 8:20 am

Hey everyone,

Thanks for all the really great suggestions - there are a lot of practical improvements to be made, I'll try and keep updating it over the coming weeks when I get some spare time.
cvoinescu wrote:The pattern is useful, but, IMHO, it would be much more useful to handcraft the G-code, to test various scenarios. For instance, one way of detecting slop would be to draw smallish concentric circles, close together, but in opposite directions. Other tests: bunches of parallel lines close together, at several different angles and at several locations on the bed, done with all lines in the same direction and with lines alternating back and forth; also with lines following a movement from one direction and a movement from the opposite direction. Really small circles enclosed in a grid can also detect slop and backlash. You already have good stuff, such as a large square (to measure the squareness of the machine) and known lengths (to measure the dimensional accuracy).
Really good ideas, I'm definitely going to redesign this to perform each complete test one after the other. I'm thinking I might break it up into a number of individual tests to be carried out sequentially, and also provide a fully automagically created CAM path for those who wish to burn-in their machines (since it currently takes 20 minutes - initially my batch 2 premium kit ShapeOko overheated after just 7 mins - for more info see this thread). If you have any more suggestions about individual test patterns, that would be great.

As an aside, when I tried to code a test pattern manually (the concentric circles you suggested), I noticed that the G3 code doesn't work properly for me (nothing happens, G2 works fine). Very odd.
edwardrford wrote: ... would you mind posting the inkscape file for this? I'd like to run i through HeeksCNC and CAMbam to see how their toolpath optimization compares to pyCAM.

Thanks again!

-Edward
Absolutely - I'll edit the original post with it attached and add some more clarifications and info for newcomers to the thread. I'd really like other complete beginners like me to be able to use something like this to test the readiness of their machine, it's been a confidence booster for me certainly!

Here's a quick run of the current pattern on my ShapeOko - excuse the super thick lines (I'm using a way blunt pencil and waaay too much pressure). It took 20 minutes to run from start to finish:
IMG_4159.jpg
IMG_4159.jpg (444.37 KiB) Viewed 20423 times
As you can see, not quite perfect! A lot of this was to do with the amount of pressure - it was heavily rippling the paper as it went and even after being tightly taped down to the board, it was still shifting a lot.

Once we've figured out a series of self-contained tests, I think it would be really valuable to set up a wiki page for people to compare their own results to and perhaps the experienced members of the community could help diagnose common causes for inaccurate patterns, etc...

Thanks everyone,

Jim
Shapeoko #: 564

Aaron Seltzer
Posts: 46
Joined: Tue Apr 10, 2012 4:33 am

Re: Prototype Calibration Pattern (with G-Code)

Post by Aaron Seltzer » Sat Sep 15, 2012 1:52 pm

JimHung wrote:Hey everyone,

Here's a quick run of the current pattern on my ShapeOko - excuse the super thick lines (I'm using a way blunt pencil and waaay too much pressure). It took 20 minutes to run from start to finish:

Jim
Jim,

Any chance you could provide a GRBL $ dump of your setup? Thanks!

Post Reply