Driving a three-phase brushless DC motor with Arduino – Part 1. Theory

Typical CD/DVD Spindle BLDC Motor With 12 Magnetic Poles and 9 Wound Cogs
This is the first part of what will probably be two (or more) posts describing one of my latest projects – an Arduino Stroboscope based on the spindle motor of a broken Xbox 360 DVD drive. I will save some practical information (like why I chose Xbox’s drive) for the second post. Here I wanted to concentrate on the theory behind using Arduino or another MCU to drive a three-phase Brushless DC electric motor such as a CD or DVD drive (or HDD for that matter) spindle motor, such as the one pictured further in the text.
{adinserter Internal_right}The diagram above as well as the photo to the left show a typical CD/DVD drive spindle motor design with 9 cogs and 12 magnetic poles. The main principal of driving such a motor is a particular sequence of commutation of the stator windings that creates several points in which the windings attract magnetically opposite poles of the rotor with maximum force. Looking at the animation below, you’ll see that this particular configuration of the BLDC motor (12 poles, 9 cogs) creates three points of maximum attraction in each of the 36 steps that make up one complete rotation. The three points move around due to the commutation sequence and that change in magnetic field directions “drags” the poles of the rotor around with it.
It may be a little easier to watch the movement of the magnetic field on the animation that follows. The animation can be paused on any step and you can move straight to the step you want if you hover your mouse above the step’s number in the navigation menu. Go ahead, play with it! We’ll be right here when you come back 🙂 While you’re at it, see if you can spot those three points with maximum attraction force in every step. They are always in different places but they are always there.
The south poles are marked with RED and the north poles are BLUE. The poles are so marked in accordance with the commonly accepted naming convention. The direction of the magnetic force is defined by the right hand rule: if the palm of the right hand follows the direction of the current (i.e. goes around the cog as the wire does, current flowing from HIGH to LOW), the thumb points in the direction of the magnetic field. The point where the magnetic field lines are originated from is called NORTH and the thumb is pointing in the direction of SOUTH.
The spots where the red dot on the winding corresponds with the blue pole of the rotor are the maximum attraction points.
The animation above was made based on several assumptions. One of them of course is the motor configuration – 12 poles, 9 cogs. Another one is that the least possible amount of MCU outputs is used to drive the motor and the driver circuitry is the simplest. I am going to have to save the circuitry for another post but suffice it to say here that the easiest implementation from the hardware stand point requires us to drive the winding either HIGH or LOW. That requires only three digital I/O pins and a very common H-bridge IC such as SN754410. There’s another possibility, too: we drive only two windings at a time and leave the third one open so no current is flowing through it and no magnetic force is generated, but that requires using 6 I/O pins and 6 discrete transistors. The benefit of the 6-pin scheme is better efficiency and torque due to lack of secondary, smaller magnetic forces pulling in the wrong direction.
By the way, it may not be apparent that the rotor is magnetized the way it is, with 12 poles, but using the old physics class trick with iron shavings things become much more clear. Unfortunately, this requires disassembly of the motor but if you are careful, you can easily put it back together – the permanent magnet shroud is press-fitted to the axis that sticks out of the ball bearing in the middle of the stator. If you were careful taking it off, you can always put it back in reverse.Not all BLDC motors have 12-pole rotors and not all stators have 9 cogs, so it may help to search for relevant documentation or even open the motor if less intrusive methods are not available. Hard drive spindle motors often have 12 cogs, for example. However, for a relatively recent (~10 y.o or less) CD/DVD/Bluray spindle motor it’s pretty safe to assume 9 cogs/12 poles. This will be a crucial piece of information when we turn to the hardware and firmware implementation based on Arduino. See the next installment of this mini-series!
Acknowledgements:
To continue your BLDC education and learn more than you ever wanted to know about BLDCs, head straight for Brian Mulder’s Electric Motors, Part 1-5 series of articles on the Southern Soaring Club Web site
Special thanks to Mike Alsup (malsup) for creating the JQuery Cycle plugin used in the animation
[…] installment in the series of posts related to Arduino and brushless DC motors. Please see the first part for a bit of info on the theory behind the commutation sequence. Once you understand the […]
[…] Driving a three-phase brushless DC motor with Arduino – Part 1. Theory […]
[…] Part 1 of the Project Build Part 2 of the Project Build Part 3 of the Project Build […]
[…] of the IC using 6 transistors wired as 3 Half-H-Bridges (look up an H-Bridge in google…). Here is a nice overview on controlling BLDC motors. These things need to be controlled via PWM […]
[…] for the full run-down on brushless motor control, click here. And we’re on twitter and Google+, so follow us for news and […]
[…] Driving a three-phase brushless DC motor with Arduino – Part 1. Theory Brushless DC (BLDC) motor with Arduino – Part 2. Circuit and Software […]
Hello. Great page. Great page!
Just one… let’s call it a tip/very friendly advice.
Switch the gallery buttons layout from 1-36 as such:
-leave the first and the last rows as they currently are
-invert the second one.
That way, one could really follow up the animation with the mouse by doing a snake kind of effect.
Best regards!
Hi there.
Great tutorial and overview.
If I’m not mistaken however, your LEVELS truth table is organized left to right for counter-clockwise movement, whereas your animation is turning clockwise. This really stumped me for a while until I realized that.
Cheers,
Eric
A less dirty solution to count pole pairs is to connect a small battery (e.g. AAA) or a bench power supply with only little current to one of the motor windings and turn the motor 1 revolution.
Count the latching positions and that gives you the number of pole pairs (so multiply by two for the number of poles).
[…] http://elabz.com/brushless-dc-motor-with-arduino/ […]
[…] http://elabz.com/brushless-dc-motor-with-arduino/ […]
[…] http://elabz.com/brushless-dc-motor-with-arduino/ […]
Hi
I have a BLDC motor with 14 poles and 12 cogs.
So, does it have 4 points of maximum attraction ?
and does it take (cogs*maximum_no_attraction_point)12*4 = 48 steps to make one complete rotation ?
Fix the animation !! The steps are fine but reversed, do not turned clockwise
Yes, as others have said, your animation is backwards. This animation would cause a counter clockwise rotation of the motors for every step. This makes the tutorial confusing! Whenever blue and blue are near eachother, they repel eachother. Whenever blue and red are near, the attract. Whenever red and red are near, they repel. Also, you should always have a 6 pin wiring with one floating wire to the motor so that you can read back emf and also the way you are doing it, as you admit, actually has sometimes one inductor pushing BACKWARDS so your circuitry is fighting itself causing tremendous inefficiency and waste of power, ruining torque, ruining speed, etc. Terrible design. Don’t be so pin greedy! Microcontrollers are cheap so pins are cheap. Also ditch the chip and use n-channel mosfets!
[…] https://elabz.com/brushless-dc-motor-with-arduino/ […]
[…] either of the drives. The motors that spin the disk look like 3 phase brushless DC motors which are a lot more complicated. I did not have the time nor energy on this quick project to delve into that subject, so I put those […]