How to control DC motor and AB Encoder using NUCLEO-H743ZI2 board.
-
Hardware: NUCLEO-H743ZI2 board, DC motor with AB Encoder, Transistor(NPN 2N3904L x 4).
-
Software: STM32CubeMX and Keil uVision5.
Item | Paramter |
---|---|
System Clock | 72 MHz |
Prescaler | 72 - 1 |
Counter Period | 100 - 1. |
- Encoder counter
Address | Address 0 | Address 1 |
---|---|---|
data type | UINT8 | UINT8 |
data | encoder cnt hightbyte | encoder cnt lowbyte |
- Duty
Address | Address 0 | Address 1 | Address 2 |
---|---|---|---|
data type | UINT8 | UINT8 | UINT8 |
data | direction(0 or 1) | duty hightbyte (0 - 100) | duty lowbyte (0 - 99) * 0.01 |
[1]. PWM (Pulse Width Mod) in STM32. https://controllerstech.com/pwm-in-stm32/
[2]. Incremental ENCODER and STM32. https://controllerstech.com/incremental-encoder-with-stm32/
[3]. STM32H743ZI MCU. https://www.st.com/en/evaluation-tools/nucleo-h743zi.html
This repository is for your reference only. copying, patent application, academic journals are strictly prohibited.
Copyright © 2021 ZM Robotics Software Laboratory.