25.1. BLDC BLOCK

25.1.1. Overview

Bldc_block project demonstrates speed control of the BLDC. - Control by trapezoidal wave algorithm - Support both HALL sensor and QEI encoder for position detection - Use PID algorithm for speed closed-loop control - Support forward and reverse rotation control

25.1.2. Configurations

  • This program uses the BLM57050-1000 brushless motor of “Leisai Intelligence”, refer to the Leisai Intelligence website for the specific parameters of the motor.

  • Board settings refer to the development board documentation Motor Pin related content

    • SOCs without the HALL peripheral need to connect the HALL signal from the motor board to the QEI pin on the motor interface of the development board

    • Ensure PWM frequency is set to 20kHz

    • Ensure motor pole pairs is 2

25.1.3. Running the Demo

The motor runs at a speed of 20r/s. The following data can be configured by serial console:

speed float, range +40~+5 -40~-5 0, unit r/s - Positive value for forward rotation - Negative value for reverse rotation - 0 for stop

The serial console message is as follows:

Speed mode, motor run, speed is: 20.000000.
Input speed:

Speed mode, motor run, speed is: 10.500000.
Input speed:

Warning

Pay attention to the current size, when abnormalities occur, please cut off the power at any time