Hello, im setting up a Manta m4p on my ender 3 pro with sensorless homing,
For some reason its not working everytime the stepper motor gets to the home position it wont stop moving and grind against the limit.
I had to configure the diag_pin: ^!PC0 negated, otherwise the virtual endstop is always triggered.
I followed BTT docs and added the jumpers to the J23 , J31, and J40 pins, removed the physical limit switch connectors and put the 2209 drivers in UART mode.
Unless its an hardware fault, i really don’t know how to debug this problem.
I don’t know if it would help but the physical switches works fine.
You need to adjust your driver_SGTHRS value - having at at 255 is much too high.
The value is generally unique to the situation (ie dependent on motor, current setting, pulley diameter, etc.). Start at 128 and change the value by 10 or so until you get good operation. It’s a bit of an art but with some patience you’ll get there.
Remember to restore your PC0 pin to the original value before changing driver_SGTHRS.
Resetting ^!PC0 to ^PC0 makes the endstop always triggered, so the printer wont home.
For the driver_sgthrs, i’ve tryed starting from 128 got as low as 20 and up to 200, the endstop is always triggered therefore no homing is performed by the printer.
Then i also tryed with ^!PC0 and starting from 128 got as low as 20 and up to 200 and nothing changed, now the homing works, but the stepper motor wont stop.
Edit:
Can my stepper motors wiring be the problem? the wiring is the stock from ender 3 pro stepper motors, maybe i need to check the connections??
Yes , by removing pullup i intend removing the ^ from the pin definition in printer.cfg. I do not intend to modify the board as i dont have the knowledge to do so.
@EddyMI3D yes i did put the jumpers on the pins specified in BTT Wiki just above the voltages jumpers , the voltages jumpers where already in that position where i received the board, never touched them.
I will try to change the current of the steppers and give feedback
You lowered “Voltage” or “Current”? It should be current.
Thank you for the image of the jumpers - they appear to be set correctly.
Could you explain the process you’re using to test sensorless homing as well as the values you’re using for the driver_SGTHRS and run_current parameters?
I would suggest that you just start with the X axis and go on to the Y axis when that is working.
I lowered the run_current on the printer cfg from 0.7 to 0.3.
To test the sensorless homing, i simply change the driver_SGTHRS starting from 128.
Lowering or raising the driver_SGTHRS does not make any difference the result is always the same:
The x axis will go to 0, and then the stepper wont stop, causing the toolhead to repeatedly hit the x axis limit switch (which is not connected to the motherboard and i plan to remove) so i must hit the emergency stop button on the web interface.
Now i tried not to stop to see what happens and the console gives me this:
No trigger on stepper_x after full movement
Just for reference i leave here my current x axis configuration:
Again, the current and driver_SGTHRS values are unique to each situation. It takes a while and some experimentation to get it right.
When I do it, I set up a table to record the current and driver_SGTHRS settings that I’ve tried and use the results as clues as to figure out what values to try next.
@bozzo yes i’ve tried , the toolhead moves to get to the zero position.
@mykepredko i started from 128 as suggested, doing -10 steps to until i got to around 28, same for +10 and i reached 228, i also tried 0 and 255 just in case.
Can you share any guide on how to tune this value? Anyway i thought that lowering would result in a less sensitive stepper and raising it should make the stepper more sensitive am i right?
FWIW,
It could be tricky if done blindly and without at least knowing the motor characteristics.
Also, Klipper literally enables and disables diag pins on homing, which adds confusion on top of that.
And because it generally works, it is really hard to redo this thing, I suspect there will be no functional changes until homing is reimplemented in Klipper.
There is a PR with the Stallguard monitoring tool which could shine light on the actually SG values while motor is spinning.
From a configuration tuning perspective, it is more or less straightforward.
You first need to get the diag pin working, it could be hard, but it should start to at least trigger on high sensitivity, and it does not trigger on low.
Then, the only problem that you would have is literally the sensitivity configuration.
You generally want to have backEMF not zero, around 1V is already nice.
You generally want to understand how your SG value behaves.
Because, as stated in the PR and in the initial topic, it is tricky and speed-dependent, obviously.
Also, you have to be aware that Stallgurad4 used in TMC2209 is different to Stallguard2 used in TMC5160/2130, so they works and tunes slightly differently.
Also, because SG4 uses the StealthChop, there could be a minimum current limitation.
Like, with high probability, your low current settings have zero effect.
(I don’t know your motor parameters or supply voltages, so you could verify it for your installation).
Also, there is a trick, like with high motor inductance and high acceleration, the motor could trigger early. It could be workarounded by decreasing current, by setting the COOLSTEP threshold >20mm/s as is done on some Prusas.
Hope that helps a little.
BTW, it obviously should be generally easier to do on the Cartesian machines where the 1 motor drives one axis.
@nefelim4ag thanks for the detailed infos, honestly i dont know much about 3d printers stuff just a beginner so it would take some time to understand everything you wrote anyway appreciated.
@mykepredko the DIAG pin is inverted because otherwise querying its status show that the x endstop is always triggered, and the result would be that when clicking the homing x button the current head position will become the new home position.
I am using tmc2209 on every axis and extruder, dont mind y,z and extruder because i am only testing on the X axis.
But i could try to complete the configuration on every axis and then test every axis, maybe the problem is isolated only on the x axis… i’ll test and give feedback in the next days.
and for z axis i need to unmount them from the frame, i dont have time right now.
So now that i have the datasheet i will try to check every wire to see if the pinout is correct compared to the manta m4p pinout for the stepper motors, just in case to exclude any hardware related problem. i’ll let you know in the next days
You can’t query it status from web or from console, like never.
Because for sensorless homing diag pin on the driver is only active while axis in homing.
Not before and not after.
This is the sort of confusion what I’ve talked about
#diag_pin:
# The micro-controller pin attached to the DIAG line of the TMC2209
# chip. The pin is normally prefaced with "^" to enable a pullup.
As pointed in the config reference, there is no inversion on tmc2209.
That is it.
To make it clear, for TMC2209, your diag pin should look like that:
This was my initial config, which i copied from the klipper config, but seeing it not working i started to mess around with it. i will now keep it as ^PC0.