Difference between revisions of "ZTATP"

From Jubilee
Jump to navigation Jump to search
Line 9: Line 9:
 
:Fully automated process that uses a camera to calculate ‘G10 Xnnn Ynnn’ commands that go in your config.g to correctly set the X Y alignment for correct tool-to-tool behavior when printing.
 
:Fully automated process that uses a camera to calculate ‘G10 Xnnn Ynnn’ commands that go in your config.g to correctly set the X Y alignment for correct tool-to-tool behavior when printing.
  
=== Requirements ===
+
= Requirements =
 
* Rasberry Pi 3B or 4B, with USB attached camera (no Picam at this time).
 
* Rasberry Pi 3B or 4B, with USB attached camera (no Picam at this time).
 
* Almost any webcam with auto-exposure and the ability to focus within a few centimeters of the lens will work. Logitech C270 is one that is known to have a threaded lens and a case that can be removed and replaced with a printed case.
 
* Almost any webcam with auto-exposure and the ability to focus within a few centimeters of the lens will work. Logitech C270 is one that is known to have a threaded lens and a case that can be removed and replaced with a printed case.
Line 15: Line 15:
 
* May run on Duet3+Pi; does NOT require that configuration, run on any Pi.
 
* May run on Duet3+Pi; does NOT require that configuration, run on any Pi.
  
== Differences between ZTATP on RRF2 and RRF3 ==
+
= Differences between ZTATP on RRF2 and RRF3 =
=== RRF 2.x.x ===
+
== RRF 2.x.x ==
 
ZTATP will default its probe input pin definition for the touch plate to the ''Z_PROBE_IN'' and ''GND'' pins, and these currently cannot be re-assigned to another endstop on an RRF2 board. This may be changed in a later release.
 
ZTATP will default its probe input pin definition for the touch plate to the ''Z_PROBE_IN'' and ''GND'' pins, and these currently cannot be re-assigned to another endstop on an RRF2 board. This may be changed in a later release.
  
 
The exact definition of this probe type in RRF 2.x.x is <code>M558 P5 I1 F200 H50</code>
 
The exact definition of this probe type in RRF 2.x.x is <code>M558 P5 I1 F200 H50</code>
  
=== RRF 3.x.x ===
+
== RRF 3.x.x ==
 
ZTATP will default the probing pin input to ''!io5.in'' (notice the inverted logic). You can re-assign this input by specifying an RRF3-style input name to any other input pin you want that would be compatible. Keep in mind, however, that ZTATP uses a ''normally open'' endstop configuration (usually RRF has normally closed endstops), and the circuit will close and trigger the endstop once the nozzle tip comes into contact with the probe plate.
 
ZTATP will default the probing pin input to ''!io5.in'' (notice the inverted logic). You can re-assign this input by specifying an RRF3-style input name to any other input pin you want that would be compatible. Keep in mind, however, that ZTATP uses a ''normally open'' endstop configuration (usually RRF has normally closed endstops), and the circuit will close and trigger the endstop once the nozzle tip comes into contact with the probe plate.
  
== Installation ==
+
= Installation =
=== Software installation and setup ===
+
== Software installation and setup ==
 
Follow the installation steps for TAMV [[TAMV|here]].
 
Follow the installation steps for TAMV [[TAMV|here]].
  
=== Hardware installation and wiring ===
+
== Hardware installation and wiring ==
  
 
* ZTATP requires a conductive touch plate that is fixed to the bed that can be reached by BOTH the nozzle on each and every tool, and by the Z-Probe. This can be slightly (a few mm) above or below the actual printable surface of the bed.
 
* ZTATP requires a conductive touch plate that is fixed to the bed that can be reached by BOTH the nozzle on each and every tool, and by the Z-Probe. This can be slightly (a few mm) above or below the actual printable surface of the bed.

Revision as of 17:37, 23 August 2020

Overview

  • ZTATP = Z Tool Align with Touch Plate.
Partially automated process that uses a touch plate to calculate ‘G10 Znnn’ commands that go in your config.g to correctly set the Z alignment for tool-to-tool correct behavior when printing. It also sets the bed-to-tool-zero spacing!
  • TAMV = Tool Alignment with Machine Vision.
Fully automated process that uses a camera to calculate ‘G10 Xnnn Ynnn’ commands that go in your config.g to correctly set the X Y alignment for correct tool-to-tool behavior when printing.

Requirements

  • Rasberry Pi 3B or 4B, with USB attached camera (no Picam at this time).
  • Almost any webcam with auto-exposure and the ability to focus within a few centimeters of the lens will work. Logitech C270 is one that is known to have a threaded lens and a case that can be removed and replaced with a printed case.
  • A Duet printer, reachable from the Pi by network, running V2 or V3 firmware
  • May run on Duet3+Pi; does NOT require that configuration, run on any Pi.

Differences between ZTATP on RRF2 and RRF3

RRF 2.x.x

ZTATP will default its probe input pin definition for the touch plate to the Z_PROBE_IN and GND pins, and these currently cannot be re-assigned to another endstop on an RRF2 board. This may be changed in a later release.

The exact definition of this probe type in RRF 2.x.x is M558 P5 I1 F200 H50

RRF 3.x.x

ZTATP will default the probing pin input to !io5.in (notice the inverted logic). You can re-assign this input by specifying an RRF3-style input name to any other input pin you want that would be compatible. Keep in mind, however, that ZTATP uses a normally open endstop configuration (usually RRF has normally closed endstops), and the circuit will close and trigger the endstop once the nozzle tip comes into contact with the probe plate.

Installation

Software installation and setup

Follow the installation steps for TAMV here.

Hardware installation and wiring

  • ZTATP requires a conductive touch plate that is fixed to the bed that can be reached by BOTH the nozzle on each and every tool, and by the Z-Probe. This can be slightly (a few mm) above or below the actual printable surface of the bed.
  • The touch plate must be grounded, to any ground in the Duet system.
  • There are three ways to wire the nozzles:
Each nozzle has a wire, leading back to a “Y” harness that leads them all into ‘io5.in’ (or any other endstop connector, if you change the script). This is basically a parallel connection from each tool back to the probe input pin.
OR
You can arrange any number of “spring” mechanisms that contact the nozzle just before the nozzle contacts the touch plate, similar in operation to a CNC pressure foot.
OR
(default and easiest wiring method) You can have a single probe wire that you connect to each tool manually in sequence. The script will pause between tools during the probing sequence until you hit Enter to resume probing.

Runtime parameters

  • -duet xxx.xxx.xxx.xxx or -duet hostname
Default value: localhost
(optional) Used to specify the IP address or hostname of the Duet controller you're connecting to. If running ZTATP on the local Pi directly connected to a Duet 3 board, you can omit this parameter.
  • -touchplate x.xxx y.yyy
Default value: 0.0 0.0
(required) Used to specify the X and Y coordinates for location of the center of the grounded touch plate used to calibrate Z offsets
  • -pin pin_name RRF 3.x.x only
Default value: !io5.in
(optional) Used to specify the input pin the probe wires are connected to. Typically a normally-open definition indicated by inverting the logic of the pin using an exclamation point at the start of the name.
  • -tool tool_number
(optional) Used to specify the tool number (starting from 0, as in T0, T1, T2, etc.) if you want to run a Z-offset calibration for a single tool. Integer values only!

Entering the coordinates of the touch plate

Edit the following in the beginning of the script:

################################
# Edit these for your printer. #
################################
tl = [0,1]            # List of tools to be compared
yc = 225              # Y line that will clear parked tools when moving in X

xz = 288              # X coord of tool nozzle over flat plate to probe Z. 15x15mm area recommended.
yz = 285              # Y coord of tool nozzle over flat plate to probe Z. 15x15mm area recommended.

# Note: The particular probe command we use does NOT apply probe offsets. 
xp = 253              # X coord of Z-Probe over flat plate to probe Z. 15x15mm area recommended.
yp = 340              # Y coord of Z-Probe over flat plate to probe Z. 15x15mm area recommended.

Note: The printer MUST define Z with a PROBE in config.g. Even if it is really an endstop switch, it is OK to define that as a probe.

Running

  • No VNC or graphics needed.
  • cd to the directory where TAMV was installed. ./ZTATP.py

Everything is automated, the ultimate output is G10 commands (containing only a Znnn) that should be placed in config.g.