Skip to content

ajitbasarur/STM32-Motor-Control-Interface-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ST Motor Control Interface Application

Frame Communication Protocol Library + Application

STM32 provides off-the-shelf motor control libraries for BLDC and PMSM motors. The motor control libraries can be generated using Motor Control Software Development Kit (MCSDK). For on-board control, motor control interface is available. To control the motor using an external microprocessor or host PC, there exists a frame communication protocol.

In frame communication protocol, STM32 or Nucleo-board acts as a slave and an external host PC acts as master. The frame communication protocol is independent of the underlying hardware. Generally, serial port over USB is used as a base hardware interface for the frame communication protocol.

In this code, a frame communication protocol is implemented on host PC side that acts as a master. The underlying operating system is assumed to linux. The goal is to control the Nucelo boards over Rasp Pi.

More details about the communication protocol can be found in the Documentation folder of this repository.

A reference master control code based on the frame communication protocol is implemented in both C++ and Python programming languages. Developers can either use C++ environment or Python environment.


To compile and execute C++ code:

  1. cd source_dir
  2. cd Code/C++
  3. g++ -o test_motor_interface.o *.cpp *.h

To execute C++ code
sudo ./test_motor_interface.o help


To test in Python environment

Python environment does not need any compilation. But it requires PySerial interface. Install it before the first use.


Testing environment

  1. Nucelo-F746ZG + IHM08M1 motor controller board is used.
  2. A standard BLDC motor with an external magnetic resolver.
  3. Motor Control Workbech 5.4.4. is used for motor and board configuration.
  4. Ubuntu 18.04 LTS is used as a host PC.
  5. Nucelo-F746ZG is connected to the host PC using USB port.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published