ElectroHub

Closed-loop speed control of a BLDC motor with Hall sensor feedback

An open-loop motor slows down when you load it, which is why almost every real drive is closed loop. This project commutates a brushless DC motor from its three Hall sensors, measures speed from the same sensor edges, and closes a proportional plus integral loop around it so the motor holds its commanded speed as the load changes. The demonstration that matters is not that the motor spins — it is the recorded step response showing speed recovering after a load is applied, next to the open-loop response where it does not.

Electrical & Electronics (EEE)Electronics & Communication (ECE)MechatronicsMachines & drivesPower electronics & convertersHardware build
Rs 8,297 to Rs 22,238
All-in cost
4.3 weeks
With 3 of you
B.E. mini, B.E. final year
Usually taken as
10
Parts on the list

What it will really cost

Not just the parts. Teams budget from a component list, then run out in week six on wire, connectors and the driver board they destroyed. These are the lines that catch them.

Split betweenstudents
LineCost
Components and materials
From the bill of materials
Rs 6,100 to Rs 16,250
Spares and replacements
15 % — you will destroy something
Rs 915 to Rs 2,438
Consumables and hardware
Wire, connectors, headers, screws, heatshrink
Rs 732 to Rs 1,950
Perfboard and assembly
Rs 150 to Rs 400
Report, printing and binding
Two or three bound copies, plots and the plagiarism check
Rs 400 to Rs 1,200
TotalRs 8,297 to Rs 22,238
Each, split 3 waysRs 2,766 to Rs 7,413

Indicative bands last checked in August 2026 — a guide, not a quotation. Prices move and vary by seller, and anything you can borrow from the lab comes straight off the total. The 4.3 week figure assumes 10 person-weeks of work shared between 3; students past 4 add coordination rather than output, so the estimate stops improving there.

Block diagram

current limitposition and speedPWM24 V supply, bulk capacitance, fuseThree-phase MOSFET bridgeDC link current sensingBLDC motorMCU — commutation and PI speed loopThree Hall sensorsBrake / generator loadSerial or SD logging
  • Supply / source
  • Sensing
  • Control
  • Power stage
  • Load / output
  • Display & logging
  • Feedback path

The same chain in words

  1. 124 V DC supply with bulk capacitance and a fuse
  2. 2Three-phase MOSFET bridge, six devices with gate drivers
  3. 3BLDC motor with three Hall effect sensors
  4. 4Hall inputs to the controller for commutation and speed measurement
  5. 5Current sensing in the DC link for the current limit
  6. 6Microcontroller: commutation table, speed loop, PWM generation
  7. 7Mechanical load: a friction brake or a small generator with a resistor bank
  8. 8Serial or SD logging of commanded speed, measured speed and duty cycle

How it works

The three Hall sensors give six distinct states per electrical revolution, so the controller always knows which of the six commutation steps applies. Each step energises one phase positive, one negative, and leaves the third floating.

Speed comes from the same Hall edges. At high speed the controller times the interval between edges; at low speed it counts edges over a fixed window, because the interval becomes too long and too noisy to be useful.

The speed error drives a PI controller whose output is the PWM duty cycle applied to the bridge. The proportional term responds to the present error and the integral term removes the steady-state error that a proportional-only controller always leaves.

A current limit sits inside the speed loop. If the DC link current exceeds the limit, duty cycle is reduced regardless of what the speed loop wants, which is what protects the bridge during a stall.

Applying the mechanical brake drops the speed, the integral term winds up, duty rises and speed recovers. Logging that recovery is the project's result.

Design calculations

This is the chapter that separates an engineering project from an assembly job. Every value below carries the formula that produced it and the assumptions it rests on — check them against your own ratings before you use them, because your motor is not this motor.

Electrical frequency

200 Hz at 3000 rpm with 4 pole pairs

f = N x pole pairs / 60

3000 x 4 / 60 = 200 Hz. Six commutation events per electrical cycle gives 1200 commutations per second, so the controller has 833 microseconds between steps at full speed.

PWM frequency

16 kHz

Above the audible range, below the point where switching loss dominates

Below about 15 kHz the drive whines audibly. Far above it, switching losses in the MOSFETs rise and the gate driver has to charge the gates more often. 16 to 20 kHz is the usual compromise for a small drive.

Current ripple check

62.5 us period against a 1 ms time constant

Compare the PWM period against the motor's electrical time constant L/R

With 200 uH of phase inductance and 0.2 Ohm of resistance, L/R is 1 ms — sixteen times the PWM period, so the winding current is smooth and the motor sees an effectively DC average. If that ratio were the other way round, the current would be a triangle wave and the losses would be far higher.

Current limit

10.4 A rated, so set the limit at 15 A

I rated = P / V, then add margin for transients

250 W at 24 V is 10.4 A. The limit has to sit above rated current so normal acceleration is not clipped, and below the bridge's capability so a stall does not destroy it.

Speed loop sample rate

100 Hz, i.e. every 10 ms

Fast enough for the mechanical time constant, slow enough for a clean speed estimate

The mechanical time constant of a small motor with a load is tens to hundreds of milliseconds. Sampling ten times faster than that is ample; sampling much faster only amplifies the quantisation noise in the speed measurement.

Integral anti-windup

Clamp the integral term at the duty cycle limit

Stop integrating whenever the output is saturated

During a stall the error stays large and the integral term grows without bound. When the load is released, that stored term drives the motor far past the setpoint before it unwinds. Clamping is one line of code and it is the difference between a controller that works and one that overshoots wildly.

Bill of materials

ItemQtyUnit cost
BLDC motor
24 V, 250 W, with three Hall sensors
1Rs 1,400 to Rs 3,500
Three-phase driver board
Six MOSFETs with gate drivers, 30 A class
1Rs 700 to Rs 2,000
Microcontroller board
STM32 or ESP32 with hardware PWM and input capture
1Rs 350 to Rs 900
Current sensor
ACS712 30 A or a shunt with INA226 on the DC link
1Rs 150 to Rs 450
Power supply
24 V, 15 A SMPS, or a 24 V battery pack
1Rs 1,200 to Rs 3,000
Mechanical load
Friction brake, or a small DC generator with a resistor bank
1Rs 600 to Rs 1,800
Coupling and mounting
Shaft coupling, base plate, bearing blocks
1Rs 500 to Rs 1,500
Tachometer for verification
Optical or contact tachometer
Borrow from the machines lab if possible.
1Rs 600 to Rs 1,600
Display and logging
OLED display and an SD card module
1Rs 250 to Rs 600
Fuses, wiring, enclosure
Blade fuses, 4 sq mm wire, vented enclosure
1Rs 350 to Rs 900

Specifications are written as ratings rather than brands, so any equivalent part works. Where a line says to borrow from the lab, do — it is usually the largest number on the page, and the total drops to Rs 7,697 at the low end without them.

What you need to be able to do

Skills

  • Embedded C / Arduino
  • Fabrication & mounting

None of these blocks you — they are learnable inside a semester. Each one you do not have costs a couple of weeks, so count them into your plan.

Equipment and access

  • Soldering stationrequired
  • CRO / DSO
  • Machines lab (motors, loading)

Anything marked required is a blocker, not a difficulty. Arrange the access before you commit to the project, not after.

What goes wrong

  • Getting the commutation sequence wrong makes the motor buzz, draw heavy current and go nowhere. Work out the Hall state to phase mapping by slowly turning the shaft by hand and logging the states before you ever apply power to the bridge.
  • Shoot-through kills the bridge instantly. Verify dead time on a CRO with the motor disconnected, and never rely on the assumption that the driver IC handles it for you.
  • A tuned PI controller is the deliverable, so do not tune by trial and error and leave it at that. Record the open-loop step response, derive the gains from it, and show both the derivation and the resulting closed-loop response.
  • Without anti-windup the controller looks fine until the first stall and then overshoots badly. It will be tested in the viva by holding the shaft, so handle it.

How to make it a stronger project

Use these when your guide says the scope is too small, or when you want something in the results chapter that nobody else in your batch will have.

  • Add sensorless commutation by detecting the back EMF zero crossing on the floating phase, and compare start-up behaviour and low-speed performance against the Hall version.
  • Add an inner current loop to make it a cascaded speed and torque controller, which is how industrial drives are actually structured.
  • Implement field oriented control with current sensing on two phases, and compare the torque ripple against six-step commutation.

Writing the report

The structure below is what a project report is marked against, with the mistake that costs marks in each chapter. There is no template to download and there will not be one: the writing is your work, and a site that did it for you would be helping you cheat rather than helping you pass.

A mini project report runs to about 40 to 50 pages, and the literature survey is usually brief. Guides expect one clear objective, met and measured. A final year report is normally 60 to 90 pages with a substantial literature survey, and many departments expect a paper submission alongside it.

The full report guide — front matter, conventions and page counts

Abstract

One paragraph covering what the problem is, what you built, and what the result was. Written last, even though it appears first.

Loses marks: Describing the problem and the method but never stating a result. If there is no number in your abstract, it is not finished.

Introduction

Why the problem matters, the context it sits in, and a clear statement of the objectives your project set out to meet.

Loses marks: Objectives written so vaguely that nobody can tell at the end whether they were met. Write objectives you can tick off in the conclusion.

Literature survey

What has already been done, what each approach achieved, and the specific gap your work addresses.

Loses marks: A list of paper summaries with no comparison and no gap. The survey exists to justify your design choice, so end it by saying what you chose and why.

Methodology and block diagram

The system as a whole: the block diagram, what each block does, and the signal or power path between them.

Loses marks: A block diagram copied from a datasheet or another report. Draw yours to match what you actually built, including the parts that are inconvenient.

Design and calculations

Every component value and rating, with the formula, the assumptions and the arithmetic that produced it. This is the chapter that distinguishes an engineering project from an assembly job.

Loses marks: Component values with no justification. If a resistor is 10 kOhm, the report must say why it is not 1 kOhm.

Hardware and software implementation

The circuit as built, the PCB or wiring, the flowchart, and the parts of the code that carry the actual logic.

Loses marks: Twenty pages of pasted source listing. Include the flowchart and the few functions that matter, and put the full listing in an appendix.

Results and discussion

What you measured, in tables and graphs, compared against what you predicted in the design chapter — including where they disagreed.

Loses marks: Photographs of the working model presented as results. A photograph is evidence that it exists, not evidence that it works. Results are measurements.

Conclusion and future scope

Whether each objective was met, what the measured performance was, and what the honest next step would be.

Loses marks: Future scope written as a wish list of unrelated features. It should follow from a limitation you actually hit.

References and appendices

Every source in a consistent style, plus datasheets, full code listings and the complete bill of materials.

Loses marks: Citing a blog or a video where a datasheet or a standard exists. Cite the primary source for anything you relied on.

Viva questions with answers

The demonstration is half the assessment. These are the questions this project invites, and the answers are written the way you would give them out loud.

Why does a BLDC motor need Hall sensors when a brushed motor does not?

A brushed motor commutates mechanically — the brushes and commutator physically switch the winding current as the rotor turns, so the switching is inherently synchronised with rotor position. A BLDC motor has no brushes, so the switching has to be done electronically, and the electronics need to know where the rotor is. The Hall sensors provide that position information.

Why six steps per electrical revolution?

Three Hall sensors spaced 120 electrical degrees apart give three binary signals, and of the eight possible combinations, two are invalid states that indicate a sensor fault. The six valid states divide the electrical revolution into 60 degree sectors, and each sector corresponds to one energising pattern of the three phases.

What does the integral term actually do?

It accumulates the error over time, so as long as any error remains the controller output keeps changing. That is what drives the steady-state error to zero. A proportional-only controller must have a residual error to produce any output at all, so it always settles slightly off target under load.

Why measure speed by timing intervals at high speed but by counting at low speed?

Because the resolution of each method goes the opposite way. Timing the interval between edges is very precise when edges come quickly but becomes slow to update and noisy when they are far apart. Counting edges in a fixed window is steady at high speed but at low speed you might count only one or two edges, so the quantisation error is enormous. Switching methods at a threshold gives good resolution across the whole range.

Why is a current limit placed inside the speed loop rather than as a separate trip?

Because a trip stops the drive, whereas a limit lets it keep working at reduced output. During acceleration or a temporary overload, clamping the duty cycle keeps the motor running within the bridge's capability and the speed loop recovers naturally once the load falls. A trip would shut the whole drive down for a condition that is often transient.

What is integral windup and how did you prevent it?

When the output is saturated the error persists no matter how much the integral term grows, so it accumulates a large value that has no effect at the time but must be unwound before the output can come back down. The result is a large overshoot when the constraint is released. The fix is to stop accumulating whenever the output is saturated, which is a clamp on the integral term.

Tools for the calculations above

Normally taken as a B.E. mini project (5th/6th sem) or B.E. final year project (7th/8th sem) project. If yours is a different course, the extensions above scope it up and the simpler half of the design scopes it down — the arithmetic does not change. Back to all projects.