Showing posts with label calibration. Show all posts
Showing posts with label calibration. Show all posts

13.1.13

Backlash

Yesterday I discovered a significant amount of backlash in my Ultimaker's axes. This is how I fixed it.

First I isolated where the backlash was coming from. I used a bit of blue tape and stuck it to shafts and belts in the mechanical linkage while driving the axis back and forth with the smallest step in PrintRun. The reason for the blue tape is to amplify the small angular or linear motions enough to see them.

Starting at the motor shaft, observe the motion of the blue tape while clicking the small step left and right (X) or up and down (Y) in PrintRun. If you observe motion in both directions move to the next part in the linkage (pulley, belt, shaft). At some point in the process, the blue tape doesn't move unless you click the step button several times. The joint between the current part and the previous part is the problem.

For me, this was right at the beginning, either where the pulleys are set-screwed onto the motor shafts or the small pulley tension is set by the four motor mounting screws. So I took off the motor, removed and reattached the pulley on the motor shaft (to let the set screw get a new grip on the shaft), and reassembled it with a lot more tension in the small belts. I was able to remove most of the backlash just from that.

This also explains the flat spots I was getting when using G2 and G3 arc codes.

9.4.12

Retract Calibration

Besides putting plastic where you want, the other half of the 3D printing problem is avoiding putting plastic where you don't. This is easy for large, potato shaped objects, but when you want to create fine features at the resolution of the machine you need to pay close attention to settings that affect voids.
I know of at least three modules in the Skeinforge module chain that attempt to address this problem, but there are probably more. The one that comes out-of-the-box is called comb. From what I understand so far, comb works by moving the extruder over already printed parts as much as possible rather than moving the extruder over a void which would leave a thread of filament dangling. This only works to an extent since often there's no place to hide.
To illustrate, I've created a fine featured part similar to the 0.5mm Thin Wall Box. It looks like this.
Castellated 0.5mm Thin Wall Box
The dimensions are 20mm on a side, 5mm high and the walls are 0.5mm thick. The slots are 2, 4, 6, and 8mm wide and 4mm deep. This is what the part looks like when using comb and with comb off beside the normal thin wall box.
With and Without Comb
As you can see comparing the walls, comb messes up the extruded areas in addition to cleaning up the void areas. Another module in the module chain that tries to fix the problem is called oozebane. From its description oozebane turns off the extruder before crossing a void and turns it on before resuming. The oozebane module is not turned on or exposed by the Cura software.

The module that is exposed in Cura is dimension. The dimension module converts the simple extruder on/off codes (the obsolete M101 and M103 codes), that are carried through the module chain up to that point, into the E 'dimension' values passed to the firmware. This relieves the firmware of calculating the extruder motor distances using the travel distances which involves compute intensive square root operations that the little microprocessor really doesn't have time for. It also provides a way to manipulate the extruder 'E' commands to retract filament when passing into a void by reversing the extruder motor - ostensibly to suck molten plastic back into the extruder, but more likely just to remove the latent pressure in the melt chamber. When starting extrusion on the other side of the void, it adds 'E' to perform a catch-up by advancing the filament back to where it was before the void.

The knobs you get to play with in ReplicatorG and Cura are a subset of the parameters available for the dimension module, but include the basic ones:

Dimension Parameters in ReplicatorG and Cura
What I need to find out is valid, or hopefully optimum, values for the four Cura parameters (on the right).
  • Minimum travel (mm) - the length of void path that has to be present before using retraction when jumping the void. This is not exposed in the UI of ReplicatorG.
  • Speed (mm/sec) - the speed of the extruder motor when doing the retraction and subsequent catch-up to start extruding again. This corresponds to Extruder Retraction Speed (mm/s).
  • Distance (mm) - the amount of filament to draw back and catch-up when doing a retraction. This corresponds to Retraction Distance (millimeters).
  • Extra length on start (mm) - the amount of extra filament to extrude when doing the catch-up. This corresponds to Restart Extra Distance (millimeters).
But first, I need a good test case. Part of the reason that comb-off print looks as bad as it does for this example is because there is a prior module called inset that behaves badly with small features. It's algorithm works well for large areas, but small features drive it nuts. The algorithm has two phases, one that does the actual insetting, and another that tries to simplify extrude paths that lie basically on top of one another. It works well for the thin wall box, but not so well for the castellated version. Here is a picture of what it does.
Inset Algorithm.
By way of explanation, the image is of just one corner of the castellated box on a layer above 1mm, so the inset is a 1mm wide rounded corner L shaped polygon (0.5mm wall thickness less 0.2mm of inset on both sides = 0.1mm) down the center. Overlayed on top of that are the algorithmically "widened" edges in two flavours - narrow diamond shapes and thicker hexagonal shapes. As it processes the polygon edge by edge, subsequent segments running through these "widened" areas are removed - identified in red. This leaves the magenta segments to be printed - which is a problem. The problem is well illustrated by the (excellent) GCode viewer built into Cura, as the mess on the left.

Before and After GCode using Cura
The red lines are extruding, and the blue lines are move operations. As you can see the extrude paths remaining after the inset algorithm finishes leave no choice but for large numbers of void jumps to and from the corners (where the magenta paths start and end).
One of the huge benefits of open source software is the ability to go in and fix a problem. It's also one of the drawbacks, because it can be an incredible time sink. After quite a while of looking into the code, I eventually gave up trying to fix it and wrote my own module. The result is shown on the right.

So, on to the calibration.

Varying the retraction distance first, I observed that only with retraction distances greater than 0.4mm or so did the small 2mm slot start to open up. I think this is because of the hysteresis built into the system with the filament rattling around a bit in the Bowden tube, compression of the filament, gear backlash in the extruder, etc.

Retract 0.4mm distance, 0 extra, 13.5mm/sec speed, 0.1mm layers, PLA, 200°C, 25mm/sec feedrate

There is also a noticeable thickening of the wall before and after the void where the extruder pauses to retract and catch-up. This may be able to be fixed if the firmware can handle changes to the extruder while travelling so that the retraction can begin before the movement finishes.

There are also diagonal sprue like artifacts that grow where the plastic snot rubs off in mid void. These are very weak and may pose no problem other than having to be cleaned up manually.

The wall thickness is also reduced from 0.48mm to 0.30mm, which indicates the extrudate isn't catching up after the void.

Varying the retraction speed has surprisingly little effect, other than to make the print speed slower or faster, so I recommend making it as fast as the extruder will allow, say 40mm/sec - since the maximum speed is 45mm/sec according to the firmware.

Increasing the extra length parameter causes the wall thickness to increase back to the nominal thickness (as for the thin wall box without the slots) with only a very small value, e.g. 0.025mm at a retraction distance of 0.6mm and 0.035mm at a retraction distance of 1.0mm.

So it seems the parameters I'll use in the future are:

  • Minimum travel (mm) - 1.0mm (default).
  • Speed (mm/sec) - 40mm/sec (maximum).
  • Distance (mm) - 1.0mm (to remove hysteresis).
  • Extra length on start (mm) - 0.035mm.


Retract  0.8, 0.9 and 1.0mm distance, 0.035 extra, 40mm/sec retract speed, 0.1mm layers, PLA, 200°C, 25mm/sec feedrate
This is still not ideal, but I think it's better than it was.





20.11.11

Z Axis Calibration - The Movie

After implementing the Z-Axis limit switch fix from GeneralRuleOfDumb, it becomes possible to repeatably trigger the switch, so this is the calibration video.

12.11.11

Z Axis Limit Switch

In order to determine when I've succeeded in reworking the Z Axis Limit Switch, I first run a calibration with the existing configuration and measure it.

First we make the bed conductive, by pressing a sheet of aluminum foil onto a dampened bed with a wet paintbrush. I suppose you could use a wet paper towel just as well.

Then we make the tip of the extruder conductive. I would have thought it was, being metal and all, but preliminary tests showed that some plastic had covered the tip from a prior build. So we wipe the extruder nozzle well with a paper towel with acetone on it. Test that the plastic is off by checking for continuity when a flat object like a screw driver blade is brought up to touch the very tip of the extruder nozzle. The metal shield around the heater wires is grounded, so you can clip an alligator clip to that.

Then we set up a digital multimeter as an audible continuity meter and fire up the machine panel of the ReplicatorG software.

By jogging the Z axis, measuring continuity and playing with the adjustment screws of the limit switch, you can get the switch to trip at the same time as the continuity meter indicates the extruder is touching the bed.

It turns out that the mechanical switch has about 0.4 mm of hysteresis. That is, the switch closes at position 0, but you need to back it off to 0.4mm before the switch opens again (see the video for an explanation).

29.10.11

Anticipation

I'm awaiting the arrival of my Ultimaker 3D printer. The printer was shipped before I left for vacation, but was returned by DHL for some reason. It should be on it's way now.

I'm intrigued by some of the objects shown on Dave Durant's blog. I'm already thinking of how to calibrate and tune the machine to be able to do as good as those pieces.

For that, I need a good way to make linear measurements. What sort of home made device can be created to measure repeatability and accuracy of position on the order of 0 to 20cm?

For repeatability I'm thinking of a parallel plate capacitor setup that would convert position to capacitance - which I have a meter for. For a couple of plates with an area of 400 square millimeters (a square 2 centimeters on a side), separated by steps of 0.05 mm (1/16th micro stepping), gives a capacitance of 70.8, 35.4, 23.6, 17.7, etc. picoFarads according to a parallel plate capacitance calculator. So that approach doesn't seem like it would be a good method.