Configuring and calibrating a delta printer using the dc42 fork of RepRapFirmware

From RepRap
Revision as of 05:45, 31 July 2015 by Dc42 (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Telling RepRapFirmware that your printer is a delta

To tell RepRapFirmware that your printer is a delta and to define its parameters, put command M665 L### R### H### B### X### Y### in your sys/config.g file on the SD card, where ### represents a number. The L parameter is the diagonal rod length. The R parameter is your estimate of the delta radius. The H parameter is the height of the nozzle above the bed when the carriages are activating the endstop switches. The B parameter is the printable radius of the bed. X and Y are the angular offsets of the X and Y towers, and may be omitted or set to zero. All these values may include decimal portions.

Setting up the homing file

You need to set up the homing commands in file sys/homedelta.g on the SD card. When configured for a delta printer, RepRapFirmware will always home all three towers when any G28 command is processed, ignoring any X, Y or Z parameters. Typical contents of homedelta.g would be:

G91                         ; use relative positioning
G1 S1 X250 Y250 Z250 F5000  ; move all carriages up 250mm, stopping at the endstops
G1 S2 X-5 Y-5 Z-5 F1000     ; move all towers down 5mm
G1 S1 X8 Y8 Z8 F1500        ; move towers up 8mm, stopping at the endstops
G1 S2 X-5 Y-5 Z-5 F10000    ; move carriages down 5mm
G90                         ; back to absolute positioning

Adjust the “250” numbers in the first line to be somewhat greater than your maximum print height, to ensure that the carriages reach the endstops. During initial testing, you may wish to reduce the homing speed value “5000” in the second line to a lower value, to give yourself more time to press the reset or power button if something goes wrong. Alternatively, reduce the motor currents during initial testing using the M906 command.

The above works because when the S1 or S2 parameter is used in a G0 or G1 command, the X, Y and Z values in the command are used as values for the individual towers instead of the head coordinates. In the case of S1, the endstops are activated too.

Setting up the Z probe deploy and retract files

If your machine has a mechanical Z probe that needs to be deployed by moving the head in certain ways (e.g. standard Mini Kossel), then you need to set up macro files for deploying and retracting the probe. These are typically named sys/deployprobe.g and sys/retractprobe.g. Here is a sample deployprobe.g file:

M564 S0                ; don't apply limits
G1 X25 Y93 Z40 F10000  ; put probe arm next to belt
G1 X-5 F500            ; move probe arm slowly across belt
G1 X12 F1000           ; move probe back
G1 X0 Y0 F10000        ; move to somewhere sensible
M564 S1                ; apply limits again

Here is a sample retractprobe.g file:

M564 S0           ; don't apply limits
G1 Z40 F10000     ; raise head
G1 X-59 Y66 Z35   ; move over the post
G1 Z7 F500        ; push probe down on post
G1 Z35 F10000     ; raise head again
G1 X0 Y0          ; move to somewhere sensible
M564 S1           ; apply limits again

Setting up the auto calibration file

Auto calibration is performed by sending command G32 (which is the same command used to do auto bed compensation on a Cartesian printer). This command runs macro file sys/bed.g, so all the work is done there. Here is a sample bed.g file:

M561                            ; clear any bed transform, otherwise homing may be at the wrong height
G31 X0 Y0                       ; don't want any probe offset for this
G28                             ; home the printer

;*** Remove the following two lines if your Z probe does not need to be deployed
M98 Pdeployprobe.g              ; deploy the mechanical Z probe
G30 P0 X0 Y0 Z-99999            ; dummy probe, because the mechanical probe gives inaccurate results the first time it is used after deployment

; Probe the bed and do 6-factor auto calibration
G30 P0 X-73.6 Y-42.5 Z-99999    ; X tower
G30 P1 X0 Y-85 Z-99999          ; between X and Y towers
G30 P2 X73.6 Y-42.5 Z-99999     ; Y tower
G30 P3 X73.6 Y20 Z-99999        ; between Y and Z towers
G30 P4 X0 Y67 Z-99999           ; Z tower
G30 P5 X-73.6 Y20 Z-99999       ; between Z and X towers
G30 P6 X-36.8 Y-21.25 Z-99999   ; half way to X tower
G30 P7 X36.8 Y-21.25 Z-99999    ; half way to Y tower
G30 P8 X0 Y42.5 Z-99999         ; half way to Z tower
G30 P9 X0 Y0 Z-99999 S6         ; centre, and auto-calibrate 6 factors

;*** Remove the following line if your Z probe does not need to be retracted
M98 Pretractprobe.g             ; retract the mechanical Z probe

G1 X0 Y0 Z150 F15000            ; get the head out of the way of the bed