How to read the torque of the motor?

Well, after reading your fantastic work, I still have two question about this project. One is can I get current info to calculate torque. Second is can bldc motor generate great torque while the speed is near zero. I am also working on a quadruped robot and I just start the design.

1 Like

Sure, take a look in this spreadsheet. The data for this particular motor is on line 13.

Yes. In fact, maximum torque for a DC motor (stall torque) is reached at zero speed.

thank you for your answer

will the odrive provide foc control for the bldc motor?is any extra sensor needed for this function?

Yes, the ODrive does FOC. You don’t need any extra sensors besides the encoder.

well, after searching and reading the documents, i don’t find any information about how to get current information from a computer. this drives me mad. could you please give me a hint on this?

The board is in position control mode by default, so you have to change it to current control mode. Then you can command new values of current_setpoint from the computer.

Look at the “Control Mode” section here.

actually, i mean that i want to get current value in computer but not setting it from this command. i found that i could only get voltage info from odrive board. i want to perform an accurate and fast force control using the t-motor and odrive. after reading some thesis, i find perform an accurate and fast force measure and control with dynamics model is a key to success. i want to do all computation task on my pc, while odrive have not provide the complex function i need, so i want to get current info from odrive to calculate torque in pc and using some other method to finish my control goal through odrive.

I think what you are looking for is to read the property:
odrv0.axis0.motor.current_control.Iq_setpoint. That will tell you the current the motor is trying to do right now.
odrv0.axis0.motor.current_control.Iq_measured is the current that is measured in the current sensors.

1 Like

what’s the difference for the current_meas_phB+ current_meas_phC compare to Iq_measured? can you do Iq_measured in other mode too(like position control)

current_meas_phB is along the B axis.
current_meas_phC is along the C axis.
Iq_measured is along the q axis, which is the direction that produces torque.
See here: Recommended books/resources.

Yes you can read it at all times.

1 Like