Friday, August 3, 2018

CoreXY Mechanism Layout and Belt Tensioning

One Level or Two?

The original design for corexy used belts that were on stacked on two levels.  When you look at the photo below, one of the things that jumps out at you is that the belts appear to cross.  They only do that because the designer chose to use separate axles for the corner pulleys.  If the pulleys were stacked on common axles, the belts would not appear to cross.

Original coreXY mechanism with all belts and pulleys on two levels (look closely).  

Close up of the Y axis pulleys set at different Z levels in order to maintain the parallel relationship of the belts and the guide rails.  The corner and drive pulleys are set at two different Z levels, too. 

You can lay the belts out so they are on the same Z level.  That requires separate axles and so lateral offsets for each and every pulley.  It also requires that the belts cross over each other, usually at the M segment.  The belts are going to touch there, so people usually put twists in the belts in that segment so that at the crossover point the smooth back sides of the belts are in contact instead of the toothed sides of the belts.

The thing that many people fail to notice, and that the original designer didn't explicitly state is that there are some critical relationships between the belts and the guide rails. The most important thing in any coreXY implementation is that the belt segments (a segment being the belt between two pulleys or between the extruder carriage and the end pulleys) whose length varies (labeled A-H in the diagram below), must be kept parallel to their respective guide rails. When I say parallel, I mean the literal definition of parallel in the XY, XZ, and YZ planes. 
Notice, the belts don't cross at M, the upper belt stays on the upper level and the lower belt stays on the lower level, everywhere.  If you laid out a corexy machine with both belts on the same level, you'd have to use separate axles for all the pulleys and the belts would have to cross at M.

While you do need individual pulleys for each belt, they don't have to be laterally separated like the original mechanism.  They can be stacked so that they share axles, as I did in building UMMD. That leads to a more compact layout (smaller foot print) that can be easier to build and align. Keeping the belts parallel to their guide rails requires careful placement of the pulleys and motors. If you use laterally separated pulleys and axles, you will have 10 points (the locations of the pulleys and motors) of potential error. If you stack the pulleys on shared axles, there are only 6 points of potential error to deal with.

UMMD's coreXY mechanism.  All the pulleys are stacked, and belt segments A-H are parallel to the guide rails.

As I have stated many times, segments A-H must be parallel to the guide rails or the belt tension will vary with the position of the extruder carriage.  It may not be obvious why, and I could spend hours deriving the trigonometric equations to calculate the lengths of the belt segments, but there's a much faster, easier way to get numerical values that demonstrates the importance of correct layout.  I drew some sketches of the pulleys and one belt in a corexy mechanism, with belt segments B and G out of parallel with the Y axis.  Here are the three sketches overlaid so you can see that the only thing that changes is the extruder carriage position and the lengths of belt segments B and G:

3 sketches overlaid showing pulleys, motor and one belt.  The extruder carriage is shown in two positions, 200 mm apart in the Y direction.

Here are the dimensions of the parts.  The layout is about what you might use for a printer that can print over a 200x200 mm bed area.

Here is the area enclosed by the belt with the extruder carriage at one Y position.  The "loop length" is the perimeter of that area, essentially equal to the belt length (plus a little of the perimeter of the extruder carriage).

Here is the area enclosed by the belt with the extruder carriage at the other Y position, 200 mm away from the first.  The "loop length" is the perimeter of the area, essentially equal to the belt length (plus a little of the perimeter of the extruder carriage).
Notice that the "loop length" -i.e. the perimeter- changes from 1368.3532 mm to 1358.4474 mm.  That's about a -10 mm change in loop length over a 200 mm movement!  That is why the belt tension will vary with the position of the extruder carriage if the belt segments are not parallel to the guide rails.  If you had tensioned the belt with the extruder at the first position, is would tighten up when you moved to the second position.  If you had tightened the belt at the second position, it would get very loose as you moved toward the first position.  Belts are very strong, and they will not stretch 10 mm.  That means something is going to fail.  The mechanism is going to bind and stop moving, or maybe the motor is going to start spinning the pulley without moving the belt.

Maybe you're skeptical of the above.  I have prepared a second set of sketches, similar to those above, but this time with the belt segments parallel to the X and Y axes.

Here are three sketches overlaid, this time with the belt segments parallel to the guide rails.  Once again, I moved the extruder carriage by 200 mm in Y, so the lengths of the belt segments change and the position of the Y axis pulleys and extruder changes.

Here's the belt length (plus a little of the extruder carriage perimeter) with the extruder carriage in the first position.

Here is the belt length (plus a little of the extruder carriage perimeter) with the extruder carriage 200 mm away from the first position.  
Notice that the loop length doesn't change even though the extruder carriage is moved by 200 mm.  That means the belt tension will be constant regardless of the position of the extruder carriage.  All these drawings are simplified- I did not include the thickness of the belt, as you should when you lay out and build a corexy design- more on that, below.

In the first set of sketches, I used a pretty extreme out-of-parallel dimension, but the same principle applies even if the offset from parallel is much smaller.  In my illustrations, the X-parallel belt segments were parallel to the X axis guide rail.  Now imagine what can happen if you combine out-of-parallel Y segments with out-of-parallel X segments...

Look at this layout for a corexy printer mechanism (from and see if you can spot any problems with the belt paths.  It looks like none of the segments that are supposed to be parallel to the guide rails are parallel to the guide rails!  How well do you think that's going to work?
Here's a look down one of the Y axis rails in a printer called "autox3d".  Do those short segments look parallel to the rail?
Here's an image I used in a previous post...  Absolutely everything about the belt routing is wrong in this build.  Notice the belt wrapped around the drive pulley at the left-rear and notice the belt wrapped around the pulley at the right-rear.  Do you think there is equal tension in those belts?  Do you think the tension is going to be constant when the extruder carriage moves?  Notice that the belts cross for some reason- vertically!  Do you think this will print well?
The examples above are just three of dozens you can find scattered around 3D printing web sites, so when you are shopping for a corexy layout to build or buy, study the designs carefully.  Ignore claims that "it works OK" when the designer didn't understand and lay out the mechanism properly.  OK to him may mean something different to you.  OK for printing Yoda heads at the center of the bed may be different from OK to print threaded parts that screw together or parts that have to mate with other objects all over the bed plate.  OK if it works for a couple weeks may not be OK if you want the machine to work for a couple years.

One thing you don't want to do is run a belt between two pulleys that are offset along their axes (like the picture above).  Gear belts have teeth that are perpendicular to the length of the belt.  The pulleys have teeth that are parallel to the pulley's axis.  The two are intended to be used with the belt running perpendicular to the axis of the pulleys and can't tolerate much offset.  If you offset the pulleys and try to run a belt between them, the belt won't be perpendicular to the pulleys' axles.  That will create a lot of stress/strain on the edges of the belt and wear on the pulleys and belt and will lead to premature failure.  What this means is that if you build a machine with stacked belts, each belt has to stay on its own level, everywhere.  Don't cross the belts at M and bring the upper belt down and the lower belt up.  There is no reason to do that and it will create all sorts of problems.

Belt Thickness

One of the fine points of laying out these mechanisms is including the thickness of the belt (or cable) in your layout planning.  The belt thickness affects the locations of some of the pulleys and the attachment points at the extruder carriage, so it affects the design of the clamps at the extruder carriage.

GT2 belt, depending on who makes it and whether it's steel or glass core, comes in different thicknesses, usually 1.4-1.8 mm measured with a caliper.  That difference matters because if you ignore it, the belts won't be parallel to the guide rails in the critical segments A-H.

Here's a typical drawing of a GT2 drive pulley, though many don't come with any drawing:

The "outside diameter" value is what you would measure with a caliper on the pulley's teeth.  The pitch diameter is used to calculate the motion when driving the system with a standard (non stepper) motor and in selecting/sizing closed loop belts.

Belts vary in thickness from one maker to the next, so you can't really use the pitch diameter value for laying out a printer mechanism.  The best approach is to obtain the drive pulleys and belts you are going to use before you do the final layout so that you can measure the parts.  Measure the pulley with the belt wrapped around it and use half that value (PBr in the photo below) when you plan the belt layout.

This is what happens when a belt wraps around a toothed pulley.  If the belt thickness measured from the back to the tips of the teeth is 1.5 mm, when you wrap the belt around the pulley, the pulley's radius, Pr, increases to PBr which is less than Pr + the belt thickness.

This is important because in a coreXY mechanism, the belt thickness affects how you position pulleys and belt clamps.  For example, one side of the drive pulley belt goes to the Y axis bearing blocks, to smooth pulleys.  If you just use Pr to figure out where to put the smooth pulley axle, the belt in segments A and G won't be parallel to the Y axis guide rails.

20 tooth GT2 pulley diameter = 12.25mm, Pr= 6.125

Belt is 1.69 mm thick.

Pulley plus belt diameter is 14.55mm, so PBr is 7.275 mm

Laying out pulley locations.  If you just use the measured diameters of the pulleys and ignore the thickness of the belt on the drive pulley (left), you will position the Y axis pulley in the wrong place and when you put a belt on it, the belt won't be parallel to the Y axis.  You have to take into account the thickness of the belt on the drive pulley (right) to ensure that segment A will be parallel to the Y axis guide rail.
If you're using the same size pulleys (bearings) at the corners, they should be positioned in line with the pulleys on the Y axis bearing blocks.  You'll have to measure the diameter with the belt wrapped around them anywhere you use toothed pulleys and position them to keep segments B and H parallel to the Y axis rails.

It seems like a small thing, but attention to detail like this is what separates great printers from junk.  I've shown what happens if the belt segments A-H aren't parallel to the guide rails- belt tension will vary with extruder carriage position. Changes in belt tension can allow the X axis to shift out of square with the Y axis (more on why, below) resulting in distortion in print geometry.  The distortion may not be noticeable if you print at the center of the bed but will get worse as the prints move away from the center.  Also, you set steps/mm in X and Y in the firmware configuration.  That assumes that the belts are parallel to the X and Y axes of the printer and that the X and Y axes are square.  If you change that relationship by improper positioning of the pulleys, steps/mm will vary with extruder carriage position, again resulting in distorted print geometry.

The same care is required when anchoring the belts at the extruder carriage.  The belts/cables must be kept parallel to the X axis guide rail for all the reasons detailed above.  In UMMD, I used 22 mm diameter F608 bearings for the Y axis pulleys.  That meant I had to anchor the belts 22 mm apart.

The belt clamps (yellow) were designed to match the diameter of the Y axis pulleys so the belts would be kept parallel to each other, and the clamps were carefully positioned on the extruder carriage to keep the belts parallel to the X axis.

Steel Core or Glass Core?

The two most common GT2 belt cores are glass and steel.  Both have several little "cables" inside that reinforce the belt to minimize stretch.  Steel core belt reinforcement cables consist of a few stainless steel wires. Each glass core belt reinforcement cable consists of hundreds of micron-thin strands.  Why pick one over the other?

Though neither type will stretch very much, in theory, the steel reinforced belts will stretch less at any given tension.  But there are other considerations.

Glass reinforced belts are much more flexible than steel reinforced belts.  When you try to bend a steel reinforced belt around a pulley, it resists and tries to remain straight.  In a coreXY mechanism, you have to bend each belt around 5 pulleys.  That extra effort requires power from the motors.  You have to pull harder on the belts to get adequate tension because the belt is resisting the bending more than a glass reinforced belt.  That means your machine has to be built more solidly to use steel core belts.  

One mystery surrounding steel reinforced belts is the minimum pulley size required to ensure long belt life.  If the pulleys are too small, all the flexing around the pulleys will cause the steel reinforcement cables to fatigue and break, and then the belt will start stretching near the break in the cable.  That causes all sorts of mysterious problems with the prints that are very hard to trace to the source.

In a coreXY printer, everyone wants to use small diameter pulleys to save weight and minimize size.  So the question is, if you want to use steel core belts, how small can the pulleys be?  Since the manufacturers of the steel core GT2 belt usually don't provide that spec, we can look to the next best source of information, steel cable manufacturers.

Two of the determinants of minimum bend radius for a steel cable is the number of strands and the overall diameter of the cable.  If you look at the tables, here, you'll see that as the number of individual strands of wire in the cable increase, the allowable pulley diameter decreases. The low end 3x7 cable has 21 strands and is OK to bend around a pulley that is 50x the diameter of the cable.  At the high end, a 7x49 cable (343 wires) can be used with pulleys that are 15x the diameter of the cable.

The glass reinforced belt cables are more like the high end of that table, with hundreds of strands of glass in each reinforcement cable, so they can be used with smaller diameter pulleys than the steel reinforced cable that is more like the low end of the table and requires 50x the diameter of the cable.  

I took apart a steel reinforced belt to see what the structure of the reinforcement cables was like.  I found, in the particular belt I looked at, 6 wires per reinforcement cable.  That tells me that we need much more than 50x the diameter of the cable for the pulleys.  It's hard to measure the "diameter" of the individual reinforcement cables because they are buried in the belt, but if we assume they are 0.5 mm diameter (the belt is about 1.7 mm thick, so a reasonable assumption), that would say that the pulley diameter should probably be more than 50 x 0.5mm = 25 mm.  How much more is anyone's guess.

Here are the individual steel wires in a steel reinforced GT2 belt.  In this particular belt, each reinforcement cable consists of 6 strands of steel wire.
Glass reinforced belts work well, even on smaller pulleys.  Unless you're going to use very large diameter pulleys (maybe 30-50 mm), I'd stay away from steel reinforced belts for a coreXY mechanism.  If you're worried about belts stretching, buy wider belts.  9mm wide glass core GT2 belts only cost a little more than 6 mm wide belts, and will stretch less for any specific tension.  If you must use steel reinforced belts, be prepared to replace them as they fail.

Tensioning the belts/cables

In the diagram, showing corexy with stacked pulleys/belts, segments labeled A-H have to be parallel to the guide rails. As we've seen, that requires careful placement of the pulleys, motors, and belt attachments at the extruder carriage. The other belt segments J, K, and M, don't have to be parallel because their length is fixed by the placement of the motors and pulleys. That parallel requirement and the layout diagram can tell you the permissible ways to tighten the belts. You can't move anything in any way that will disturb the belts' parallel relationships to the guide rails at segments A-H. That still leaves several places where you can tension the belts. You can pull on the belts where they attach to the extruder carriage (pull only in the X direction), you can move the motors and the corner pulleys in the Y direction, or you can deflect the belts somewhere along segments J and K, or M.

These are all the ways you can tension the belts in a corexy mechanism.  None of them will change the parallel relationship between the guide rails and segments A-H.

As you apply tension to the belts, you create a torque on the X axis. In the image below, the green arrows show the forces at P1 and P2 created by tension in the lower belt. The blue arrows show forces at P1 and P2 due to tension in the upper belt. The orange arrows are the vector sum of the forces on P1 and P2 when the tensions on the belts are matched. If the tensions aren't matched, the orange arrows won't be pointing along the X axis and will cause the ends of the X axis to tilt relative to the Y axis as much as imperfections (slop in bearings, flex in the frame and guide rails, etc.) in the mechanism allow. So what you want is to match the tensions in the two belts as closely as possible. 

Forces on Y axis pulleys due to tension in belts.  Green arrows are the forces vectors due to tension on the lower belt, blue arrows are force vectors due to tension on the upper belt.  The orange arrows are the vector sum of the blue and green arrows.  As long as the tensions are matched, the orange arrows will point along the X axis and there won't be any torque on the X axis.

This is another reason why it is important to position the pulleys carefully, so that belt tension doesn't vary with the position of the extruder carriage.  If the tension varies, there will be twisting torque applied to the X axis as the extruder carriage moves. 

In corexy mechanisms, when you apply force to one belt (move one of the motors in the Y direction, for example) to change its tension, you also change the tension on the other belt. When you assemble the mechanism and adjust tension on the first belt, the X axis will shift out of square with the Y axis. When you adjust tension on the second belt, you do so until it pulls the X axis back into square with the Y axis. At that point if you feel the tension isn't high enough, you repeat the tightening sequence.

How much tension is enough?  Unfortunately, that's hard to say.  You can buy instruments that measure belt tension by pushing on a span of belt and measuring the deflection, but without any specs on the belts most people use, having a number isn't all that useful. Fortunately, belts work pretty well as long as you take out the slack. Some people pluck the belts like guitar strings to decide if they're tight enough and equal tension, but the real test of relative tension is the squareness of the X and Y axes, regardless of the absolute tension in the individual belts.  So get them tight, but not too tight, and make sure the X and Y axes are square, and you should be fine.  If the belts are too loose you might see some defects like ringing in the print surface that diminish if you tighten the belts.  Ringing can be caused by acceleration and jerk settings, too, so adjusting belt tension alone isn't likely to cure a ringing problem.

All of the above applies to machines with belts or cables that aren't stacked, except that cables can be shifted in Z without creating too many problems.  Cables are a whole different animal that have a unique set of problems and advantages.  In a corexy mechanism, belts are a lot easier to deal with.

Designing a CoreXY Mechanism

When you design any printer, you can work in different ways.  You can start at the outside of the printer and design and build inward, or you can start on the inside and build outward.  The former is better if you have very specific goals with regards to the overall size of the machine- maybe it has to fit in a specific cabinet or specific location in your house or office,   and the latter is better if you have very specific goals for the printing capacity of the machine.  If your goal is a specific print capacity, and you design and build the frame and enclosure first, you may have to struggle to fit the mechanism that meets your print capacity goal inside it and you might not be able to do it.

People often forget about the size of the extruder and the impact that has on the size of the mechanism to move it and the size of the enclosure that will fit that mechanism.  You have to design in some means of tensioning belts, and that type of stuff take up space that has to be included in your design.

I suggest that if you're going to design and build a printer to have a specific print capacity, you start at the extruder carriage and work your way outward, with the frame/enclosure being the last thing you design.  If the extruder is 100 mm wide, you're going to need a 400 mm wide space in order to move the nozzle 300 mm.  If you think you might want to add a second extruder in the future, design the extruder carriage for it (or allow for the space it will take up) when you figure out how big to make your corexy mechanism.

In the diagram above, that shows the possible belt tensioning locations, you'll notice that moving the motors and corner pulleys in the Y direction can be used to tighten the belts without disturbing the parallel relationships between the belts and the guide rails.  People like to use t-slot aluminum extrusions to build printer frames.  Combining the two ideas suggests that if you mount the motors and corner pulleys on the Y parallel frame members, you can apply tension to the belts simply by sliding the motors and/or the corner pulleys in the t-slot and locking them in place using t-nuts.

I recently designed and built such a mechanism using printed parts and cables instead of belts, but the concept will work with belts, too.  In this project I didn't have many constraints except that the frame size had to be 1.9 m x 1 m, and I didn't try to maximize the area of movement.  Whatever I ended up with would be big and big enough.  

Here's video of the mechanism in operation:

Motor mount rev 3 for cable driven corexy from Mark Rehorst on Vimeo.

The left corner pulley block, held in place with t-nuts.  Cable tension is adjusted by moving the block back toward the corner of the frame.

The right side corner pulley block, a mirror image of the left side block.

Here's an older version (compared to the video) of the right side motor mount.  Tensioning the cable is done by moving the mount to the right and tightening the bolts that hold it in place in the t-slot.

Notice the entire mechanism fits inside the frame, and the cables can be tightened by simply sliding the motor mounts and corner pulleys along the slots in the frame.  This particular project doesn't require micron accuracy or precision, so I wouldn't recommend duplicating it for a printer, but a similar mechanism could be built that will provide the necessary precision and accuracy, and very easy adjustment of belt tension, perhaps at the expense of the footprint of the machine being a little larger then it might be if it were optimized for small size.

Wednesday, July 4, 2018

PT100 sensors for 3D printing

I've been wanting to try polycarbonate filament for a while, but didn't have any means of reading the high hot-end temperatures required, so when I got my Duet Ethernet board from Tony at, he was kind enough to supply a PT100 interface board to go with it.

I ordered some cheapo PT100 sensors from China (when will I ever learn?) via ebay and hooked it all up.  These were supposed to be good up to 450C.  Things were fine for a little while, but after about 2 weeks of use, printing mostly ABS, I started having weird temperature behavior in the hot-end.  First it was just some small, random temperature fluctuations, and then jumps to 2000C, and finally it started throwing heater faults.

I checked the connectors, the cables, the connections to the board, and everything looked fine.  Then I noticed a message on the Panel Due console (or was it the DWC?) that said there was a short between the temperature sensor and other electronics.  Hmmm.  I pulled the PT100 sensor out of the heater block and checked its resistance between the leads and between the leads and the metal casing.  I found a short between the one of the leads and the metal casing.  The printer's frame is grounded, which means the heater block is also grounded, hence the error message about a short.

The type of cheesy PT100 sensors I bought have teflon leads that go into the steel housing.  They are completely useless for printing ABS or any material that requires much more than about 230C because the teflon breaks down when you get much higher than that.

I did some shopping on Ali-express and found that many of the PT100 suppliers will say that the sensors are good to 400C or 450C, but they don't tell you that the wires are teflon insulated, so while the sensor itself may be fine at 400C, the wires connected to it will not be.  The only insulation I know of that is reliable at 400C is glass fibers.

E3D sells a PT100 sensor for about $20 that has glass fiber insulation on the leads.  This should be good for printing ABS, PC and other high temperature filaments.  The only other PT100 sensors I could find with glass fiber lead insulation were industrial parts that cost about $80-100.

TLDR: cheap PT100 sensors with Teflon insulated leads will self-destruct when used at high temperatures, so don't try to use them for hot-end temperature readings.

UMMD: A Better Way to Set Up the Origin and RepRapFirmware Manual Bed Leveling Assist

Setting Up the Printer's Origin

In a previous post I explained how to set up the endstops and origin of a 3D printer.  In the method I outlined, slic3r is easy to set up, but Cura required some custom gcode to get prints dropped on the center of the bed.  It turn out that it's easier to set up the slicers to drop prints on the center of the bed if the printer's origin is at the printable center of the bed.

This post describes how I put UMMD's origin at the printable center of the bed with the new Duet Ethernet controller board, and how you can do the same for your printer.

First, you have to know the dimensions of the printable area of your printer's bed.  It may sound strange, but some machines can't print on the entire bed surface.  So, move your printer through it's motion limits and watch the nozzle relative to the bed.  If it is unable to print on part of the bed, mark a line (or lines) on the bed where the nozzle can't go any further.  Now mark the center point of the printable area of the bed (you can find the center by drawing diagonals between opposite corners of the printable area).

Next, move the extruder to the "home" position (where the X and Y end stop switches are both triggered). Use a ruler to measure the distance from the printable center of the bed to the nozzle in X and Y and write the numbers down.  Now move the extruder carriage to the diagonally opposite corner of the motion limits and measure again, and write down the numbers.

Make a sketch of the top view of the printer, showing the limits of nozzle travel and the outline of the printable area within those limits, like this one that I made for UMMD:
Top view of UMMD's XY stage.  The outer rectangle represents the limits of XY motion of the extruder nozzle.  The  printable area of the bed is a 300x300 mm square that fits within those limits.  The leveling screws are shown for reference (we'll use those later).  The home position is in the right rear corner of the machine because that's where the end stop switches are located.

The origin is set to the dead center of the bed's printable area.  Notice that the bed is not centered within the range of motion.  That's OK.

In the Duet config.g file, the following statements define the origin as the center of the bed's printable area:

M208 X-151 Y-185 Z0 S1 ;  sets the minimum values for all axes
M208 X150 Y153 Z680 S0  ; sets the maximum values for all axes

With the Duet (RepRapFirmware), the fact that the upper right corner is the home position is a function of where the endstop switches are positioned on the X and Y axes and the motor rotation directions.  In SmoothieWare, there are explicit statements that the X and Y axis home to max or min, and then the ordinate values to assign to each.

Now mark the coordinates of the corners of the printable area of the bed:
When you set up Cura you tell it the dimensions of the printable area of the bed (in this case, 300x300 mm), and check the "origin at center" box:

Cura custom machine setup.  There's no need to make changes to the start gcode to position the origin.
Plater view in Cura, origin at center of bed.

When you set up Slic3r, you enter the dimensions of the printable area of the bed and then enter offsets that put the origin at the center:

Slic3r bed set-up.  You enter dimensions of the printable bed area and offset values that put the origin at the center of that printable area.

And this is what you see in the Plater view- origin at center- it matches the diagram perfectly.
Why is this better?  Besides the easier setup in the slicers, it makes the gcode a little more portable between different printers, assuming they use origin at center.  Of course, you still need other things to be right for gcode to be moved from one machine to another.  You won't be able to use gcode for a 300x400x200mm print in a machine with print capacity that's 200x200x200, for example.

Manual Bed Leveling Assistant

The Duet has been working fine for a few weeks now and I am still exploring some of the options in the firmware.  One of the really great ones for people with printers like UMMD that have flat, stable beds that don't require frequent releveling, is called the "manual bed leveling assistant".  The assistant probes the bed at a few locations then does a least-squares fit and tells you how much to adjust each leveling screw up or down to minimize leveling error .  It's a quick process that works extremely well.  In order to use it, you'll need to add the coordinates of the leveling screws in a config file statement, so start by adding the coordinates to the diagram we drew above by measuring the distance from the bed center to each of the screws:

Leveling screw coordinates added.  These coordinates will be used in the M671 statement in the config.g file.

There's going to be some gcode presented below.  You can find definitions of all the gcode supported by RepRapFirmware at this site.

You'll also need to select probing points, at least one for each leveling screw.  If you have 3 leveling screws, you might choose to use just 3 probing points.  You must use at least as many probing points as there are leveling screws, so if you have 4 screws, you need at least 4 probing points.  I chose to use five points, one near each corner of the bed and one at the center:
Probing point coordinates added.  P0-P4 designators are used in G30 statements in the bed.g file.

The config.g file has to contain a few specific lines to enable use of the manual bed leveling assistant.  First, there's and M667 statement that tells the firmware the architecture of the printer you're setting up (coreXY, delta, etc.).  Then you need a couple statements that set up the origin of the printer because everything to come will depend on the coordinates.  You need an M558 statement to tell the assistant how the probing is to be done, and an M671 statement to tell the assistant where the leveling screws are located.  In the M671 statement, list the screw coordinates reference first, then pitch, then roll.  UMMD's config.g file will contain:

M667  S1  ;  set coreXY architecture
M208 X-151 Y-185 Z0 S1 ;  set minimum travel limits (front left corner) for X, Y, and Z
M208 X150 Y153 Z680 S0;  set maximum travel limits for X, Y, and Z
M558 P0 F180 H5 T6000  ; no probe, probe at 180mm/min, start 5 mm above the bed, travel between probing points at 6000 mm/min
M671 X-161:161:0 Y0:0:-161 P0.7  ; defines leveling screw locations and thread pitch

Finally, you need to have a bed.g file that specifies the coordinates of the probing points.:

bed.g file:

G28 ;  home
G30 P0 X-140 Y-140 Z-99999  ; first probe point coordinates
G30 P1 X140 Y-140 Z-99999  ; second probe point coordinates
G30 P2 X140 Y140 Z-99999  ; third probe point coordinates
G30 P3 X-140 Y140 Z-99999  ; fourth probe point coordinates
G30 P4 X0 Y0 Z-99999 S3  ; fifth probe point coordinates, 3 leveling screws

Once all this stuff is in place, you can start the manual bed leveling assistant from the Panel Due by first preheating the bed and nozzle to print temperatures, homing all the axes, then touching the wavy looking icon under "P0" on the right side of the control screen.

Heat up the bed and nozzle, home all axes, then touch the sine wave looking icon on the right side to start the manual bed leveling assistant. Note: I did not heat the bed and nozzle for this photo...
Then you'll see a screen like this for each of the probing points:

The manual leveling assistant at work.  The nozzle will start at the height set by the H parameter in the M558 statement in the config.g file, in UMMD, that will be 5 mm above the bed.
Put a piece of paper between the bed and the nozzle and lower the nozzle using the buttons on the screen until the nozzle just grabs the paper.  After the last point has been probed, the assistant stops. and you go back to the ordinary control screen.  What happened?!!

Fear not!  Switch to the console screen and you will see a message telling you how far off the leveling is at each leveling screw, and how much to rotate it to correct the error:

The message at the bottom tells you the result of the manual leveling assist process.  The first leveling screw is considered the reference and the error and correction are always zero there.  
The example above shows that there is no error or adjustment required at the reference screw (it will always show that, and that's why you put the reference screw coordinates first in the M671 statement on config.g), the bed is low by 20 um at the pitch adjust screw, and the bed is low by 60 um at the roll adjust screw.  Since I told it the pitch of the screws are 0.7mm (the P parameter in the M671 statement in config.g), the bed Pitch adjust screw needs to be turned 0.03 of one rotation (that's not much!) in the direction that raises the bed to correct the leveling error, and the bed Roll adjust screw needs to be turned 0.08 of one turn in the direction that raises the bed to correct the leveling error.

You twist the leveling screws by the stated amounts to bring the bed into "level" (true meaning is parallel to the XY plane of the printer defined by the X and Y guide rails).  If you are full-on OCD or just borderline like me, you repeat the process as many times as it takes to satisfy you that the bed is as level as it can possibly be.

Finally, it's a good idea to readjust the Z=0 position after you're satisfied that the bed is level.

You can find info on using the manual bed leveling assistant here, and definitions of all the gcode that RepRapFirmware supports here.

Saturday, June 30, 2018

UMMD STEP and Fusion360 Files

Someone (I'm afraid I can't locate his name, sorry!) on Google groups was able to convert the .rsdoc CAD file for UMMD to a STEP file that could be imported to Fusion360 and other CAD packages.

I imported it into Fusion360 and you can download that file here.

I put the STEP file on google drive and you can download it here.

The files have not been updated with the latest electronics enclosure and layout- they still show the original configuration.

Here's what the top of the machine looks like with the Duet Ethernet controller board installation complete:

A big improvement over the original build!

Monday, June 18, 2018

Aluminum Titan Extruder from China

The original Titan extruder from E3D works pretty reliably, but has a few issues.

It's made of flexible plastic, the V6 hot-end fits a little bit loosely inside the extruder body, and the way it mounts on the printer is not very user friendly.

The flexibility of the plastic cover is a problem.  It is easy to over-tighten the screw that passes through the drive gear, which bends the cover and causes misalignment of the bearing.  The bearings used are very small and can't withstand much side-loading.  Unfortunately, that screw is one of the screws that mounts the whole assembly on the motor, and you really want it to be tight.

The V6 hot-end, also a reliable performer, is not optimal when paired with the Titan.  One of the design problems with the V6 hot end is that it has no anti-rotation features.  When you put it into a Titan extruder, it can rotate easily, even from the small force produced by the heater cartridge wires. More on the shortcomings of the V6 hot-end, here.

You can either use E3D's plastic mount, or print your own - flexible- or you can mount the extruder to a metal plate, as I have done in UMMD.  If you opt for the more secure mounting to a metal plate, when you remove the cover from the extruder, there is only one screw holding the entire extruder on the printer.  Three of the cover screws go all the way through the extruder body to the motor, so if you just want to take off the cover so you can take out the hot-end to clear a jam or to change the nozzle, you have to trust the one screw to keep the extruder in place.  That remaining screw is located behind the hot-end, so if you want to remove the extruder from the printer, you have to disassemble it completely.

The good things about the Titan include high pushing force on the filament due to the gear reduction and small diameter drive gear.

I saw an aluminum version of the Titan in a forum post and ordered one from a Chinese supplier.  It has a couple flaws that are obvious from the start, but I thought maybe those can be fixed.

Here's the aluminum Titan assembled with a V6 hot-end.  The unit I ordered came with a metal mounting bracket that should make it possible to swap extruders without taking it apart.  One nice feature that the original doesn't have is the small lock screw that grips the hot-end to keep it from rotating.

Just like the original, there's one screw located behind the hot-end that holds the extruder body onto the motor.  Three of the cover screws pass through the extruder body and into the motor.

Cover off, hot-end in place, and filament inserted.  Notice the large gap between the bottom of the drive gear and the top of the tube that guides the filament into the hot-end.  That's very bad.

This is what can happen when there's a gap between the drive gear and the filament guide tube. This is a BullDog XL extruder on SoM, and the filament is PLA or ABS.

This is that BullDog XL extruder with the front cover off.  The arrow points to the gap that allowed that mess to occur.  All they had to do to prevent the problem was make the brass tube a bit longer.  Doh! 

One more problem- the filament doesn't ride on the center of the drive gear concavity.  That means that it may tend to wander back and forth on the gear teeth, especially with the wide gap between the feed tube and the drive gear.  The result may be inconsistent extrusion because the diameter of the drive gear changes with the filament's position on it.

Extend the Filament Guide Tube

I found a piece of 1/8" OD aluminum tubing at the makerspace and used a belt sander to put a couple 45 degree chamfers on the end of the tube, then cut the tube with a jeweler's saw to about 15 mm long and deburred the ends with some jeweler's files.  Next, I drilled out the feed tube hole with a #30 drill (0.1285") and the aluminum tube fit loosely inside it.  I mixed some epoxy, put a drop on the aluminum tube, and inserted it into the feed tube on the extruder body.  I pushed it up to the drive gear and inserted a piece of filament to help hold the tube in position while the epoxy set.

Side view of the extruder with the aluminum tube installed (inside red square) and filament inserted to hold tube in position while epoxy set.  The ID of the tube is about 2 mm.

Extruder with cover off showing aluminum tube in place.
Pinch roller removed. 

The addition of the tube has made it easier to load filament, and should help control the position of the filament on the drive gear teeth.


I was curious to see if the E3D parts were compatible with the Chinese parts.  In particular I wanted to see if the Chinese Titan mount would work with the E3D Titan extruder, and if the E3D drive gear would work, too.  I am pleased to report yes to both!

I swapped the E3D drive gear into the Chinese extruder and it fit perfectly.  The aluminum extruder uses the same bearings for the drive gear, and careful measurement of the two gears finds them essentially identical except that the original drive gear diameter (the steel part that grips the filament), measured at the deepest concavity of the teeth is 7.78 mm and the Chinese drive gear is 7.39 mm in diameter.  That difference means that the steps/mm settings for the two should be slightly different.  I also noticed that there are fewer teeth in the filament drive part and they are cut deeper in the original E3D part compared to the Chinese part.  The best thing is that the filament path in the aluminum Titan seems to have been designed around the original E3D part - the concavity in the filament gripper teeth lines up perfectly with the holes that guide the filament in the aluminum extruder.

Here's the Chinese drive gear in the extruder body.  You can clearly see that the filament will be off center in the gripper teeth.

Here's an E3D drive gear mounted in the aluminum Titan.  Notice that the teeth of the filament gripper line up perfectly with the filament guide tube.
I had to take the E3D Titan off UMMD before I could mount the aluminum Titan, so I checked to see if the original E3D Titan will fit on the Chinese mount.  I am pleased to report that it fits perfectly.

Here's the E3D Titan mounted on the aluminum mount that I got with the aluminum Titan.  A perfect fit!

The other side of the E3D Titan mounted on the Chinese aluminum mount.  

Print Testing

I mounted the aluminum Titan on UMMD, rezeroed the Z axis, and ran a test print.  No problems were encountered.  After calibration I found that 443 step/mm was a good number for the extruder with the Chinese filament drive gear.

Chinese aluminum Titan extruder mounted on UMMD with an XCR3D hot end.

Aluminum Titan mounted on UMMD.

UMMD Printing With Aluminum Titan Extruder from Mark Rehorst on Vimeo.

The real test of anything like this is how it holds up with use.  I'll be using it a lot in the coming months and will do more blog posts if I encounter any problems.