Solid printing at last!

The hot end is assembled and fitted.  The filament drive extruder is assembled and fitted.  Even the LCD panel is fitted and (mostly) working.  this means that I can now print solid plastic parts.  In theory.  In practice, there are teething troubles.

  1. Levelling the bed.  Layers of plastic must be deposited at thicknesses of less than 0.35mm.  If the print bed is not level with respect to the print head motion, then it might, at different points on the bed area, print in mid-air (bad), or drive the print head into the print bed (bad), or simply print too thin a layer (bad but not terrible).  I’ve made a bit of a rod for my own back by giving my print bed three adjustment screws, but it is doable.
  2. Calibrating the print head motion.  This is still not quite right.  Assuming that the glass print plate is flat (and it’s float glass, so it should be), then my print head seems to move in Z (the vertical axis) slightly as it travels over the X and Y axes.  It’s as if the notional Z-plane is a very slight dome, higher in the centre.  This makes printing larger objects (more than about 100mm diameter) impossible at present.  It’s undoubtedly fixable, but may require a software tweak.
  3. Ensuring that the extruder drive doesn’t slip.  This has been a big problem.  Forcing a plastic filament down a PTFE tube and through a heated nozzle only a fifth of its diameter actually takes quite a bit of force.  The extruder drive pushes the filament by pressing a rotating knurled wheel against it.  The problem is that if the resistance from the nozzle is too great (for example, if the clearance between the print head and the print plate is too small, leaving no room for the hot plastic) then the knurled wheel rotates and grinds into the filament rather than pushing it along.  This means no molten plastic at the print head, and a failed print.  Careful adjustment of the force on the filament seems to have fixed this for now.

Having said all that, I have actually managed to print something:


It’s not really that impressive.  A simple 10mm cube, cunningly printed in blue plastic on blue masking tape, so it’s hard to see.  Careful positioning of the ruler ensures that you can’t see that it actually came out 9mm in each dimension.  Did I mention that calibration is still an issue?

Flushed with success printing a tiny cube, I thought I’d try something bigger.  One of the printer’s own components, in fact.  The next picture shows two versions of the pen-holder used to replace the hot end while I was testing.  No prizes for guessing which one I printed, and which came from  Rob’s printer.


Still, it’s a start.  For scale, here is the part in the printer, just finished:


Initially flushed with success, I spent the next few days completely unable to get the printer to do anything but produce failed prints.  Here’s the sort of thing I mean:


The problem here is that the first layer of plastic hasn’t stuck properly to the print bed, leaving holes (not the round ones, they are deliberate).  Or possibly the extruder drive mechanism has slipped.  Or both.  Either way, it’s junk.  I have quite a few of those.  Gradual tweaking and experimentation has improved matters now, though, and I have managed to print out some reasonable parts:


These are two copies of the same object (actually part of the print mechanism), using different layer thicknesses.  The further of the two uses thinner layers.  It takes longer to print, but is much more successful.  For scale, the holes you see in the parts are 3mm diameter.  These are quite small parts.  The layers in the better print are 0.2mm thick.  With a bit of sanding to remove the rough edges, this part should be quite usable.  It will be amusing to replace the printer’s parts with items it has printed itself.

Some like it hot

Over the last couple of weeks, I’ve got the printer to a point where I can send it G-Code commands in the reasonable expectation of it carrying them out.  At the moment, the print head only has a pen mounted in it, so I can check its positioning, but it will draw things on a piece of paper.  There’s a rather poor quality video of it doing a calibration test print (or should that be a test plot?) here:  There is still a little bit of levelling to do on the glass plate which acts as the print bed, and I need to come up with a good strategy for calibrating the print head position, but it’s ready for the next step.

Now that I’m finally reasonably confident that the printer is capable of enough accuracy and repeatability, it’s time to make it actually squirt plastic.  For this I need a roll of plastic filament, a ‘hot end’ to melt it and deliver it through a tiny nozzle, and a mechanism to push the filament through the hot end (an extruder).  This is a delta configuration printer, and one of its distinguishing features is that the print head is capable of moving very fast.  This is helped by the low weight of the print head.  To keep the weight low, it is desirable not to mount the extruder on the print head (as most cartesian printers do) because it has fairly heavy stepper motor in it.  Instead, the extruder is connected to the print head by means of a flexible PTFE tube through which the filament is pushed, in a Bowden cable-like arrangement.

The hot end parts have arrived.  I’ve gone for a popular design, the J-head Mk V.  In an exploded view, it looks like this:


Though it looks a bit complex, it’s actually very simple.  The shiny aluminium cuboid/cone combination is the hot part.  This has a big hole in it in which to mount a power resistor or a heating element (the photo shows both) and a small hole in which to mount the tiny glass bead  thermistor.  The heating element heats the hot part up, and the thermistor measures the temperature.  Both are linked to the controlling arduino, so that the hot end temperature is maintained as close a possible to the optimum for melting the plastic in use.  the beige machined cylinder in the centre of the picture serves as a holder for the hot nozzle, a guide for the filament and as a thermal insulator.  it’s made out of a high-temperature plastic known as PEEK.  The purpose of the slots is to help airflow, so that the mounting end stays cool enough to attach to the print head (which is, in my case, made out of plastic which will melt at the temperature of the hot end) while allowing the hot end to deliver plastic-melting heat the the filament before it gets squirted out of a really tiny (0.35mm) hole.

Rob has very kindly printed the plastic parts for the extruder mechanism:


It’s fascinating to see just how far removed we are from conventional manufacturing techniques.  The body of the extruder is a mass of complex shapes, involving curved and tapered surfaces.  It would be a nightmare to make with conventional machinery.  With 3D printing, of course, the shape complexity is almost irrelevant.  If it’s a valid 3D shape, it can be printed (with some minor limitations, like overhangs).   I’m using Airtripper’s design for an extruder, because there is no need to reinvent the wheel.  It requires only three bought-in parts: a couple of small bearings and a toothed pulley which grips and drives the filament.  This last part I have had to order from Denmark, and it seems to be taking some time to arrive.  Watch this space.

Pink plastic printer parts printed

Last weekend, the ever-generous Rob very kindly printed out a whole batch of parts for my 3D printer:


With the ones he’s already done for me (and a few bearings, nuts and bolts and bit of carbon fibre rod) these comprise enough to build the printer completely, apart from the ‘hot end’.  So that’s what I’ve done over the last few days.  Although the parts were printed to quite high accuracy, with holes in the right places, there was still a fair bit of smoothing, trimming and tapping of holes to be done.  I also had to drill one or two new holes where I had forgotten to design them in.  This is version 1, after all.  The assembled result looks like this:


It’s a bit of a monster.  At least I’ll be able to print large things (think ‘traffic cone’) if I want to. 

Here’s a close up of the print head.  The bit in the middle is a holder for a pen, so I can do some tests for accuracy before I fit a hot extruder.


I’m sure you want to see it working.  There is a video on YouTube, which shows it moving around at a variety of speeds.  Now I need to get a printing platform in place, hack the Marlin firmware in the controller to support a delta configuration, and start doing some serious tests.

It’s Alive!

Yesterday, Rob very kindly printed a few more components for my 3D printer: a stepper motor mounting bracket, the top end idler pulley bracket, an idler pulley and a drive pulley.  The drive and idler pulleys are version 2 components.  I had to modify them to allow for a phenomenon I’m choosing to call squeezage.  This is the behaviour of molten plastic which causes it to extrude slightly sideways when deposited from above, resulting in circular holes being slightly smaller in diameter than expected.  I don’t have a lathe (yet), so I was unable to modify the version 1 pulleys with enough accuracy to make them fit the bearing and shaft.  Here are the new components:


And here are pictures of them all fitted to the printer frame:


As you have doubtless come to expect, most of the pictures (the ones not taken with a phone) are blurred because of my camera’s focusing fault.  I really must buy a new camera.

This morning I fitted the high-strength fishing line I’m using in place of a drive belt, set the tensioner in place, temporarily wired up the controller board and fired up Pronterface to see if I could make the carriage move up and down.  Astonishingly, everything just worked.  You can see a (rather dull) video of it on YouTube if you really have nothing better to do.  If you can bear to watch right to the end of the video (it’s only a couple of minutes), you’ll get some idea of the size of the printer.  It’s a bit bigger than I originally intended – but if I ever need to print something the size of a traffic cone, I’ll be well set up.

The next step is to do some tests to see how accurate and repeatable the motion is.  When I’m satisfied with that, I’ll fit the other two sets of drive components, and then it will be time to connect up the print head and its support arms.  Watch this space.

Scary maths

Or how to convert from x,y,z coordinates to delta robot position

With a simple cartesian robot (or printer), the mechanism moves directly along rails in each of the x, y and z directions.  If you want to move a print head from the origin to, say, (10,10,20) you simply direct the motors to move it 10mm along the x axis rail, 10 along the y axis rail and 20 along the z.  You get the idea.  With a delta configuration, it’s not so simple.  Moving any one of the carriages which run up and down the three vertical struts will cause movement of the tool head in x,y and z simultaneously.  Calculations are required to work out how to move all three carriages at the same time to move the print head to the right place.  Fortunately, they are not too hard (and don’t need too much processor power for the Arduino to cope with).

Suppose we want to move the extruder nozzle to a particular point.  We’ll call this the tool position, and it will have coordinates (tx,ty,tz).  We want to calculate the positions of the three carriages (the bits that move up and down the struts) based on the tool head position.  We’ll call the carriages A, B and C.  Looking down from the top of the printer, Carriage A is on the X axis, carriage B is 120° anti-clockwise from A, and Carriage C is 240° anti-clockwise from A.  The positions of A, B and C are:

A2 = (a2x,a2y,a2z),
B2 = (b2x,b2y,b2z) and
C2 = (c2x,c2y,c2z).

The diagram below shows this a bit more clearly:


Because we know that the arm length (la) is fixed and that the carriages can only move up and down (so we always know their x and y coordinates) we can calculate the carriage positions from some simple trigonometry.  First, we need to know the positions of the other ends of the arms (which I’m calling the the pivot points).  These are

A1 = (a1x,a1y,a1z),
B1 = (b1x,b1y,b1z) and
C1 = (c1x,c1y,c1z).

The diagram below shows how we can calculate these.  It’s a schematic view of the tool head, looking down from above.  We have to take into account the distance between the extruder nozzle and the pivot points, because it’s a finite size:


Pivot A

Pivot B

Pivot C

a1x = tx + po
a1y = ty
a1z = tz + to
b1x = tx + po * cos(120)
b1y = ty + po * sin(120)
b1z = tz + to

c1x = tx + po * cos(240)
c1y = ty + po * sin(240)
c1z = tz + to

Once we know the locations of the pivot points, it’s straightforward to use Pythagoras’ theorem to calculate the distance in the x-y plane from the pivot to the carriage, and then use Pythagoras again to calculate the height the carriage must be above the pivot.  the next diagram shows the geometry, looking at it side-on:


Firstly, we know the carriage head positions in x and y, because they are fixed to the strut positions:

Carriage A

Carriage B

Carriage C

a2x = sp
a2y = 0
a2z = ?
b2x = sp * cos(120)
b1y = sp * sin(120)
b2z = ?

c2x = sp * cos(240)
c2y = sp * sin(240)

The x-y plane distances of the pivots to the struts are given by:

aa = sqrt((a2x-a1x)*(a2x-a1x) + (a2y-a1y)*(a2y-a1y))
ab = sqrt((b2x-b1x)*(b2x-b1x) + (b2y-b1y)*(b2y-b1y))
ac = sqrt((c2x-c1x)*(c2x-c1x) + (c2y-c1y)*(c2y-c1y))

And then the heights of the carriages above the pivot are calculated thus:

ha = sqrt((la*la) – (aa*aa))
hb = sqrt((la*la) – (ab*ab))
hc = sqrt((la*la) – (ac*ac))

so the heights of carriages above the floor of the printer (which is what we wanted to find), are then simply

a2z = tz + to + ha
b2z = tz + to + hb
c2z = tz + to + hc

And there it is.  The maths isn’t particularly hard, and I’ve described it in a procedural way to make it easy to implement in code should you so desire.  Calculating the other way (determining the nozzle position starting with the positions of the carriages) is harder, because it its necessary to calculate the intersection point of three spheres.  Fortunately, we don’t need to do that to drive a printer!

Motorized mayhem

Caution!  Hyperbole warning!

All right, so there is no mayhem involved.  But there are motors.  Stepper motors, to be exact.  Four of them.  Over the weekend I built my RAMPS module (Aah, solder fumes!) and I am pleased to crow about the fact that it worked first time.  In case you don’t know, this is an arduino shield which integrates the majority of the external components required for a 3d printer.  It can host 5 stepper motor drivers (I only need 4 at the moment, but it gives me the option to add a second extruder), manage the inputs from end stops, thermistors and other safety devices, and can provide power for a heated base on which to print.  Each stepper motor has its own little daughter board, a pololu A4988 which handles the slightly complex business of powering the coils on the motor.  Driving stepper motors is different to driving simple DC motors – they have two or more (sets of) coils, which are powered in sequence (and with varying polarity) to move the rotor in discrete steps.  The motors I have have two sets of coils, and have a resolution of 200 steps per revolution.  The Pololu driver boards are sophisticated, and by manipulating the voltages over both sets of coils at once, can make the stepper motors turn in increments of as little as 1/16th of a step (which gives the motor a resolution of 3200 steps per revolution).  The completed board with its steppers attached looks like this:

WP_20130218_001 (1)

Yes, I know it’s out of focus.  My camera seems to have developed a very irritating fault, and every photo I take is slightly blurry.  The lack of focus doesn’t show up on the LCD viewfinder, because the resolution is insufficient.  It’s like going back to the old days of taking photos on film and not discovering that they were out of focus until a week later, when the film was developed.  I don’t really want to buy a new camera, so you might have to put up with soft focus images for a while.

Back to the point: the RAMPS board works perfectly.  To test it, I’ve loaded Marlin firmware into my Arduino.  Marlin is the program which takes more-or-less standard ‘G-code’ instructions (G-codes are widely used in the manufacturing industry to tell computer controlled machine tools how to act) and converts them to stepper motor steps.  I’m going to have to hack the Marlin source code a bit, because it’s designed for printers which have one motor for each of the x, y, and z axes.  Delta printers have more complex geometry, and that’s what my next post will be about.  Marlin in turn listens to a PC over a USB connection and gets its instructions from Pronterface, which allows me to test the movements of the motors.  It does a lot more than this, in fact.  Its true purpose is to drive the printer mechanics over the whole print run – but more of that when I’ve got something to print with.  For now, just marvel at the lovely UI, and accept that it allows me to test that all four motors work properly.


A note on power supplies

Stepper motors take electricity.  This may not be a revelation to you.  What you may not know is that they take quite a bit of electricity, even when they are not moving.  Especially if you are using micro stepping, the motor coils need to be energised (Mr Scott) simply to hold the motor in a given position.  Four motors can easily eat a few amps.  A very easy way to get a relatively high current power supply is to use one from and old PC.  I’ve got more of those than you can shake a stick at, so the whole printer will be driven from an old ATX PSU.  Easy.

Something for the weekend, Sir?

I love the smell of solder fumes in the morning.

Raw materials for my 3D printer keep arriving.  It’s not surprising, as I keep ordering them, but it is fun.  I’ve now received the aluminium extrusions I’m going to use for the vertical posts in my design.  I ordered them from a place in Surrey, and was a amused to watch their delivery progress on the UPS website.  Amused, because they started their journey in Austria, stopped off in Germany, then briefly visited Barking, Tamworth and Dewsbury before ending up in Hull.  And I thought I was ordering from the UK.  Never mind, I’m now the proud possessor of three 1-meter lengths of extrusion, which looks like this (the penny is just for scale):


A carriage (to be printed by Rob) will run up and down each of these posts, and will be linked to the print head by parallelogram arms.  I really must post an image of the design soon.

One metre length doesn’t sound much, but I have a suspicion that this printer is going to end up quite big.  This weekend’s tasks are to (1) cut the base and top of the assembly out of nice stiff plywood and (2) to assemble the RAMPS kit which will control the stepper motors.  It’ll be nice to get soldering again. 


The kit is very well packaged and looks a doddle to make, so it shouldn’t take long.  Once it’s up and running, I’ll put some firmware (probably Marlin) on to the Arduino and see if I can get it to drive the stepper motors.  Watch this space.  Unless you have better things to do, which I really hope you have.

Printer Claus has come to town!

As you know (because you follow my blog very closely), I’m building my own 3D printer.  Today I received a box of stepper motors, an Arduino Mega 2560 board and a RAMPS controller board kit.  These are the major items that I had to buy (rather than getting Rob to print for me).  Having spent actual money, I’m now really committed to building the printer.  Any day now I should receive the aluminium extruded sections I am using as vertical struts.  Watch this space.