Arduino with brushless motor

Is it possible to drive a brushless motor directly with Arduino? Or should I revert on controlling a brushless motor ESC with PWM pulses?

It is possible.
But I would use an ESC.

EDIT: I removed a part of my answer, because it was not correct. Sorry.

Is it possible to drive a brushless motor directly with Arduino?

That depends on the amount of current the motor takes. Many of them take way to much for an Arduino's output pins (which are 20mA/pin).

Have you already got the Brushless motor? The specification should make it clear.

Or should I revert on controlling a brushless motor ESC with PWM pulses?

You will probably need some way to switch the current.
A normal Brushless DC motor has three coils, so it usually needs 3 drivers. This can be a driver/coil, or a chip with all 3 drivers.

There are specific IC's which are Brushless DC motor driver at RS, and that may be the easiest way to go.

Depending on the way the IC works, and how fast you need the motor to rotate, you can most probably use the timers on the Arduino to generate the pulses.

HTH
GB

Most newer R/C brushless motors are of the 3 phase type (using a switching controller) and cannot be driven with a H-bridge and PWM signal. These motors require a R/C brushless motor controller (ESC), which to an Arduino would look just like driving a servo.

http://www.rcdude.com/servlet/the-Brushless-Motors/Categories?sfs=3b2306eb
http://www.rcdude.com/servlet/the-Brushless-Controllers/Categories

Lefty

These motors require a R/C brushless motor controller (ESC)

I don't believe they require R/C brushless motor controller.

You could make the motor control yourself, though a ready made one is less hassle if it does everything you need.

GB-)

I don't believe they require R/C brushless motor controller.

One really needs to be specific on what actual DC brushless motor they are talking about. The R/C industry has gone crazy with very powerful, very efficient, 3 phase DC brushless motors, such as I posted links for. These are quite cost effective for the power they produce and have made electric powered flight a mainstream item Vs the older gas powered R/C. These do require a electronic speed controller designed to drive 3 phase DC brushless motors using 3 phase mosfet switching logic for variable speed control. They interface as a servo device (PPM signal) used with the standard R/C radio controllers.

There are other kinds of DC brushless motors, but I don't know what they require to drive. A simple stepper motor can be considered a DC brushless motor, but can't be driven with a simple H-bridge either.

So saying a brushless DC motor is not enough information to accuraly answer, without more specific motor information.

Lefty

So saying a brushless DC motor is not enough information to accuraly answer, without more specific motor information.

Agreed.

A simple stepper motor can be considered a DC brushless motor, but can't be driven with a simple H-bridge either.

Agreed. It needs two H-Bridges for a bipolar stepper motor, and doesn't need H-Bridges for driving unipolar steppers (though H-Bridges could be used, it would be overkill).

Similarly, three phase Brushless DC motors, depending on coil topology, can be driven in several ways.

Once ozanuzay tells us the specification of the motor, I'm confident we can help.

HTH
GB-)

I have been giving this a thought this easter.
Not just as simple as it seems.
A modern rc car brushless motor has a KV between 2000 and say 9000. (KV=kilo rpms per Volt) Assume 5700KV in this example.
The same car (actually my car) uses 2S LiPo, 7.4V
The motor is a standard 2pole motor.
This gives the calc:
Every phase needs to produce pulses up to a rate of
KVVoltPoles=57007.42=84360 pulses / minute = 1406 pulses / sec.
The motor phases are phase shifted 120 degrees (if the circle is 360 degrees :P). Meaning, the Arduino needs to calc the time to trig every phase, depending of rpm.
It can be done, but its critical timing for smooth action!

KVVoltPoles=57007.42=84360 pulses / minute = 1406 pulses / sec.
The motor phases are phase shifted 120 degrees (if the circle is 360 degrees ). Meaning, the Arduino needs to calc the time to trig every phase, depending of rpm.

Maybe I am misunderstanding, but I don't think calculating the timing is hard, it is getting the pulses nice and even, especially during acceleration and deceleration, without consuming all of the resources, but maybe that is what you mean?

There are brushless DC motor drivers which would take a single pulse train, and do all of the work for us, but maybe that fails to address your concern.

I assume this is the sort of pulse train we want from three pins:

Is your concern that the variability of the timing will be too big?

There are several ways to generate something like this.

One approach is to use one timer, running at 3 times the required frequency, catch interrupts, and control the pins in the interrupt service routine. I'd use the 16-bit, Timer1 to make acceleration and deceleration smooth. (An even simpler technique would be used to make a single pulse train for some of the Brushless DC motor controllers.)

With a bit of care, the path through the interrupt service routine can be made sufficiently consistent that the slight difference between each phase of each cycle will be very small or even zero (by small error I'm thinking <0.1% of frequency). I'd disable the Arduino's clock to do this.

The nice thing about this type of approach is the speed can be varied by only adjusting one timer. That should make speed control relatively straightforward.

A second approach is to generate all of the signals directly with the timer hardware. The timers in the ATmega168/328 aren't very sophisticated, so I think a significant downside of this is, I think it uses all three timers, and they could only be run as 8 bit timers, so speed control (specifically acceleration and deceleration) might be a bit course.

HTH
GB-)

Is your concern that the variability of the timing will be too big?

Yepp, but you solved it easy with the timer, running at 3 times the required frequency! As always, its simple when someone does the thinking for me... ::slight_smile: Thanks.
Then Fwd/Reverse is as simple as switching two of the outpins.

So this is diagram more helpful?

I'm trying to show the relationship between the timer frequency and the motor frequency.

I'm trying to show the relationship between the timer frequency and the motor frequency.

I think that looks correct. The thing missing, I think, is the fact that all the commercial R/C speed controllers for brushless DC motors rely on feedback from the motor to actually start and control the rpm of the motor. The very early models relied on hall effect sensors in the motor to supply the needed feedback, while most now utilize a counter sensed EMP pulse that the controller can read directly from the three phase output winding drivers.

Lefty

The thing missing, I think, is the fact that all the commercial R/C speed controllers for brushless DC motors rely on feedback from the motor to actually start and control the rpm of the motor

I think that is challenging my graphic design skills :slight_smile: but I'm willing to have a go. I think that would be a second diagram showing both sensor output and driving input?

The very early models relied on hall effect sensors in the motor to supply the needed feedback

Yes, I think that is the easiest to understand initially. Most encoder seems to be straightforward to understand, especially optical which are even easier see work.

while most now utilize a counter sensed EMP pulse that the controller can read directly from the three phase output winding drivers

I think that is a third diagram. Getting the idea of feedback can come before this. Then looking at the actual current flow and noting that it contains enough information to discard the encoding sensors seems a reasonably understandable step.

I believe this
Allegro A8904 is an example of a 'sensor-less encoder'.

[edit]I don't know if and when I'll have time to draw them though.[/edit]

GB

is the fact that all the commercial R/C speed controllers for brushless DC motors rely on feedback from the motor to actually start and control the rpm of the motor

Nope.
The phenomenon is called Cogging. On lo rpms, the esc could not create a smooth motion. Thats the reason to the sensor.
But now its very common to run sensorless and handle it with software.

But now its very common to run sensorless and handle it with software.

I am under the impression that, while there is no physical encoder (e.g. Hall sensor) the ESC driver detects and measure the motor driving pulses directly, and hence can derive similar information to a Hall sensor (possibly better). So that is sensorless in the respect that there is no Hall sensor, but the motor behaviour is actually been sensed, and used in feedback to control the motor driving pulses.

HTH
GB

What happened to the OP and is his question answered?

if ozanuzay wanted to know if there was a practical way to control brushless motors from Arduino without an ESC (Electronic Speed Controller) , seems from the discussion above like the answer is no.

[edit]

What happened to the OP and is his question answered?

good question. :)[/edit]

if ozanuzay wanted to know if there was a practical way to control brushless motors from Arduino without an ESC (Electronic Speed Controller) , seems from the discussion above like the answer is no.

Not sure I understand what what you mean by ESC.

If the brushless DC motor is

  • low current, then can use Arduino (unlikely)
  • 3 phase wye ("Y"-shaped) windings, could use three suitable MOSFETS (or any driver transistor if backwards is okay)
  • 3 phase delta, then need 3 H-bridges, and any H-bridges (supporting motors spec) will do (could be two L239D's), then generate pulses from Arduino, (or is this what you meant by ESC?)

Or could:

  • use 3 phase brushless DC motor controller IC, and drive with Arduino (maybe use controller IC for feedback) (probably included in definition of ESC)
  • buy R/C ESC and drive with Arduino

Is that what you were thinking?

GB

I was thinking this:

If one wants to control a brushless motor from arduino, use a hobby ESC with compatable motor, and drive using the Servo library.

Okay, I understand.

I like the 3 H-Bridge approach. I quite fancied trying three individual H-Bridges, (but making the PCB is inconvenient for me :-()
and doing the control pulses with the Arduino.

GB-)

hi i need help