Contents
(UPDATE FOR MENDEL 3)
Introduction
This page tells you how to set up the axis compensation of your Huxley so that it can print accurately. You should have covered basic communication in the Commissioning section.
The Duet supports both a USB interface, via the RepRap utility Pronterface, and an ethernet/web interface using a web browser. At the moment only the Google Chrome and Firefox web browsers are supported, though other browsers may well work too. Browser support will be expanded in future firmware releases.
Setting the Z Probe
The proximity sensor (also known as the Z probe) uses an infra-red sensor to detect the aluminium bed.
Plug both the USB and ethernet cables in and turn on the power.
Now a useful thing: you can use both interfaces at the same time – the RepRap Firmware in the Duet controller will sort everything out for you. Open the Arduino IDE and go to Tools->Port and select the USB port for your printer. Then go to Tools->Serial Monitor. Make sure the speed is set to 115200 (bottom right) and that Newline is selected (next to the speed). Now type an M105 GCode command in the Send bar and send it:
serial: M105 ok T:16.3 B:18.9
The Duet is saying it got a command on its serial (i.e. USB) interface, and is reporting its temperatures to you. You are talking directly to the USB interface, something that is normally mediated by Pronterface. You can actually do the whole of this section just by typing commands at this interface. but things will be quicker if you also use the network interface at the same time. Open a browser and connect to the IP address you set for your printer in the Commissioning Section.
(If the web interface is not working, you can debug it by using the Serial Monitor to send M111 S9 – debug HTTP requests.)
On the web control page lift the printer’s Z axis by +10mm to make sure the nozzle is well clear of the bed, then select Home X and Home Y. Those two axes should zero themselves.
Now use the controls to move the Z probe over the bed corner. (X = 55, Y = 0) should be about right.
Send the command M558 P2. This activates the Z probe. This should already be in your config.g file, but make sure it loads on startup (see the section in the Commissioning instructions).
Make sure the tag is well under the probe – you don’t want the probe near its edge.
Now move the Z axis down so that the nozzle is a tiny bit above the bed and you can just see light between the two. Take care – you don’t want to crash the nozzle into the bed. When you get near, move in 0.1mm increments.
Send a G92 Z0 command. You should see the Z position on the Control page go to 0.0. G92 tells the RepRap Firmware that an axis is at whatever position you specify. As the nozzle is almost touching the bed, we want this to be Z = 0.
Next send a G31 command. This fires the Z probe and reports the measurement it makes in the Serial Monitor window. The measurement should be about 950 or so.
(What’s going on? The Z probe works by reflected IR light. The closer it gets to the paper target the more light is reflected, and this sends back a bigger voltage to the Duet controller, which converts the voltage into a number. The biggest possible voltage is 3.3 volts, which the Duet would convert to 1023 = 210 – 1. So the 950 means “pretty close”.)
Now. It is not a good idea to zero the Z axis by driving it down and looking for this value for two reasons:
- The probe is not very accurate or sensitive at the very top end of its range, and
- It gives us no room for error – we might crash the bed.
So, raise the Z axis in small increments and send a G31 after each movement. As you start, you will see almost no change (not very accurate or sensitive at the top of its range, remember?), but then the readings will start to drop. Stop when they are somewhere between 600 and 500. Suppose the value is 556. Look at the Z position box. Z will probably be between 2 and 3mm off the bed – say it’s 2.3mm.
Now send G31 Z2.3 P556
This use of G31 sets values, rather than reporting them to you. It tells the Duet that a reading of 556 corresponds to Z = 2.3 mm off the bed.
Now when you select Home Z, Z will drop until the Duet detects a probe reading of 556. It will then lower by a further 2.3mm, and you will be at Z = 0. Try it: raise Z to about 10mm, then select Home Z. Your printer will home its Z axis.
This is all very well, but you don’t want to go through this rigmarole every time you turn on the machine. So put the G31 Z2.3 P556 (with your numbers, obviously) in the config.g file. That will set these values every time you reset the machine. See here for how to edit the config.g file.
As mentioned above, the position X=55, Y=0 should be about right for the IR probe to be above the paper target. But if your position is significantly different you will also want to record that permanently so that your RepRap always homes its Z axis in the right X,Y position. The axes are all homed by macros. These are little G Code files stored in the sys folder on the SD card, and are described here. There is one called homez.g. As supplied it looks like this (with comments for explanation):
G91 ; set movements relative G1 Z5 F200 ; move upwards 5mm at 200 mm/min to make sure we don't hit anything G90 ; set movements absolute G1 X55 Y0 ; Move to the X, Y point at which to probe the bed over the paper G30 ; Move down until the probe is triggered (i.e. move down until the IR voltage is 556, which automatically sets Z = 2.3mm). G1 Z0 F200 ; Move down to Z=0 (i.e. move down the last 2.3mm)
If your paper is in a different place, change the G1 X55 Y0 line to the appropriate X and Y coordinates.
There is also a file called homeall.g. This is used to home all three axes at once (this is more efficient than calling the separate macros for each axis in turn). Open that and change the G1 X55 Y0 to your paper coordinates too.
Getting Extrusion Just Right
To get the best quality prints, you need to make fine adjustments to the filament feed to make it as accurate as possible.
Using Pronterface for this is best, as in a moment you’ll want to see what happens on the USB interface in its window.
Select Motors Off, so that you can turn the extruder mechanism by hand. Feed filament into the input of the filament drive, and wind the big gear until the filament is just visible in the PTFE Bowden tube. (Don’t pinch your finger in the gears…) Then use a felt-tipped pen carefully to mark the filament just where it enters the mechanism.
Now tell your printer to feed 100mm of filament. Mark the filament again.
Reverse the filament by 110 mm, so you can see both marks. Using a ruler carefully measure between them. The measurement probably won’t be exactly 100mm. Suppose it is 97mm.
Now send an M92 command. The result in the USB interface window will be something like:
Steps/mm: X: 87, Y: 87, Z: 4000, E: 420:420:420:420:420
These numbers are the number of pulses sent to each stepper motor to drive it 1mm. There are five extruder values because the firmware supports up to five extruder drives.
Because you only got 97mm and you wanted 100mm, the E420 needs to change to 420x(100/97), which is to say 433. Do that calculation for the length you measured, then add a line saying
M92 E433
but with your number in place of the 433 to your config.g file. M92 with no arguments reports the values; if you give it a value, it sets it.
(You only need to specify one E value – that will set all five values to that one. In multiple-drive machines you can set them individually thus: M92 E433:427:440:425:429 )
Now your printer will extrude precisely the right amount of filament when it’s printing.
Finally, set the temperature of the hot end to 200oC. When it gets to temperature feed the filament all the way to the nozzle. You can run it fast when the end is still visible in the tube (800 mm/minute in Pronterface). But make sure you slow down before the filament enters the hot end, and extrude at 100mm/minute maximum. If you try and extrude too fast, there will not be sufficient time for the heater to melt the plastic, and the pressure required to extrude will increase until the filament starts slipping in the drive.
Bed Plane Compensation
Duet-equipped printers allows you to compensate for the fact that the plane of its printing surface may not be exactly at right-angles to its Z direction. This section tells you how to implement this.
1 – Give the software a sporting chance – set the bed by hand
The Huxley has a fixed bed, but this doesn’t mean that it is completely unadjustable. First, follow the ‘frame alignment’ guide on the ‘frame assembly’ page of the instructions, to get the frame as square as possible. Then level the X axis with the bed, by moving the nozzle down to the bed. Set the bed so the nozzle is over the centre of the bed, then move the X axis to the left and right of the bed. Equalise the height of the nozzle over the bed on each side, by turning the Z motor for that side by hand.
The bed will now be much more accurately flat. Now run the Bed Plane Compensation:
2 – Bed Plane Compensation – fully automatic
(UPDATE FOR HUXLEY)
Fully automatic bed plane compensation is a very easy process. It uses the IR Z probe to probe the bed in four places automatically.
As before choose a rectangle of (X, Y) points at which to probe. Make sure that when the nozzle is at each point, there is piece of paper under the Z probe between the Kapton tape and the glass. Good coordinates are X = 60, 220, and Y = 0, 180. But move your own machine around and check against the paper. You need the IR Z probe to be roughly over the middle of the paper.
Now record the points at which you want automatic probing to take place. You can either put these in a short G-code file that you run, or add them to config.g.
M557 P0 X60 Y0
M557 P1 X60 Y180
M557 P2 X220 Y180
M557 P3 X220 Y0
Make sure you set them in clockwise order round the rectangle, starting near the origin.
Set the Z Probe correctly (see the section above).
Now sending a G32 command will cause the printer to probe all four points and set the bed compensation fully automatically every time.
Orthogonal Axis Compensation
(UPDATE FOR HUXLEY)
Before doing the compensation described in this section, first do the Bed Plane Compensation described above. Orthogonal Axis Compensation depends on having the bed plane right.
This compensation is not intended to avoid all the effort in getting the axes at right angles. During construction you should have used the supplied set-square on the Y axis to set the vertical Z pillar at right angles to it.
Now skip to the Printing Instructions. They tell you how to do your first print, which you will need to set the orthogonal axis compensation. Then come back and do the rest of this section….
Setting the compensation from the printed test parts
Duet-equipped printers allows you to compensate for the fact that its X, Y, and Z axes may not have been assembled at perfect right angles. This section tells you how to implement this.
First clean any extraneous wisps of filament or small lumps on the surface of the printed parts away. When you get used to printing these won’t happen anyway, but this was your first print, and so it would be unreasonable to expect it to be perfect.
The thumbwheel in the test print has 10 radial indentations to allow you to count turns of it. The thread pitch of an M3 screw is 0.5mm, so each gradation is 0.05mm. Use a felt-tipped pen to mark one indentation so you can identify it as the wheel turns. Then assemble the gauge shown above.
Start by using a short M3 screw to draw an M3 nut into the hexagonal cavity in the angled part. Put an M3 washer under the head of the screw. Take care as you tighten the screw that the flats on the nut are aligned with the hexagon of the cavity. You will feel the tightening force increase as the nut reaches the bottom of the cavity.
Then assemble the measuring screw. An M3 hex-headed screw fits in the cavity in the top of the thumbwheel, if you have one available. Secure it there with a nut with a washer under it on the other side of the wheel. Then put a washer, a spring, and another washer on the screw and screw it into the nut embedded in the cavity of the angled piece as shown above.
The order goes: M3 screw, thumbwheel, washer, nut, (washer, spring, washer, if available) angled piece, nut embedded in the angled piece.
Now use a set square to set the screw at just the right position for a right-angle, as shown above. Push the set square against the small projection near the angle. But don’t force things or push too hard. You don’t want to distort the pieces.
Note the position of the mark you made on the thumbwheel.
Now take the three-legged test piece that you printed. Hold it in the same place as the set square, and see how much (if at all) you have to turn the thumbwheel to just touch it. Note down the turns, and whether they were clockwise/inward/acute-angle/negative or anti-clockwise/outward/obtuse-angle/positive.
Suppose you need 1.3 clockwise turns. The pitch of an M3 thread is 0.5mm, so this means that the axis pair you have measured is -0.65mm away from a true right angle.
You can take several readings and average them – always more accurate. If you do, re-zero with the set square before each reading.
Measure all three pairs of axes: XY, YZ and XZ and write down the measurement for each.
Finally, measure the distance between the tip of the projection near the angled corner and the centre of the end of the screw. This should be 78mm, but it is best to measure it than to rely on the accuracy of your first print.
Suppose the XY, YZ and XZ measurements are XY = -0.65, YZ = 0.9, XZ = 0.2, and the screw distance is that 78mm. Then sending
M556 S78 X-0.65 Y0.9 Z0.2
to your printer will cause it to correct for those angles between the axes when it prints.
You can put the M556 command in your config.g file. Or you can put it in a short file called, say, setaxes.g and upload that to your printer using the web interface. Then, when you run that file, it will set your axis compensation.
To check that the axis compensation has worked, apply it, print the test pieces again, and check them with the set-square and gauge. This time you should find that all three legs of the largest test piece are at right angles to each other.