After your delta robot is able to move around and print reliably, you may want to fine-tune the calibration so that you can be confident the motion is accurate and the 3D objects are printed the correct size. This process is not difficult, but there are important steps to cover, so the walkthrough may seem a bit long. The end goal for calibration is to achieve two things:
- Ensuring the end effector motion is flat across the entire build platform
- Ensuring the length of movement in the x-y plane is the same as anticipated in software
The first can be done by adjusting the relative distances from each mechanical endstop to a corresponding point on the outer edge of the build platform until they are all equidistant. The point in the center of the platform is then measured, and depending on which direction it needs to be adjusted, there is a value in the firmware to adjust accordingly.
After the motion passes the planar test, it is time to print the delta calibration object and measure the output with calipers. First is a verification the motion is flat based on measurements, and then the length of the arms in firmware will get adjusted until all the dimensions measure up correctly. Both of these core procedures can be an iterative process, so patience is essential to calibrate well. For more information on optimizing design to play well with the delta firmware, you can expand the Design Optimization section.
Design Optimization
Accurate movement is what separates a recreational toy from an industrial tool. If your intentions are to create organically shaped objects of arbitrary size, then accuracy may not be important to you. On the other hand, if you want to create an object that must interact with other existing real-life objects, then it is essential to have accurate movements so that you have confidence what you are creating is going to be to scale.
In the case of a delta robot, Calibration is not so trivial and can require a few manual adjustments. This is one of the disadvantages when comparing with a more traditional cartesian robot platform. A cartesian axis allows you to isolate movement in the direction of that axis, measure actual movement vs. ideal and scale the relationship between motor movement and length. The difference in a delta axis is that the relationship between motor movement and length depends on the angle of the arms, so it is not as straight forward to correct.
Understanding where positional inaccuracies are created can be a challenge and requires some background on how the firmware is controlling the machine. Just like anything else, the firmware makes some necessary assumptions about the robot that may not be the most accurate in real-life. The most important assumption is that the machine is symmetrically built. A simplified model of delta robot geometry can be seen below, and is what the firmware is defining.
All three sets of arms and vertical towers must be 100% identical to each other for symmetry to hold true, and unfortunately even the factories of Apple could not produce such a thing. This means there will always be a little error in every build, so the trick is to make sure it is small enough that variability in plastic extrusion/diameter is much larger and will mask comparatively small positional error. The trick to achieving this is in the mechanical design of the machine itself, it should be using high tolerance manufacturing methods and avoid stacking these tolerances wherever possible. The tradeoff for having less parts in a delta robot design is that manufacturing becomes more challenging and possibly more expensive.
To avoid a painful calibration experience, these are some Important Mechanical Considerations in the design of a Delta Robot:
- All three vertical towers are equidistant from the imaginary central axis of the machine and are all parallel to each other
- All arms are identical in length and each pair forms a perfect parallelogram at all times
- The distance from the center of the end effector to the imaginary axis where the joints on the arms connect to it must all be equal
- The distance from the center of the vertical tower rods to where the arms connect to the moving carriages must all be equal
- There must be no backlash while moving the carriages around on any of the vertical towers
- The joints on the arms must have as little resistance as possible and are properly constrained to avoid any lateral movement
Every single one of these assumptions is very difficult to achieve, but makes for an excellent manufacturing and design challenge. Assuming all of the above criteria are as true as you can make it, then you are ready to continue on with the calibration procedure!
The good news is that once properly calibrated, the same firmware values should hold true throughout the lifetime of the machine unless some major mechanical adjustments have been made.
To calibrate end effector motion, we need to write g-code telling the machine go to three coordinates equidistant from the center of the build platform as well as a 4th point in the center, all at a height of z=0. If you don’t want to write out the g-code by hand, you can download and edit your machine configuration values in this python script to generate g-code for you.
A piece of paper or cardstock should be placed between the nozzle and platform to be used like a feeler gage. An adjustment can be made to either the platform height or the endstop height until there is a noticeable amount of pinching between the paper and nozzle. If using the euclid heated build platform, loosen the closest mouting screw on the platform and the spring will raise the platform up.
Once the points in images A, B, and C all feel equal, you can compare with the feel of the center point, image D. This process involves incrementally changing Delta_Radius in the firmware until all 4 points, A, B, C and D, have an equal amount of pinching force against the paper. This ensures that across the entire platform the end effector motion is indeed planar.
Planar Motion - Step1
Run the four generated g-code files one by one, starting with Xtower, Ytower, and Ztower. Adjust the height until there is a good grip on the paper, but not too tight that you can not remove it.
You may need to cycle through the 3 outer points more than once before you are happy with the results.
Planar Motion - Step2
Compare the 3 points you just adjusted with the center point.
The grip on the card will decide how to change DELTA_RADIUS. (Bring nozzle down -> make DELTA_RADIUS larger; Bring nozzle up -> make DELTA_RADIUS smaller)
Planar Motion - Step3
Open up Configuration.h in the Marlin firmware, and scroll down until you find the ===Delta Settings=== section. Delta_Radius is the variable we want to change based on step 2. As you can see DELTA_RADIUS is defined as (DELTA_SMOOTH_ROD_OFFSET – DELTA_EFFECTOR_OFFSET – DELTA_CARRIAGE_OFFSET), so we can adjust one of those three values to indirectly change DELTA_RADIUS.
Adjusting DELTA_SMOOTH_ROD_OFFSET will have the same effect, so we will tweak that number instead. Make sure there is a decimal point in the value for the firmware to properly compile. Re-flash the firmware onto the motherboard and start at step 1 again. When all 4 points are at the same height, it is time to move on to the dimensional accuracy.
Calibrating for dimensional accuracy is done by printing out the Delta Calibration 3d model and measuring it with calipers. The OpenSCAD and STL files for the object below can be found here.
The model is made up of a 40mm square combined with 2x 120mm long rectangles. Assuming the delta arms are all the same length, there are a few conclusions we can make from measuring the dimensions of the printed object:
- Are the 3 vertical towers equidistant from the center of the machine? If so, the x-dimensions and the y-dimensions will be equal. (i.e. the vertical 120mm rectangle and the horizontal rectangle are the same length, even if not exactly 120mm long.) Otherwise, there is some asymmetry that needs fixing in the mechanical build.
- Is the planar motion calibrated in the previous step flat enough? If so, the dimensional error of the 40mm square and the 120mm rectangle will be equal. (i.e. the object measures to be ~40.15mm and ~120.18mm. The accuracy is off by approximately the same amount regardless of length, and can be adjusted for.) Otherwise the motion still has an arc to it and the dimensional accuracy will continue to suffer.
- Is the arm length properly calibrated in the firmware? If so, the measured dimensions will match that of the original 3D model. (If the size of the measured object is too small, decrease arm length, and if the object is too big, increase arm length.)
Dimensional Accuracy - Step1
Print out the delta calibration object
Dimensional Accuracy - Step2
Measure the lengths of the 40mm square and 120mm rectangles and make note of the dimensions.
If the x and y dimensions are not the same, there is likely a problem with alignment of the vertical towers. If both lengths are off by the same amount, you are ready to move on to the next step. If the error is larger on one than the other, the end effector is most likely still moving up or down in the center of the platform. You can try adjusting the firmware in the same direction as earlier, except change it a bit more and see how that changes the results.
Dimensional Accuracy - Step3
Open up the Configuration.h page of the Marlin firmware, and navigate to the ===Delta Settings=== section. DELTA_DIAGONAL_ROD is the firmware value representing the lengths of the arms.
If the size of the measured object is too small, decrease arm length, and if the object is too big, increase arm length. You may need to repeat this process a few times until the dimensions match the 3D model. Once you are able to print the correct size, you have successfully completed calibration and can begin printing anything with a new sense of confidence. Congratulations!