Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

Is it possible to use the Arduino SimpleFOC Library with an ESC?

Open thankyoucubed opened this issue 4 years ago • 3 comments

Hi y'all, I apologize in advance if this has been asked before/is a silly question - I'm quite new to this area of motor control.

I was curious if it's possible to use this ESC (https://www.rcelectricparts.com/100a-rc-brushless-motor-electric-speed-controller-esc-4a-ubec-with-xt60--35mm-bullet-plugs.html) with this BLDC motor (https://www.scorpionsystem.com/catalog/boat/motor_3/is-34_series/is_3435_1800/) with the FOC code? I'm hoping to use this setup to do torque control mode on the motor down the road.

I'm having a very difficult time finding a motor driver for this particular motor. I see that the pinout that works with the code requires the 3 PWM pins (1 pin for each phase of the motor), but an ESC only utilizes the 1 PWM pin as the signal to translate to the motor. Is it possible to use an ESC still?

Any help would be greatly appreciated, thanks

thankyoucubed avatar Nov 09 '21 19:11 thankyoucubed

Hey @thankyoucubed ,

Welcome to SimpleFOC - please consider using our forum for this kind of question: community.simplefoc.com - there's quite an active community, and there could be others who have ideas about this.

To answer your question: at the moment this is not possible. SimpleFOC would have be running on the ESC to enable FOC control of the motor, or the ESC would have to be "simpler" and offer direct control of its FET switches to the outside. Neither is the case here. Typically these ESCs run some kind of simple 6-step commutation control software. They have input for RC-receiver, and process this into the motor control by themselves. Their MCUs aren't powerful enough to run FOC, and they don't have the inputs for the additional position sensor needed.

The motor looks like a fairly standard BLDC in-runner. With some tuning of the PID-parameters, a driver that can handle higher currents, and a fast position sensor you should be able to get it working well with FOC control.

You can't do the FOC with a 1-PWM ESC... you'll need a BLDC motor driver board that does 3-PWM or 6-PWM. Check the SimpleFOC documentation and the forum for some ideas what can work...

runger1101001 avatar Nov 10 '21 11:11 runger1101001

Hi @runger1101001,

Thank you so much for the quick reply! I tried to post this on the parent site but I didn't receive the confirmation email to create an account (checked spam folder and everything and it's the right email address), so I resorted to posting here.

I see, dang. That's what I was worried about; the ESC wouldn't be an easy-peasy puppet here unfortunately. My application is pretty high torque, low rpm (up to ~1000). It's been quite difficult to find a driver that can handle the possible maximum current of the motor too, even with lower operating voltage it seems. This helped quite a bit, I hope to learn more about all of this, it's really fascinating so far.

Thanks a bunch again

thankyoucubed avatar Nov 10 '21 19:11 thankyoucubed

I'm sorry to hear the forum signup didn't work as expected... would you mind sharing your username and email you signed up with on the forum, then I can check what's going on there?

runger1101001 avatar Nov 15 '21 11:11 runger1101001

I'm going to close this for now. Do let us know if you have other questions!

runger1101001 avatar Oct 30 '22 09:10 runger1101001