archive

3D Printing, Archive

G29 vs G33 on Delta Printers

An older article on delta-printer geometry, calibration and bed levelling that still gets the occasional visitor.

Ok, so I don’t really use this blog much (though at least it’s only just over a year since my last post which is an improvement) but wanted to post some info on an oft confused topic with kit 3D Delta printers.

TL;DR If you want to skip the “learning” bit and go straight to the discussion about G33 vs G29, click here (hint: as a Delta owner you should really understand this stuff though!!)   

Background

Whilst the quality of the components of cheap 3D printer kits has been gradually improving over the last few years, there is still quite a bit of a gap between the instructions on how to build vs how to get the best printing on these printers.

Even though it’s fairly easy to get your first print (usually something small and fast to print!) out the gate on a new delta, I and many others struggled when it comes to optimising the printer to print larger and dimensionally accurate prints.

This usually leads to hitting the forums and Facebook groups for advice… and here I think is where a lot of confusion compounds – you really need to be aware of the many less-than-obvious differences between the Delta and the Cartesian printer – and make sure you get advice from someone who understands these differences.

Having said that – there are quite a lot of similarities between the two types of printer – things that pretty much all FDM type printers will share – nozzle temperature, heatbed temperature, enclosure (or lack of) temperature, under/over extrusion, bad filament, part cooling and more are all the same problem and same fix for both styles of printer.

Things that differ considerably, where a cartesian printer approach will be either frustrating, not work optimally or simply not work at all include:

  • Setup and Configuration
    • Setting up a cartesian printer involves making sure everything is at 90 degrees to everything else.  As soon as that is true, it is pretty much as simple as calibrating the stepper motors to the correct steps/mm.  On a cartesian printer, the X motor steps are directly proportional to a movement of the print head (or bed) in the “X” direction (left/right), the Y motor steps are directly proportional to a movement of the print head (or bed) in the “Y” direction (forward/back), and, unsurprisingly, the Z motor steps are directly proportional to a movement of the print head (or bed) in the “Z” direction(up/down)
    • A delta printer does not have the same linear relationship between the movement of the three motors, and the position of the print head in 3D (X-Y-Z) space.  In fact the movement of the print head depends on lots of right-angled triangle calculations to determine an unknown (or desired) length (ie the distance of the print head away from the tower).  (Note that the height of a delta is actually a linear relationship to the motor steps – but needs to be applied as a constant to the position all three motors!).  If you’re paying attention then you’ll realise that Pythagoras’ theorem is what’s needed here – and this means that a *LOT* of Square Root calculations are needed on a delta printer.
    • 8-bit processor boards, most often used on these printers (such as Arduino/RAMPS), can handle this maths, but it’s a bit of a struggle so the algorithms have had a lot of code optimisation to even make them work.
    • So for a Delta, as well as knowing the correct steps/mm for each motor, you also need to know the d

      Delta Geometry

      iagonal length of the arms (DELTA_DIAGONAL_ROD), the horizontal distance from the point the arm connects to the carriage and the effector (DELTA RADIUS),  and the distances between the rod connection points and the centre of the nozzle (DELTA_EFFECTOR_OFFSET) and the centreline of the carriage movement (DELTA_CARRIAGE_OFFSET).  Added together, these last three are collectively known as DELTA_SMOOTH-ROD-OFFSET

    • Finally – even once you know all of these – the printer needs to calculate the desired position in the current 2D plane – still not by X/Y/Z – but by translating these into distance needed from each tower, 120 degrees apart
  • Dimension Accuracy
    • Delta’s simply don’t work in the same way here – a “calibration cube” (actually my own first print on a delta!) won’t help you in any way to fix the problem – only showing you that something’s “wrong” and in no way “how to fix it”
    • Because Deltas work in “distances from the towers” there simply are NO parameters you can change to increase or decrease the dimensions of a print in “just” the X or “just”  the “Y” directions  (you can make a change in the Z but since this will also effect the calculations, we still need to re-calibrate everything afterwards!)
    • A calibration object for a Delta IS NOT a cube, but a hexagon or other regular 6 sided object aligned with the towers (such as https://www.thingiverse.com/thing:2256557)

Auto Calibration (G33) and Unified Bed Levelling (G29)

There is lots of confusion about this topic.  Some of this is because the manufacturers actually tell people they have bought an “auto levelling” system, and guide users to G29 first.  Why this is the case is debatable, but it’s probably to shield new users from the reality of having to understand their printers (take note all of you who skipped the learning bit above 😉 ) 

More TL;DR:  You know you really should read this stuff... but for those with “no time” – G33 (or manual calibration) allows you to understand the actual physical nature of your Delta Printer.  G29 creates a “fudge factor” that tries to hide the artifacts of your badly set up machine.  In the process it wastes precious memory and processing power on your controller and actually makes understanding, tuning and improving your machine harder.   There’s no good reason to use G29… really… but if you must, then do this ONLY AFTER you’ve properly calibrated your delta as well as you can.

What G29 Does

G29, or Unified Bed Levelling, uses the Z-Probe of your printer to move the printer to a “grid” of points over the surface of the bed and record the “actual” position – clearly the nozzle is at “zero”  when it touches the bed (+/- any probe offset) – against the “recorded position”

This matrix of “corrections” is then saved to RAM (and also usually to the EEPROM) so that the printer can change the position it moves the nozzle to accommodate this “error”.

The positions between the probed points are “interpolated” to give a map of the whole bed.  Eg. Imagine two probe points along a line in the Y axis.  Point 1 was recorded as -0.2mm  in the table and point 2 was recorded as -0.4mm.  If the printer was to move the nozzle to a point halfway between these two places at a height of Z=1.0, it would read the table and correct this to be Z=0.7  (1.0 – 0.3mm).

This happens for every move for the entire print. AND IT WORKS (but don’t stop reading).

G29 may actually be the way to go if you have a bed that measurably is warped or isn’t flat (ie if you put it on a piece of glass, it wobbles) – or at least it is until you can replace the bed and get something that is flat!! (which you should do.  You owe it to yourself!)

Delta Geometry Errors

G29 will also “correct” (within limits) for a poorly built or calibrated printer.  Issues with the delta geometry due to inaccurate measurement or build tolerances will result in “apparent” issues with the bed “level” or “flatness” – what this means is that the nozzle will scrape the bed in some areas and be “floating” in others – EVEN IF YOUR ACTUAL BED SURFACE IS FLAT AND LEVEL!!!

If your DIAGONAL-ROD length or DELTA-RADIUS is wrong, you will see a “bowl” or “dome” error where the centre of the bed “appears” to be too high or too low  (images from http://boim.com/DeltaUtil/CalDoc/Calibration.html)

If the tower endstops are not accurate (or you didn’t actually install the bed level and tight to the frame) then you will get a tilt.  One tower in error will result in a tilt towards/away from that tower – an error in all three will result in an arbitrary direction tilt.  If your tower isn’t in a perfect equilateral triangle, you will see an apparent “curve” in the print surface.

 

Add together all of these sources of error, and when you print you will find your nozzle is not close (or too close) to the bed in different positions.

Now, within reason, G29 WILL in fact correct for these errors.

So I should be using G29 then right?

Wrong.  Well, not to correct the problems above anyway…

Analogy:

Your car is pulling to the right.  Do you:

  1. Unbolt your steering wheel and put it on “a bit to the left” so it looks like the steering wheel is pointing forward when the car is moving forward
  2. Go to the mechanic and get him to check your steering/suspension.

This is quite similar to the G29 vs G33 debate.

If you rely on G29 to correct your poor delta calibration then you are essentially doing Number 1 above.  You are getting your printer to adjust every single move and line by an amount saved in memory to avoid fixing the problem that’s causing it.

This problem is exacerbated greatly when you are using an 8-bit Arduino/RAMPS controller.  The already stretched processor that for every single G-code line needs to calculate a bunch of square roots and trigonometry problems ALSO has to keep a table of “fudges” in memory and ALSO has to add/subtract that from the values being sent into the trigonometry calculations.

This does work – but you are increasing your chance of something going wrong, your print quality being affected by your overstretched processor, and an inability to diagnose any problems.

So the answer is G33 then?

Well, Yes and No.

The answer is CALIBRATE YOUR PRINTER’S DELTA GEOMETRY PROPERLY!!!

There are a number of methods – starting from simply measuring everything and assembling with ultra-tight tolerances.  You should always start here.

  • Try to keep everything tight and square when you build the printer.  The frame triangle corners should be even and equal, and the uprights (towers) should be 90 degrees to the base
  • make sure all your rods are the same length before fitting them
  • make sure your carriages or linear rails have no slop
  • measure your diagonal rods from pivot to pivot and see that they are the right length.
  • Calibrate the steps/mm of your steppers by moving the effector (ie all 3 carriages) in the Z-axis and checking movement vs measurement. (see the wiki)

Now you can try to measure the Delta Radius too (and the other offsets) – but because they are not simple measurement between “real points” they can be a little tricky.  Any small variances in measurement also add up quickly – remember we are not talking about thousands of dollars of precision machined and assembled NASA hardware here – so there will always be some errors.

So… G33 then, right?

Maybe. But not necessarily.  What we need to have is a way to see if our initial values for the delta geometry parameters are right, and if not, what do we need to change.  and there are a number of ways of doing that.

One of the best is the “Escher3D” Delta calibration routine. The Escher3D calculator asks you to enter the initial configuration you have, and then move your printer nozzle to various places on the bed and record the apparent error in each of those points. After you’ve done this, the calculator will then perform a “least squares” algorithm using your entered data.  It will then suggest a set of values for the delta parameters  (endstop positions, diagonal rod, delta radius, home position and tower angle)  that would provide the closest solution that would fit your measurement.

Now, because all of these things interrelate with each other (for example, a change in rod length will affect the diagonal rod, delta radius and home position) the algorithm cannot provide an absolute solution in one iteration – rather one must make the same measurements again and run through the process 2-3 more times.  If the printer is reasonably well assembled geometrically, then the iterations of this algorithm will bring the printer closer and closer (converge) to the “perfect” solution.

It is this set of delta geometry measurements that can be loaded into your configuration.h file (or set in your EEPROM) that describe fully the physical characteristics of your printer.

It is vitally important to realise that your printer controller board has to always make the “inverse kenematic” calculations that use these geometrical measurements anyway.  Unlike G29 which adds an additional “fudge factor” calculation to every single move – getting your calibration correct imposes no burden whatsoever on your controller.  

Wait, I thought we were talking about G33?

Now we can….  in reality all G33 does is take the manual process above and automate it.  Instead of you moving your nozzle to lots of places, recording the Z values and typing it into an online form, the Delta G33 process does this for you.  Of course, the accuracy of the probe values relies on your Z-Sensor being well set up – but when it is, G33 can complete the process above (using a number of iterations) all automatically without the user needing to do all the work.

If your printer is reasonably well put together, and your print surface is actually flat (in real life – not just based on the nozzle position) – then performing a calibration should be able to solve every single artifact that you can have from a delta printer due to geometry – including tilt, bowl, dome, curve.  Getting calibration right means you don’t need to waste memory and processing power in your controller and G33 removes most of the difficulty and labour needed to perform the calibration.

G29 is simply not needed on any delta printer with a mechanically flat bed.

In the small number of cases where G29 would help (perhaps you have a warped heatbed and are waiting on the slow boat from china for parts) – then, yes, G29 can help – but please… do this only when you’ve calibrated your printer as well as it is possible to do so!

Other things to consider (or how to make things worse!)

Incorrect calibration doesn’t only result in artifacts that make the bed appear to be less than flat.  As well as a “bowl” or “dome” or other issue, print scale is also affected.  Whilst G29 can use it’s “correction/fudge table” to adjust the Z value to “correct” the apparent issue – it doesn’t do anything to fix the scale.   Most people then hit the forums where someone will suggest to either tweak the steps/mm,, diagonal rod or delta radius – or all three.

Making a tweak to one or all of these, especially without a calibrated starting point, is how things then turn from bad to worse.  How much do you change of what?  well actually it’s going to be impossible to tell when you’ve taken a badly calibrated printer, added a fudge factor and then changed the initial settings.

It’s really for this reason that it’s better to ignore G29 altogether.  leave the fudge factor out of it and concentrate your efforts on getting your printer set up right.  Once it is, there are some easy tools out there to fine tune your scaling (in the 3 directions a delta gets tuned in – not using a square!) and you can keep using those values unless you actually change something.  In fact – knowing the correct delta parameters would even allow you to set up a completely new controller (such as a Duet or Smoothiware) and it should still work correctly.

Further Reading