Saturday 27 October 2007

Extruder dimensions

I have been asked for dimensioned drawings of the extruder. I made these by manually inspecting the 3D models in ArtOfIllusion. It is not the easiest application for extracting dimensions so I made 2D drawings in Visio which does have good dimensioning tools. I then made Python scrips to do the milling. My dimensions may differ in places but I did make the extruder from these drawings and it does work. I tightened up some of the hole clearances because my milling machine holds much tighter tolerance than FDM.

This is the motor shaft coupler. I adjusted the slot to suit my GM3 motor. I think there are now two versions of this part. The official design is tapered but this is not necessary with the offset motor mount so I simplified it to a cylinder.



Here is the finished article milled with a 2.22 mm bit. The step on the outside and in the shaft slot are there because my milling tool's shaft is wider than the bit, so to go deeper than 9mm I need to have some clearance. The material is some sort of metal loaded resin.



Here is the clamp drawing I used. It has now been superseded by a larger design. Note that I adjusted the hole for the PTFE to suit my 12mm rod. I think the official design was 10mm but is now 16mm. I also widened the slot to allow the 2.2mm milling tool to get in and added some extra mounting holes to suit my machine.


I milled it from 9mm Delrin.



Here is the pump drawing :-



The poly channel on the official version slopes outwards at the entry but that is only needed for the version without the offset motor.

And here is the milled version :-



The material I used is not as slippery as CAPA so, to reduce friction in the channel, I smoothed it with emery paper, polished it with metal polish and sprayed it with PTFE dry film spray.

I split the motor mount into three pieces for milling from a sheet of 5mm perspex. I fixed the pieces together with M2.5 screws, tapped into the perspex.





If anybody wants the Visio source file it is here:- forums.reprap.org

Tuesday 23 October 2007

They don't like it up 'em!

How is this for bad luck :-

I was trying to connect a scope probe to the far side of a two row connector on my machine. I made a small hook from a piece of wire with a bit of insulation to get it past the front row.



I inserted this with the power turned off. Unfortunatly, and almost unbelievably, the far end of the wire manage to find its way into a hole leading to the mains live terminal on my solid state relay. That was the only thing on the live side of the mains switch.

Massive bang! Blew the crap out of HydraRaptor and my ADSL router. My PC is crippled is well, it no longer runs at the correct front side bus speed and insists I haven't got an 80 pin IDE cable.

This is the CPU of my axis controller :-



And this the micro from my extruder controller :-



I expect all the rest of the electronics is fried as well, so pretty much the end of HydraRaptor. The only lucky thing was that I was holding the insulation, otherwise it might have been the end of me as well!

Stretching a point

In his article: x-idler-bracket-continued Vik Olliver alluded to the fact that you can extrude filament with a smaller diameter than the hole in the nozzle. I did some experiments to see how fine I could go. In fact the final filament diameter is simply determined by the feed rate of the extruder and the travel rate of the nozzle, or in my case the bed. The filament stretches to the length that matches the rate of travel while it is still liquid. You can then calculate the mean diameter from the volume of material extruded. The nozzle height has to be a bit less than that mean diameter and then the width becomes a bit wider.

Here are three 20 x 20 x 20 open cubes with different wall thicknesses :-



The first was 1mm diameter filament extruded at 4mm per second with a height of 0.8mm giving a wall thickness of about 1.2mm.

The second was the same feed rate but with the extruder traveling over the bed at 16mm per second to give 0.5mm filament, the same as the nozzle hole diameter. The height was set to 0.4mm giving a wall thickness of about 0.6mm. As you can see it warps more but I expect it would behave if it was building a solid object. The bottom layer which was stuck to the table has better corner definition.

The third attempt was 0.35mm filament extruded at 16mm per second with a hight of 0.28mm and a width of about 0.5mm. As you can see holes started appearing but I think that was just because the sides buckled so badly. Interestingly the holes can be bridged by filament above that needs no support. Again, I think this would be OK making solid objects, or at least objects with thicker walls.

This is really good news as it means I can get down to the sort of resolution commercial machines get (0.25mm) without having to have a very small nozzle aperture, which would limit the flow rate. It remains to be seen what effect stretching has on the polymer but as it is still liquid at that point I think it wont increase the contraction much, if at all. It does mean I need very fast head movement to keep up the deposition rate, about 64mm per second. I think my machine will do that if I reconfigure the steppers for speed rather than torque, a simple one wire change.

Tuesday 16 October 2007

Scaling new heights

In my article laying-it-on-the-line I showed how I arrived at this test shape, a 20mm open ended cube :-



I decided to try different sized shapes to see how the process scales. It turns out that it doesn't and 20mm cubed is the magic size that is easiest to make!

The first thing I tried was taller :-



As you can see at 50mm tall it is starting to sag and 100mm is hopeless. The problem is that as the height increases, the plastic already laid down contracts as it cools and leaves the nozzle high and dry. I fixed that be reducing the Z increment from 1mm per layer to 0.95mm. That allowed me to make a good 20 x 20 x 95mm square tube :-



I presume with this increment I can keep going up, but who knows, I thought that at 20mm!

Next I tried low and wide. This was an attempt to make 120 x 120 x 20mm :-



I stopped it when the first two layers failed to weld. This was because with an object this large, by the time it has traced the perimeter to start the next layer, the first layer has cooled down to room temperature. In my post sticking point I predicted that to make an instantaneous weld between molten plastic and plastic at room temperature requires the molten plastic to be at temperature

T = 2 x Tm - Tr, for HDPE and 20°C this means about 240 - 250°C.

I set my extruder to 240°C and made this mess :-



I don't like running the extruder that hot because, although HDPE is not supposed to burn until 350°C, it smells like burning plastic and the end of the nozzle is glazed black. Also, the toothbrush that wipes the nozzle is showing signs of melting.

The object came unstuck from the foam board because of the extreme corner curling due to shrinkage. This is a fundamental problem with HDPE and room temperature FDM. HDPE shrinks about 2% when it cools from its melting point to room temperature. Commercial FDM machines use ABS, which has a lower shrinkage, and they keep the work piece in an oven close to the melting point. That means the hot plastic does not need to be so much hotter than the melting point, and most of the shrinkage occurs after the object is complete. The problem here is that the first layer cools and shrinks before the next layer lands of top. The next layer is bigger when it welds on top but then it shrinks, contracting the bottom layer more. Each subsequent layer increases the tension on the layers below. The bigger the object is, the worse the effect is because the mismatch between the size of the hot layer and the cold layer below it is bigger in absolute terms.

Following in Forrest's footsteps I tried laying down a raft of HDPE first to anchor the object to the foam base. The raft is 120 x 120mm but the object is now only 100 x 100 x 20mm.



As you can see that gives a big improvement but it wasn't strong enough to hold the corners down fully. A bigger raft, and perhaps a second layer might help but as it was an hour to build the raft and half an hour to build the object I didn't bother trying again. The blob, by the way, is where the firmware crashed on the last layer!

Here are some 40 x 40 x 20mm tests made with rafts, the second one had a bigger raft:-



Here the corner curl with a raft is comparable to the 20 x 20 x 20mm test without a raft showing how this effect gets dramatically worse as width increases.

Next I tried tall thin objects :-



Both were made on rafts and, the first is 15 x 15x x 75 mm, the second is 10 x 10 x 100mm. The photo is not very good but they both flare towards the bottom. The one on the left has an untidy surface as each layer is not well aligned with the layer below it and the one of the right has a completely wavy surface like basket work.

The reason for this is that because the perimeter is shorter, the layer below is still molten when the next layer is extruded on top of it. It moves around giving an untidy surface and also does not resist the contraction of the layer above. The bottom few layers are the correct size because they are welded to the solid raft but the layers above are too small as they have contracted inwards. A 5 x 5mm test shows this effect even more :-



The only way around this is either to wait for the layer below to cool, speed up its cooling with a fan, or extrude very slowly. I decided to experiment with a fan. It was immediately obvious that if you have a fan blowing near the nozzle you have to insulate it otherwise it doesn't reach its target temperature.

The RepRap design uses fiberglass wool but I wanted to be able to see the state of my heater so I decided to make a transparent cover. I started with a plastic test tube, donated by my wife, which used to contain bath salts.



I cut the end off this and drilled a hole to clear the nozzle. I converted a large plastic nut into a mounting flange by stripping out the thread on my lathe so that it was a push fit.



Here it is mounted on the extruder :-



The first fan I tried was a small North bridge cooling fan. It was so light that I could mount it on a stiff wire attached by ring tail crimps and bolts. :-



Unfortunately it wasn't very powerful so the next fan I tried was a PC case fan complete with speed control and blue flashing LEDs.



This worked a lot better but it is difficult to get it as close as I would like it. Here is the tallest thing I have made so far, it is 10 x 10 x 150mm. At this point I changed to 4mm per second travel and a feed rate to give a 1mm filament. I found that you can get finer filament just by stretching it as it leaves the nozzle so the work I did with flow rate and filament size is not really relevant. I had to reduce the layer height to 0.8mm.



This worked well on the windward side, with a nice tight corner, but not so well on the leeward side. The corner away from the fan is more rounded and the layers are less tidy. A cross section shows that the two sides cooled by the fan are straighter and longer.

The 5 x 5 x 20mm test is much improved but its surface area is so small that the fan fails to keep it cool enough. I think the only option with something as small as this is to slow down, and possibly drop the temperature.



Again the leeward side is not as good. The filament short cuts the corner because the layer below is not strong enough to hold it in place. I think to make the fan effective a cowling and duct is needed to get a strong flow of air directed downwards around all sides of the nozzle.



I have noticed that there is always an excess of material at the corners. This is because the head makes a perfect right angle but the filament has a minimum bend radius and takes a short cut. I am not sure how to compensate for this. I can't really pause the extruder because its response is too slow, so I either have to speed the head up as it takes a corner, or perhaps make it move in an arc that matches the bend radius rather than a right angle.

And finally here is an improved version of the magic 20mm cube :-



This is with the benefit of a raft, finer filament and fan cooling. The corners are a bit sharper and the corner curling a bit less. The reasons why this turned out to be the optimum shape are :-
  1. It is small enough that the filament does not cool too much when you go round it.
  2. It is large enough to make it long enough to traverse so that it does not stay too hot.
  3. It is short enough for the fan to be able to cool the back wall from the inside as well as the front.
  4. It is small enough for corner curling to not be too extreme.
From these experiments I now think I have a good understanding of how the parameters: temperature, flow rate, traversal rate, z increment and fan use affect the result. I have only looked at thin walled boxes, I expect solid objects to add more thermal and contraction issues.

The only reason I am using HDPE is that it seems to be the only thermoplastic filament I can buy off the shelf in the UK without getting it specially made.

With a bit of trial and error I expect I could make the machine produce a wide range of shapes and some useful objects but therein lies the problem. It is not supposed to be trial and error. The dream is to be able to input an arbitrary 3D model, of any size within the build volume, and have the item appear a few hours later. At the moment I can't see how that can happen with room temperature extrusion of HDPE. Its melting point is too high and its contraction too great. Managing the temperature of the object being built is very tricky as the features of the object vary from large to small.

Saturday 13 October 2007

GM3 motor suppressor

I have also been asked for more details on my motor suppression circuit that I first blogged in dc-to-daylight, so here goes :-



The Solarbotics GM3 generates large amounts of RF noise from 20MHz up to at least the TV band, which is 470- 850MHz in the UK. I know this because I can see the 20 MHz on my scope and it was also affecting our TV reception.

This is the circuit I used :-



The 1nF capacitors were axial ceramics and the 10nF was a radial ceramic, mainly because that is what I had to hand. I don't know the spec of the ferrite beads because I salvaged them from an old disc drive. Here is what they look like though :-



They should be a low Q type rated for at least 1A. The current rating is not so much about how much current they can carry but about the point where the magnetic field saturates the ferrite and the inductance disappears.

We want them to have a high impedance from 20 MHz to 800 MHz. I don't have much knowledge in this area but think this is quite a big ask for a ferrite and that I fell lucky with these. To get more impedance at the low frequency end it is normal to increase the number of turns to increase the inductance which is proportional to their square. The problem with that is that it increases the capacitance, reducing the attenuation at the high frequency end.

These beads are a good compromise: they have nearly a whole turn compared to a straight through bead which is half a turn, hence four times the inductance, but the wires maintain 0.1" separation so minimizing the capacitance.

The first two 1nF capacitors are soldered to the motor case. This is easier than you might imagine because steel is such a poor conductor of heat compared to copper, although it has to be said I am using a 50W temperature controller soldering iron. I cleaned the area first with a PCB cleaning block.



This is the rest of the circuit before it was soldered on top of the two capacitor leads. Spot my mistake!



Ignore the back emf diode, it is specific to my controller and should really be part of it. I used twin screened cable with the braid grounded at the controller end and left unconnected at the filter end.

Tuesday 9 October 2007

Measuring temperature the easy way

I have been asked for more details on my temperature measurement scheme so I have consolidated some of my previous articles :-

The objective is to measure temperature from room temperature to about 250°C using a thermistor. The thermistor resistance is a extremely non linear. It is approximated by a negative exponential of the reciprocal of absolute temperature.

Ro is resistance at known temperature To, in this case 25°C, expressed in Kelvin. Beta is a second parameter of the thermistor which can be calculated if you know the resistance at two different temperatures or can be found on the data sheet.

The RepRap thermistor is an Epcos B57540G0103+, data sheet here. R25 is 10KΩ and beta is around 3500. Several values are given on the datasheet for different temperature ranges illustrating that the above equation is only an approximation. Here is a graph of its resistance against temperature :-


This can be made more linear by putting a fixed resistors in parallel. The magic value to use appears to be the value of the thermistor at the middle of the temperature range. In this case it is about 470Ω. Here is the resulting combined resistance, the formula for two resistors in parallel is :-

1/R = 1/R1 + 1/R2

I.e. the total conductance is the sum of the two conductances.


The resulting resistance is a lot more linear, however to measure temperature with an ADC we need a voltage rather than a resistance. This is easy, instead of wiring the resistor in parallel connect it in series to a voltage source equal to the full scale voltage of the ADC.



The voltage across the thermistor is then :-

V = Vref . Rth / (R + Rth)

Here is a graph of the the output voltage when Vref is 5V.



Note that the voltage decreases as the temperature rises. This could be inverted by swapping the resistor and thermistor but I prefer to keep one end of the thermistor at 0V so I can use single screened cable. It is also a good idea to put a capacitor across the ADC input to filter out any noise when using long leads like RepRap does. I used a 10uF tantalum bead.

Another consideration is how much power is dissipated in the thermistor as it will cause heating and alter the reading. The maximum dissipation will occur when its value equals the value of the resistor. At this point half the voltage is across the thermistor so the power dissipated in it is :-

P = (Vref / 2)2 / R

In the example above this works out at 13.3mW. The thermistor datasheet specifies a maximum of 18mW and a dissipation factor (in air) of 0.4 mW /K. I think this means that the temperature will rise by 33°C by self heating. The error would be less when not in air, but it is still perhaps a bit high. My system uses a Vref of 1.5 volts which, because it is a square law, only dissipates 1.2mW giving a 3°C rise at the mid range temperature in air.

For a 5V system is is probably worth sacrificing some of the ADC resolution to reduce the self heating error. This can be done by using two resistors :-



The full scale voltage is now :-

Vfsd = Vref * R1 / (R1 + R2)

We also want the source impedance of this voltage, which is R1 in parallel with R2, to be 470Ω.

1/R = 1/R1 + 1/R2

Solving these simultaneous equations gives :-

R1 = R / (1 - Vfsd / Vref)

R2 = R . R1 / (R1 - R)

So for Vfsd = 1.5V, Vref = 5V and R = 470:

R1 = 671Ω and R2 = 1569Ω, preferred values are 680 and 1K6.

And finally here is the Python code to work out the temperature :-
from math import *

class Thermistor:
"Class to do the thermistor maths"
def __init__(self, r0, t0, beta, r1, r2):
self.r0 = r0 # stated resistance, e.g. 10K
self.t0 = t0 + 273.15 # temperature at stated resistance, e.g. 25C
self.beta = beta # stated beta, e.g. 3500
self.vadc = 5.0 # ADC reference
self.vcc = 5.0 # supply voltage to potential divider
self.vs = r1 * self.vcc / (r1 + r2) # effective bias voltage
self.rs = r1 * r2 / (r1 + r2) # effective bias impedance
self.k = r0 * exp(-beta / self.t0) # constant part of calculation

def temp(self,adc):
"Convert ADC reading into a temperature in Celcius"
v = adc * self.vadc / 1024 # convert the 10 bit ADC value to a voltage
r = self.rs * v / (self.vs - v) # resistance of thermistor
return (self.beta / log(r / self.k)) - 273.15 # temperature

def setting(self, t):
"Convert a temperature into a ADC value"
r = self.r0 * exp(self.beta * (1 / (t + 273.15) - 1 / self.t0)) # resistance of the thermistor
v = self.vs * r / (self.rs + r) # the voltage at the potential divider
return round(v / self.vadc * 1024) # the ADC reading

Monday 8 October 2007

Laying it on the line

I decided to investigate the conditions necessary for multiple layers of HDPE filament to stick together so I wrote a little Python test script to extrude 20mm squares stacked on top of each other. From my graphs in equations-of-extrusion I chose an output rate of 3mm/s which gives a filament diameter of about 1.2mm. That only requires about 60% PWM which I thought was not too stressful for a 5V motor running from 12V. I set the heater temperature to 200°C. Here is the first run :-



The first two layers look reasonable and then we are into basket work! The z-axis was raising 1.2mm between each layer but, although the nominal filament diameter should be about 1.2mm, the sides were not growing at the same rate. That meant the filament was dangling allowing it to wiggle around. Next I reduced the z-increment to 1.1mm :-



Better, the first four layers are OK this time, so obviously I tried z-increment 1.0mm next :-



Much better! What is happening is that the filament is no longer cylindrical. Each layer is about 1.0mm high and 1.4mm wide. It could be due to gravity but I think it is more to do with being bent through 90° as it comes out the end of the nozzle.

The fact that the filament weaved about when the nozzle was too high made me think that the feed rate might be too fast so I did a taller test with the XY travel 20% faster :-



Another basket case! What is happening here is that there is not enough material so the filament slumps down and holes start appearing.

I went back to the original feed rate and did a couple of 20mm high tests to check consistency :-



These are actually incredibly strong in the vertical direction. I can stand on one and it takes my full weight. Here is a video of the one on the right being made, the middle section is sped up 8 times :-




I also ran a test at 160°C to see if the filament would still weld to the layer below. It did but it did not stick to the foam board.

As you can see the main defect is that the bottom corners curl up. This was completely expected from the work Forrest published here: Ten-layers-with-no-curling, so next I will try his solution of laying down a raft first.

Another defect is that the filament width varies in waves. These seem to be related to the rotation of the extruder drive screw. You can hear the motor labouring more on part of the revolution. I think it is because something in the drive is a bit eccentric but more investigation is required.

Sunday 7 October 2007

Brush off

HydraRaptor was using a knife to remove excess filament from the extruder :-



It always cut the filament OK, but it was random whether the loose bit fell off or stuck to the far side of the nozzle. The soundtrack of a video I saw of a commercial FDM machine said that they use a brush. I thought I would need a wire brush for 200°C but then I reasoned that, if the nozzle passed through fast enough, the high specific heat capacity of plastic might mean that it would not have time to melt. I decide to give it a try with an old electric toothbrush head :-



It does seem to work quite well. Here is a video of it in action :-



The scrap of filament sometimes stays stuck to the brush but subsequent passes eventually knock it off.

When I was using HydraRaptor for milling I had a tray around the table and a plastic skirt to protect the mechanism of the precious XY table from loose plastic chips. When I moved on to FDM I thought these would not be needed because it is a lot less messy. Actually I was wrong as HDPE chips are appearing, presumable from inside the extruder, and the filament offcuts sometimes ping off from the brush. I have therefore refitted the tray and skirt.

Taking up the slack

I had a problem with my HDPE filament getting unwound from its reel. Because my extruder is attached to the z-axis, the filament gets pulled off the reel as the z-axis descends, but when it rises back to the home position there was nothing to take up the slack. Also the springiness of the HDPE makes it want to unwind. It needs a constant back tension to take up the slack and keep the filament on the reel.

My first idea was to attach a small DC motor to the roller to provide a backwards pull. As the motor would be permanently stalled I would have had to limit the current to something reasonable. After some thought I came up with a much simpler solution. I wound some picture cord around the roller and hung a weight from it. As the filament unwinds it lifts the weight. The weight is also tethered to the top of the machine, so once it gets to the maximum height it stops. The reel is only a friction fit on the roller so it starts to slip at that point. When the axis ascends again the weight falls and winds the reel backwards, taking up the slack. There is enough travel on the weight to cover the full z-axis travel, even when the filament has been used down to the inner diameter of the reel.