SLAAE95A March   2023  – September 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3106 , MSPM0G3107 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507 , MSPM0L1105 , MSPM0L1106 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346

 

  1.   1
  2.   Using MSPM0 MCUs to Design Trapezoidal-Based BLDC Motor Controllers

Using MSPM0 MCUs to Design Trapezoidal-Based BLDC Motor Controllers

Brushless-DC (BLDC) motors are used in a wide variety of products such as power tools, robotics, appliances, cordless vacuums, RC toys, motor modules, printers, and more. For these applications, brushless DC motors are considered over other motor types due to high-efficiency operation, low noise and long operational lifetimes. The trapezoidal (TRAP) algorithm, a simple software loop, is widely used in BLDC control designs due to the capability to develop large torque and a high maximum speed. MSPM0 MCUs, using TRAP, can fill this role with board portfolio, abundant analog resources, and high-performance features.

GUID-20230223-SS0I-FR4Z-KK8J-5BTVNHBX27FS-low.jpg
GUID-20230223-SS0I-XJ7Z-RPMP-ZGCPXXFHFMJP-low.jpg
GUID-20230223-SS0I-C6DR-CNJB-KS4HG54GXBXZ-low.jpg
GUID-20230223-SS0I-1Q39-HHQZ-B9WRPNXKPSCL-low.jpg
Home appliancesPower toolsIndustrial motorsPersonal transport

What are BLDC and Trapezoidal Control?

BLDC is a brushless motor that uses the force generated by the inconsistent magnetic fields of the stator and rotor to drive the motor. The rotor of this motor is a permanent magnet, and the stator is a multiple machine winding composed of coils.

Trapezoidal control means controlling the direction of the magnetic field according to the position of the rotor by changing the U, V, and W current direction. Hall encoders (or other sensors) provides the rotor position. A sensorless version uses the Back-EMF sensor to estimate the rotor position, typically using either 120° 6-step control logic or 150° 12-step control logic.

Across BLDC related applications, users must accurately control the motor speed, torque, and other variables to meet the requirements of the application. As a result, the main requirements for a BLDC application are:

Sensored Trapezoidal

For sensored feedback, Hall-effect sensors or other sensors provides the immediate rotor position by detecting magnetic fields of the motor and translating them into logic-level signals. The current state of the motor (determined by the Hall input signals for phase U, V, or W) determines the PWM signal pattern required to spin the motor to the next state. The states of the motor phases are driven high (+), low (-), or undriven (Z) in a specific pattern to commutate the motor.

GUID-20230118-SS0I-XSGD-TDZN-MTV8S3QJ2LXS-low.pngFigure 1 U, V, W Change Step Timing for Trapezoidal, 6 Step, 120°

Sensorless Trapezoidal

Sensorless trapezoidal control uses the BEMF of the motor to estimate the rotor position, typically when the "Z" periods cross a preset threshold, which determines the next motor state. The preset threshold is often known as the BEMF threshold and can be used in one of two ways:

  1. Set as a comparator input from an integrated reference DAC, and compared to the BEMF voltage on the undriven winding.
  2. Set in software and compared to the phase voltages of the motor sampled as ADC inputs (using resistor dividers to scale down the phase voltages).
GUID-20230209-SS0I-KMRX-NHPR-1GQNKXMMTZPX-low.svgFigure 2 BEMF Detection using Comparator on Undriven Winding

Across BLDC-related applications, users must accurately control the motor speed, torque, and other variables to meet the requirements of the application. As a result, the main requirements for a BLDC application are:

Hardware:

  • Microcontroller (MCU): Motor driver controller, which controls analog data acquisition, run control algorithms, monitors the motor status, and communicates with other products.
  • Predriver: Pre-driver for power stage
  • Power stage: Six N-type MOSFETs
  • Analog front end: monitor motor voltage, current, speed, and more for closed loop speed and torque control or current regulation.

Software:

  • Application: Task management and scheduling
  • Algorithm: Calculates the drive signal output of the motor in real-time according to the feedback of the motor and the user input signal

The functions can be implemented using TI devices for a wide range of 3-phase BLDC motor voltages and powers.

Why is MSPM0 considered for BLDC and trapezoidal control?

TI’s scalable M0+ MSPM0Gxx high-performance MCUs with advanced on-chip motor control peripherals provide a design for a variety of motor control applications. The portfolio covers from 32 KB to 128 KB of flash with scalable analog integration, motor control peripherals, and CAN-FD.

GUID-20230118-SS0I-ZKXM-JQHW-NQHZJNRLMPXL-low.svg
  • Up to 80-MHz M0+ CPU – Reduces process time for trapezoidal algorithms and sensing signals
  • Integrated math accelerator
    • 32-bit hardware divider (eight cycles) for fixed point and IQ format numbers
    • Square root operation in 21 cycles
    • 24-bit trigonometric calculations (sin, cos, atan) in 29 cycles
  • Two independent 4-Msps 12-bit ADC modules (up to 16 channels)
    • Up to 11 ENOB with improved SNR.
    • Up to 4-Msps ADC boost motor phase current sensing within 250 ns.
  • Two zero-drift chopper op-amps – Accurately amplifies the bus current.
  • Three high-speed comparators – Detects Back-EMF and provide stable step signal (sensorless).
  • Advanced motor control timers – Flexible 6 PWM control with deadband.
  • Robust IO design with glitch filter – Provides a reliable system with motor noise.
  • Comprehensive communication interfaces – Includes UART, I2C, SMBus, SPI, and CAN-FD to meet all the communication requirements with the motor control system.
  • BLDC trap algorithm library – Spin a BLDC motor with Hall-sensored trap control in less than 10 minutes.
  • Scalable MCU portfolio – Pin-to-pin compatible devices across a wide range of flash memory options.
  • Small footprint package – Options for space constrained designs.
  • Wide operating temperature range (-40°C to +125°C)
  • Automotive-Q100 qualified and functional safety options (up to ASIL-B) for system stability and reliability

What Can MSPM0 Do in BLDC and Trapezoidal Control?

In a BLDC application, the MSPM0 monitors the motor status and runs the trapezoidal control algorithm with a 3-phase gate driver or motor driver. Additionally, the MCU or driver can integrate many features to optimize the design and reduce overall form factor. MCU selection for BLDC motor control can vary based on low-power or high-performance requirements, and driver selection can vary based on analog integration and motor drive specifications. To account for these different system designs, the MSPM0 portfolio offers a variety of MCUs optimized for low-power or high-compute performance with optional analog integration as listed in Table 1.

Table 1 MSPM0 Selection Based on MCU Performance and Motor Driver Analog Topology
Low PowerHigh Compute Performance
Motor driver with integrated current sense amplifiersMSPM0L110x (32 MHz)MSPM0Gxxxx (80 MHz)
Motor driver without current sense amplifiersMSPM0L130x (32 MHz with analog)MSPM0Gx50x (80 MHz with analog)

For low-power BLDC sensored trap applications, MSPM0Lxxx devices provide as small as 1 µA of standby current while providing sufficient performance for sensored and sensorless trapezoidal control. MSPM0Lxxx devices are available in small packages (as small as SOT-16) and can be powered from a 3.3-V LDO or Buck integrated in the motor driver to reduce system form factor and BOM cost. This topology is designed for low-power, mid-performance BLDC trap applications such as BLDC motor modules, robotics, small appliances, RC toys, and HVAC motors.

For high-compute BLDC sensored trap applications, MSPM0Gxxx devices provide 80 MHz of CPU performance with a hardware math accelerator for data logging and processing while providing sufficient performance for sensored and sensorless trapezoidal control. MSPM0Gxxx devices come in small packages (as small as VSSOP-20), provide optional CAN-FD interface, and can be powered from a 3.3-V LDO or Buck integrated in the motor driver to reduce system form factor and BOM cost. This topology is designed for high-performance BLDC sensored trap applications such as power tools, garden tools, cordless vacuum cleaners, medical equipment, drones, e-mobility, and servo drives.

The MSPM0 portfolio offers optional analog integration which can be used for calculating motor phase currents and detecting low side overcurrent, and pairs well with basic motor drivers without integrated current sense amplifiers (CSAs). Conversely, MSPM0 devices without analog integration pair well with integrated motor drivers that include up to three low-side CSAs for phase current feedback. Figure 3 and Figure 4 show the supported topologies for Hall-sensored and sensorless trapezoidal control using MSPM0.

GUID-20230222-SS0I-84W5-V0HH-CNGPRRFNBMKR-low.svgFigure 3 MSPM0 Block Diagram for Hall-Sensored Trapezoidal Control
GUID-20230223-SS0I-VGJG-BHCR-NHRMWDBPSFQZ-low.svgFigure 4 MSPM0 Block Diagram for Sensorless Trapezoidal Control

Design Details

  • Motor control designs in MSPM0-SDK
  • Timer
    • Generate PWM (TIMx)
      • Configure the cross trigger between TIMG instances to generate six PWMs without deadband insertion
      • Generate six PWMs from TIMA0 with deadband insertion
      • PWM: Complementary PWM signals with adjustable duty cycle
      GUID-20230118-SS0I-GG0B-KHZF-L1DXNKCW98T9-low.svgFigure 5 PWM Sequence for 120° 6-Step TRAP
    • QEI (TIMG)
      • Quadrature encoder interface (QEI) for positioning and movement sensing
      • Hall sensor input mode for hardware speed computation
  • OPA and ADC
    • 6-MHz GBW in standard (STD) mode
    • 4-V/µs slew rate in STD mode
    • 6-µV/°C input offset voltage temperature drift in STD mode
  • GUID-20230209-SS0I-4XZF-372S-4HG3PMXGZGQL-low.svg Figure 6 MSPM0Gx OPA Block Diagram for Current Sensing
  • COMP – High-speed mode
    • The 8-bit DAC inside COMP sets the Back-EMF threshold
    • DAC settling time: 1 µs in static mode
    • COMP response time: 40 ns in high-speed mode
GUID-20230209-SS0I-39LF-PD5V-LSWQBJD7G9CG-low.svg Figure 7 MSPM0 COMP Block Diagram for BEMF Detection

Resources

Order an MSPM0 LaunchPad™ development kit and a DRV83xxEVM today to start evaluating MSPM0 for a motor control system. Jump-start a motor control design with MSPM0 code examples and interactive online training. The follow links show additional resources that are available.