Wednesday, August 21, 2013

Myths About Building A Delta

I've seen a lot of conversation on the Google Deltabot group recently having to do with fine tuning.  Time to offer my 2 cents...

My printer is based on the original Rostock design with 8mm rods and linear bearing for the vertical towers.  I use belts and pulleys, not spectra line to control the tower carriages.  I am using TRAXXAS joints, not magnetic balls or even DuBro joints.  And I am not using auto-bed-leveling code.  And I REALLY like the way my machine prints.

Auto Bed Leveling

I appreciate the work done to add automatic bed leveling to firmware.  As clever as it is, it is not a substitute for good build quality or sloppy fine tuning.  A Delta will print best when accurately built and tuned (see my earlier posts).  Auto bed leveling should keep a tuned delta printing accurately over time, hopefully isolating the printer from minor misalignment that can happen as it is moved or bumped on the workbench.  Auto bed leveling should not, however,  be used to compensate for initial firmware tuning. Turn off auto bed leveling when tuning a newly built (or re-built) delta printer, tune, and then turn it on.

Aluminum Extrusions

I am totally impressed by the visual impact and general rigidity of extrusion based printer.  But I haven't had a need to change from my Rostock / 8mm rod based configuration...my printer makes beautiful prints.  I carefully chose my linear bearings and rods, and keep after cleaning and lubrication.  And because I use belts and pulleys (which have become more available lately!) I have no steps per mm calculation headaches.  It seems to me that the original Rostock concept was most in keeping with the Maker ethic and the RepRap focus on minimizing the use of speciality items to keep the result accessible and low cost.

Diagonal Rods


The smoothest, most slop-free delta effector I have made actually used the original Rostock printed U-joints with CF rods.  My current printer uses TRAXXAS joints with CF rods, but if I find myself with another opportunity to build or rebuild, I'll seriously consider going back to the original design.  Why buy when you can make something as good or better?  I appreciate seizing opportunities to create a better mousetrap.  But is it really a better mousetrap?

Measurement and tuning

On a delta...here is what matters


  1. Build it right!  Accurate dimensions are far less important than symmetry.  The towers must be parallel and equidistant.  The six diagonal rods must all be equal in length.
  2. Turn off EEPROM and auto bed leveling when tuning.
  3. The only firmware tweaks that are important are steps per mm (which controls general X and Y movement, and Z height), DELTA_RADIUS (which controls "flatness" ) and DELTA_DIAGONAL_ROD (which controls X and Y dimensional accuracy).  Set and tune these values in this order.  
  4. I see a lot of conversation about carefully measuring DELTA_SMOOTH_ROD_OFFSET, DELTA_EFFECTOR_OFFSET, and DELTA_CARRIAGE_OFFSET.  These only matter when starting to dial in DELTA_RADIUS.  Use them as starting information.  See #3 above.  After all, what matters is that the printer is printing flat and accurately in X,Y, and Z dimensions.
  5. Tune the firmware so that the printer prints correctly.  Tuning firmware to match the (presumed) "as built"measurements of the printer is not the fast-path to a smooth and accurate printer.
  6. Only turn on EEPROM and auto bed leveling when tuning is complete.
YMMV







Thursday, July 04, 2013

A common gotcha....

I just had pointed out to me that there is a challenge in calibrating the printer with the Repetier firmware. I and others have experienced problems adjusting values in the firmware, then not seeing the effect of those adjustments in a test print.

This can be attributed to the values in EEPROM overriding any new changes made in the firmware.

The best approach is to turn off EEPROM in Repetier while calibrating.  Any changes made to the Repetier code should be immediately be applied and apparent.

#define EEPROM_MODE 0   /*disables EEPROM settings */

Perform your calibration, as below, and when complete,

#define EEPROM_MODE 1   /*enables EEPROM settings */


I hope this helps.........

Thursday, May 30, 2013

Calibrating a Delta 3D Printer

So since wrote on the topic,  I’ve migrated to the Repetier firmware and RepetierHost with Slic3r, and thought I’d update my post….

First, and foremost, build your printer as accurately as you can.  Most important is getting the three vertical towers equally spaced and as parallel to each other as possible.  The actual spacing is less important than having equal spacing of the towers.  We’ll correct for actual spacing in firmware.

Next, the six diagonal rods must be as equally matched in length as possible.  Again, the exact length is less important than getting the rods equal in length.

And we’re going to make an assumption that your build surface is flat.  A pretty good assumption, as the community consensus is to use a glass build surface.  And, typically, that glass surface is typically held at three points, so the build surface shouldn’t be mechanically warped.

Also, at this point you should have an Arduino environment, some knowledge of how to edit the Repetier or Marlin firmware, compile it, and upload it to your controller of choice.  Your printer’s upper end-stops should be working properly, and your steps per inch values for your extruder and carriage motors should be set correctly.  Your RepetierHost or Pronterface program should be able to control your printer.

What we’re going to do is:
Enter some starting values into the firmware
Calibrate each of the three towers to the actual build surface.
Calibrate the firmware to print flat (not dished or cupped) across the build surface.
Calibrate the firmware to print to correct dimensions.

1- Enter starting values into the firmware.

With your endstop screws about halfway into the carriage (allowing for adjustability in either direction), click the HOME on Pronterface or RepetierHost, and measure the distance from the tip of your extruder to the build surface.

For Repetier, edit

    DELTA_DIAGONAL_ROD in Configuration.h
    END_EFFECTOR_HORIZONTAL_OFFSET in Configuration.h
    CARRIAGE_HORIZONTAL_OFFSET in Configuration.h
    PRINTER_RADIUS in Configuration.h
    Z_MAX_LENGTH in Configuration.h

For Marlin, edit

    DELTA_DIAGONAL_ROD in Marlin.pde/Marlin.ino
    DELTA_EFFECTOR_OFFSET in Marlin.pde/Marlin.ino
    DELTA_CARRIAGE_OFFSET in Marlin.pde/Marlin.ino
    DELTA_SMOOTH_ROD_OFFSET in Marlin.pde/Marlin.ino
    Z_HOME_POS in Configuration.h

If you built your printer as designed, the default values should be pretty close.  Otherwise adjust as appropriate. I like to double check the Z_... value to avoid crashing the extruder tip into the build surface.

2- Calibrate the towers to the actual build surface.

An important trick here.  Set up four scripts in RepetierHost, or four user defined buttons in Pronterface, to move the carriage to four specific measurement locations on your build surface.  Three locations are on a circle centered on the center of your build surface immediately in front of each of the three towers.  The fourth is the actual center of your build surface.  And each of the four locations is at height Z=0.

Let’s call the three tower locations A, B, and C, and the center D.  The script code for each is:

    Button                Script
    A                      g28 g0 f8000 x-77.94 y-45 z0
    B                      g28 g0 f8000 x77.94 y-45 z0
    C                      g28 g0 f8000 x0 y90 z0
    D                      g28 g0 f8000 x0 y0 z0

(Decoded, g28 homes the printer carriage, g0 is a move to an absolute location, f8000 controls the speed of the move, and x, y, and z are followed by the corresponding coordinates in 3D Cartesian space.  The x and y coordinates are points on a circle 90mm from the build surface center and directly in front of each of the three towers.)

Now run script A in RepetierHost / click button A in Pronterface.  The carriage should move up to home, then down to a point in front of tower A.  The proper height should be just above the print surface, with clearance space for a single sheet of paper to slide between.  Adjust the end-stop screw only for tower A if necessary, then repeat the test by running the script or clicking the button.  Repeat until the paper slides between the print surface with only slight drag.

With tower A adjusted, move on to tower B, and then to tower C.  When tower C is adjusted, you should be able to go back and successfully repeat the test on tower A without having to readjust.

 3- Calibrate the firmware to print flat

At this point, it is likely that if the firmware instructs the printer to move the carriage across the build surface, the nozzle tip will not stay true to the build surface.  Even though the extruder will be at the calibrated correct Z height at each of the three tower locations, it will either be above or below the build surface at the center of the build area.  This is also corrected by adjusting the firmware. 

Run script D / click button D.  The carriage should move up to home, then straight down to the center of the build surface.  You will see one of three things.  The extruder nozzle will be above the build surface, at just the right height (using the paper test), or will hit the build surface.

The value in the firmware constant DELTA_RADIUS (both Repetier and Marlin) controls the “flatness” of the movement of the carriage at a given Z height.  If DELTA_RADIUS is too large, the extruder nozzle will track below the desired Z height inside the calibrated points A, B, and C.  If DELTA_RADIUS is too small, the extruder will track above the desired Z height inside the calibrated points A, B, and C.

However, in both Repetier and Marlin (as the code is written), you don’t adjust DELTA_RADIUS directly.  DELTA_RADIUS is calculated from the initial values entered earlier:

For Repetier in Configuration.h

   DELTA_RADIUS is
PRINTER_RADIUS - END_EFFECTOR_HORIZONTAL_OFFSET -CARRIAGE_HORIZONTAL_OFFSET

For Marlin in Marlin.ino.Marlin.pde

   DELTA_RADIUS is
DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET -DELTA_CARRIAGE_OFFSET
           
To correct the problem, the best course is to change one of the variables set earlier to force the value of DELTA_RADIUS to increase(to lower the extruder nozzle) or to decrease (to raise the nozzle).

To lower the extruder nozzle
increase DELTA_RADIUS by increasing DELTA_SMOOTH_ROD_OFFSET(Marlin) or PRINTER_RADIUS(Repetier).

To raise the extruder nozzle, 
decrease DELTA_RADIUS by decreasing  DELTA_SMOOTH_ROD_OFFSET(Marlin) or PRINTER_RADIUS(Repetier).
For your first cycle, if you are above the build surface, increase DELTA_RADIUS by (about) the same amount.  If the extruder nozzle hits the build surface, decrease DELTA_RADIUS. 

Next, repeat the ABC tower calibration process.  Changing the DELTA_RADIUS changes the tower calibrations, so you must cycle through the process of adjusting the ABC buttons/scripts again.  And when the ABC towers are set, test the center D button/script.

You may have to repeat this a few times with smaller changes to DELTA_RADIUS, but eventually, the drag on a piece of paper should be the same at all four locations.  Now the printer knows how to print flat at a given Z height.

4- Calibrate the firmware to print to correct dimensions.

At this point the printer probably prints, but the results are dimensionally wrong.  Printing something 100mm long results in a printed object that is not exactly 100 mm long.  This also, can be corrected in firmware.  Adjustments to DELTA_DIAGONAL_ROD in the firmware control the size of the printed object.

Create a simple calibration object in openscad, slice it, and print it. By measuring the actual size of the object as printed and comparing it to the size in the design, the accuracy of the printer can be assessed and adjusted.

Here is my sample openscad object:

cube([100,2,2]));

If the length of the object is wrong, adjust DELTA_DIAGONAL_ROD:

new DELTA_DIAGONAL_ROD =
100 / measured_length * original DELTA_DIAGONAL_ROD

then re-upload the firmware, and print and measure again.  When the printed object measures 100 mm, the printer is printing accurately to size and is fully calibrated.



Saturday, December 22, 2012


How To Calibrate a Rostock 3D Printer

The first step is to build the printer as accurately as you can.  The towers and the diagonal rods are critical.

The tower rods should all be equidistant from the center of the build platform, and evenly spaced from each other 120 degrees apart around the circle.  I haven't found a good way to measure between the centers of two parallel rods with a ruler or calipers. And it is pretty difficult to build using a hand cut plywood base as a reference for the inter-tower dimensions. My solution was to modify the top idler and bottom motor mount adding threaded rods to adjust the distance between. Next, I use a wooden jig with two 8mm holes into which I insert short scrap pieces of 8mm rod. I use this jig to accurately set the distance between the adjacent idlers and motor mounts, locking everything in place with the threaded rod. I end up with top and bottom triangular assemblies that are identical in diameter and with identical spacing of the towers.

The exact diameter of the assemblies is not accurate to the design, but it is within a mm or two. But no matter, I adjust for that later in the firmware.

The diagonal rods are another critical part of the build. I build mine with carbon fiber rod and TRAXXAS joints, using a jig to make sure the rods are identical in length. My jig is a piece of thin wood, with 3mm holes at the correct distance. 3mm screws with washers are in the holes and hold the TRAXXAS joints at the correct distance. A drop of CA glue holds the rod in the joint very nicely.

The exact length of the rods is not as important as getting all of the rods the same length. Plus or minus a mm or two is OK. Again, we will adjust in firmware later. Build your carriage/diagonal rod/platform/hot-end assembly.

Install your limit switches and motors to the top and bottom assemblies.
Attach your top and bottom platforms to the top idler and bottom motor mount assemblies. No need for precisely cut platforms as the threaded diagonal rods ensure accuracy.
Install the rods in the base, add the carriage/diagonal rod/platform assembly, and then the top. Add timing belts or your fishing line setup, and tighten them up.
(I use belts, and threaded rods in each tower to adjust and hold tension on the belts. See http://www.thingiverse.com/thing:30164 )

Whew...done building. On to Calibration.

The rest of the calibration is done in firmware, with a big tip of the hat to our old Greek friend, Pythagoras. Remember that he showed that we can calculate the length of the third side of any right triangle if we know the lengths of the other two sides, and which of the three sides is the hypotenuse.

So for any one tower, at any given point in the printing process, the nozzle should be a known distance from the tower. This distance is one side of the triangle. Also, we know another side of the triangle, the always constant diagonal rod distance which is also the hypotenuse of the triangle. The firmware handles the calculation of the third side of the triangle, the exact height of the carriage. Moving the vertical carriage and maintaining the 90 degree angle that defines a right triangle accurately sets the third vertex

With three towers arranged equally around a circle and some additional math, the tip of the nozzle in three dimensional space can be accurately positioned. We have an accurately built machine, now we need to get the math right.

The first step is to get the steps per mm correct in the firmware. This is well covered elsewhere and is different (or the same?) for different belts, pulleys, and stepper drivers. 

Also, get the Z_HOME_POS value correct in the firmware. It should be set to some value a skosh less than the distance from the tip of the hot end nozzle to the build surface when the carriage is at the (top) home.

If you are certain about the flatness of your bottom platform, go ahead and mount your build surface directly to it. If not, it makes sense to mount your build platform at just three points, as three points determine a plane, but a fourth point can determine a warped plane. A flat build surface is critical, but whether the surface is perfectly perpendicular to the build platform is not so much. Pythagoras says so...his theorem can handle it.

Next we will set the z height for each tower. Variations in the length of your belt or fishing line or tension may make the height of your towers a bit different, but no matter. When setting the z height, we are actually setting the stepper count/position for each tower where the nozzle should be while at the very base of the build, some small height above the actual build surface. The firmware will know that the carriage can be moved vertically between z=0 (at the bottom) and z=Z_HOME_POS) at the top.

Using pronterface, set up three buttons for this purpose. Each of the three buttons moves the carriage to a point on a circle immediately in front of one of the three towers.

My button definitions are :

g0 f8000 x-77.94 y-45 z0
g0 f8000 x77.94 y-45 z0
g0 f8000 x0 y90 z0

These points are equidistant from both the tower and the center of the build area. Use these buttons to adjust each carriage screw, one at a time. A piece of paper should show the slightest drag when moved between the nozzle and the build surface. If not, adjust the screw, a quarter turn at a time, home (up) the carriage, then remeasure. When one tower is set, move to the next.

This method prevents the adjustment of one tower's z height from affecting the current setting of the other two towers. It also assures that the z height across the entire (flat) build surface will be the same.

Not done yet!

Unavoidable build inaccuracy may lead to a nozzle that is high or low in the center of the build surface compared to the settings at the towers. We can fix this in firmware.  Faster and easier than tearing down and rebuilding with new parts or adjustments.  

Set up a fourth button set up to move the carriage to the center of the build area, 5 mm high.

g0 f8000 x0 y0 z5

Use the z axis control in pronterface to move the carriage down, a mm at a time, the last 5mm. If the carriage moves down 5mm and the nozzle is visibly above the build surface, there is a low-center condition. If the carriage can't move down a full 5mm before touching the build surface, there is a high-center condition. If the carriage moves a full 5 mm and it passes the piece of paper test, luck prevails!

The high-center and low-center conditions can be adjusted in firmware with changes to DELTA_RADIUS. And in the firmware DELTA_RADIUS is calculated from SMOOTH_ROD_OFFSET, DELTA_CARRIAGE_OFFSET, and DELTA_RADIUS. 

In order to correct low-center, DELTA_RADIUS must be increased. In order to correct high-center, DELTA_RADIUS must be decreased. Adjust your firmware accordingly, re-compile and upload.

Now, go back and re-adjust your tower heights using the three tower buttons, and check the center z height with the fourth button. The condition should be better, and maybe even fixed. A couple of cycles adjusting DELTA_RADIUS  might be needed to get this right, where the nozzle is at the same height at all four locations.

Now the printer is capable of printing across the build platform. But perhaps not accurately to size. We're not done yet!  Another firmware adjustment will fix that.   Adjustments to DELTA_DIAGONAL_ROD in the firmware control the size of the printed object.

I like to create a simple calibration object in openscad of a known size, slice it, and print it. By measuring the actual size of the object and comparing it to the size in the design, the accuracy of the printer can be assessed.

Here is my sample openscad object:

cube([100,2,2]));

If the length of the object is wrong, adjust DELTA_DIAGONAL_ROD:

new DELTA_DIAGONAL_ROD =
100 / measured_length * original DELTA_DIAGONAL_ROD

and try again.

And so what if, in the end,  the length of DELTA_DIAGONAL_ROD in the firmware doesn't match the length of the rods that were built?

Anyway this process seems to work for me. Good luck!