Mks nano V3.1 tmc2209 issue

Basic Information:

Printer Model: ER20
MCU / Printerboard: Mks nano v3.1
klippy (4).log (4.5 MB)
Tmc2209 from aliexpress
klippy.log

I have tmc2209 drivers and struggling to get the sensorless homing to work.

i have managed to follow the klipper guide and get the steppers to move correctly

set the jumpers on the mainboard for uart but get an error when i try to move the steppers

if i remove the uart oprions from the printer.cfg i can move all axis successfully, but struggling when i insert the uart info into the config.

19:41:09 $ DUMP_TMC STEPPER=stepper_x

19:41:09 // ========== Write-only registers ==========

19:41:09 // SLAVECONF: 00000200 senddelay=2

19:41:09 // IHOLD_IRUN: 00081313 ihold=19 irun=19 iholddelay=8

19:41:09 // TPWMTHRS: 00000000

19:41:09 // TPOWERDOWN: 00000014 tpowerdown=20

19:41:09 // SGTHRS: 00000000

19:41:09 // ========== Queried registers ==========

19:41:09 !! Unable to read tmc uart ‘stepper_x’ register GCONF

i put a jumper on the diag pin as well,

i’m setting one stepper up at a time

any ideas ?

May I inquire what would be the reason for going sensor-less?
I looked at this option while designing my machine but I couldn’t find any convincing reasons to do it. The payload benefit is minimal, the only reason I could see was that it needs less wiring and therefor you possibly have a minute cost saving.
I am genuinely interested in possible other reasons that I may have overlooked?
I am sorry that I do not offer a solution for your troubles, I am simply asking because I am in the starting phase of design and if there are convincing reasons to go sensor-less it would save me 6 pins on my plugs with which to connect the printer to the control box.
Regards,
Kees

1 Like

Let’s start with the X axis communication errors. The most likely causes of the problems are:

  1. You haven’t set the jumpers on the board correctly
  2. You haven’t specified the Klipper parameters correctly
  3. The drivers are not TMC2209s
  4. The drivers are burned out/damaged

Please send a photograph of how you have set your jumpers for the “X” axis.

Next, standardize the printer.cfg x axis as:

[tmc2209 stepper_x]
uart_pin = PD5
run_current = 0.580
stealthchop_threshold = 999999
diag_pin = PA15
driver_sgthrs = 100

[stepper_x]
step_pin = !PE3
dir_pin = PE2
endstop_pin = tmc2209_stepper_x:virtual_endstop
homing_retract_dist = 0
enable_pin = !PE4
microsteps = 16
rotation_distance = 40
position_endstop = 0
position_max = 250
homing_speed = 40

You’ll notice its slightly different than anything you’ve tried. I’m not modifying any of the pins and setting the SGTHRS register to an intermediate value.

I’d never go with explicit sensors on X/Y ever again.

The reasons are basically as you listed but they’re not as insignificant as you seem to feel they are. Not having the additional wiring is a huge plus as there is an immediate cost savings but there is also a build time and maintenance savings. There are no MCU pin savings as you need to connect the “diag” pins for each driver rather than use MCU pins for the sensors.

Going sensorless simplifies the printer and its operation.

1 Like

Thanks for your quick reply

I changed to your config for the x

The steppers are brand new - btw i flashed marlin with uart and tested uart with pronterface which returned no errors on all axis and the axis moves - so i assume they’re ok?

still errors - {‘error’: ‘WebRequestError’, ‘message’: “Unable to read tmc uart ‘stepper_x’ register IFCNT”}

also just noticed on the aliexpress liting is says to enable uart you need to remove a pin and solder does that look right to you?

Thanks, I will look into it again. Loosing 6 wires and 2 switches is indeed the best thing I could think of, but ease of build and less components do also count for something.
Kind regards,
Kees

So followed the hidden instruction on their website, and removed pin from one and soldered tx/rx

no errors now

5:43:30
$ DUMP_TMC STEPPER=stepper_x
15:43:30
// ========== Write-only registers ==========
15:43:30
// SLAVECONF: 00000200 senddelay=2
15:43:30
// IHOLD_IRUN: 00081212 ihold=18 irun=18 iholddelay=8
15:43:30
// TPWMTHRS: 00000000
15:43:30
// TPOWERDOWN: 00000014 tpowerdown=20
15:43:30
// SGTHRS: 00000064 sgthrs=100
15:43:30
// TCOOLTHRS: 00000000
15:43:30
// ========== Queried registers ==========
15:43:30
// GCONF: 000001c0 pdn_disable=1 mstep_reg_select=1 multistep_filt=1
15:43:30
// GSTAT: 00000000
15:43:30
// IFCNT: 00000018 ifcnt=24
15:43:30
// OTP_READ: 0000000d otp_fclktrim=13
15:43:30
// IOIN: 21000240 pdn_uart=1 dir=1 version=0x21
15:43:30
// FACTORY_CONF: 0000000d fclktrim=13
15:43:30
// TSTEP: 000fffff tstep=1048575
15:43:30
// MSCNT: 00000108 mscnt=264
15:43:30
// MSCURACT: 01f300f7 cur_a=247 cur_b=-13
15:43:30
// CHOPCONF: 34030053 toff=3 hstrt=5 tbl=2 vsense=1 mres=4(16usteps) intpol=1 dedge=1
15:43:30
// DRV_STATUS: c0120000 cs_actual=18 stealth=1 stst=1
15:43:30
// PWMCONF: c80d0e24 pwm_ofs=36 pwm_grad=14 pwm_freq=1 pwm_autoscale=1 pwm_autograd=1 pwm_reg=8 pwm_lim=12
15:43:30
// PWM_SCALE: 0001001a pwm_scale_sum=26 pwm_scale_auto=1
15:43:30
// PWM_AUTO: 000d002b pwm_ofs_auto=43 pwm_grad_auto=13
15:43:30
// SG_RESULT: 000000cc sg_result=204

before i mess with the other steppers have i done the right thing? i thought the board jumper would have done that

1 Like

Interesting how people feel different. I have an inherent dislike for sensorless homing:

  • Mechanical switches as endstops are precise
  • Mostly maintenance free
  • Easy to debug or replace
  • Once in place, the 4 wires do not bug me at all

Personally, I rather keep functions clear and separated instead of some black-magic interdependent stuff.

3 Likes

Great news! What kind of TMC2209 stepper driver modules did you buy (you didn’t include a link to the modules you purchased)?

I use BTT’s TMC2209 modules:

https://www.aliexpress.com/item/33028050145.html

But, if I look through it, I do see a comment about having to change a 0 Ohm resistor based on which pin is used by the main controller board as the UART pin.

Good catch on your part!

I don’t know if I would call Stallguard “black-magic interdependent” stuff. It’s simply a feature that makes my life easier.

One of the things I really hated about my Voron 2.4 was how the X & Y endstops were implemented and wired - once I realized that I could work with sensorless homing, I was able to clean up the printer wiring quite a bit (I also put in a CAN toolhead controller, which I know you’re not too fond of) and I’ve never had a second’s worth of trouble with the X/Y endstops.

These are the ones I purchased

Super Silent TMC2209 V4 Stepstick Module Stepper Motor Driver With Heat Sink For 3d Printing Motherboard

https://a.aliexpress.com/_EzUCTh9

I thought they were duds but they’re surprisingly good apart from pin removal and soldering

They are all working as intended and sensorless is working better than previous drivers

I used your config setup and repeated it for the rest and it’s all working so thank you for that code

1 Like

A post was split to a new topic: TMC UART wiring and pin variations

I am totally with you on the arguments you make here, and I was before this thread came along. BTW, it is 6 wires if you use the 3 wire versions from BTT but that is little different. The reason I was looking at it is because I bought 9 plugs with 7 pins each to connect from my control box to the printer. I did not really think this one through perfectly before realising that finding the room for all those wires needed more forethought.
Now I looked at it more, and found that possibly cutting pins and re-soldering components is asked for, AND that there seems to be conflicting information about the accuracy and reliability, I may decide to redesign my control box to accept more plugs of different styles. One other thing I forgot was the mains feed bed heater, which cannot go through my purchased plugs.
The joy of design.
Thanks for all the help and every bodies input.
Kind regards,
Kees

Yeah I was googling the error and issues and a lot of people were In the same situation and gave up but I was abit more persistant

Thank you for putting a detailed guide on this issue so it helps others out in the future and hopefully it gets added to the wiki guides

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.