Force Control Loop

Hi, I am working on building out a force control loop for a dc brushless motor but I was wondering what would be the best approach.

I have a tension sensor that uses an SPI interface but I feel like connecting that to the ODrive and configuring firmware to have that work with the ODrive’s SPI pins would be rather tedious.

Would just using the current control loop be a reliable option in this case? I’m using a motor with a cable that spools.

One thing you could do, would be to build an outer control loop around the ODrive’s current loop.

Send to the ODrive current (torque) control commands via CAN or USB or UART, and read back the value from your load cell. Then design a control function that will increase the current if the tension on the load cell is too low, and decrease it if it is too high. Depending on what you are doing, this could run much more slowly than the ODrive’s current loop itself.

Thanks for the feedback @towen! What do you think of using the ODrive’s SPI pins to read back values from the load cell? The ODrive SPI firmware seems to be compatible with select encoders and not necessarily a general SPI solution, however, I feel this would definitely decrease the delay of this control loop.

What I’m trying to build is a motor-controlled tether that maintains a constant tension force. So if someone pulled on the end of the tether greater than the set tension force, the motor would unravel the tether and vice versa. Using a separate load cell to measure tension in the tether is definitely accurate, but implementing the outer control loop would be difficult without considerable slowing. Do you think the ODrive’s current loop is reliable enough for this specific use case?

Thanks again

1 Like

You could definitely do that although it would need quite a significant modification to the ODrive firmware.
You’d probably need to define a new controller class that specifically makes use of your SPI load cell.

Another way to do this of course, would be to use a more “linear” (in terms of control response) actuator. e.g. a direct-drive motor with cogging compensation enabled is a very good torque transducer, and a simple pulley would convert that torque into force.