Getting Started with Kinetis Motor Suite

Created by Derek Lehmann, last modified on Jul 24, 2017

Introduction

NXP has developed Kinetis Motor Suite, a tool developed to help embedded and software engineers and developers to work in applications involving motors, without the need to be an expert on motor control. KMS is a GUI environment that allows for quick and easy changes to motor parameters and motion sequences. No motor application or coding experience is required, nor is previous usage of KMS, NXP hardware, or NXP software assumed.

Hardware

There are 3 options to getting set up to use KMS. Most commonly used is the Freedom package, but a Tower Board and High Voltage Dev Platform are also available.

FRDM-KV31F-ND – MCU, ARM Cortex M4 Dev Board

image

FRDM-MC-LVPMSM-ND – Low Voltage, 3 Phase Motor Control Shield

image

FRDM-MC-LVMTR-ND – 24V Brushless DC Motor (BLDC), Linix 45ZWN24-40

image

Other Hardware Options

TWR-KV31F120M-ND - Tower MCU

TWR-MC-LV3PH-ND - Tower Motor Control Kit

HVP-KV31F120M-ND - High Voltage MCU

HVP-MC3PH-ND - High Voltage Motor Controller Kit including MCU

Getting Started

NXP’s Getting Started Guide to KMS

The link is to NXP’s getting started guide to KMS with the KV31F and the BLDC. With the option of watching a series of videos or reading through the instructions, it covers the hardware setup for the boards and motor, installation of KMS, initial connection, and setting up velocity control for the motor. The “Getting Started Guide” provided by NXP is already quite good. Below are just additional notes on each section of the guide.

Plug It In! Notes

    • The Heartbeat – RGB LED.
      • Blue/Green Flashing – Normal
      • Red/Purple Flashing – Fault
        • The Motor Control Shield has a 5.5mmx2.1mm power connector for a 24VDC input. The range of this is 18-30VDC. Out of this range will flag a fault. Other faults can include, motor stall, motor overspeed, overcurrent, as well as many other failures.

Get Software

    • Warning – The KV31F comes from the factory with execute-only code dedicated to KMS. This code can be mass erased, although there are protections in place to prevent this. If mass erased, KMS can no longer be connected to the controller.

Velocity Control

    • When going through the motor characterization, take note of when the motor is supposed to be bare shaft or connected to the system. This will help get more accurate motor characteristics. An increase in system inertia (i.e. attaching a wheel) will change how the motor should be controlled and the motor should be retuned for optimal performance.

Features

Motor Tuner

Motor Tuner guides the user through the fundamental steps for getting a motor up and running.

Motor Manager

Motor Manager provides a superset of Motor Tuner capabilities, offering greater configuration options. It allows you to change more parameters to get your motor operation specifically set for your application.

Real Time Debugging

A built in Software Oscilloscope allows you to visualize and save data for internal variables and enables the application engineer to validate and compare configurations in order to optimize the application.

Motion Sequence Builder

After identifying and tuning the motor, use Motion Sequence Builder to generate code for the application’s motion sequence from a graphical environment.

Active Disturbance Rejection Control (ADRC)

KMS takes advantage of the Active Disturbance Rejection Control (ADRC) control method. Rather than having multiple tuning parameters as with a PI or PID, ADRC has only one tuning parameter. Along with easier, single parameter tuning, the ADRC control system provides tighter responses, with less overshoot and lag than a PI controller. Another advantage of ADRC, is that it works well throughout the variable ranges of speeds and loads your motor could operate at, unlike a PI controller which can only be tuned optimally for one speed and load.

KMS and Kinetis Design Studio

At the time of writing this article, KMS is only designed to work with Kinetis Design Studio (KDS). The best way to create your own application is to first, go through the Kinetis Motor Suite motor tuning setup and tune the motor. Then, navigate to the directory you saved the project in. Import the SDK (software development kit) into KDS. You can edit and build your application around the motor control program. In order to keep using the KMS to tune the motor as you change your application, you must program the board using the “load application image” tool in KMS. This allows you to continue to easily change acceleration, jerk, inertia, and other motor settings all in the KMS GUI.

One thing to keep in mind while editing the KMS SDK; it features a Real Time Operating System (RTOS). There are many classes and tasks already set up that may be useful to take advantage of. Take care to avoid blocking functions or disabling interrupts. This will affect the operation of the motor control system.

Alternative Guides and Additional Documents

KMS User Guide - KMSUG.pdf (4.9 MB) - A Comprehensive, Downloadable KMS User Manual Provided by NXP

DigiKey’s Getting Started Guide to KMS - Another Getting Started Guide by DigiKey

Adapting KMS for Custom Hardware - Helps you do use KMS on your own project

Kinetis Motor Suite Lab Guide - Additional tips and tools to help you become more familiar with KMS

Comments/Questions

For questions or feedback about information on this or any other page, please go to the TechForum: TechForum