Use Odrive and Arduino to balance an inverted pendulum

Hello all,

I am working on a project about balancing an inverted pendulum using a brushless motor. My basic plan is to use odrive and arduino to control the motor without an encoder (so it must be sensorless mode for Odrive)

In general, I think odrive is a good fit for this project, but what do you guys think? Any general thoughts or concerns?

Also, I am new to odrive and I made really slow progress in the past one month. I completed the “get started” section for odrive but achieve no progress in connecting arduino to it. Is it possible to run sensorless mode for odrive using arduino?

Thank you so much

Hi Kevin,

Great project, inverted pendulums are a classic!

Sorry, you can’t operate the motor at slow or zero speed with sensorless control, so I think you will need an encoder or hall sensors for your application.

Thank you so much, your product is awesome.
I am using Arduino to control the odrive. Is it possible to input PWM to Odrive through Arduino?

Voltage and torque of the motor are important variables in my inverted pendulum system and I am having trouble to have direct access to motor voltage.

Another problem is, when I use the velocity control mode in Arduino:

odrive.SetVelocity(0, 10000, 5);

the motor only rotates for a couple seconds and stop. What should I do if I want it keep spinning?

I really appreciate your help