14.3. Touch screen control of BLDC¶
14.3.1. Overview¶
bldc_littlevgl_foc control of DC brushless motor by operating the touch screen.
Use the FOC control algorithm
Use the littlevgl motor drive library
Touch screen operation to control motor position and speed
Real-time display of motor speed and position
14.3.2. Configurations¶
This program uses the BLM57050-1000 brushless motor of “Leisai Intelligence”, please refer to the Leisai Intelligence website for the specific parameters of the motor.
Board settings refer to the development board documentation PWM_PIN related content
Click HPM6750EVKMINI-TO-MOTOR Extension Board section and configure, list of supported development boards:
hpm6750evkmini
Click DRV-LV50A-MP1907 Motor Driver Board section and configure, list of supported development boards:
hpm6750evk
hpm6360evk
14.3.3. Code Options¶
Add
sdk_compile_options("-mabi=ilp32f")
to the project’s CMakeLists.txt to get a higher performance
Note
This code does not support any compilation optimization, please turn off compilation optimization
14.3.4. Running the demo¶
After the initialization operation, the screen will display the interface, click on the screen for speed and position control, and the screen will show the speed and position information.
Warning
After the motor is powered on, it will first perform the “alignment” action. If the motor is disturbed at this time, it will produce a jitter.
Pay attention to the current size, when abnormalities occur, please cut off the power at any time