Homing slow and weak

Hi there, I am able to control two odrives driving 4 motors. I can put them in closed loop control and move them, they have a lot of power in that mode. However when I send the command to home them they have absolutely NO power and move very slowly, then when they hit the limit switches they move fast again to their offset position. I assume its because it is going into a different control mode to home. What parameters should I increase to get the homing sequence to home with some force?
The issue is that the force isnt enough to get them to move steadily. they instead jerk slowly towards the homing switches. Its been a long day so apologies if i have’nt included a vital piece of information to help with this

Thanks!
David

I should add that I am using firmware version :
In [1]: odrv0.fw_version_minor
Out[1]: 5

In [2]: odrv0.fw_version_major
Out[2]: 0

In [3]: odrv0.fw_version_revision
Out[3]: 1

And the actual AXIS_STATE_HOMING command isnt recognised so i am calling axis state 11 instead.

My guess is your vel_gain is too low. Homing works like this:

  1. Calibrate motor, make sure it can enter closed loop control.
  2. Enter closed loop control
  3. Enter the homing sequence / state machine
  4. Put the axis in INPUT_MODE_VEL_RAMP and CONTROL_MODE_VELOCITY_CONTROL
  5. Drive towards the min_endstop at homing_speed
  6. Once the endstop is found, handle setting the offset then
  7. Put the axis in INPUT_MODE_TRAP_TRAJ and CONTROL_MODE_POSITION_CONTROL
  8. Command the axis to 0 position

Make sure your motor runs well in the velocity control mode for good homing behavior.

1 Like

Ah thank you. Yes that helped. It seems the vel_gain acts differently in the two modes. So I will have to set the vel gain for the homing sequence and then back it off by a factor of 10 once it goes back into trap traj mode otherwise it vibrates after homing. I had not used the velocity control mode before - probably why i came across that issue.

Hmmm… It shouldn’t act that way. I’ll have to test it. It could be that your pos_gain is too high given your 10x vel_gain

Ah you are correct I do have a very high pos_gain value as it was the only one that gave me the power i was used to testing with my motors. perhaps i will go through the tuning stage again. I think i must have done something wrong. thanks for the reply!

i used to have 20 as the pos gain, but on my rebuild of this project I was trying to tune them better and got to 120 as the value that gave me the same force to push back against me trying to turn the motor wile in closed loop control.

Drop the pos_gain and increase the vel_gain and vel_integrator gain, you’ll get the same force.

Hi,
I have the same problem.

stuck on FW 0.5.1

have a 1.3m long axis
it does the homing run (if the gantry is at the farest distance from the endstop) about 50-70% the way ok, then it starts to go stuttering till it gets to a full stop.

Homing is fixed in the upcoming 0.5.6… suggest just going with that tbh.