Sunday 25 December 2011

Mendel90

I never understood why Mendel has a triangular prism frame. The way I see it, the frame only has two functions: - To hold the Y bars in a flat plane and to support the tops of the Z bars. It isn't good at doing either:

  • The main forces on the Z bars are in the direction of the X-axis and the frame has no strength in that direction. It wobbles when the X-carriage changes direction. 
  • It also doesn't ensure the Y bars are in a flat plane because there is nothing to ensure one end triangle is not rotated slightly relative to the other. 

After a trip down a cobbled street in Sheffield my Mendel behaves as if one corner of the bed is lower than the other three. This is impossible because it has a flat sheet of glass on it, but it isn't obvious what needs to be adjusted to fix it but it must be the ends of the Y -bars. The bed needs to be level to within about 0.05mm for good results printing 0.3mm layers without a raft. That is difficult to achieve when the Y axis is strung from bars at opposite sides of the machine.

Other problems are: -

  • It gets smaller at the top, so the maximum Z travel is limited by the extruder colliding with the bars. 
  • The sizes of the Z axis and the Y axis are tied together, so you can't change one without the other. 
  • It is difficult to adjust the axes so that they are orthogonal to each other and keep them that way if the machine is moved.

This machine is my attempt answer to these problems. I am calling it Mendel90 as I can't think of a better name at the moment. The 90 is to emphasise that the frame is based on right angles rather than 60 degree triangles.


Two flat sheets are mounted at right angles to form the XY and XZ planes. Two buttresses maintain them at right angles to each other. This relies on the sheets being cut at perfect right angles but in the UK you can buy sheet materials such as MDF or acrylic cut to size and they have good right angles. The only cutting I had to do was to cut the arch out with a jig saw. It doesn't need to be accurate and it could be done with a hand saw. The piece removed could be used to make the Y carriage, depending on the material.

The buttresses are bigger than they need to be. I took them all the way back to give me plenty of room  to mount my non-standard electronics, but it also has the advantage that the machine will sit on five of the six faces, making it easy to work on.


If the anti-backlash springs are fitted to the Z-axis it should print in all those orientations as well, which would be interesting to try. When printing directly on glass, parts come loose when the bed cools. If the machine was on its back they would fall out the bottom. Who needs an ABP? It might also solve the PLA ooze during warm up problem.


The gantry could be unscrewed and laid on its back over the top of the Y axis to make the machine more compact for travelling. In this case the buttresses could be slimmer to allow it to become even more compact.

I used B&Q style fixing blocks to fasten the sheets together.


I bought some of these and I printed some. They are a lot faster to print than Mendel frame vertexes! The economics are interesting: they are cheaper to print than buy, but while my machines are fully occupied making parts to sell, it is more economical for me to buy them. The printed ones are actually more accurate than the injection moulded ones! The holes are all over the place. I think they must be formed by removable cores and the tool must be worn allowing them to move.

I drilled pilot holes using a paper template. I did this by exporting DXF files of the sheets from OpenScad. I then hacked together a Python DXF reader and an SVG writer to make a program that generated drill centres. I printed them on a large plotter but it could be done with A4 sheets tiled together like the Darwin bed template.

The design is modelled in Openscad, down to the nut and bolt level, and is fully parametric so you can make any size machine and scale the rod diameters and motor sizes if necessary. The only limits are that eventually belts would need to be replaced by rack and pinion above a certain length. It also automatically generates a complete bill of materials for anything in the model.



See also: mendel90-extrudermendel90-axes and mendel90-finishing-touches.


Merry Christmas!



Sunday 26 June 2011

Half belt hack

I found that I didn't have enough belt to complete the x-axis of my Prusa, but I did have a couple of offcuts about half the required length. Since less than half the belt actually passes over the motor pulley I simply joined them in the middle. My first idea was to print a two part clamp. Another idea was to use heat shrink sleeving, but in the end I simply tied them with some wire.


I joined them back to back so that the teeth mesh, keying them together. This has the beneficial side effect that the smooth part of the belt goes round the smooth idler pulley.


It might actually be worth doing this to get smoother running, even if you do have a belt long enough. Also if you are on a tight budget the second half does not need to be toothed belt at all. It could be packaging strapping or steel wire, etc.

Saturday 25 June 2011

Yet another Prusa Z-coupling

I finally got around to building the Holiday Prusa Mendel I printed over Christmas. I had a few problems with some of the comedy parts and had to revert to using some of the more up to date ones that I sell.

I didn't find the Z couplings worked very well. The requirements are to couple the M8 threaded rod to the 5mm motor shaft exactly coaxially and with no vertical play, but with some angular flexibility to cater for slightly bent threaded rods or any slight angular misalignment.



The rods are not held very coaxially because the clamp is not symmetrical. The alignment depends on how much the two independent clamps are squeezed, which depends on the exact diameter of the shafts relative to the printed diameter of the part.

They are not very flexible either because they have to be strong enough to support half the weight of the X-axis and the extruder. The direction of pull is in the weak direction of the part that tends to de-laminate it, consequently I print them 100% fill to make them strong enough. I would imagine that if there is any wobble in them the constant flexing would eventually fatigue the part and cause it to break.

I looked around at the various attempts to improve these, but I wasn't happy that any satisfied all the requirements above. I did find two sources of inspiration though:

This one by keegi uses a piece of tubing to provide the angular flexibility and it also helps to grip the smooth motor shaft.

This one by Griffin_Nicoll has the strong direction of the part in the right direction, but suffers the same problem as the original because it has two independent clamps. That is easily solved by removing the split in the top section, but then it would be difficult to grip the smooth motor shaft without the clamp halves being exactly parallel, which would depend on the exact shaft and part sizes. It also has no obvious flexibility. Putting the tubing on the motor shaft solves both these problems.

I hacked Griffin's script to make this version: -


I removed the split, changed the holes and the nut traps to fit M3 and changed the motor shaft diameter to 7mm, which is for a 5mm shaft with tubing on it.



Here it is mounted: -


Both halves are identical inside so not matter what the shaft size is they will always centre and align the shafts automatically. The sleeving allows the shaft to flex angularly and also makes a very firm grip on the motor shaft. The part bears weight along its strong direction and is not required to flex at all, so should last forever. Another possible benefit is if the part is made from PLA it is somewhat insulated from the motor shaft by the tubing, so there is less chance it will melt.

I haven't run the axis yet, but it turns very easily manually and there is no wobble at all. I will include these in my kits from now on and I will include the short piece of tubing as it would be annoying to have to buy just 30mm. Note it does require four extra M3x20 bolts, nuts and associated washers.

The files are here on Thingiverse.



Tuesday 14 June 2011

FR4 fail

Well it seems that FR4 only lasts for about a week. The grip slowly fades making the parts very easy to remove. In fact they all pop off as the bed cools below 60°C and slide about due to the fan and the bed's final movement to the front. The odd small part falls down inside the machine.

If I mounted my machine so it was inclined at 45° they would all fall out the front and could be directed by a chute into a hopper and the machine could then build continuously unattended. Who needs a conveyor belt! The only problem is the grip is now not enough to hold the bigger parts during the build.

I have tried cleaning with acetone but it doesn't seem to help. I suspect the high temperature is making the epoxy more brittle and less sticky. I will be able to prove that when the FR4 without copper on HydraRaptor fails. If I then turn it upside down and it still works on the under side then it is not a temperature ageing effect. If the other side is still working then it must be a reaction to the ABS or the acetone that is the problem.

It is shame because I much prefer a solid substrate to tape. Something like polyimide and fibreglass laminate would probably be ideal but it is hundreds of dollars for a piece big enough.

Wolfgang has posted a mystery material to me that sounds promising, so back to PET tape until it arrives. My friend Tony found that Farnell sells it in wider rolls. It seems to be a bit thicker as well, so is easier to apply, but a lot more expensive than the stuff from BestOfferBuy.com.



Friday 10 June 2011

ABS on FR4

I have been printing both ABS and PLA on PET tape for more than a year now. It works well and lasts for many months, but eventually the silicone adhesive fails and it blisters. Applying it is fiddly to avoid any overlap but also not leave gaps between the adjacent runs of tape. I have been on the lookout for a solid material to avoid these pitfalls.

Stoffel15 (Wolfgang) told me that FR4 fibreglass PCB material works well. FR4 is the most common PCB material and is a glass fibre and epoxy resin laminate. It will handle solder re-flow temperatures (~ 240°C) for short durations and can be used continuously at 140°C. As I haven't worked on single sided PCBs for many years, I had forgotten what the surface of the raw material looks like. It is actually smooth and glassy, so ideal as a bed material.

I ordered some single sided PCB material from Farnell. It works fantastically well. It seems to have a bit more grip than PET and has the advantage that there are no lines on the part from the joins in the tape. It also has no give in it, so I don't get any blistering at sharp corners like I did with tape, sometimes leaving shallow dimples.


Another advantage is that when the object cools it tends to break free because it contracts more than the bed does. With tape there is some compliance, so it usually stays stuck when the object cools and it is often hard to remove parts. With FR4, if you get the layer height spot on, the parts break free of their own accord, and if not, are very easy to snap off. This vertex bracket was loose after the bed cooled to 50°C.

Yet another advantage is that I stick the tape to a steel plate 0.9mm thick that weighs 280g. The FR4 is 1.6mm thick but it only weighs 134g, so less than half the mass.

I also tried some plain FR4 without copper and that seems to work just as well. It is 0.9mm thick and weights only 75g. The disadvantage is it is bright yellow, which makes it hard to see the white plastic on it.


I have printed a full set of Mendel parts so far on FR4 and every part has come out perfectly flat, and was easy to remove.

I don't know if it will degrade over time, but there is no sign of surface damage so far. The dark features on the picture above are marks on the aluminium plate underneath.

The nice thing about the z - probe I have on HydraRaptor is that I can change the bed without any calibration.


This is what the underside of an object looks like.


I used the same temperature I used for PET tape, which is 140°C for the first layer and 110°C after that.

I haven't tried PLA yet, but my guess is it will stick because it seems to stick to a superset of things ABS sticks to.

Great tip Wolfgang!

In the past I tried FR2 (SRBP, Paxolin) but that did not work, probably because it had a matt surface. I also tried some CAT7FR, which is another type fibreglass PCB material, but again it had a matt surface and did not work very well. I was able to build a flat object on it, but the first layer outline did not stick properly, so some holes were a bit scrappy.

The copper on the bottom of the single sided material could be used as a heater like the Prusajr heated bed design.


Thursday 9 June 2011

Reliable connections

After eliminating lots of other sources of unreliability in my machines, electrical connection failures are now the most common failure mode.

The latest failure on my Mendel was that it started leaving a 10mm gap in the outline rectangle that it draws around the objects. Since a bed full of objects still seemed to build OK I decided perhaps it was due to an air bubble in the extruder while it was warming up. However, one time I saw the extruder motor stall and realised it was actually a bad connection.

I have come to realise that simple friction fit connectors do not work in the environment of these machines. I tried re-seating the motor plug but that did not fix it, so I figured the cable must be faulty. I wired both coils in series to my multimeter and waggled the cable until it went open circuit. That allowed me to locate the break and it was, as could be expected, at the point where the cable bends the most, i.e. just below the cable clamp on the  top right of this picture: -


On reflection this was not a good arrangement as the cable is only just long enough for the extremes of travel, so it is forced to bend sharply both ways at the clamp. After millions of movements the strands break one by one but the insulation holds the ends together making it only lose contact when it is stretched. When I pulled the ends of the wires three of them snapped very easily, indicating most if not all the strands were broken.

I had a similar problem with the mains wire to a heated bed a while ago. In that case the arcing melted the insulation and allowed the live and neutral to short out, blowing a hole in outer sheath of the cable. Not good! Normally you expect a fuse to protect against a cable fire, but if all the strands start breaking, reducing the current capability, or it breaks and arcs, the fuse offers no protection against fire. Even a low voltage heated bed could fail in this way because of the high current.

The XY table of HydraRaptor uses 9 way D-type connectors. These have been totally reliable moving connections because they are screwed together and have gold plated pins and proper strain relief. The professional stepper motor drives on HydraRaptor have screw terminal blocks for their connections, and again they have proved totally reliable. In contrast all the friction fit connectors fail if there is any movement or vibration of the wire. Some even burn out despite being run at well below their current rating. The contact resistance rises and they then start to heat up.

I rewired my Mendel extruder using a 9 way D-type at the extruder and a longer loop of cable. That necessitated resiting the extruder controller and I also replaced all of its 0.1" MTA connectors with screw terminal blocks. The wires could go straight into these but I added ferrules to allow them to be more easily removed and replaced. I just push the wire into the ferrule and then squeeze it with pliers.

I reprapped a bracket to attach the DB9 connector to the back of  Wade's extruder bracket.

The pins are four motor connections, two heater, two thermistor and one heatsink fan that shares a 12V feed with the heater.

Here is the new arrangement :-


The cable loop is much longer, so it bends through a much smaller angle. The top end goes through two cable clamps before it goes to the extruder controller. I found that if you put a bunch of wires though a single clamp you can get some movement at the other side of the clamp. Using two eliminates any movement of the wire relative to the board, less critical now I that have screw terminals, but still a good idea.

It should last a lot longer than the previous cable (which lasted for 15 months of continuous use) and can be easily replaced. I have seen people use corrugated tubing to protect the cable, but I didn't fancy adding any more drag on the extruder as it would increase backlash.

Interestingly, although my extruder stepper motor connections have failed several times, I have never damaged the Allegro driver chips.




Monday 25 April 2011

Auto bed leveling

One thing I find tedious is leveling the bed of my machines, so I decided to make use of the Z-probe on HydraRaptor to measure the incline of the bed and compensate for it in software.

First I had to increase the resolution of my Z axis. When I first built the machine I did not realise that I would need fine resolution on Z, so I used an old 24V unipolar motor that I had in my junk collection. With half stepping it gave me 0.05mm resolution. I thought that it was a 200 step motor and that the lead screw had a pitch of 20mm. It turns out it must have been a 250 step motor because the pitch is actually 25mm. I replaced it with a Keling KL23H251-24-8B NEMA23 left over from my Darwin and I now drive it with a x10 microstepping controller the same as I use on X and Y. That gives me a resolution of 0.0125mm and also makes it the fastest axis on my machine. It can easily do 150 mm/s but seeing the nozzle approaching the bed at that speed and then stopping within 0.3mm is very unnerving, so I limit the speed to 50mm/s!

I no longer need the heat sink and fan because the new motor is more efficient and is directly mounted on the axis, which takes the heat away.


I use 6mm aluminium tooling plate so I make the assumption that the bed is a flat plane (rotated slightly around the X and Y axes and offset a little in Z). That means I only need to measure the height at three arbitrary points in order to characterise that plane. I then use the method here to calculate the equation of the plane in the form ax + by +cz +d = 0. The method puts two vectors through the three points and takes the cross product to get a vector at right angles to both of them. That is the normal to the plane and its components are the coefficients a, b and c. Substituting the first point into the equation gives d.

It is important that the three points are ordered anti-clockwise, otherwise the normal vector would point downwards and the machine would try to build the object upside down under the surface of the bed!

Given the bed's plane I then have to make the model coordinates relative to that inclined plane and transform them to the coordinate system of the machine. To do that I calculate two orthonormal basis vectors on the plane using it's equation and use the normalised normal vector for the third. I then multiply the model coordinates by those vectors and add the origin to find where they are in the machine's coordinates. Here is the Python code I used: -

class Plane:
    "A plane in 3D."

    def __init__(self, p0, p1, p2):
        "Construct from three anti-clockwise points"
        #
        # Calcluate the normal vector
        #
        v1 = p1.minus(p0)
        v2 = p2.minus(p0)
        normal = v1.cross(v2)
        if normal.z < 0:
            raise Exception, "Probe points must be anti-clockwise"
        #
        # Coefficients of the plane equation ax + by + cz + d = 0
        #
        a = normal.x
        b = normal.y
        c = normal.z
        d = -a * p0.x -b * p0.y -c * p0.z
        #
        # Generate three basis vectors aligned with the plane
        #
        self.origin = vector( 0, 0, -d / c)

        self.k = normal                      # k axis is simply the normalised normal
        self.k.normalize()

        px = vector( 1.0, 0.0, -(a + d) / c) # an arbitrary point on the x axis: x = 1, y = 0
        self.i = px.minus(self.origin)       # find direction to it from origin
        self.i.normalize()                   # make a unit vector

        self.j = self.k.cross(self.i)        # make a third vector mutually at right angles to the other two
        self.j.normalize()                   # make a unit vector, probably is already

    def transform(self, p):
        "Transform a point to be relative to the plane"
        return self.origin.plus(self.i.times(p.x)).plus(self.j.times(p.y)).plus(self.k.times(p.z))

To test the principal I put a 1mm thick washer under one corner support of the bed to give it an extreme slant compared to normal misalignment. I then built a 100 x 100 x 5mm cube with 0.35mm layers. This would normally be impossible without the bed being level to a small proportion of the layer height. The result was that it came out fine.


As the nozzle traverses the object in XY the Z axis moves a few microsteps. It is barely visible but I can hear it and feel it if I hold the stepper motor shaft. The object is built perpendicular to the plane of the bed, so the sides are very slightly slanted with respect to the machine axis and the nozzle. I am not sure how well it would work on Mendel as the z-axis is geared down so much. It would probably still work as the movement required is so small when the bed is reasonably level. I can't test it as there isn't room for a z-probe on my carriage due to the large heat sink.

Monday 4 April 2011

Auto z-probe

A niggling problem I have with Hydraraptor is that the z-axis calibration varies with the weather and how much it is used. This is because the frame is made from wood, which absorbs atmospheric moisture and expands. When the machine is running constantly the heat from the bed dries it out and it plateaus at a low z-value. If I don't use it for a while the z-axis gets higher by as much as 0.5mm in wet weather and the first few builds need large adjustments. When printing raft-less the initial layer height needs to be accurate to about 0.05mm for 0.3mm layers.

When it was configured as a milling machine I made a tool height sensor to solve the problem. It doesn't work for FFF though because the nozzle usually has hot plastic dribbling from it and it also wastes some of the build area.

To solve the problem I designed a z-probe that hangs below the nozzle at the start of the build but then retracts itself after the measurement. It consists of a weighted metal rod that slides through a couple of plastic guides. It has a plastic flange on the top that depresses the plunger of a light action micro switch. In measurement mode the rod protrudes about 10mm below the nozzle. When the measurement is completed the axis descends to place the nozzle close to the bed. The rod lifts until the attractive force of two Neodymium magnets causes it to be pulled about 5mm above the nozzle and held there until the start of the next build.




Here it is installed on the axis.


I used a Meccano worm gear as an improvised weight to ensure the micro switch is activated, much cheaper options exist! The actual weight is surprisingly not very critical. It must be enough to activate the switch reliably but not too heavy for the magnets to lift.


The operating procedure is as follows: The machine warms up the bed and the extruder and waits for a couple of minutes for the nylon pillars that support the bed to expand fully. It then extrudes a length of filament with the z-axis at the top and gives an audio prompt on my computer. I grab the filament and snap it off and then lower the z-probe, which closes the switch and instructs the machine to start.

The axis descends rapidly to place the rod 1mm above the centre of the bed. It then descends in 0.1mm steps until the switch opens. Then it ascends in 0.01mm steps until the switch closes again and that gives the Z calibration point, which is a known distance (about 10mm) above the bed. The nozzle then descends to 1mm above the bed to retract the probe before it moves to the start point.

Here is a video of the sequence.



It could also lower the probe automatically simply by having a bracket near the top of the z-axis to catch the flange as the axis rises past it. The reason I don't do that at the moment is because I use the act of manually lowering the probe as a cue to the machine that I have removed the start extrusion.

The design is on Thingiverse.

Sunday 13 March 2011

Spot on flow rate

I have been doing some fine tuning of flow rate recently. I had previously noticed that PLA appears to need a slightly lower flow flow rate than ABS. I didn't notice this with HydraRaptor but I did when I changed from PLA to ABS on my Mendel, which has a Wade's extruder. My theory was that PLA feeds faster than ABS for the same rotational speed of the pinch wheel because, being much harder, it sits on the crests of the teeth and hence is driven by a larger effective pinch wheel diameter than ABS, which sinks in further. This effect is more extreme with a smaller pinch wheel. HydraRaptor has a 13mm pinch wheel compared to just 5mm for the hobbed bolt in my Wade's.

Other people have claimed that ABS changes density when it is extruded. I didn't believe that so I did an experiment to investigate.

I programmed HydraRaptor to extrude 100mm of ABS. I put a mark on the feedstock about 120mm away from the top of the extruder and measured how far the mark moved. I also measured the length and diameter of the extruded filament and I also weighed it and a 100mm sample of the feedstock. These are the results: -
Filament input to the extruder: 105mm of 2.98mm ABS equals 732mm3, weighs 0.777g, density 1.06 g/cm3.
Filament extruded: 2.89m at 0.56mm diameter equals 712mm3, weighed 0.764g, density 1.07 g/cm3.
So on the face of it the volume has gone down by 3% and the weight by 2% giving a slight increase in density. This could be explained by some volatile compounds boiling off, which they do, but I think it is mainly measurement error. In particular the diameter measurements have a big effect because of the square law for area. I took four measurements and averaged them but that is not many along 3m of extruded filament. Also the electronic scale I used to weigh the filament does not have a very stable display as it is only a cheap instrument. It is certainly a lot less than the 15% I have seen reported though.

I also extruded "100mm" of PLA and that actually fed 110mm, showing that with a 13mm pinch wheel it feeds about 5% faster. With a 5mm hobbed bolt I would expect that to be about 12%, which starts to become very noticeable.

So I corrected the pinch wheel diameter in my software for the correct value for ABS and added a bodge factor for PLA. That left the flow rate a bit too low as it has previously been producing good looking objects with the overfeed, so I reviewed the maths I was using.

I have always extruded filament with a 1.5:1 width over height ratio and use a flow rate that would fill a circle 1.25 times the layer height. That was because I originally observed that you need to squash the filament to 0.8 times its diameter to get a good bond and that makes the width about 1.5 times the height. However, that only gives a packing density of 82%, which is a bit low. If you increase the flow rate so the infill is 100% then the outlines will be too wide. This is because the infill can occupy the full rectangular cross section of the filament road, but the outline, being unconstrained, will not have straight sides, so will be wider.

I reasoned that the outline will be extruded with a flat top and bottom where it is constrained between the nozzle and the bed but the sides will most likely be semicircular due to surface tension effects. This led me to a formula that gives the width from the notional extrudate diameter and the layer height.


Equating the two areas gives πd⁄ 4 = πh⁄ 4 + h (w - h). So w = h + π(d⁄ h - h) ⁄ 4 allowing the width to be predicted from the layer height and the flow rate.

Calling the aspect ratio a = w ⁄ h and re-arranging to get the flow rate to make the desired width gives: d = h√(1+ 4(a - 1) ⁄ π). For an aspect ratio of 1.5 d = 1.28h. I had previously been using 1.25h which is about 5% too low but was compensated for by the pinch wheel overfeed. I made a single walled box with the corrected pinch wheel diameter and the new formula and verified that the walls were 1.5 times the layer height.

I also used the same flow rate for the infill, but that can be increased up to the full area of the rectangle w×h. Because the outline and infill use different flow rates there is a small deficit of plastic where they meet, as this model shows: -


This can be fixed by using the infill perimeter overlap ratio setting in Skienforge, but how much? The deficit in area is a rectangle h  ⁄ 2 × h minus a semicircle of diameter h, i.e. h⁄ 2- πh⁄ 8. If the infill overlaps by a distance x then it contributes an area x × h. Equating these gives x = h (0.5 -π/8).

Converting to a ratio of w gives x/w = (0.5 -π / 8) / a. For a = 1.5 that gives an overlap of 0.07 leading to a "fully stuffed" model where the solid layers are 100% plastic.


In practice that leaves no room for error and requires the nozzle to force the plastic into the corners of the rectangular channels like an injection molding machine. I found I get a better looking object with the volume reduced to 90% of that value. So for the infill I use the formula d = h√(0.9 × 4a  ⁄ π) giving d = 1.31h for a = 1.5, making the optimum flow rate for the infill about 5% more than the outline. I also use an overlap value of 0.05 giving the theoretical packing arrangement below.


Running the new equations on my Mendel certainly produces nice looking objects:


At least four people I have sold parts to have commented they look as good or better than parts they have seen from a commercial machine. I use filament about twice the diameter that commercial machines use, which results in more visible layers and rounded corners, etc, but apart from that I must be close now.

Saturday 5 February 2011

Polyholes

When Reprap machines print holes they tend to come out undersized, even if the linear dimensions of an object are spot on. There are several effects that all make holes smaller than they should be: -

Faceting error
When CAD systems convert cylinders to triangles they produce a polygonal prism, so holes represented in an STL file are polygons with their vertices on the circumference of the original circle. That means the sides of the polygon are inside the circle, shrinking it by cos(π / n).
You need 10 vertices to reduce the error to 5% and 22 for 1%. So this error quickly becomes small as n increases but that creates another error:-

Segment pausing
When a circle is broken into a lot of little segments the start up time for a segment becomes significant. Reprap in the past has suffered from this really badly and I am unsure what the current status is. Slow serial comms and complex floating point firmware add pauses where extra filament can ooze from the nozzle.

I have never suffered from pausing because I use a 100Mbit Ethernet connection, which has a very low latency, and the data is transmitted in binary and in the units my firmware works in. This means that no further processing is required other than calculating which of the three axes has to go the furthest. However, I use trapezoidal acceleration on each segment, so for very short segments the average speed will be a little lower.

Arc shrinkage
When a flat strip of filament is bent into an arc there is too much plastic on the inside of the curve and too little on the outside. That makes both the inside and outside edges a smaller diameter than they should be. Adrian calculated a formula for it here: http://reprap.org/wiki/ArcCompensation. The formula comes out with a figure that is too small though. I think there is a secondary effect:

Corner cutting
When filament is dragged round a corner it likes to take a short-cut. This depends on how elastic the filament is and how much it is being stretched. I think when the nozzle moves in a circle the filament is continually trying to cut the corner and ends up forming a smaller diameter circle. I think this is the dominant effect on my machines.

Obviously, if you lie to Skeinforge about how wide your filament is that will make holes even smaller, but that is just a calibration problem.

Ideally all these effects should be compensated for in the slicing software but what has happened instead recently is that people are using parametric values in OpenScad to tweak the holes to come out right on their machines. That is the wrong approach because when the holes comes out smaller than they should be, without the slicing software compensating for it, then the infill doesn't meet it as tightly as it should do.

When I started printing Prusa Mendel parts I found the values in the configuration file far too big. I have also noticed this when downloading some designs from Thingiverse. That implies that my holes shrink less than a lot of other peoples, which is odd because all the effects above don't depend on the machine, apart from segment  pausing.

Some of the holes in Josef's parts are octagonal. That made me realise that polygons with low vertex counts don't shrink. The inside of the hole is defined by straight lines and they get extruded in the correct place. What does happen though is that the corners of the polygon are rounded. As long as the polygon has a small number of vertices, the corners are far enough from the circle that they can be rounded without impinging on it. The ideal number of vertices is when the corner cutting just meets the circle.

I decided to investigate this using OpenScad. I made a script that generates holes from 1 to 10mm with vertex counts from 3 to 8, 10, 16 and 32. The diameter of the holes is increased to make the polygon edges tangential to the circular hole. I.e. removing the faceting error by dividing by cos(π / n).

difference() {
    cube(size = [95,125,3]);
    for(i = [1:9]) {
        assign(v=[3,4,5,6,7,8,10,16,32][i - 1]) {
     assign(shrink =  cos (180 / v)) {
                echo(v,shrink);
                for(d = [1:9]) {
                    translate([d * d + 5 - ((v == 3) ? 3 : 0), 13 * i, 0]) 
                         cylinder(h= 20, r = (d/2)/shrink, $fn= v);
                }
            }
        }
    }
}


I printed the resulting shape on HydraRaptor and used drill shanks to gauge the hole sizes. Not terribly accurate as the shanks tend to be a little smaller than the tip. I inserted the drills in the highest vertex count hole that it would fit in.


A pattern emerged that the seemed to indicate the maximum number of vertices you can have before the hole shrinks is twice the hole size in mm. The only drill I couldn't fit was the 1mm drill because you can't have a polygon with only two sides. The "1mm" triangular hole did at least leave a hole though, whereas higher polygon counts fill in completely.

To test this simple rule I made a new shape with holes from 1mm to 10.5mm in 0.5mm steps with the number of vertices set to twice the diameter and the diameter increased by cos(π / n).

module polyhole(h, d) {
    n = max(round(2 * d),3);
    rotate([0,0,180])
        cylinder(h = h, r = (d / 2) / cos (180 / n), $fn = n);
}


difference() {
 cube(size = [100,27,3]);
    union() {
     for(i = [1:10]) {
            translate([(i * i + i)/2 + 3 * i , 8,-1])
                polyhole(h = 5, d = i);
                
            assign(d = i + 0.5)
                translate([(d * d + d)/2 + 3 * d, 19,-1])
                    polyhole(h = 5, d = d);
     }
    }
}


I found that all my drills bigger than 1mm fit. The large ones are a snug fit and the smaller ones a little loose, probably because with only a few tangential points touching there is little friction.


These two tests where done on HydraRaptor extruding 0.375mm filament from a 0.4mm nozzle. I printed this the test again on my Mendel with 0.6mm filament through a 0.5mm nozzle and the drills still fit, so it seems universal, at least amongst my machines. It would be interesting to see if others get the same result, so I have put the files on Thingiverse.

My goal is to work out how to print circular holes the correct size, but this seems like a good hack for OpenScad designs to allow holes to come out the right size, regardless of the printer or whether it compensates hole diameters. For example, one would expect circular holes to come out right on a professional printer, so if you have oversized circular holes in your model they will come out too big. However, if you use these low vertex count polygonal holes they should still come out the right size as one would also expect a professional printer to print polygons at least as accurately.

Monday 10 January 2011

ABS on PETG

I have been using PET tape on my heated bed for a long time now. It works very well as long as I clean it with acetone about every 100 hours. It does need a high temperature (145°C) for the first layer with some types of ABS though .

It seems to last forever, the only failure mode is that large thick objects with sharp corners can defeat the adhesive and raise blisters at the corners near the edge of the bed. I solve that by building little heat shields to keep the corners warm. I am always on the lookout for something better though. It would be nice to get rid of the lines where the tape butts against itself.

A friend gave me a sheet of 1mm thick PETG to try. I clipped it onto my heated bed, and thinking it would behave like PET tape, I ran a build using the same temperatures.


Big mistake, PET has a glass transition at 75°C so it went soft and floppy. The object stuck to it very well and was hard to remove, but after getting a knife under one corner, it peeled cleanly. However it left an impression in the PETG.


The base of the object is flat but the filaments are more ridged because they sank into the sheet rather than being squashed.


When the sheet cooled down it warped badly, so that was the end of that experiment. I did have a small offcut though so I tried again at 70°C.


This time the object warped badly. It stayed stuck to the PETG but it warped the sheet. The adhesion was less and the object was easily peel-able. The PETG warped where the object was but the rest of it stayed flat. The heat of the object must have been enough to tip it over its glass transition locally. It left an impression, but not as deep as the first time.



The filaments on the bottom were squashed tighter, not as smooth as when using tape.


So a failed experiment. It is a shame because at high temperatures it bonds very well but, unlike PC, it still peels, but it is no good if it doesn't remain rigid. Wikipedia does say that PETG has a lower melting point than PET. It doesn't mention how it affects Tg, but it gives the Tg of PET as 75°C. Odd then that PET tape doesn't go soft at 75°C. My next trial will be Mylar, which is another form of PET (BoPET).