188 views|1 replies

3082

Posts

4

Resources
The OP

[Year-End Refresher] Driving a ZD2808 Motor Using STM32G474 and MCSDK Library [Copy link]

This post was last edited by bigbat on 2026-4-13 16:52

I. Project Introduction

This project implements a stable operation of a ZD2808 brushless DC motor (BLDC) based on the STM32G474 series microcontroller and ST's official motor control software development kit (MCSDK). Using the MCSDK library integration tool MotorControl Workbench_6.4.2, a FOC (Field Oriented Control) driver is generated, which can control the ZD2808 brushless DC motor to achieve PWM speed regulation and direction control, and has overcurrent and overheat protection functions.

Use Motor Pilot_6.4.2 software to monitor and control the setting of motor operating parameters.

II. Hardware Configuration and Connection

  • Main control development board: NUCLEO-G474RE development board

  • Motor: ZD2808 brushless DC motor, rated voltage 11.1V-14.8V

  • Driver module: X-NUCLEO-IHM16M1 development board

  • Auxiliary tools: VSCode (development environment), ST MC Workbench (MCSDK configuration tool), ST-LINK debugger

  • Power supply: 12V 6.0A DC power supply

III. Software and Parameter Configuration

1. Required software

Development tools: VSCode, STM32 plugin, CMake, etc.

Code generation tool: STM32CubeMX

Motor tools: MotorControl Workbench_6.4.2, Motor Pilot_6.4.2, which are included with MCSDK.

2. Development Environment and Configuration

The VSCode STM plugin and STM32CubeMX need to be verified to be able to complete the development of the STM32G474 chip.

Open MC Workbench 6.4.2 and create a new project.

Select "Circuit Board"

Specify the X-NUCLEO-IHM16M1 development board.

Select NUCLEO-G474RE development board

After completion, select the motor settings.

Normally, there is no option for the ZD2808 motor; you need to import the ZD2808 motor parameter table.

The motor parameter table for ZD2808 was obtained using Motor Pilot_6.4.2 software.

Select ZD2808 motor parameters

After completing all options, the motor "Go to Summary" is now active.

View the summary page. Don't rush to click "Create". You need to drive the STM32CubeMX software, which exists as a background service system.

Return to the MC software and save the file ZD2808.

Click "Generate Project Code"

A pin conflict has occurred; the "Bus Voltage Detection Pin" needs to be adjusted.

Adjust the ADC pin PB14 to ADC1_IN1(PA0).

This pin configuration was found in the X-NUCLEO-IHM16M1 development board manual.

Return to the main configuration page. Check the configuration.

Use buttons to control the motor start and stop, and use a serial port to control parameters such as motor speed.

Generator.

IV. Operation and Testing

Open the program project in VS Code.

Compile and run the project

Connecting software: Motor Pilot_6.4.2

VID20260413163437

Project files MCSDK.zip (18.86 MB, downloads: 0)

Latest reply

I've learned something.   Details Published on 2026-4-21 12:09

6710

Posts

4

Resources
2

I've learned something.


Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Robot
development
community

Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list