Designing a PWM-Based BLDC Motor Controller Circuit with Detailed Schematics

For brushless motor applications requiring precise torque control under 1 kW, a three-phase inverter bridge using IRFB4110 MOSFETs paired with DRV8305 gate drivers delivers optimal performance. This configuration supports PWM frequencies up to 50 kHz with dead-time adjustment under 200 ns, minimizing switching losses while preventing shoot-through currents. Ensure the bootstrap capacitors (CBST) are sized at 0.1 µF to sustain gate charge during high-side switching, particularly in sensorless trapezoidal commutation.
Current sensing demands careful resistor placement: shunt resistors below 5 mΩ (e.g., CSRN2512) should be positioned on the low-side of each phase to avoid common-mode noise. For closed-loop speed regulation, integrate a STM32F303 microcontroller sampling phase currents at 20 kHz via its 12-bit ADCs, with PID tuning focused on a 30% proportional gain and 12 ms integral time constant for typical 4-pole motors. Power supply decoupling requires a 470 µF bulk capacitor on the DC bus, supplemented by 100 nF ceramics near each MOSFET’s source-lead.
Thermal management hinges on PCB copper pours: allocate 3 oz/ft² copper for the inverter stage, with vias under the MOSFET tabs connecting to a 100×100 mm aluminum heat sink rated for 10 W/°C. Grounding splits into three nets–power ground, signal ground, and chassis ground–joined at a single star point to prevent ground loops. For fault protection, the gate driver’s overcurrent threshold should trip at 1.3× the motor’s rated stall current, with hysteresis configured to avoid nuisance resets.
In sensorless applications, back-EMF detection requires filtering: a 1 kHz low-pass RC filter (R=1 kΩ, C=150 nF) precedes the comparator input, while the microcontroller’s timer triggers commutation 30° after the zero-crossing event to compensate for phase lag. Hall sensor wiring must use twisted pairs with shielding grounded at the controller end to reject EMI from motor cables longer than 50 cm. For regenerative braking, the braking resistor value is calculated as RBR = VDC2 / PMAX, where VDC is the bus voltage and PMAX is the maximum braking power.
Schematic for a Three-Phase Motor Driver: Key Components and Wiring
Start with a 60V-100V MOSFET bridge (e.g., IRFB3077 or IPB60R040C6) for high-current applications–these withstand 90A continuous at 25°C with RDS(on) under 4mΩ. Place a 100nF ceramic capacitor directly across each MOSFET pair to suppress switching spikes (X7R dielectric, 50V rating). Avoid trace loops between the FETs and caps; keep distances under 5mm to minimize inductance.
Microcontroller Pinout and Peripheral Connections
Use a STM32F303 or dsPIC33CK for its dedicated motor-control PWM (6 complementary pairs, 1ns deadtime resolution). Route Hall sensor signals (5V-tolerant) to GPIO ports PA0-PA2 (STM32) or RB0-RB2 (dsPIC) with 1kΩ pull-ups and 100pF series capacitors to filter noise. For encoder input, wire the ABZ lines to timer channels TIM2 (STM32) or IC1-3 (dsPIC) with 47Ω series resistors to prevent reflections.
Gate drivers require isolated supplies–use a Si8271 (2.5kV isolation) or ISO5852 (5.7kV) with a 12V bootstrap circuit. Space the driver IC at least 2mm from the MOSFETs to avoid EMI coupling. Add a 4.7µF tantalum capacitor (16V) on the VDD pin and a 1µF MLCC on each bootstrap node to stabilize voltage during startup.
- Deadtime: Set 1-3µs via MCU registers (STM32:
TIM_BDTR->DTG; dsPIC:PWMCON1bits.DTC) to prevent shoot-through. Verify with an oscilloscope–adjust empirically if ringing exceeds 2V. - Overcurrent: Use a shunt resistor (0.005Ω, 3W, Vishay WSLP) on the DC bus, amplified by a INA240A1 (20V/V gain). Connect the output to the MCU’s ADC with a 10kΩ anti-aliasing filter (cutoff at 10kHz). Trip threshold: 80A for >5µs.
- Speed Feedback: For sensorless schemes, feed back the back-EMF through a 5kΩ/10kΩ divider to the comparator input (LM393). Eliminate noise with a 10Hz-1kHz bandpass (R=10kΩ, C=1µF/220nF).
Route power traces as 2oz copper, minimum 5mm width (1A/mm), with thermal vias (0.3mm diameter) spaced every 3mm under the MOSFETs. Separate analog ground (AGND) from power ground (PGND)–connect them only at a single point near the DC link capacitor. Use star grounding for all sensor and gate driver returns to prevent ground loops.
Brake circuitry: Add a P-channel MOSFET (e.g., IRLML6401) and 20Ω/5W resistor for dynamic braking. Drive it via a complementary PWM signal (inverted from the low-side FETs) to dissipate energy during deceleration. Monitor resistor temperature with a 10kΩ NTC thermistor; disable braking if temperature exceeds 120°C.
- Test the PWM signals with a 20% duty cycle at 20kHz–verify deadtime symmetry (target ±5%) and check for cross-conduction on a dual-channel scope (probe MOSFET gates with 10x attenuation).
- Measure DC bus ripple with a 10µF film capacitor across the supply; target
- Calibrate the current sensor by applying a known 50A load (DC load bank)–adjust the INA240 gain if the ADC reading is off by >2%.
For firmware, implement a trapezoidal commutation routine first (aligned with Hall sensors), then refine with sinusoidal PWM (SVPWM) for smoother torque. Store commutation tables in flash (STM32: @0x080E0000; dsPIC: __prog__ space). Add a watchdog timer (STM32: IWDG; dsPIC: WDT) with a 100ms timeout–reset it in the main loop and during PWM interrupts.
Key Components of a Brushless Motor Driver Schematic
Begin with a high-side and low-side MOSFET or IGBT configuration for switching the motor phases. Use IRF540N or IPP075N10N3 for 12V–48V applications, ensuring RDS(on) < 10 mΩ to minimize conduction losses. Pair each gate with a dedicated driver IC like DRV8305 or L6384E, which handles shoot-through protection and dead-time insertion of 50–200 ns.
Current sensing is non-negotiable–integrate a shunt resistor of 1–3 mΩ on the low-side return path or use a Hall-effect sensor like ACS712. Route the shunt signal to an operational amplifier (TLV2371 or OPA333) with a gain of 20–50 V/V, then feed the output to the microcontroller’s ADC. Ensure the amplifier bandwidth exceeds 10× the PWM frequency to avoid phase lag.
The microcontroller unit (MCU) anchors the design–opt for STM32F303, dsPIC33CK, or ESP32 with dedicated motor-control peripherals (e.g., CORDIC accelerator, 3-phase PWM generation). Input capture channels should synchronize with Hall sensors or back-EMF zero-crossing detection, using a 100 kHz–1 MHz sampling rate. Flash memory ≥ 128 KB accommodates field-oriented control (FOC) algorithms.
Power supply design demands isolation–use a flyback converter (LT8302) for the control section, outputting 5V/1A with ≤1% ripple, and a buck regulator (LM2596) for the gate drivers, stepping down from 12V–60V with efficiency >90%. Include a 10 µF ceramic capacitor across each MOSFET drain-source to suppress voltage spikes, and a TVS diode (SM6T33CA) rated for 1.5× the bus voltage.
- Hall sensors (A1324): Mount radially on the stator, spaced 120° apart. Use twisted-pair wiring to reject EMI.
- Braking circuit: Add a power resistor (10W/10Ω) and a relay or MOSFET (IRFZ44N) to dissipate regenerative energy.
- Communication: UART/I2C/SPI for tuning, plus CAN (TJA1050) for industrial compatibility.
Thermal management dictates component placement–mount MOSFETs on a heatsink with thermal paste (Arctic MX-6) and ensure >2 W/m·K conductivity. Calculate heatsink size using junction-to-ambient thermal resistance (θJA) and worst-case power dissipation (PD(max) = IRMS² × RDS(on)). Forced air cooling is mandatory if PD > 10W.
EMI suppression starts with a Pi-filter (2× 10 µF + 1× 100 µH) on the DC input. Add ferrite beads (BLM21PG221SN1) on all high-speed signal lines (PWM, encoder, comms). Route traces for current loops >2 mm wide, keeping high-current paths <10 cm to reduce inductance. Shield control signals with a ground plane beneath them.
Fault Protection Priorities

- Overcurrent: Trip at 1.2× nominal current using a hysteresis comparator (LM393) with a 1 µs response time.
- Undervoltage: Monitor the bus with a window comparator (TLV3012), cutting power if Vbus drops <80% of nominal.
- Overtemperature: Deploy a thermistor (10k NTC) on the heatsink, shutting down at >85°C via the MCU’s analog watchdog.
- Short-circuit: Use PWM blanking time (1–2 µs) combined with desaturation detection on the gate drivers to block faulty phases.
Firmware Critical Paths

Implement PWM generation via center-aligned mode with a switching frequency of 16–32 kHz to balance switching losses and torque ripple. Use space vector modulation (SVM) for FOC, calculating the voltage vector via Clark/Park transforms with >10-bit precision. Calibrate the ADC offsets at startup–disconnect the motor and average 100 samples to correct sensor inaccuracies. For sensorless operation, employ a phase-locked loop (PLL) on the back-EMF signal, with a bandwidth of 50–200 Hz to track rotor position.
Step-by-Step Winding Connection for a Three-Phase Brushless Drive
Identify the six stator terminals marked U, V, W and their counterparts U′, V′, W′–these denote the start and end of each winding set. Use a multimeter in resistance mode to verify continuity between U-U′, V-V′, and W-W′; readings should match (±10% tolerance). Connect U′ to V, V′ to W, and W′ to U to form a delta configuration, reducing current draw by 1.73× compared to star for equivalent torque. For high-speed applications (above 5,000 RPM), reverse this: link U to V′, V to W′, and W to U′ to avoid phase lag.
Solder 18–22 AWG wires directly to the terminals, ensuring strain relief with heat-shrink tubing or silicone sealant to prevent vibration-induced breaks. Route leads through the motor’s cable gland to a 3×PWM driver module (e.g., DRV8301 or L6234), aligning the A/B/C inputs with U/V/W outputs. Power the module with a 12–48V DC supply, matching the motor’s voltage rating; a 1000μF electrolytic capacitor across the supply terminals filters ripple currents exceeding 0.5A. Ground the driver’s logic side (3.3V–5V) to the motor’s chassis via a 1kΩ resistor to suppress EMI.
Test rotation using a 50% duty-cycle PWM signal (5kHz–20kHz) applied sequentially to the A/B/C channels. Spin direction reverses by swapping any two winding connections–e.g., swap U and V to flip polarity. For closed-loop control, attach Hall sensors (120° spacing) to the driver’s feedback pins; calibrate thresholds at 1.8V (high) and 0.4V (low) using a logic analyzer. If cogging exceeds 5% of rated torque, increase PWM frequency by 2kHz increments until smooth.