Min_endstop/max_endstop

I follow the instruction https://docs.odriverobotics.com/endstops to setup the min/max end stop and got it to work. Except, when and after the Odrive is reboot or power cycle the end stop no longer work. In order to get it working again, I will need to first disable using “XX_endstop.config.enabled=False” then set it back to True.

Anyone have the same experience to share? Did i miss anything obvious here or this is the expected behavior.

I did not hook up external pull up resistor in my setup, is that why?

Thanks!

The pull up / pull down resistors are not optional. In 0.5.1 you should be able to set the internal Pull-up but I’m not sure if it’s working correctly (I have a report it didn’t work for one user)

2 Likes

I was able to get the feature work now by not using gpio_num 1 and 2 (My guess this 1 & 2 pin have some other default use for UART). Internal Pull-up is working and tested working with NO or NC contact switch with correct setup of is_active_high (the instruction in the docs clearly explained this). Thanks for your feedback!

1 Like

I believe I am having an issue with one of the min end stops. I am using 0.5.1 on 2 seperate boards. one board works flawlessly and the other triggers the min end stop intermittently with nothing happening. I do not have an oscilliscope to hand but I have measured the voltage to be 3.3 normally and 0 when triggered. I have checked the config and the internal pullup is set to True and the GPIO pin is pin 5. I have rewired the switch just in case but no luck. Just wanted to check in to see if this is still a known error or not?

These are the end stop settings :

“min_endstop”:
{“config”:
{“gpio_num”: 5,
“enabled”: true,
“offset”: 1.0,
“is_active_high”: false,
“pullup”: true,
“debounce_ms”: 10}},
“max_endstop”:
{“config”:
{“gpio_num”: 8,
“enabled”: true,
“offset”: 0.0,
“is_active_high”: false,
“pullup”: true,
“debounce_ms”: 0}}},

Thanks in advance!

(also is it good practice to jump on similar threads like this? Or should I have started a new one?)

Well it seems that after another inspection of the end switch page it suggests that the “most common faliure mode leaves the switch open” (Which is how i had them set up), so i changed the switches to be NC and it seems to have fixed the error.

2 Likes