Homing / Endstops

i can’t get the Homing function to work.


odrv0.axis0.min_endstop: config: gpio_num = 6 enabled = False offset = 2.0 is_active_high = False pullup = False debounce_ms = 50
I used a standard 3d-Printer mechanical Endstop with 3 wires. (Red goes 3v/5v, black at ground and green to GPIO 6)

The Endstop will show activity by Blinking and with odrivetool and odrive-gui i can see that it will properly recognized.

But the homing procedure will not stop then the Endstop was triggered!
If i trigger it multiple times or longer by hand will only result in a “AXIS_ERROR_MIN_ENDSTOP_PRESSED”

I try different settings but no luck.

  • setup other GPIO Pins
  • switching “is_active_high” or “pullup”
  • use other axis
  • change the endstops

plz help me

1 Like

Thanks for the feedback, we will investigate this.

There are some problems with your configuration:

  • odrv0.axis.min_endstop.config.pullup does not exist on firmware 0.5.2 (seems we forgot to update the docs, will do)
  • If your endstop is active low you probably want to use a pull-up resistor
  • You set enable of the endstop to False.

With that in mind I verified homing on 0.5.2 and it works as intended.

odrv0.axis0.min_endstop.config.gpio_num = 6
odrv0.axis0.min_endstop.config.offset = 2.0
odrv0.axis0.min_endstop.config.enabled = True
odrv0.axis0.min_endstop.config.is_active_high = False
odrv0.config.gpio6_mode = GPIO_MODE_DIGITAL_PULL_UP
odrv0.config.enable_brake_resistor = True
odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
odrv0.axis0.requested_state = AXIS_STATE_HOMING

I used a jumper wire on GPIO6 and briefly touched GND with it and this will stop homing as expected and make the motor move backwards a bit (to the 0 position). After that dump_errors(odrv0) showed no errors and odrv0.axis0.is_homed was True.

1 Like