Dual Z TMC2209 Issue

Hi,

I’m trying to configure my Z axis to work with 2 TMC2209 drivers and 2 motors. I may want to configure it to be able to work individually in the future but now I just want them to work… The tmc2209 stepper z section is in comment because I was having issue with the UART adresses…
Here’s my config :
Duet 3 Mini 5+

[stepper_z]
#driver2
step_pin: PC24
dir_pin: PB28
enable_pin: !PC28
microsteps: 16
rotation_distance: 8
#endstop_pin: PC5
#position_endstop: 0
position_max: 400
#Uncomment if you have a BL-Touch:
position_min: -4
endstop_pin: probe:z_virtual_endstop
#and comment the follwing lines:
[stepper_z1]
#driver4
step_pin: PC16
dir_pin: PB21
enable_pin: !PC28
microsteps: 16
rotation_distance: 8
#endstop_pin: PC5
#position_endstop: 0
#position_max: 400
#Uncomment if you have a BL-Touch:
#position_min: -4
#endstop_pin: probe:z_virtual_endstop
#and comment the follwing lines:


[tmc2209 stepper_z]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 2
run_current: 1
sense_resistor: 0.056

#[tmc2209 stepper_z1]
#uart_pin: PA1
#tx_pin: PA0
#select_pins: PD0
#uart_address: !0
#run_current: 1
#sense_resistor: 0.056

Assuming you’re using driver 4 for z1, you have a typo in your config. The dir_pin should be PD21, not PB21.

1 Like

Oh crap thanks! I did correct it but still get the error with UART if I uncomment the tmc2209 stepper z1 section… With it commented the second Z still doesn’t move.
The error : Unable to parse option ‘uart_address’ in section ‘tmc2209 stepper_z1’

Post a log with the error.

1 Like

By the log I suppose it’s the klippy.log, here it is :

===== Config file =====
[stepper_x]
step_pin = PC26
dir_pin = !PB3
enable_pin = !PC28
microsteps = 16
rotation_distance = 40
endstop_pin = ^PC31
position_endstop = 0
position_max = 300

[tmc2209 stepper_x]
uart_pin = PA1
tx_pin = PA0
select_pins = PD0
uart_address = 0
run_current = 1
sense_resistor = 0.056

[stepper_y]
step_pin = PC25
dir_pin = PB29
enable_pin = !PC28
microsteps = 16
rotation_distance = 40
endstop_pin = ^PC4
position_endstop = 0
position_max = 300

[tmc2209 stepper_y]
uart_pin = PA1
tx_pin = PA0
select_pins = PD0
uart_address = 1
run_current = 1
sense_resistor = 0.056

[stepper_z]
step_pin = PC24
dir_pin = PB28
enable_pin = !PC28
microsteps = 16
rotation_distance = 8
position_max = 400
position_min = -4
endstop_pin = probe:z_virtual_endstop

[stepper_z1]
step_pin = PC16
dir_pin = PB21
enable_pin = !PC28
microsteps = 16
rotation_distance = 8

[tmc2209 stepper_z]
uart_pin = PA1
tx_pin = PA0
select_pins = PD0
uart_address = 2
run_current = 1
sense_resistor = 0.056

[safe_z_home]
home_xy_position = 104.25,147.6
speed = 80
z_hop = 10
z_hop_speed = 10

[adc_scaled vref_scaled]
vref_pin = PB5
vssa_pin = PB4

[extruder]
step_pin = PC19
dir_pin = PD20
enable_pin = !PC28
microsteps = 16
rotation_distance = 5.7
nozzle_diameter = 0.400
filament_diameter = 1.750
heater_pin = PB13
sensor_type = EPCOS 100K B57560G104F
pullup_resistor = 2200
sensor_pin = vref_scaled:PC1
control = pid
pid_kp = 30.089
pid_ki = 2.229
pid_kd = 101.550
min_temp = 0
max_temp = 285

[tmc2209 extruder]
uart_pin = PA1
tx_pin = PA0
uart_address = 3
select_pins = PD0
run_current = 0.60
sense_resistor = 0.056

[heater_bed]
heater_pin = PB17
sensor_type = ATC Semitec 104GT-2
sensor_pin = vref_scaled:PC0
control = pid
pullup_resistor = 2200
pid_kp = 201.86
pid_ki = 10.67
pid_kd = 954.96
min_temp = 0
max_temp = 130

[heater_fan heatbreak_fan]
pin = PB1

[fan]
pin = PB2

[mcu]
serial = /dev/ttyACM0

[printer]
kinematics = cartesian
max_velocity = 300
max_accel = 3000
max_z_velocity = 5
max_z_accel = 100

[board_pins]
aliases = 
	EXP1_1=PA9, EXP1_3=PC6, EXP1_5=<LCD_RST>, EXP1_7=<NC>, EXP1_9=<GND>,
	EXP1_2=PB9, EXP1_4=PA2, EXP1_6=PB12,      EXP1_8=<NC>, EXP1_10=<5V>,
	EXP2_1=PC15,  EXP2_3=PD1,  EXP2_5=PC11, EXP2_7=PD12,        EXP2_9=<GND>,
	EXP2_2=PC13, EXP2_4=PC14, EXP2_6=PC12, EXP2_8=<RESET_EXT>, EXP2_10=<NC>

[bltouch]
sensor_pin = ^PD8
control_pin = PD9
set_output_mode = 5V
pin_move_time = 0.4
stow_on_each_sample = False
probe_with_touch_mode = False
x_offset = 45.75
y_offset = -3.40
z_offset = 3.28
samples = 2
sample_retract_dist = 2
samples_result = average

[bed_mesh]
speed = 50
horizontal_move_z = 6
mesh_min = 46.50,0.75
mesh_max = 253.5,295.85
probe_count = 7,7
algorithm = bicubic

[bed_screws]
screw1 = 33,29
screw1_name = front left screw
screw2 = 273,29
screw2_name = front right screw
screw3 = 273,269
screw3_name = rear right screw
screw4 = 33,269
screw4_name = rear left screw

[virtual_sdcard]
path = ~/gcode_files

[display_status]

[pause_resume]

[gcode_macro PAUSE]
description = Pause the actual running print
rename_existing = PAUSE_BASE
variable_extrude = 1.0
gcode = 
	{% set E = printer["gcode_macro PAUSE"].extrude|float %}
	{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
	{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
	{% set max_z = printer.toolhead.axis_maximum.z|float %}
	{% set act_z = printer.toolhead.position.z|float %}
	{% if act_z < (max_z - 2.0) %}
	{% set z_safe = 2.0 %}
	{% else %}
	{% set z_safe = max_z - act_z %}
	{% endif %}
	PAUSE_BASE
	G91
	{% if printer.extruder.can_extrude|lower == 'true' %}
	G1 E-{E} F2100
	{% else %}
	{action_respond_info("Extruder not hot enough")}
	{% endif %}
	{% if "xyz" in printer.toolhead.homed_axes %}
	G1 Z{z_safe} F900
	G90
	G1 X{x_park} Y{y_park} F6000
	{% else %}
	{action_respond_info("Printer not homed")}
	{% endif %}

[gcode_macro RESUME]
description = Resume the actual running print
rename_existing = RESUME_BASE
gcode = 
	{% set E = printer["gcode_macro PAUSE"].extrude|float %}
	{% if 'VELOCITY' in params|upper %}
	{% set get_params = ('VELOCITY=' + params.VELOCITY)  %}
	{%else %}
	{% set get_params = "" %}
	{% endif %}
	{% if printer.extruder.can_extrude|lower == 'true' %}
	G91
	G1 E{E} F2100
	{% else %}
	{action_respond_info("Extruder not hot enough")}
	{% endif %}
	RESUME_BASE {get_params}

[gcode_macro CANCEL_PRINT]
description = Cancel the actual running print
rename_existing = CANCEL_PRINT_BASE
gcode = 
	TURN_OFF_HEATERS
	CANCEL_PRINT_BASE
=======================
Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds']
Git version: 'v0.10.0-515-g24a1b50e'
CPU: 4 core ARMv7 Processor rev 3 (v7l)
Python: '2.7.18 (default, Jul 14 2021, 08:11:37) \n[GCC 10.2.1 20210110]'
webhooks client 3042068480: {'program': 'Moonraker', 'version': 'v0.7.1-597-gd37f91c'}
=============== Log rollover at Tue Jul 26 00:37:47 2022 ===============
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
MCU error during connect
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 176, in _connect
    self.send_event("klippy:mcu_identify")
  File "/home/pi/klipper/klippy/klippy.py", line 264, in send_event
    return [cb(*params) for cb in self.event_handlers.get(event, [])]
  File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify
    raise error(str(e))
error: mcu 'mcu': Unable to connect
Build file /home/pi/klipper/klippy/../.config(1609): Fri Jul  8 00:09:30 2022
========= Last MCU build config =========
CONFIG_LOW_LEVEL_OPTIONS=y
# CONFIG_MACH_AVR is not set
# CONFIG_MACH_ATSAM is not set
CONFIG_MACH_ATSAMD=y
# CONFIG_MACH_LPC176X is not set
# CONFIG_MACH_STM32 is not set
# CONFIG_MACH_RP2040 is not set
# CONFIG_MACH_PRU is not set
# CONFIG_MACH_LINUX is not set
# CONFIG_MACH_SIMU is not set
CONFIG_BOARD_DIRECTORY="atsamd"
CONFIG_MCU="samd51p20a"
CONFIG_CLOCK_FREQ=120000000
CONFIG_USBSERIAL=y
CONFIG_FLASH_START=0x4000
CONFIG_FLASH_SIZE=0x100000
CONFIG_RAM_START=0x20000000
CONFIG_RAM_SIZE=0x40000
CONFIG_STACK_SIZE=512
CONFIG_ATSAMD_SELECT=y
CONFIG_HAVE_SERCOM=y
# CONFIG_MACH_SAMD21G18 is not set
# CONFIG_MACH_SAMD21E18 is not set
# CONFIG_MACH_SAMD21E15 is not set
# CONFIG_MACH_SAMD51G19 is not set
# CONFIG_MACH_SAMD51J19 is not set
# CONFIG_MACH_SAMD51N19 is not set
CONFIG_MACH_SAMD51P20=y
CONFIG_MACH_SAMD51=y
# CONFIG_CLOCK_REF_X32K is not set
CONFIG_CLOCK_REF_X25M=y
# CONFIG_CLOCK_REF_INTERNAL is not set
CONFIG_SAMD51_FREQ_120=y
# CONFIG_SAMD51_FREQ_150 is not set
# CONFIG_SAMD51_FREQ_180 is not set
# CONFIG_SAMD51_FREQ_200 is not set
CONFIG_FLASH_START_4000=y
# CONFIG_FLASH_START_0000 is not set
CONFIG_ATSAMD_USB=y
# CONFIG_ATSAMD_SERIAL is not set
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER_CHIPID=y
CONFIG_USB_SERIAL_NUMBER="12345"

#
# USB ids
#
# end of USB ids

CONFIG_CANBUS_FREQUENCY=500000
CONFIG_INITIAL_PINS=""
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_BITBANGING=y
CONFIG_HAVE_STRICT_TIMING=y
CONFIG_HAVE_CHIPID=y
CONFIG_HAVE_STEPPER_BOTH_EDGE=y
CONFIG_INLINE_STEPPER_HACK=y
=======================
Build file /home/pi/klipper/klippy/../out/klipper.dict(7071): Fri Jul  8 00:10:05 2022
Last MCU build version: v0.10.0-515-g24a1b50e
Last MCU build tools: gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.34-4+rpi1+14) 2.34
Last MCU build config: STEPPER_BOTH_EDGE=1 ADC_MAX=4095 RESERVE_PINS_crystal=PB22,PB23 CLOCK_FREQ=120000000 RESERVE_PINS_USB=PA24,PA25 MCU=samd51p20a STATS_SUMSQ_BASE=256
Build file /home/pi/klipper/klippy/../out/klipper.elf(1641276): Fri Jul  8 00:10:12 2022

Yes the klippy.log, but attached as a file I can download. What you posted here though indicates you’re board isn’t connecting at all.

This is all that log contains as far as errors.

The file doesn’t seem to update with my last error?!?

I need to see the full log. A parsing error is usually caused by a typo, but I need the log to figure out what is wrong.

I m sorry I cant find your section for [tmc2209 stepper_z1]
without that it won t find the uart for that stepper driver
That might be creating the issue

This was resolved on Discord.