Is it possible to drive a brushless motor directly with Arduino? Or should I revert on controlling a brushless motor ESC with PWM pulses?
6 Answers
Actually sometimes you just MUST make your own ESC. ESCs sold on the maket are "commercilized" and have their own control codes for RC stuff like airplanes, helis, cars...
For example sometimes you need to have a double side regenerative brake. From back to stop and from forward to stop. There is NO RC ESC that has that feature. They either have only one regenerative brake from forward to stop or none. Or you may need a sensor control BLDC but there are only a few sensored ESCs in the market, and they only have (the same for common sensorless ESCs) built in features that you do not need and don't have some that you absolutely need!
Designing your own ESC is a perfect choice and much cheaper even than the cheapest $10 one with HUGE power.
It is true that the control code and the hardware can be a pain but after some reading it is just a toy.
There's a good tutorial here on how to make a BLDC controller with an arduino using 6 mosfets and some other stuff you can easily find at Jameco's site (very nice) This is where I buy my stuff for cheap but spurkfun can be a nice alternative if you don't find some sensors like gyros, etc.
http://www.instructables.com/id/BLDC-Motor-Control-with-Arduino-salvaged-HD-motor/
very nice and easy to follow guide. You can make ANY power from low to ultra high ESCs using this guide and almost any combination of regen brake, using resistance, motor windings or battery charger...
Using mosfets is just a toy, you can do almost anything.
The prob is that you can't control this mosfet very efficiently with an MCU like an arduio board which outputs only 5V I think and the gate voltage of the mosfet for medium voltages is pretty much higher in the range of 16-30V easily. So you must use some other tansisor to step up arduino's voltage.
Good luck.

- 145,145
- 21
- 455
- 667
You should definitely use the ESC. Brushless motors works best when driven with a sine wave (or as close as possible to a sine wave). They also require a fairly accurate and complicated set of signals. Generating the proper wave forms and timing from an arduino would be difficult, and unless you really need to it, is probably not worth it. You can always arrange to control the ESC from your arduino, which would give you programmatic control plus the efficiency and power of the ESC.

- 1,132
- 8
- 12
-
nitpick: According to Wikipedia ( http://en.wikipedia.org/wiki/brushless_DC_electric_motor ), BLDC motors are optimized to work best when driven by switched DC: full positive, undriven, and full negative. Permanent magnet AC motors are optimized to work best when driven by a sine wave; that's the only significant difference between them. I agree with your conclusion: it is probably worth it to use an off-the-shelf ESC rather than develop one yourself. – davidcary Jun 15 '10 at 06:22
-
4The controller on a BLCD could very well use the same atmega as an arduino; so the advantage is more handing off the detail problem to someone else to solve; and handing off the low-level commutation task to leave the arduino's atmega free for higher level tasks. – Chris Stratton Dec 08 '11 at 18:58
-
BLDC motors use essentially square wave drive to the coils. On the user side of the controller (ESC) they use DC power feed plus whatever control signals the ESC requires. Sine waves do not feature. – Russell McMahon Jan 21 '14 at 23:36
I have gone back and forth on this for like 30 minutes. I think you probably want to use an ESC unless you are just doing it as a learning experience. To properly control the motor would tie up more resources from your arduino than I could imagine justifying. Plus you would be limiting the responsiveness of the motor to that of the adc polling. I wouldn't think of using an ESC as reverting, that is the way it is supposed to be done.

- 925
- 6
- 10
Since no one else has said it - you wouldn't be able to practically drive a motor directly from an arduino simply because the AVR chip won't put out enough current to supply any useful amounts of power.
So at the very least, you'd be looking at creating a three-phase H-bridge arrangement (read: three 'half H-bridges') to drive the currents needed, requiring six digital lines just to operate the drive transistors.
Assuming you had this drive capability problem solved, and that's not trivial, then you'd have to get into the control code. These motors have permanent magnet rotors, so you can't just blindly spin the stator field and get useful torque. You have to know the orientation of the rotor in order to keep the electrical phase angles adjusted so that you get uniform torque.
So like others have said, unless you want the specific learning experience, there's no dishonor in just buying an ESC.

- 19,163
- 3
- 48
- 75
I think it would be a great learning exercise, but ESCs use back EMF to detect rotation, although you can use optical or magnetic sensors for this. Basically you have to generate 3 AC phases and activate/deactivate them in the right moment.
The speed of the rotation of the magnetic field needs to be the adapted to the motor's, i.e. if you want to accelerate, the field has to run a bit earlier and quicker. You can also break, doing the opposite.
For a thorough explanation: http://www.embedded.com/columns/technicalinsights/196701832?_requestid=137540
For a practical job, get an ESC.

- 477
- 2
- 8
-
i first thought that acceleration and deceleration were accomplished the way you describe, by leading and lagging the field. but then i read that acceleration is mainly determined by voltage (although i can't see how that could decelerate). i feel a bit confused. do either of the approaches work for acceleration? any reason to prefer one over the other, or mix them? thanks! – necromancer Jul 16 '14 at 00:33
You can drive it directly with Arduino if by driving you don't mean literally supplying current for the windings - any MCU would be much too weak for that. Besides, Arduino can sink but not source current yet you'd need both for a brushless motor.
However, if you use a very simple H-bridge driver IC in addition to the Arduino, you can implement pretty much every function of the ESC. In fact, depending on the application you might not even need an E*SC* meaning that you may not need a closed loop speed control - if the load is not too great, you may be able to just get away with simply trusting the motor to respond in sync with energizing of the winding, and the rate of the winding current changes would come from the Arduino. Check out this very simple brushless (BLDC) motor control schematic and Arduino sketch that you may be able to adapt to drive your motor. That one is based on SN754410NE quad H-bridge IC which is maxed at 750mA if memory serves.
The code is not too trivial and makes use of PWM for smooth rotation but it's not too difficult to parse either to adapt to your application. The actual Arduino sketch for the BLDC motor is here.

- 21
- 2