Previous posts

Post 1 - Introduction

Post 2 - Installing OpenCV - Prerequisites

Post 3 - Installing OpenCV

Post 4 - Installing Pygaze

Post 5 - Installing eye tracker

Post 6 - SPI communication

Post 7 - SPI communication in Python

EyeLiner - Post 8 - Getting started with Kinetis

EyeLiner - Post 9 - Mechanical design

EyeLiner - Post 10 - Mechanical design: the plotter

EyePrints - Post 11 - Eye tracker software

 

 

This post will explain how to create the KDS project that controls the two axis that move the plotter on the drawing area

Hardware setup

The hardware setup is not complex at all. The only missing pieve of information was how to connect the motor to the connector on the LVPMSM board. The only reference was the picture on the NXP site, so I connected the motor as shown in picture and fortunately it works. Pay attention to connect the thicker wires, since there are other green, blue and white wires for the sensor (they are thinner)

 

IMG_20160603_170619.jpg

Project setup

First of all, I downloaded and installed the Kinetis Motor Suite application. This is a tool that automatically identifies the optimal control parameters for the motor. This tools drives the motor at different speed and acceleration, creates a mathematical model of the motor and the connected components (like, for example, the inertia of the system) and makes a project for the Kinetis Design Studio that can be built and executed on the Freedom board

 

NOTE: The Kinetis Motor Suite only works with Kinetis Design Studio 3.0.0 or 3.1.0, not the latest 3.2.0

 

The Kinetis Motor suite starts with a wizard where you are asked to select

  • The product family (the only option is KV3x)
  • The development platform (Freedom, High voltage or Tower): I chose Freedom
  • The control type (Sensored position, Sensorless velocity or Sensored velocity): I chose Sensorless velocity
  • Motor type (the only option is PMSM)
  • Development environment (IAR Embedded workbench or Kinteis Design Studio): I Chose Kinetis Design Studio

When the wizard is completed, to tool starts the autotuning process. At the end of this process, a m1_pmsm_appconfig.h is created. This files contains the most suitable configuration for the motor under test

This is the full video of the motor parameters identification procedure