Drive by wire / Ride by wire

Hello everyone,
I’ve just discovered SimpleFOC and it looks awesome!
I’ve already worked with arduino on avrs and stm32, I’m working on a motorcycle project and I’ve developed a simple Ride by wire device, involving an “electronic” throttle handle (which consists in two pots, redundant, used by Ducati) and actually a brushed DC motor actuating the throttlebody butterfly valves via the traditional steel cables, cause there’s no space for a motor near the throttlebody. The throttlebody still has its return spring, so my PID is less confused by motor windings mechanical resistance and it can return to 0 in case of failure.

It is working…not a very neat device, it squeaks a bit and probably I have to find a better quality DC motor with a better gearbox still able to be turned by the return spring (if i want to keep this kind of safety)

SimpleFOC looks like the graal in this application, using position control with a stepper or a BLDC motor sounds to be the way to go, position feedback would come from the TPS sensor (which is throttle position sensor, commonly used in throttlebodies, which is, in the end, just a potentiometer).

Here the questions for you:

A nema 34 kind of stepper driver would have enough force without a gearbox, the motor and its drivers would be cheap. In case of failure and powered windings the return spring wouldnt be able to push it back, but I suppose that with simplefoc i can set some current thresolds, and I will have a throttle position validation by engine ecu, so if the drive by wire mcu or something related goes mad the engine ecu will cut injection/ignition.

A gearless BLDC motor would be the graal of smoothness, but I know nothing about them, torques, products, driver boards, its everything much more foggy. And it will be much more expensive, I suppose. Oh and the voltage, my voltages would go from 10 to 15 volts, maybe this is a problem for BLDC ?

Another doubt regards calling move very very frequently, lets say everytime throttle handle has a 1% variance, will it drive the SimpleFOC algo mad ?

Your thoughts ?

Thank you,

Hi, and welcome, @deffie !

That would be no problem, but the torque might… without a gearbox I would assume a NEMA34 stepper has higher torque than a BLDC.

You will need a encoder / magnetic sensor on the motor shaft to run the FOC control…

You expect the FOC algorithm to run at >1kHz, ideally 10kHz. The move function could be called with a 1:4 downsample, so 250Hz to 2.5kHz… you can set new target values that often, although of course there are physical limits to what the motor can do…
Normally this is fast enough for very fine control over the motion.

1 Like