Alternatives for odrive Endstop

Hello all

Unfortunately I can’t get the problems with the limit switches under control, but I want to make progress in the project. So I ask myself, if I should switch to the standard firmware of the main branch and not use the limit switches with Odrive anymore.

But then I ask myself, how do you others do your projects (e.g. robot arms) without limit switches? Somehow almost every application needs some kind of limit switches???

I appreciate every answer very much!

Hi

You could try to use ODrive in combination with Arduino, I think this will make things easyer for you, there’s is a library for ODrive so you can just read the limit switches with the Arduino and you can also use Arduino with the xsimulator software so I would suggest you try that.

Good luck

Let me know if you have any questions

Cheers

Carelsbergh Stijn

I second the idea of using the Arduino instead of the ODrive to read the limit switches. If you do that, it may be a good idea to use absolute encoders or hall sensors on the motors so that way they don’t have to calibrate on startup, as you wouldn’t want the motor to accidentally crash the actuator into an end stop during calibration.

That’s along the lines of how I’m doing it in my project, but instead of the Arduino reading limit switches on startup, it reads a secondary absolute encoder at the output of the gearbox on each motor, and uses that initial position to be able to know the robot’s state before having to make any movements at all.

Hi Stijn,
thanks for your help!
Did you go the way with the arduino? Or how did you implement your endstops?

Actually I would prefer not to add more components (arduino) and comlexity to the system - but as a last way out, I would do…
Wickie

Hi Isabel,
all the mechanical work of the actuators of my motion platform https://discourse.odriverobotics.com/t/6dof-motion-platform-using-odrive/1629?u=wickie is already done - and all money was spent :sweat_smile:.
So changing to absolute encoders will not be my favored way.
Nevertheless much thanks!
Wickie

Hi

My racesim uses the endstop branch and what I’m doing is: calibration -> homing -> offset to the middle of the actuator, this is because the flypt software sends positive and negative position so the middle off the actuator should be 0.

If you have any questions, let me know

Carelsbergh Stijn

1 Like

Hi Stijn,
Thats the same way I did. And it worked perfectly with my prototype, but not with the other same actuators… …hmm.

Didnt you have problems during startup?

Would you mind sending me your *.json file to check all your settings? Maybe I make something systematically wrong…

Hi

I will send you the file this weekend, help me remember please.

I do have some startup problems, when I try to fire up an ODrive, sometimes the motor jumps to another position and doesn’t do anything after that. But then I just rotate the motor a little bit and try again.

Cheers

Carelsbergh Stijn

Hi Stijn,
In my design I have multiple odrives connected to a single computer running python scripts. In this case, would I connect the Arduino to the odrives or to the single computer?

Thanks

Hi

You can do both, I conected them with USB to my PC but you can also use Arduino if it’s handyer for you.

Cheers

Thanks for the reply. So I will first make my PC run the homing sequence, use the Arduino to read the states of the limit switches, have the Arduino continuously send the states to my PC, and have my PC continuously monitor the Min’s and Max’s of the actuator. Is it possible to do it this way? And If I do it this way, would I even need to use the OdriveArduino library?

Thanks again!

Hi

You this is totally possible and yes with that lib

Cheers

Carelsbergh Stijn

Im still a little confused. Why would i need to use the ArduinoOdrive library? Wouldn’t the arduino just need to perform DigitalRead() on the limit switches?
Sorry for all the questions.

Hi

Are you not going to connect the ODrive’s to the Arduino?

Cheers

Carelsbergh Stijn

I’m not sure. I didn’t think I would need to connect the arduino to the odrives because my main PC is the main computer running the python scripts to control the motors. So the PC will be the master and the Arduino/Odrives will be acting as the slaves. Is there something wrong with this design?

Thanks again!

Hi Stijn,

Nevermind. I figured out what I am going to do. I flashed the Endstop branch from github on my Odrive. Do you have to configure the endstop parameters before anything else because only one motor will do the Full calibration sequence?

Thanks

Hi

Ik don’t understand what you’re saying, when you enable and cofigure the endstops, it will do this in the correct order so that when you start up the ODrive, it calibrates -> goes into closed loop -> homes -> does offset -> sets position to 0

Cheers

Carelsbergh Stijn