BLDC Control ODrive-for-ARC

Mickey666Maus

Germany
robot video thumbnail
robot video thumbnail
robot video thumbnail

This is the setup for my Tarot 6S 4108 KV:380 BLDC motor to be used like any other servo in ARC...

It is just MY PERSONAL setup and meant to get you started, please READ THE manual over at the official Odrive website! https://docs.odriverobotics.com/

First you will need to install and configure your Odrive Software... I am running Linux, please check the installation guide for Windows found at the official Odrive website if you are running Windows! This will just be needed for the first time setup. After the setup you will use an Arduino connected to a Windows PC running ARC!

https://github.com/SwannSchilling/ODrive-for-ARC/blob/main/setup

You should see your BLDC motor moving, after being put to closed loop and receiving the odrv0.axis0.controller.pos_setpoint command...

Next you will have to upload this code to your Arduino Uno https://github.com/SwannSchilling/ODrive-for-ARC/blob/main/ODriveArcArduinoTest.ino

In ARC just add a servo control to your project, and connect to the Arduino! https://synthiam.com/Community/Tutorials/Connecting-Arduino-to-ARC-17526 The Arduino sketch will receive those servo positions and send them to the ODrive...

All non-power I/O is 3.3V output and 5V tolerant on input, on ODrive v3.3 and newer.

This tutorial is just meant to be a starting point, please mess around with my settings and share your experience, so we will get a better understanding on how this whole setup can be utilized!!:)

User-inserted image

By — Last update

ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

PRO
USA
#9  

@Mickey666Maus, So you are testing FOC, position control and gear design what is after that ? What you plan to build or what you think can be useful for ?

PRO
USA
#10   — Edited

Quote:

Does VESC supports position control with encoders ?
Not when I last played with it (2018?). It was velocity only then...might be worth another look now...

Edit: Looks like it does! And always has. From the developer:

#11  

That Flipsky board looks really bad its got zero pins to use encoders and I doubt it will be suitable for what we are doing...which is robotics!:D Also what @ptp pointed out is a fairly valid point....

Quote:

So the hardware is not an "official" ODrive 3.6 clone, maybe they studied and cloned the design, but, they shouldn't advertise the compatibility... maybe is nothing wrong.

What makes the difference is the firmware, community and support so unless they (Flipsky) spends the time and resources to build their firmware, I would pick the original product.

So far, the ODrive and the Moteus are the best options for BLDC control. While the Moteus offers a nice an compact form factor for robotic joints, and is an all in one solution, the ODrive is a more open solution which supports a wider range of hardware and applications!

My SimpleFOC Shields also arrived...lets see what they can bring to the table!

#12  

@ptp I am planning to design a bigger robotic arm and also a hip joint for ZOE, which will offer more torque and a more degrees of freedom... I am about to do an assembly video of the gearbox and will make all those files available, if you are interested in building one for yourself!:)

PRO
USA
#13  

I dont want to clog up this thread with more info..head back to robot dog thread...your gonna want to see this!

#14  

You can always clog my threads with god findings...happy that you do!

Here that assembly video one more time...I will upload all those files asap, if you guys want to give it a try!!!:)

#15  

This is very very good and also understandable video of PID control, if you are setting up your ODrive the

.controller.config.pos_gain = 20.0 [(turn/s) / turn] .controller.config.vel_gain = 0.16 [Nm/(turn/s)] .controller.config.vel_integrator_gain = 0.32 [Nm/((turn/s) * s)]

are the values that you would want to tweak, when setting up your motor...the above video explains what they mean, and how they are used.

PRO
USA
#16   — Edited

...That was a good video. I found Skyentifics description a bit better to understand in reference to position control...I also believe James B has a good explanation for how we are using it. In the case of MJBots dev kit...I find that playing with the "P" (proportional) of PID, affects the stiffness or compliance (springiness) of the motor on full stop or holding. And "D" (derivative) of PID, as dampening that motion. And James says stay away from "I" (integral) unless necessary.