Position after sensor less homing
Hello,
which parameter configures the position value that is shown after sensorless homing?
80 Replies
There is a homing routine on RatOS that is not used in anything else.
What is your goal?
I have the minion setup in the configurator but for a different printer and after homing it shows 200 for X for instance (even though position_max: 400 is set for StepperX)
So I assume there is a variable I am missing
How does a minion show 200 after homing X?
Please, share RatOS-Debug.zip
That is your issue. Position_max: 400
The minion is not 400.
I know, as mentioned I used the minion setup as a starting point for a custom printer
I thought adjusting those values is all it takes
Why? It is not supported…
And the position after homing is always half of position_max.
mikl suggested it
Ok that is why...makes sense then
stepper min, max and endstop positions
[stepper_x]
position_endstop = 0
position_min = 0
position_max = 400
step_pin = PF13
dir_pin = PF12
enable_pin = !PF14
microsteps = 64
full_steps_per_rotation = 200
rotation_distance = 40
homing_speed = 50
endstop_pin = tmc5160_stepper_x:virtual_endstop
homing_retract_dist = 0
That is what I used
I just realized, that sensorless homing does not seem to work...
Maybe that is the problem: It is meant to go in the middle after sensorless homing triggers but it just never triggers
And then it sets the position to 200
Calibrate your sensorless.
If it grinds when hitting the end, it needs calibration.
What board are you using?
Rato-debug.zip would help
Are you referring to the klippy.log?
No.
Go to configurator, bottom left you have RatOS-Debug.zip
Hmm, it shows are warning about possibility of sensitive information
Klippy.log is not enough?
Who says that?
This zip compiles your config files and logs. NOTHING else
Check discord on how many people shared it…

RatOS says so itself 😄
I just don't want my wifi key to show up online
or something like that
@MDFPereira
Read the complete sentence!!!
The final part
Just fyi: I changed the name. Calling it the best printer did not seem appropriate at this point 😄
To clarify the error: When homing X (I haven't tried Y yet), the axis travels exactly 200mm and then stops and shows up as homed
travels towards what? homing position or centre?
Homing position
use set_centre_kinematic_position to check motor directions
I've already done that
That works fine
I can navigate the printhead without any issues after doing that
are you sure to be using RatOS 2.1?
Are you recommending for me to use normal Klipper?
no
where is your RatOS_edited.cfg?
I am waiting for my beacon to arrive
In the meantime I wanted to use the Cato Probe - but I had to comment out the probe section for that
That's why I had to created the new file (so it is ot overwritten every startup)
did you insert the jumpers for sensorless on the board?
and Cartographer messes the homing routine. It is programed for the supported sensors.
Both carto, eddy, bd sensor, micro probe have issues.
You have to set up your homing sequence.
Comment out [include RatOS/homing.cfg] on RatOS_edited.cfg and include your homing routine on the carto file
make sure you have the jumpers inserted on the board for X and Y and calibrate your sensorless homing threshold
Thank you. This is also true if I am just homing X individually?
yes
if homing X the printhead only moves towards the right, you are missing the jumpers or sensorless calibration.
Tha means it is always triggered and the machine only needs to move to the supposed X200
and you need jumpers for both X and X1. Not only X
same for Y and Y1

also, you are missing the tmc2209 config for the Z motor driver. You only have it on Z1 and Z2
the GENERATE_SHAPER_GRAPHS macro is already part of RatOS. No need to include it again
I removed the home section 🙂
the same for the shell_commands
Thanks for the hint
since you have the jumpers, calibrate sensorless
I think I have to first do the homing sequence calibration
without sensorless working?
I thought I had to do that to get it working
you need sensorless working correctly to have a correct homing sequence
otherwise there is no reference for the machine to move correctly
15:47
Run Current: 1.60A Hold Current: 1.60A
15:47
Run Current: 1.60A Hold Current: 1.60A
15:47
Run Current: 0.90A Hold Current: 0.90A
15:47
Run Current: 0.90A Hold Current: 0.90A
Is this telling you something?
that is not what you need
In which direction I should go
[tmc5160 stepper_x]
diag1_pin: ^!PG6
driver_SGT: -20 # Lower value = higher sensitity, range -64 to 63
on sensorless-homing-x.cfg
same for y
Am I right in understanding, that at -64 it should stop in every case?
Maybe even too soon?
yes
you need to increase it until it does not grind on the end of the travel but without stoping too soon
start with 0 and check
Then there is some other issue, because it does not
I set it to -64 and it still grinds
if it grinds, you need to decrease and go negative. If it stops too soon you need to increase towards positive
I set it to -64 and it does not stop
again, check your jumpers...
make sure you inserted the jumper for the correct drivers
I uploaded the picture above

I saw it. But I have no idea on how you have the motors set. What driver slot for each motor
Motor 0-3 are X and Y
(they are the red ones in the picture)
issue
motor 2 has 2 plugs that are the same.
counting from the power plugs (with screws) you need slots 1, 2, 3 and 5
have to go now
later will take another look
Thank you very much for your patience 🙂
I put the stepper motor in the correct slot and moved the jumper one slot over as well.
Unfortunately it still does not home properly - there is something strange going on
What really bogles my mind is the fact, that it does not go further than 200mm and then just is marked as homed
So it turns out I had it like that in the first place (correct way)
You can see it in the picture that the second Y motor is between two empty slots
Then it means something in your config is not correct
Are you using it as a hybrid machine or a AWD?
This means sensorless is always detecting a stall and then moves to the mid point
Since you are not using a RR machine and I know almost nothing about it, can’t do much…
Could it be that the 5160 V1.1 don't support sensorless homing?
No. Have them working on my machines
…
It is a cross gantry
Two motors for X and two for Y
So I guess AWD would be the closest
sense_resistor: 0.033 is also what you have?
Not sure. I’m not at home
What version of the 5160 are you using?
TMC 5160 Pro V1.1 Vishay
D/C: 2023.2.28
What brand?
BigTreeTech
Can I damage something by entering a wrong senseresistor value?
https://klipper.discourse.group/t/sensorless-homing-btt-octopus-pro-tmc5160/5771
They have sense_resistor: 0.075 - so I would just try that
Solution

Thank you 🙂
Don’t think so
Then I'll just test it - wish me luck 🙂
It is working now, thank you 🙂
The wrong value was made by RatOs or did you change it?
It was the default - but I used the Minion in the configurator
I am not sure if that makes a difference
Even selecting the v minion, when choosing 5160 should have set the correct values
The config lines on your printer.cfg are overriding the stock settings from RatOs.
Did they maybe change the resitor for the newer 5160?
I will check later because mines are working correctly
could you also look up your values for "variable_sensorless_x_current"?
And for y?
I have to different values for mine and I would like to know which ones are correct
They all deppend on the machine, belt tension, motors, etc
But lowering the current as RatOs does helps with sensorless.
What is the meaning of those values?
You were faster
Thanks
@MDFPereira have you checked your values?
I’m using the current values set by RatOS. Didn’t change them.
I meant your sense resistor value
Stock from RatOs. I selected tmc5160 T (Pro)
Just checked the configurator and it is correct
driver: 'TMC5160',
sense_resistor: 0.075,
Very strange, but thanks for the confirmation
If I remember correctly, You included the 5160 info on printer.cfg.
And that overrides everything set in RatOs.cfg
The include for RatOs.cfg is in the beggining of printer.cfg. Everything after that include is overrides