bldc (brushless dc motor) sensorless control using arduino

Photo of author

By Jackson Taylor

Home » Hardware » bldc (brushless dc motor) sensorless control using arduino

As an Amazon Associate we earn from qualifying purchases.

A brushless DC (BLDC) motor needs electronic commutation, which means something has to decide which pair of windings to energise at each moment. Many designs use Hall sensors for this. Sensorless control removes them and works out the rotor position from the motor’s own electrical signals. This article explains how that works and how to approach it with an Arduino.

The video below shows a BLDC motor being driven with an Arduino without position sensors.

Why use sensorless control?

A BLDC motor has permanent magnets on the rotor and three sets of windings on the stator. To keep it turning, the controller must switch current between the windings in the right order. Many motors use Hall effect sensors to report the rotor position. Sensorless control has a few practical advantages:

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video
  • Fewer parts and wires: there are no sensors or sensor cables to fail.
  • Lower cost: useful for fans, drones, pumps and other small drives.
  • Better in harsh conditions: heat, dust and vibration can be hard on small sensors.

The trade-off is that sensorless control does not work well at very low speed or standstill, and the software is more demanding.

How sensorless commutation works

When the rotor magnets pass the stator windings, they induce a voltage in them. This is called back-EMF, and its size grows with speed. In the common six-step (trapezoidal) method, only two of the three phases carry current at any moment. The third phase floats, so its voltage can be measured.

As the rotor turns, the voltage on the floating phase crosses the motor’s neutral (centre) voltage. This is the zero-crossing point. It is tied to the rotor position, and the next commutation step happens a short time after it, usually about 30 electrical degrees later.

The basic loop looks like this:

  1. Energise two phases according to the current step.
  2. Watch the floating phase and detect its zero-crossing.
  3. Measure the time since the previous crossing and wait about half of that interval.
  4. Move to the next of the six steps and repeat.
See also
ARDUINO -BOOST CONVERTER SIMULATION IN PROTEUS 24V TO 40V

If you want to understand the layout of the windings and magnets first, take a look at the inside of a BLDC motor before building anything.

What you need

  • An Arduino board such as an Uno or Nano, or a faster board if you need quicker timing.
  • A three-phase power stage: six MOSFETs (three half-bridges) with a gate driver, or a ready-made driver module. An Arduino pin cannot drive the motor directly.
  • Voltage dividers on each motor phase, so the back-EMF is scaled down to the Arduino’s input range (5 V or 3.3 V, depending on the board).
  • A suitable power supply rated above the motor’s current draw, ideally with current limiting while you test.
  • A BLDC motor whose rating matches your supply. Small hobby motors are a safer place to start than large hub motors.

Reading the back-EMF

The three phase voltages go through resistor dividers to analog inputs, or to the Arduino’s analog comparator. Two approaches are common:

  • Compare against a virtual neutral. Three equal resistors from the phases form an artificial neutral point. The floating phase is compared with it.
  • Compare against half the supply voltage. This is simpler, but the result depends on the PWM timing.

With PWM drive, the floating phase is cleanest when it is sampled during the PWM on-time, or filtered properly. The classic Arduino analogRead() is fairly slow, so many projects speed up the ADC or use the comparator. Plan for this if you want higher speeds.

Starting the motor

At standstill there is no back-EMF, so the controller cannot detect the rotor position. Sensorless drives therefore use an open-loop start-up:

  1. Align: energise one step for a short time so the rotor settles into a known position.
  2. Ramp: step through the commutation sequence with a gradually shortening delay, so the motor accelerates without a feedback signal.
  3. Switch to closed loop: once the back-EMF is large enough to detect reliably, start commutating from the zero-crossings.
See also
LOAD CELL INTERFACING USING ADS1231 AND ARDUINO

The ramp and the duty cycle used during start-up usually need tuning for each motor and load. A ramp that is too fast makes the motor lose sync and just twitch. One that is too slow can overheat the windings.

Controlling speed

Once the motor is running, speed is set by the average voltage applied, normally through PWM on the high-side or low-side switches. The same ideas as in basic PWM speed control apply. A potentiometer on an analog input can set the duty cycle, while the commutation timing follows the rotor automatically from the back-EMF.

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works

Because back-EMF falls as speed drops, detection becomes unreliable at low duty cycles. Setting a minimum duty cycle in code avoids stalls.

Common problems

  • Motor vibrates but does not spin: the open-loop ramp is wrong, or the phase sequence does not match the motor. Swapping two phase wires or adjusting the sequence in code often helps.
  • Motor runs, then stops suddenly: the hand-over to closed loop happened too early, or zero-crossings are being missed because of noise.
  • Noisy readings: add filtering to the dividers, keep wiring short, and use a ground shared with the Arduino.
  • Hot MOSFETs or driver: check dead time between high and low switches, gate drive and the current rating.

For safety, start with a current-limited supply and a small motor, and never connect a high-voltage supply to an untested circuit.

Going further

Once the basics work, you can add current sensing, a closed-loop speed controller, or smoother drive methods such as sinusoidal control. A sensorless drive can also be extended with regenerative braking by managing how energy flows back during deceleration. If you prefer to see a larger motor driven by an Arduino, our BLDC hub motor project covers that setup.

FAQ

Can an Arduino drive a BLDC motor directly?

No. Arduino pins supply only a small current. You need a three-phase driver or a MOSFET bridge with a gate driver, and the Arduino provides the control signals.

See also
INTELLIGENT BABY MONITORING ICU

How does a sensorless BLDC motor know the rotor position?

It measures the back-EMF on the phase that is not being driven. The zero-crossing of that signal marks a known rotor position, and the controller uses it to time the next commutation step.

Why does a sensorless motor need a special start-up routine?

Back-EMF is close to zero when the rotor is still, so there is nothing to detect. The controller starts the motor open-loop and moves to back-EMF feedback once the speed is high enough.

Is sensorless control better than using Hall sensors?

It depends on the job. Sensorless control is simpler in hardware and cheaper, but Hall sensors give reliable position at low speed and from standstill, which suits vehicles and loads that start under heavy torque.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works