Design of STM32-based Hub Motor Controller
SHI,Xinjing ZHANG,Jianxing Li,Li LIU,Yongjie CUI
DOI: https://doi.org/10.3166/ejee.19.59-73
2017-01-01
European Journal of Electrical Engineering
Abstract:ABSTRACT. This paper aims to develop a new control architecture of wheeled mobile robot that supports the start-up and stop of robot driven by dual hub motors, the forward and reverse rotation of hub motors, and the coordinated control of two wheels in motion. Inspired by three-phase power supply, Hall signal detection, and square wave driving mode, the hub motor control system was made up of a power circuit, a three-phase full bridge inverter circuit, a Hall signal detection circuit, a peripheral circuit of STM32 single chip microcomputer, communication circuits, a current detection circuit, an over-current detection circuit, a key input circuit, and a printed circuit board (PCB). With the aid of Keil software, the following programs were developed for the hub motor control system, namely, the keypad detection program, the organic light-emitting diode (OLED) module driver, speed detection program, proportional–integral–derivative (PID) support program, motor startup program, motor commutation program, motor speed PID control program and motor stop program. This research successfully optimizes the vehicle control architecture and simplifies the control logic, allowing the vehicle controller to send simple instructions and achieve the basic motion control of the robot body.