BLDC Motor Control with Arduino

There is a lot of interest these days among hobbyists in controlling brushless DC (BLDC) motors, which have improved performance and better energy efficiency over
traditional DC motors, but are more difficult to use. Many off-the-shelf products exist for this purpose. For example, there are lots of small BLDCs controllers for RC
airplanes that work really well.

For those wanting to delve more deeply into BLDC control there are also many different micro controllers and other electronic hardware intended for industrial users and
these usually have very good documentation. So far, I have not found any comprehensive descriptions of how to do BLDC control with an Arduino microcontroller. Also, if
you are interested in doing regenerative braking, or using a BLDC for power generation, I have not found many products that are suitable for use with small motors or
much information on how to control a 3-phase generator.

This instructable started out as a demonstration project in a class on real-time computing, and which I continued after the class ended. The idea for the project was to
demonstrate a scale model of a hybrid electric vehicle with flywheel energy storage and regenerative braking. The motors used in the project are small BLDCs

BLDC Motor Control with Arduino

This instructable started out as a demonstration project in a class on real-time computing, and which I continued after the class ended. The idea for the project was to
demonstrate a scale model of a hybrid electric vehicle with flywheel energy storage and regenerative braking. The motors used in the project are small BLDCs
scavenged from broken computer hard drives. This instructable describes how to implement BLDC control with one of these motors, an Arduino microcontroller and Hall-
Effect position sensors, in both motoring and regenerative braking modes. Note that having access to an oscilliscope is extremely helpful, if not essential, to doing this
project. If you don’t have access to a scope, I have added some suggestions for how it might be done without one (step 5).

One thing that this project doesn’t have that should be included in any practical motor controller is any safety features, such as overcurrent protection. As it is, the worst
thing that can happen is that you burn out the HD motor. However, it would not be too difficult to implement overcurrent protection with the current hardware, and perhaps
I will do it at some point. If you try controlling a larger motor, please do add overcurrent protection, to protect your motor, and for your own safety.

I would like to try using this controller with a larger motor that can do some “real” work, but I don’t have a suitable motor yet. I noticed an 86W motor for sale on eBay for

Major Components in Project


BLDC motor from a computer hard drive
A magnet ring (half of the motor) from another hard drive.
Several (3-6) of the silver disks from a hard drive
A second small motor (DC brushed OK)
rubber band or (preferably) belt to turn the BLDC with another motor
Electronic Breadboard
solid core wire 22 AWG for breadboard connections

One Arduino Duemilanove microcontroller
Three 120  k ohm resistors
six ~400 ohm resistors
Linear or Rotary Poteniometer 100 k ohm

ST Microelectronics  L6234 Three Phase Motor Driver IC
Two 100 uF capacitors
One 10 nF capacitor
One 220 nF capacitor
One 1 uF capacitor
One 100 uF capacitor
Three recifier diodes
one 2.5 amp fuse
one fuse holder

3 Honeywell SS411A Bipolar Hall-Effect Digital Position Sensors
Three 1 K  resistors

12 V hobby sized lead acid battery

If you are going to do this project, I recommend that you spend the time to thoroughly understand how a BLDC works and is controlled. There are tons of references available online (see below for some recommendations). I do however, include some diagrams and tables from my project that should assist you in your understanding.

I did this project with a salvaged disk drive motor because it was easy to come by and I liked the idea of learning the ropes of BLDC control with a small, low voltage motor that doesn’t pose any safety issues. Also, the configuration of the magnets for the Hall sensors was made really easy by using a magnet ring (rotor) from a second one of these motors (See Step 4).

If you don’t want to go to all the trouble of installing and calibrating the hall sensors (steps 5-7), I understand that at least some CD/DVD drive motors have built-in hall sensors.

BLDC Motor
To provide some rotational inertia on the motors and to give them a bit of a load to work against, I put 5 hard drive disks on the motor, lightly glued together and to the motor with a little superglue (this made the flywheel in my original project).

If you are going to remove the motor from a hard drive, you will need a T8 torx driver to unscrew the casing (often there are one or two screws in the center that are hidden behind a stick-on label) as well as the internal screws that hold the motor in place. You also need to remove the head reader (a voice coil actuator) so that you can remove the memory disks to get to the motor.

Also, you’ll need a second, identical hard drive motor from which you’ll remove the rotor (which has a ring of magnets inside it). To pull the motor apart, I gripped the rotor (top) of the motor in a vise and then pried on the stator (bottom) with two screwdrivers 180 degrees apart. It’s not so easy to grip a motor in a vice tight enough without deforming it. You may want to build a set of wood v-blocks for this purpose.

I drilled and bored a hole in the magnet ring on a lathe so it would fit snugly on top of the motor. If you don’t have access to a lathe, you can fix the inverted rotor to your motor with superglue.

Photos 2 and 3 below show the interior of one of these motors that I pulled apart. Inside the top half there (the rotor) are 8 poles (magnets that are encased in plastic). On the bottom half (the stator) there are 12 slots (windings).  Each of the three motor phases has 4 slots that are connected in series.

Some HD motors have three contacts on the bottom, one for each phase, and have an extra one that is the center tap of the motor (where the three phases meet). In this project, there is no need for the center tap, but in sensorless control it can come in handy (I hope to post an instructable about sensorless control one of these days). If your motor has four contacts, you can identify the phases with an ohmeter. The resistance betwee the center tap and a phase is half  of the resistance between any two phases.
around $40.00 that seems like a good candidate. There’s also an RC website called “GoBrushless” that sells kits for putting together your own BLDC. These are not too
expensive and building one is a worthwhile experience. Note that the motors from this web site do not have Hall sensors.

Whew! It was a lot of work to write up this instructable. I hope you find it useful and please post your comments and suggestions.


For more detail: BLDC Motor Control with Arduino

We recommend EasyEDA for electronic circuit design.
From Schematic Drawing to PCB Production, Just Need One Tool
Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test

This Post / Project can also be found using search terms:

  • arduino BLdc
  • bldc motor control arduino
  • BLDC arduino
  • bldc motor control using arduino
Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Beginner Programming of Arduino
Beginner Programming of Arduino

This video is from a meeting of the Kids and Technology Meetup group in Washington DC. The youth who show...

Scroll to top