End switches an interrupts

#41

I’m not really sure how to install the end-stop branch to my odrive with the DFU tool, since I don’t have an ST-Link.

6 DOF racesimulator
#42

My suggestion is to have ST-Link. Sometimes my ODrive wasn’t accessible after a shutdown. The only way to get it working again was to flash it with the ST-Link.
On the other hand, if you want to send ASCII commands, there is already the serial timeout bug. To do the workaround like described here: Serial Timeout Issue
you have to modify the firmware. With a ST-Link it’s much easier.

Greetings Zennix

#43

I would really like to use this feature, but it still hasn’t been included in the main release. Can I help out with testing without an ST-Link, or is it too risky? If so, how? I have the hardware setup necessary to test end switches.

#44

Please do help out! You’ll just have to pull the Endstops branch. I’m not 100% sure how to flash the firmware without an ST-Link, you can probably do some sort of DFU once you build the firmware though.

1 Like
#45

An STlink clone is stupid cheap. Like cheaper than the screw terminals on the ODrive.
$2.02 (US) free shipping on AliExpress


Less than $10 on amazon
I consider it pretty much a requirement to work with the ODrive.

#46

Hi @Wetmelon

where can I download the V3.6 compatible version?

what GPIO’s are supported?

Is there a list of the specific commands?

cheers

Carelsbergh Stijn

#47

Hello?

I need to finish my project, can you guys please help me?

Thankssssss

Cheers

Carelsbergh Stijn

#48

Hi Stijn,
all you need to get it running with the end stop branch is documented in this thread.

Greetings / Zennix

#49

Hi

Is there a v3.6 file available?

Do the switches need to be connected to 5v or gnd?

Are the switches NO or NC?

Cheers

Carelsbergh Stijn

#50

Hi Stijn,

you have to use https://github.com/Wetmelon/ODrive/tree/Endstops

Switch against 3.3V. You can define high or low active. I had to use some capacitors on the GPIOs for preventing debouncing.

Greetings / Zennix

#51

Hi,

What USB driver do you have to use?

Cheers

Carelsbergh Stijn

#52

Hi,

My end switches are not recognized, what should I do?

Cheers

Carelsbergh Stijn

#53

Hello

When I press the button, button state is false, when I don’t press the button, button state is false too, what can I do?

#54

Hi Stijn,

This my config for an endstop that switches GND to GPIO 8.

odrv0.axis0.min_endstop.config

Out[37]:
gpio_num = 8 (int)
enabled = True (bool)
offset = -500 (int)
is_active_high = False (bool)
debounce_ms = 100.0 (float)

Greetings Zennix

#55

Hi

Thank you, I’m now on vacation, I will try it afterwords.

Cheers

Carelsbergh Stijn

#56

The Endstops branch has been updated to the most recent Devel HEAD. It compiles but I have no way to test, so please let me know if there are any issues.

#57

Hi

I’ve updated it myself last week and it seems to work, I will try your version aswel

Cheers
Carelsbergh Stijn

#58

Hi

What am I doing wrong?

After manual reboot it is not saved

Cheers

Carelsbergh Stijn

#59

Hi Stijn,

odrv0.save_configuration()
and
odrv0.reboot()

Try this.
Greetings Zennix

#60

Hi

What now? The state does not change when I press the button?

Thanks in advance

Cheers

Carelsbergh Stijn