Unsolved Mystery. Weird Z0 behavior around build perimeter.

Having a problem? Post it here and someone will be along shortly to help
User avatar
redoverred
Printmaster!
Posts: 159
Joined: Tue Sep 30, 2014 2:28 pm
Contact:

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by redoverred »

626Pilot wrote:Math time...

I have a question about finding a point on a 3D mesh made out of triangles, the vertices of which are the test points on the print surface. If I probe the surface and get a bunch of depths, I have a "mesh" approximating that surface. I need to use that mesh to correct for Z.

I assume that in order to get the right depth for a given (x, y), I have to find the nearest triangle of that mesh and then somehow turn the surface normal into a depth.

How do I do that really quick (since it will have to be done 100s of times a second) and with the smallest memory footprint possible? I don't know that much about computational geometry. Help me find the right answer, and I will help you print!
What size of test grid do you have? Are they in a specific pattern? What is your method for hooking the movement of the effector and changing the z value? How often do you need to run the loop and how much computation time do you have to do it?

Wild assumptions below:

Assuming you have something like a 9x9 test grid (for example), I think the best way would be to have a running loop of what triangle you are currently in and track when you cross over to a different triangle. At the start of the print, it is easy enough to use any method initially to determine your first triangle location and then once you have done so you can take the input vector of the movement for each g-code and determine which triangles you are going to cross over the next x seconds. Then you simply need to have a loop that tracks when your <x,y> has passed into a different triangle. Since you know what triangle you are in at any given time, you can simply have a calculation loop which runs every .05mm or whatever that calculates using simple geometry the z-correction and passes that on.
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by 626Pilot »

I have been looking at various ways to do this with triangles, but something has been nagging at the corner of my consciousness for some time: "There has to be an easier, faster way."

For a delta robot, position updates are recalculated on the order of 100-200 times per second. Speed is not an enormous issue for me personally, considering that the Smoothieboard and Azteeg X5 are running on 72MHz (I think) ARM processors, but this code should ideally be portable so that someone running an Atmel chip at 16MHz can benefit from it as well. (At this point I strenuously wag my finger at all the CNC controller manufacturers who are still using this pitiful, offensively overpriced Z80-era crap, just for the sake of saying, "Hey! It's Arduino!")

First, my current scheme is to use geometrically significant test points - the towers, tower opposites, midpoints between towers, opposites of those midpoints, etc. This generates a grid of irregular triangles, which I find less than ideal. I want to move away from that to a regularly-spaced grid, like 6x6 or 9x9. This will effectively produce an array of quads, or groups of four points that form squares. If I want to turn the quads into tris, all I have to do is draw a segment between any two diagonally opposite points, and I'll get two triangles, each with its own definite surface normal. (A quad may or may not have a surface normal because its points aren't necessarily coplanar.)

Because the quads are all regularly spaced, finding the quad a point belongs to is simply a matter of multiplication.

At that point, I have two options. I can perform a further test to see which tri the point lies in, and then do this:

Code: Select all

return ((-normal[0] * x) - (normal[1] * y) - d) / normal[2]
Or, I can do a bilinear interpolation to get the interpolated elevation, which will be weighted properly on both the X and Y axes. Bilinear interpolation seems like it would give much smoother results - it produces a smoothed surface representation, whereas using the two-tris method gives me two flat triangular planes with an abrupt transition between them. I think bilinear interpolation will provide a much smoother map.
User avatar
redoverred
Printmaster!
Posts: 159
Joined: Tue Sep 30, 2014 2:28 pm
Contact:

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by redoverred »

626Pilot wrote:Or, I can do a bilinear interpolation to get the interpolated elevation, which will be weighted properly on both the X and Y axes. Bilinear interpolation seems like it would give much smoother results - it produces a smoothed surface representation, whereas using the two-tris method gives me two flat triangular planes with an abrupt transition between them. I think bilinear interpolation will provide a much smoother map.
This is the method I would use, personally. It seems like the easiest, geometrically, to understand for most people and as you stated it will give a little bit smoother results than the flatly planed triangle method.
User avatar
robotfive
Noob
Posts: 2
Joined: Mon Nov 10, 2014 5:42 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by robotfive »

I haven't gotten my Rostock in yet, and I'm only 4 pages into this forum issue, but I was wondering if anyone has access to strain gages? It would be nice for us to understand the forces that are put on the arms & towers during calibration/printing. Hopefully I'll be able to contribute to the discussion soon. I'll place my order tomorrow, so maybe a week?
User avatar
redoverred
Printmaster!
Posts: 159
Joined: Tue Sep 30, 2014 2:28 pm
Contact:

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by redoverred »

Today I finally got around to using zip-ties to lightly compress the arms in the middle so that there is a LOT less effector wobble. It has improved my post-zip-tie test print CONSIDERABLY, although I am still getting a lot of problems at the extreme outer diameter of the print surface. I think that for now I have to keep things within about 120mm of the center of the bed, unfortunately.

I also realized my hotend was quite clogged and I was getting really bad quality from it, so I took it apart (E3D v6) and placed the nozzle and heatbreak on an electric burner on my stove and set it on high. After a few minutes of crackling and noxious smoke (I opened a window) I had really clean parts that I just had to lightly wipe with a q-tip and a greenie-weenie pad to get the soot off the inside and outside. Now I get really nice prints, thank goodness!

I looked at that spreadsheet and haven't had much luck deciphering it quite yet since I don't have much time to read up on the kinematics, but after WEEKS of trying to calibrate my machine as good as possible, I just need to print some friggin' stuff for a change, lol.

Keep up the nice work with the quest for perfect prints!
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by 626Pilot »

YES!!!

Bilinear interpolation DOES work. Here are the bed depths before correction:

Code: Select all

[PD]                 1.238
[PD]
[PD]         -0.248   -0.098   -0.075
[PD]
[PD] -0.305   -0.192   -0.019   -0.038   0.005
[PD]
[PD]         -0.155   0.028   0.033
[PD]
[PD]                 0.103
[PD] Best=0.000, worst=1.238, min=-0.305, max=1.238, mu=0.011, sigma=0.266, energy=0.195
After correction:

Code: Select all

[PD]                 -0.061
[PD]
[PD]         -0.019   -0.009   -0.038
[PD]
[PD] -0.009   -0.014   -0.014   -0.028   -0.028
[PD]
[PD]         -0.014   -0.019   -0.023
[PD]
[PD]                 -0.005
[PD] Best=0.000, worst=0.061, min=-0.061, max=0.000, mu=-0.011, sigma=0.015, energy=0.022
I'm using a 5x5 grid, which results in a diamond-shaped correction map. I think 7x7 would be better. Nevertheless, the standard deviation went from 0.26mm to 0.015mm. This means that 100 micron layers all the way out to the print surface are quite possible. I think the best solution is to run parallel annealing, add up to 10 microns of Z correction (via bilinear interpolation), anneal again, allow another 10 microns of correction, etc. until the printer converges on the best solution my code can provide. (The code doesn't do this yet.) It's possible to use Z correction without bothering with annealing at all, but the annealing should help with errors in X and Y, whereas Z correction does nothing for them.

The (highly experimental, possibly dangerous) code is here: https://github.com/626Pilot/Smoothieware

Probe offsets are broken and G32 hasn't been tested since I refactored the depth mapping code, so if you want to try my code, don't use either of those features. Type G31 with no args to see how to use it. G31 A/B are for depth correction, G31 Z depth-maps the bed and prints the results, and all the other letters (of which there are quite a few) have to do with annealing.

For those of you who hail from the US, Happy Thanksgiving!
Zedsquared
Noob
Posts: 4
Joined: Mon Nov 24, 2014 9:29 am

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by Zedsquared »

Good stuff! Thanks for the work 626pilot.
I'll be testing it out on my Mini Kossel with smoothieboard which I've only really been able to get printing properly when it was driven by a printrboard with Marlin and grid probe style Z correction. I guess I have build problems that don't yield to the normal calibration methods ( tried Rich C's marlin, current smoothie Zprobe calibration and manual tweaking ) so it'll be interesting to see how far I get with your smoothie mods.

Cheers,
Robin.
Zedsquared
Noob
Posts: 4
Joined: Mon Nov 24, 2014 9:29 am

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by Zedsquared »

Well nothing blew up or caught fire :) Also no nasty head crashes or attempts to wander off the print bed.

What's the best order to run things with G31?
Will having levelling enabled (B) throw off the radius etc annealing?

Here's the output from a run i just did. My probe is three FSRs under the bed (glass spring form cake tin bottom) connected in parallel across Z_min and earth on the smoothieboard.

Code: Select all

> G28
ok
> G29
[RT]    Repeatability test: 10 samples (S)
[RT]      Acceleration (A): 70.0
[RT]    Debounce count (B): 0
[RT]  Smooth decel (D0|D1): false
[RT] Eccentricity test (E): off
[RT]   Probe smoothing (P): 1
[RT]     Probe priming (Q): 0
[RT]             Feedrates: Fast (U) = 70.000, Slow (V) = 25.000
[RT] 1 step = 0.01000 mm.
[RT] Test  1 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  2 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  3 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  4 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  5 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  6 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  7 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  8 of 10: Measured 2017 steps (20.170 mm)
[RT] Test  9 of 10: Measured 2017 steps (20.170 mm)
[RT] Test 10 of 10: Measured 2017 steps (20.170 mm)
[RT] Stats:
[RT]   range: 0 steps (0.0000 mm)
[RT]      mu: 2017.000 steps (20.170 mm)
[RT]   sigma: 0.000 steps (0.000 mm)
[RT] Repeatability: 0.0000 (add a little to be sure)
[RT] This is your best score so far!
[RT] This score is very good!

ok
> G31
[HC] G31 usage: (* = you can supply an annealing multiplier)
[HC] A: Set up depth map for auto leveling
[HC] B: Enable or disable auto leveling (currently off)
[HC] Z: Probe and display depth map - no calibration
[HC] K: Keep last settings
[HC] O: Simulate only (don't probe)
[HC] P: Endstops *
[HC] Q: Delta radius *
[HC] R: Arm length *
[HC] S: Tower angle offsets *
[HC] T: Annealing: Iterations (50)
[HC] U: Annealing: Max t_emp (0.35)
[HC] V: Annealing: Binary search width (0.1)
[HC] W: Annealing: Overrun divisor (2)
[HC] Y: Zero all individual radius, angle, and arm length offsets
ok
> G31 Z
[DM] Current kinematics:
[PG]           Arm length: 213.942
[PG]         Delta radius: 104.653
[PG]      Endstop offsets: {-0.542, 0.000, -0.991}
[PG] Radius offsets (ABC): {0.430, 0.000, 0.265}
[PG]  Angle offsets (DEF): {0.000, -0.017, -0.985}
[PG]    Arm offsets (TUV): {0.000, 0.000, 0.000}

[DM] Depth to bed surface at center: 2017 steps (20.170 mm)
[PD]                 -0.250
[PD]
[PD]         -0.020   -0.060   -0.220
[PD]
[PD] -0.030   -0.010   -0.030   -0.130   -0.290
[PD]
[PD]         -0.100   -0.080   -0.130
[PD]
[PD]                 -0.190
[PD] Best=0.000, worst=0.290, min=-0.290, max=0.000, mu=-0.062, sigma=0.088, ene                         rgy=0.118
ok
> G31 PQR

[HC] Heuristic calibration in progress. Press Reset to abort.
[HC] /!\ DO NOT /!\ access the SD card, press the E-stop button, use the panel, or send any commands. Doing so may cause the probe to CRASH!

[HC]             Data source: Probe
[HC]            Active tests: [Endstops (P), mul=1.00] [Delta Radius (Q), mul=1.00] [Arm Length (R), mul=1.00]
[HC]          Inactive tests: [Tower Angle Offset (S), mul=1.00]
[HC]  Keep last settings (K): false
[HC]     Annealing tries (T): 50
[HC]            Max temp (U): 0.350
[HC] Binary search width (V): 0.100
[HC]     Overrun divisor (W): 2.000
[HC]    Zero all offsets (Y): false

[HC] Baseline kinematics updated.
[HC] Keeping existing kinematics.
[HC] Depth-mapping the print surface...
[PG]           Arm length: 213.942
[PG]         Delta radius: 104.653
[PG]      Endstop offsets: {-0.542, 0.000, -0.991}
[PG] Radius offsets (ABC): {0.430, 0.000, 0.265}
[PG]  Angle offsets (DEF): {0.000, -0.017, -0.985}
[PG]    Arm offsets (TUV): {0.000, 0.000, 0.000}
[DM] Depth to bed surface at center: 2017 steps (20.170 mm)
[PD]                 -0.250
[PD]
[PD]         -0.020   -0.100   -0.210
[PD]
[PD] -0.020   0.000   -0.010   -0.120   -0.260
[PD]
[PD]         -0.080   -0.060   -0.100
[PD]
[PD]                 -0.150
[PD] Best=0.000, worst=0.260, min=-0.260, max=0.000, mu=-0.055, sigma=0.081, energy=0.106
[HC] Generating carriage positions for a printer with this configuration.

[HC] Starting test configuration: Arm Length=213.942, Delta Radius=104.653


[HC] ***** Simulated annealing pass 1 of 1 in progress *****
[HC] Existing calibration has energy 0.106

[HC] Reticulating splines...
[HC] Try 0 of 50, energy=0.069 (want <= 0.010)

[PG]         Delta radius: 104.803
[PG]      Endstop offsets: {-0.192, 0.000, -0.840}
[PG] Radius offsets (ABC): {0.000, -0.636, -0.142}
[PG]  Angle offsets (DEF): {0.000, -0.017, -0.985}
[PG]    Arm offsets (TUV): {0.000, 0.000, 0.000}
[PD]                 -0.099
[PD]
[PD]         -0.000   0.010
[PD] Best=0.000, worst=0.332, min=-0.099, max=0.332, mu=0.066, sigma=0.116, energy=0.038

[HC] Type M500 to save.
ok
> M500
Settings Stored to /sd/config-override
ok
> G31 Z
[DM] Current kinematics:
[PG]           Arm length: 213.580
[PG]         Delta radius: 104.803
[PG]      Endstop offsets: {-0.192, 0.000, -0.840}
[PG] Radius offsets (ABC): {0.000, -0.636, -0.142}
[PG]  Angle offsets (DEF): {0.000, -0.017, -0.985}
[PG]    Arm offsets (TUV): {0.000, 0.000, 0.000}

[DM] Depth to bed surface at center: 2034 steps (20.340 mm)
[PD]                 -0.180
[PD]
[PD]         -0.060   -0.040   -0.090
[PD]
[PD] -0.100   -0.060   0.000   0.020   0.010
[PD]
[PD]         -0.150   -0.020   0.070
[PD]
[PD]                 -0.070
[PD] Best=0.000, worst=0.180, min=-0.180, max=0.070, mu=-0.027, sigma=0.055, energy=0.067
ok
> G31 A
[DM] Depth to bed surface at center: 2035 steps (20.350 mm)
[PD]                 -0.190
[PD]
[PD]         -0.060   -0.030   -0.100
[PD]
[PD] -0.100   -0.060   0.000   0.020   0.000
[PD]
[PD]         -0.140   -0.020   0.070
[PD]
[PD]                 -0.060
[PD] Best=0.000, worst=0.190, min=-0.190, max=0.070, mu=-0.027, sigma=0.055, energy=0.065
[ST] Depth correction enabled.
ok
> G31 Z
[DM] Current kinematics:
[PG]           Arm length: 213.580
[PG]         Delta radius: 104.803
[PG]      Endstop offsets: {-0.192, 0.000, -0.840}
[PG] Radius offsets (ABC): {0.000, -0.636, -0.142}
[PG]  Angle offsets (DEF): {0.000, -0.017, -0.985}
[PG]    Arm offsets (TUV): {0.000, 0.000, 0.000}

[DM] Depth to bed surface at center: 2034 steps (20.340 mm)
[PD]                 0.010
[PD]
[PD]         0.000   -0.010   0.000
[PD]
[PD] -0.020   -0.020   -0.010   -0.010   0.000
[PD]
[PD]         -0.010   -0.020   -0.010
[PD]
[PD]                 -0.020
[PD] Best=0.000, worst=0.020, min=-0.020, max=0.010, mu=-0.005, sigma=0.008, energy=0.011
ok
While doing the final Z probe some of the long moves it makes ... the "carriage return / line feed" at the end of each row ... were still very noticably dished, whereas the shorter moves looked flat. Are some moves made "uncorrected" ?

Cheers,
Robin.
Zedsquared
Noob
Posts: 4
Joined: Mon Nov 24, 2014 9:29 am

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by Zedsquared »

OK, embarrassed now ;) Somehow I had neither delta_segments_per_second nor mm_per_line_segment set in my config so that's why long moves were curved!

Now I have enabled it. More from me next week as the weekend is full of family stuff.

Cheers,
Robin.
User avatar
Eaglezsoar
ULTIMATE 3D JEDI
Posts: 7159
Joined: Sun Apr 01, 2012 5:26 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by Eaglezsoar »

Zedsquared wrote:OK, embarrassed now ;) Somehow I had neither delta_segments_per_second nor mm_per_line_segment set in my config so that's why long moves were curved!

Now I have enabled it. More from me next week as the weekend is full of family stuff.

Cheers,
Robin.
I hope that putting in those numbers solves your problem!
Enjoy your family stuff.
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by 626Pilot »

Zedsquared wrote: What's the best order to run things with G31?
First, G29 to get the probe calibrated.

Then, I'd do G32 (iterative calibration, like GeneB's style but converges endstops/DR simultaneously) to get the basic calibration in spec as much as possible. (G32 is fixed on my side, but not yet uploaded to github.) Since you already had an approximately good calibration it wouldn't matter much on your machine.
Will having levelling enabled (B) throw off the radius etc annealing?
Yes. You'd want to do annealing first and get it dialed in as well as possible, because that fixes errors in X, Y, and Z. Depth correction ONLY corrects for errors in Z, meaning that it'll work even on printers where the endstops and delta radius are kind of hosed - it doesn't help X and Y accuracy at all, so whatever problems are induced by being out of spec will still be there, just not on the Z axis. If you turn on depth correction and then run the annealing, it won't do much because the surface is already being corrected. I should probably make the annealing turn off depth correction, now that you mention it.

Code: Select all

[PD]                 -0.250
[PD]
[PD]         -0.020   -0.100   -0.210
[PD]
[PD] -0.020   0.000   -0.010   -0.120   -0.260
[PD]
[PD]         -0.080   -0.060   -0.100
[PD]
[PD]                 -0.150
[PD] Best=0.000, worst=0.260, min=-0.260, max=0.000, mu=-0.055, sigma=0.081, energy=0.106

...

[DM] Depth to bed surface at center: 2034 steps (20.340 mm)
[PD]                 -0.180
[PD]
[PD]         -0.060   -0.040   -0.090
[PD]
[PD] -0.100   -0.060   0.000   0.020   0.010
[PD]
[PD]         -0.150   -0.020   0.070
[PD]
[PD]                 -0.070
[PD] Best=0.000, worst=0.180, min=-0.180, max=0.070, mu=-0.027, sigma=0.055, energy=0.067
This is excellent! I see two points that got significantly worse (near the X tower), but the rest turned out in a range from ever-so-slightly worse to WAY better. The tradeoff it made is pretty good. It looks like this step by itself opened up a lot more of your print surface to layer heights under 100 microns, whereas before it would've been more like 300+ microns. This makes me happy because now I have two printers it works on rather than one. I always wondered if the annealing routine would work great on mine, but wander off into nowhere land on someone else's. Hopefully some more people will be willing to test it now.

BTW, if you run G31 annealing multiple times, it should get a little better each time because the starting point of the simulation is based on more accurate kinematics. It may eventually get worse if you run it enough times - it does on mine. You might be able to get the points near Z and X slightly better.

Code: Select all

[PD]                 0.010
[PD]
[PD]         0.000   -0.010   0.000
[PD]
[PD] -0.020   -0.020   -0.010   -0.010   0.000
[PD]
[PD]         -0.010   -0.020   -0.010
[PD]
[PD]                 -0.020
[PD] Best=0.000, worst=0.020, min=-0.020, max=0.010, mu=-0.005, sigma=0.008, energy=0.011
This is about what I would expect to see from depth correction. Again, good to see it working on more than one printer!
While doing the final Z probe some of the long moves it makes ... the "carriage return / line feed" at the end of each row ... were still very noticably dished, whereas the shorter moves looked flat. Are some moves made "uncorrected" ?
I think I need more test points, like a 7x7 or 9x9 grid instead of 5x5. I have noticed some minor undulations on my printer as well. It's a function of how close a given test point is to the lowest or highest deflection in its neighborhood. More points = more accurate correction for the surface's curvature.
RegB
Printmaster!
Posts: 293
Joined: Fri Jun 27, 2014 7:45 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by RegB »

Bahh,
Just to throw ANOTHER money wrench in the works;

I liked the trick trucks from Trick Laser when they first appeared, I held off buying them, the $10 off expired, Brian renewed it, I ordered...

Somewhere in there I got to thinking about building my own - well, having a machinist friend make some.

Here's the thing that came out of my thunking and it MIGHT have relevance to this thread;
The delta arm's axis on the carriage (horizontal) must be at right angles to the center line of the bearing axles (between the two bearings in Brian's design).

I suspect that any build error or tolerance build up that makes this other than 90 degrees would translate to a problem similar to what this thread describes, i.e. carriage delta arm axles not parallel to build plate.
SO OBVIOUS, I know, but it jumped right out at me when I started to draw it.

With cheapskates... I am wondering if it is worth slackening off the fixed bearings a bit while adjusting the eccentrics.

So, how to measure if the carriage delta arm axles are parallel to the plate and the columns are at 90 degrees to the plate ?
I have a dial gauge, I probably just need a 1/2 decent post for it, although a height difference between the ends of an 8 cm or so axle are likely SMALL for an angle that could make big differences at the plate.
User avatar
Eaglezsoar
ULTIMATE 3D JEDI
Posts: 7159
Joined: Sun Apr 01, 2012 5:26 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by Eaglezsoar »

RegB wrote:Bahh,
Just to throw ANOTHER money wrench in the works;

I liked the trick trucks from Trick Laser when they first appeared, I held off buying them, the $10 off expired, Brian renewed it, I ordered...

Somewhere in there I got to thinking about building my own - well, having a machinist friend make some.

Here's the thing that came out of my thunking and it MIGHT have relevance to this thread;
The delta arm's axis on the carriage (horizontal) must be at right angles to the center line of the bearing axles (between the two bearings in Brian's design).

I suspect that any build error or tolerance build up that makes this other than 90 degrees would translate to a problem similar to what this thread describes, i.e. carriage delta arm axles not parallel to build plate.
SO OBVIOUS, I know, but it jumped right out at me when I started to draw it.

With cheapskates... I am wondering if it is worth slackening off the fixed bearings a bit while adjusting the eccentrics.

So, how to measure if the carriage delta arm axles are parallel to the plate and the columns are at 90 degrees to the plate ?
I have a dial gauge, I probably just need a 1/2 decent post for it, although a height difference between the ends of an 8 cm or so axle are likely SMALL for an angle that could make big differences at the plate.
You make a lot of sense with your writing, if you can come up with a dial that can help align the cheapskates, it sure would generate some interest.
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by 626Pilot »

Just in time for Christmas, a new update: https://github.com/626Pilot/Smoothieware

There are a lot of changes. Type G31 to see the new commands - some stuff was moved around.

Probe offsets don't work with depth-mapped Z correction. I got hung up on this for over a week! It's best to use a probe mounted at the perfect center of the effector. I have plans to update my Z-probe to allow mounting like this.

Jimustanguitar was talking about using shimming to solve some of his problems. I originally said I didn't think it would help my problems, but it seems that I was wrong. I have added virtual shimming support as a calibration type, and it does seem to help the annealing routine arrive at slightly better solutions.

The 5x5 grid was probed in a diamond shape before, which meant the diagonal "corners" of the circle were left out of the equation in depth correction (correcting for Z based on a depth map). I have added code that does some chicanery with linear extrapolation to probe at the edge of the circle in rows 2 and 4 (where the diamond shape excludes some area). It seems to be working well so far.

G32 (regular GeneB calibration) is working again.

Upstream changes from the main Smoothieware branch have been merged in, fixing a few minor things including a race condition (that I have never seen).

Per-tower arm length was scrapped. I could never get anything useful to happen with it.

Here's how you use this to get a picture-perfect calibration:
G32
G31 OPQRS
G31 Z to see how it did

You may want to run G31 OPQRS and G31 Z multiple times to see if the simulated annealing algorithm can get better results. (It usually does for me, but maybe it'll get everything super good on your printer the first time.)

G31 A (depth maps the print surface, saves depths to the SD card)

Now comes the annoying part: saving the config. Luckily, the depth mapper saves the depths correctly to the SD card. Unluckily, M500 is FUBAR. (No, it's not my fault.) If you try to save, you'll get a corrupted config-override on the SD card.

Instead of typing M500, type M503. This dumps the config to the Repetier console. Copy and paste it to a text file, and remove all the timestamp garbage from the beginning of each line. Shut the printer down and MOVE THE SD CARD TO A SEPARATE READER. Save the text file to config-override on the SD card, then safely eject it and put it in the printer.

When you boot up the printer, type M503 to verify your settings made it over (just check whether M667 exists at the end of the file) and then type G31 Z. You should get something like this:

Code: Select all

[DM] Current kinematics:
[PK]           Arm length: 268.708
[PK]         Delta radius: 129.680
[PK]      Endstop offsets: {-1.886, -1.431, 0.000}
[PK] Radius offsets (ABC): {0.000, 1.166, 0.781}
[PK]  Angle offsets (DEF): {-0.143, 0.636, -1.597}
[PK]     Virtual shimming: {1.263, 0.669, -0.385}, vector={0.006, 0.009, 1.000}, d=-0.516, enabled
[PK] Depth (Z) correction: enabled

[BH] Determining the probe-from height.
[PR] Priming probe 5 times.
[BH] Bed height set to 350.813
[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 2243 steps (0.000 mm)
[PD]                    0.033
[PD]
[PD] [0.000]    -0.005     0.009     0.009    [0.000]
[PD]
[PD]  0.005     -0.009     0.000     -0.009     0.005
[PD]
[PD] [0.000]    -0.005     -0.009     -0.014    [0.000]
[PD]
[PD]                    -0.009
[PD] Best=0.000, worst=0.033, min=-0.014, max=0.033, mu=-0.000, sigma=0.009, energy=0.010
These numbers are excellent. The absolute worst one is 33 microns, or 1/3 of a layer height when printing at 0.1mm. I can get numbers like this without simulated annealing (depth correction only) but this fixes errors in the XY plane, AND in Z.

CAVEAT - This is experimental. Run it at your own risk.

If you have any questions, DO NOT send me a private message. Ask here instead. That way, everyone sees the answer, and other people can contribute to the discussion.
User avatar
Jimustanguitar
ULTIMATE 3D JEDI
Posts: 2608
Joined: Sun Mar 31, 2013 1:35 am
Location: Notre Dame area
Contact:

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by Jimustanguitar »

That's awesome! I think I'll have to get my Smoothieboard installed over the break.

Have you already posted what ZProbe you're using? I'm curious.
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by 626Pilot »

Jimustanguitar wrote:That's awesome! I think I'll have to get my Smoothieboard installed over the break.

Have you already posted what ZProbe you're using? I'm curious.
Link in my sig. I want to design a center mount for it because probe offsets don't work right with depth correction.
chaosmarshall
Noob
Posts: 2
Joined: Sun Dec 21, 2014 7:28 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by chaosmarshall »

Hi I am new to all this and built my printer a week ago.
I have the same problem. at each tower and center all is good but between towers the head is high. It's almost the same at all 3 points so I think my build is square.
Now for my thoughts. I may be very wrong and this may have been thought about before but in my short time looking I haven't seen it.
Please correct me if i'm wrong.
All the maths for a delta printer work work on drawing 3 triangles where the long side (arm length are fixed) and the tower points are know but what about the attachments at the head. Is the head radius taken into account? Also if it is it wouldn't be the pivot points it would be the center between each pair of pivot points.
My thoughts based on the above is that when it traces the 3 pointed star towards the tower all of the triangles will converge beyond the tip where as if the head is between the towers the triangles don't converge and therefore there is an error. (the arm with the shallowest angle will trace a line above the others making the whole head sit high.
This to me is why lengthening the rod length in the software helps a bit but is not a total fix.

My questions.
Is the radius of the head defined? if so is that the pivot points or the mid point between them?
Can this figure be adjusted and if so where?

I don't have the skills to do the maths but just thought I would throw this into the mix to see if someone would share their knowledge with me.

Cheers.
User avatar
lordbinky
Printmaster!
Posts: 744
Joined: Sat May 18, 2013 3:53 am
Location: Tri Cities Washington

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by lordbinky »

I tried the firmware and the controller board completely locks up after a few movements after the 'determining probe from height'.* G32 works and G31 Z seems to work as well.

Could be a difference since I'm using an Azteeg X5. It is definitely curious.

Anyone else using an Azteeg or 32 microstep smoothieboard? I could see an overflow being the culprit.

Still, this is awesome.

*Completely unresponsive and all serial communication is lost. I caught it a few times locking up halfway back down after homing, another time on the 3rd move of the sequence, etc.
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by 626Pilot »

chaosmarshall wrote: All the maths for a delta printer work work on drawing 3 triangles where the long side (arm length are fixed) and the tower points are know but what about the attachments at the head. Is the head radius taken into account?
It's difficult for me to parse the question as you have asked it, but I can tell you one thing: the math behind the kinematics is correct. You can see an analysis here.
lordbinky wrote:I tried the firmware and the controller board completely locks up after a few movements after the 'determining probe from height'.* G32 works and G31 Z seems to work as well.

Could be a difference since I'm using an Azteeg X5. It is definitely curious.

Anyone else using an Azteeg or 32 microstep smoothieboard? I could see an overflow being the culprit.

Still, this is awesome.

*Completely unresponsive and all serial communication is lost. I caught it a few times locking up halfway back down after homing, another time on the 3rd move of the sequence, etc.
I developed this on an Azteeg X5 Mini (same board as yours). Since the hardware is identical, the problem is probably in the config. Can you post your config file, and the console output when it crashes? What probe are you using? Also, are you using an LCD panel? If so, it's probably running out of memory. My code needs to be optimized to save more RAM, which is already on the to-do list.
chaosmarshall
Noob
Posts: 2
Joined: Sun Dec 21, 2014 7:28 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by chaosmarshall »

Thanks 626pilot.
That link has shown me a lot. It has filled in a lot of the gaps in my knowledge. My brain isn't big enough to handle the rest.
It has also made me curious about the max error in Z diagram. That illustration is almost exactly what i'm seeing (but exaggerated) so I wonder which part of my build is off to match that diagram.
I will exercise the grey matter some more and see if I can figure out what I have done wrong with my machine.
shapeshifter
Prints-a-lot
Posts: 27
Joined: Tue Oct 14, 2014 11:08 pm
Location: Somewhere out there.

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by shapeshifter »

Wow 626 and the others you are doing some awesome work!! Finally read the entire thread and thought I would just add that I too am having the same issues and have rebuilt, re-squared, rechecked, replaced arms on this machine so many times its not funny so it looks like I will get a smoothieboard so that I can join in on all the fun. Great work....
jckrieger
Printmaster!
Posts: 58
Joined: Sun Nov 30, 2014 9:49 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by jckrieger »

I thought I'd share my Z0 behavior, as I finally found a solution after hours of reading on this forum. I had an issue where the print head would be too high between the Z and X towers, as well as too high between the Z and Y towers. The print head was too low between the X and Y towers. In the end, I subtracted a few tenths of a degree from the X tower rotation angle and added a few tenths to the Y tower rotation angle in the EEPROM settings. I did a little trial and error but in the end I am now 100% happy with this printer.

In my opinion, calibrating the tower rotation angle should be a step in the manual. My printer was shipped this month and still required some small tweaks to make the first layer perfect.
User avatar
lordbinky
Printmaster!
Posts: 744
Joined: Sat May 18, 2013 3:53 am
Location: Tri Cities Washington

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by lordbinky »

For reference to the distortion caused by irregularities
http://wp.boim.com/?p=67
Typically it isn't just one wrong variable so the real world outputs are much more complicated.


Here is the config file I'm currently using with 626 pilot's firmware (and is going nuts with any of the 31 OQPRS options)
Attachments
config.txt
(18.21 KiB) Downloaded 329 times
jckrieger
Printmaster!
Posts: 58
Joined: Sun Nov 30, 2014 9:49 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by jckrieger »

lordbinky wrote:For reference to the distortion caused by irregularities
http://wp.boim.com/?p=67
Typically it isn't just one wrong variable so the real world outputs are much more complicated.


Here is the config file I'm currently using with 626 pilot's firmware (and is going nuts with any of the 31 OQPRS options)
Those plots are quite useful! It makes it clear why I shouldn't need to adjust with the arm length. There are so many variables to consider, I see why you guys are working on an analytical solution.
User avatar
626Pilot
ULTIMATE 3D JEDI
Posts: 1716
Joined: Tue May 14, 2013 12:52 pm

Re: Unsolved Mystery. Weird Z0 behavior around build perimet

Post by 626Pilot »

lordbinky wrote:Here is the config file I'm currently using with 626 pilot's firmware (and is going nuts with any of the 31 OQPRS options)
Looks like your config file is old - it's different from the one I'm using, some stuff is missing and other stuff is extra. Try the one I've included here.

Also, what kind of probe are you using? Make sure the setting "zprobe.decelerate_on_trigger" is correct. If your probe doesn't have any runout (i.e., it runs out of "throw" as soon as it triggers, like an endstop switch) you'll want that to be turned off. Go over all the settings and make sure they're correct. I noticed a few things, like steps/mm, are different, even though we both have the same board. (Unless you have different steppers or aren't using 32x microstepping.)

It would be helpful to see some log output for when it crashes.
Attachments
config.txt
(20.3 KiB) Downloaded 498 times
Post Reply

Return to “Troubleshooting”