High power, constant torque system design

Hello everyone,

I’m working on a project to create a fitness cable station that uses an electric motor instead of traditional weights. While I’ve noticed that the SimpleFOCShield isn’t rated for the power levels I need, I’d like to start with a small-scale demonstration setup first.

Here are the key requirements for the motor setup:

  • The motor needs to provide constant torque for most of the operation, including when it’s stationary.
  • The movement cycle would look something like this:
    1. Gradually ramp up the torque to an adjustable value with minimal movement.
    2. Brake with constant torque for about 3 seconds.
    3. Maintain torque without movement for 1 second.
    4. Move at constant torque for 2 seconds in the direction of the applied torque.
    5. Briefly hold at constant torque, then repeat the cycle at 2.
  • I’d prefer to avoid using a transmission, with the motor running at a maximum of around 10 RPM. But I could set up a timing belt.
  • The system may require up to 300 W of peak power (estimated as 100 kg * 10 m/s² * 1 m / 3 s, demo system can have much less)
  • The torque should not change by more than 5% during the movement cycle. A flywheel could be used to compensate high frequency changes, but I would prefere not to use it.
  • Of course, ideally, the setup should be as simple and cost-effective as possible.

A few specific questions I have are:

  1. Is a brushless motor necessary for this application? Would a brushed motor with current sensing and a current control loop suffice? Would the torque be linear enough or would I get stuttering at low speeds?
  2. Would an outrunner motor be better due to its higher torque?
  3. How many poles/slots (e.g., 12N14P) should the motor have? I assume higher numbers provide smoother operation but may also increase cost.
  4. How does the SimpleFOCShield handle induced currents?
  5. Is an encoder needed or is back EMF enough?
  6. I have an Arduino Uno at hand. Can it handle FOC current control? Is DC current control enough?

Since I’m relatively new to electric motors and control systems, I’d greatly appreciate any insights, suggestions, or hints to help me move forward.

Thank you in advance for your help!

Are you sure about that 10RPM? 300W would be 286Nm, which is pretty serious business.

Very well then! So 30RPM would be roughly 100Nm. Probably an ebike motor with belt reduction will be your best bet.

  1. Yes, brushed will probably stutter at low speed. Use brushless.
  2. Yes.
  3. In general yes, but some low-pole motors are smooth and some high-pole motors are coggy.
  4. Generated energy is passed to the power supply, which may or may not explode depending on what kind it is.
  5. Yes, you need a position sensor for torque control at zero speed.
  6. Probably ok. I think dc_current will give similar results at low speed, and there’s no need need for high update rate either.

You’ll need a brake resistor to burn off the generated energy, but we don’t have any code for that, and most driver boards don’t have a spare mosfet for it. You’ll also need a way to measure the bus voltage to see when it needs to be switched on. Makerbase XDrive-S may be best. I think it can use the ODrive firmware, in which case you may not need SimpleFOC at all. But if you do stick with SimpleFOC, I think it would just be a matter of switching on the resistor anytime the bus voltage is above some threshold. It will give the excess energy a place to go, and once the voltage drops back to where the power supply is having to put out energy, you switch the resistor off to stop wasting energy. No modification to the motor control loop.

Have you thought about the safety aspects of this. If the motor or driver or transmission (or your code) fails unpredictably, will your system yield and prevent injury? i.e. suddenly lets go, or worse suddenly pulls with max torque and speed…

To be clear, is the actual task to provide resistance to external motion, and not to create motion? And you want cost effectiveness and low complexity, and maximal inherent safety: I would look at eddy current braking. It’s how they stop roller coasters at the end of the ride.

Lookup Tom Stanton’s eddy current bike for more info.

Thank you for the great ideas and suggestions!

Safety is definitely a top priority for me. I’m considering incorporating end-stop switches, a manual switch on the handlebar, and a fuse for current limiting. However, I’m still exploring ways to handle sudden loss of torque. One idea I’ve had is using a flywheel-driven brake mechanism similar to a seatbelt, but I’d love to hear any other suggestions on this.

The bike is really cool! I’ve also thought about eddy current braking. It’s appealing for its simplicity. However, I’m concerned about its limitations: no torque at 0 speed and in general a strong dependency on speed. To make it practical, I’d need a way to control the torque, likely by adjusting the magnet position based on rotation speed. Additionally, since eddy current braking only provides resistance, it would lead to one-sided exercises. Training both concentric and eccentric motions would be much better for a balanced workout.

The Makerbase XDrive looks really promising, thank you for bringing it to my attention! I’ll dive deeper into it.

On the topic of motor selection, is there a reliable way to predict how smooth or coggy a motor will be, besides simply resorting to high-pole-count models?

To handle the induced current, I’ve been considering using a lead battery as a buffer power supply. My idea is to charge it to around 12V and, if the voltage exceeds that, use a MOSFET to redirect excess energy into a resistor. The resistor might not even be necessary if the motor can burn the energy generated in step 2 during the other phases of the movement cycle. What’s your take on this approach?

Thanks again for your valuable input!

The number of cogging steps in one revolution is LCM(N,P), N being number of stator slots, P being number of magnets. So a 12N14P motor will have 84 cogging steps.

Besides that, I find the “strength” of the cogging to be somewhat related to the length of the stator slot tooth. i.e a heavier stator with more steel means stronger cogging when not powered. These motors have a very small diameter hole in the middle of the stator ring.
Motors which have shorter stator teeth/with less stator mass overall, will have less perceived cogging. These motors have a relatively large diameter opening through the axis of the stator.

Hey there - I built something just like this using SimpleFOC and a small gimbal motor. At the time, I used a Nucelo64 for control and one of those DRV8302 power stages from AliExpress. It worked as you would expect, producing variable force as a function of commanded Iq. It’s pretty easy to write the control logic to have torque be a function for f angle so the motor doesn’t just spin when torque is commanded.

After doing the proof of concept with SimpleFOC, I ended up going to Odrive for control and a large direct drive motor sourced from a Chinese supplier. I chose Odrive because I needed something off the shelf that worked, although nothing should prevent you from using SimpleFOC and a sizable power stage. The system was battery powered using a 48V power tool battery, and could generate 150 lbs of force at a velocity up to 2 m/s (cable speed). Peak powers were in the 1-1.5 kW range. Energy regeneration is significant at high forces and speeds, so you’ll either need a battery, or be able to dump the energy to a resistor.

This was the motor I used: 70-120nm single shaft electric car motor with encoder - UU Motor Retail

It has a built in 1024 cpr encoder in addition to hall sensors.

Thank you for the response, that is awesome to hear!

Was your application also for fitness? 2 m/s is far more than I expect.
Did you have any safety features?
The price tag on that motor is quite high. Is the additional encoder needed?
I was rather thinking of repurposing something like this: Amazon.de

Yep, I built it to replace the weight stacks in gym equipment. 2 m/s is not that fast based on measurements I did of real exercises. Safety systems only included realtime torque limits that Odrive uses. That motor you linked will work, but you need to have some kind of higher resolution encoder on it. Uses the hall effect sensors alone will leading to substantial cogging at low speeds. Expect to be able to generate 20-30 lbs of force using that motor at reasonable speeds.

Thank you very much! The estimations are very helpful!

20-30 lbs is far less than I would have expected. I guess I have to spend more money on the motor. Or at least take one where the torque is specified.