ST eMotion User Manual

November 2006 Rev 1 1/29
UM0289
User manual
eMotion: a motion control kit based on ST10F276
Introduction
This user manual describes the features of the eMotion Kit, and explains how use the kit to perform generic speed control of DC and BLDC motors.
Key features
GUI software (Windows XP OS-compatible)
Control board MDK-ST10 (ST10F276 core, 16-bit DSP @ 64 MHz)
Shielded interface board (for encoder feedback)
powerSPIN boards (L6205 / L6235 eval)
Configurable PID closed speed loop for up three motors DC or BLDC
RS232 communication
www.st.com
Contents UM0289
2/29
Contents
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 MDK-ST10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 PowerSPIN boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 L6205 Eval board (DC Motor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.2 L6235 Eval board (BLDC Motor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Feedback board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 PC software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1 eMotion GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1.1 EVAL 6235 window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1.2 EVAL 6205 window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.3 Log window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 ST10 firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1 Communication protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Control algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 Using eMotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1 Evaluate eMotion kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1.1 Installing eMotion GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1.2 Board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1.3 Control operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.1 Hardware issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Appendix A Bibliography. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
UM0289 Overview
3/29
1 Overview
1.1 Getting started
eMotion is a motion control kit able to manage up to 3 motors (DC or BLDC) simultaneously, it can be used as starting point for the evaluation of control algorithms, motors and drivers.
The complete kit is composed of:
Windows GUI (XP-compatible): a Multi-Windows software for managing, through a
serial connection, the control of up three motors.
MDK-ST10 board: control board based on microcontroller ST10F276 and three
connectors compatible with a powerSPIN board (eval 62xx)
Interface board: a board with two shielded connectors, to be stacked into the sockets of
MDK-ST10 to allow motor feedback of encoder signals.
powerSPIN boards: the eMotion kit can manage up to three motor driver boards based
on L6205 (DMOS dual full bridge motor driver) and L6235 (DMOS fully integrated three-phase motor driver) chips, for DC and BLDC motors respectively.
Firmware for open/closed loop operation: a complete source library is developed to
manage the control of DC and BLDC motors in open loop mode (PWM and driver settings) and closed loop mode (speed regulation with encoder feedback) using 62xx eval boards.
Protocol communication: a complete frame-based protocol is developed to allow the
exchange of data with GUI via standard RS232 channel.
Figure 2. eMotion kit block diagram
It is possible via the GUI to interact with the ST10F276 control board (MDK-ST10) and generate open loop signals for up three DC or BLDC motors. The PWM frequency (17-30 kHz) and duty cycle (0-100%) can be managed together with driver signals such as enable/disable, brake/unbrake (BLDC) and forward/reverse (DC).
The closed loop operation can be performed in terms of motor speed with encoder feedback.
A complete PID (Proportional, Integrative, And Derivative) control algorithm is implemented.
The user can configure:
the value of PID terms (from 0.01 to 100)
the speed (from 1 to 3000 rpm)
the control loop time (from 1 to 52 ms)
the number of encoder pulses per revolution (1 to 65536)
PC + GUI
Board Power
Control
board MDK
ST10
Feedback
board
(shielded)
PowerSPIN
boards
Encoder
signals
Encoder
signals
Power
signals
PWM/ Driver
BLDC or
DC
motors
Driver Powe r
RS232
Serial
Protocol
Overview UM0289
4/29
Encoder feedback signals are directly managed by the ST10F276 through its dedicated peripherals.
In order to guarantee an optimum quality of encoder waveforms, a special adapter is included to shield the signals and to avoid interference (refer to Section 2.3 on page 9 for further information).
UM0289 Hardware
5/29
2 Hardware
2.1 MDK-ST10
(Refer to the MDK-ST10 User manual (UM0288) for more detailed information)
The core of the eMotion Kit is the control board which is based on the ST10F276 microcontroller, in which all the driver board management routines are implemented.
Board key features:
ST10F276 core (16-bit with DSP @ 64 MHz, 832 KB Flash,68 KB RAM)
RS232
RS485
2 CAN
I
2
C (3.3V and 5V)
MC Connector
3 powerSPIN connectors
VN808 board / GP connector
All pin outs available
The board design allows the user to develop a high-end motion control system based on this 16-bit microcontroller. The features of this powerful device allow the integration of complex routines to create advanced motion control algorithms.
Referring on Figure 2, the eMotion kit uses the connectors PowerSpin_1, 2, 3 as indicated on the silkscreen of the board with the text "PractiSpin 1", "PractiSpin 2", "PractiSpin 3".
To allow the compatibility with powerSPIN evaluation boards, for each board connector is inserted a jumper (VCC PRACTI X, located close to the connector) that, if closed, provides a 5V power supply to the respective board.
Communication with a PC and GUI system is achieved via an RS232 channel through a standard DB9 female connector and using a standard RS232 cable.
Hardware UM0289
6/29
Figure 3. MDK-ST10 board
Note: Refer also to Section 5.1.2: Board configuration on page 23
The default configuration of the board (once programmed) is:
EA jumper: 1 (in order to obtain the fetch of the code from internal flash of
microcontroller)
SW3 switches: all OFF
SW5 switches:
Switch 2 (CSEL 0): ON
Switch 7 (CLK 1): ON
Other switches: OFF
Selector J206: "PRACTI" position (in order to connect micro lines to powerSPIN
connectors)
These configurations impose a 60 MHz core clock frequency and leave port 6 of microcontroller free for I/0s (needed because P6.0=CS0 is used to manage powerSPIN boards)
To better understand how powerSPIN boards are managed by control board, Ta bl e 1 provides a description of the powerSPIN connectors:
MC_CONNECTOR
POWERSPIN_2
ST10F276
VN808 / GP
POWERSPIN_3
RS232
RS485
I
2
C
CAN2
CAN1
POWERSPIN_1
UM0289 Hardware
7/29
Table 1. PractiSPIN connectors description
2.2 PowerSPIN boards
eMotion kit can manage up to three boards based on monolithic driver of L62xx family. This first release of system works with DC and BLDC drivers so with boards L6205 and L6235 but also with similar boards for the same motors.
2.2.1 L6205 Eval board (DC Motor)
(refer to application note AN1762 and the L620x datasheet for more details)
PIN No. PractiSPIN 1 PractiSPIN 2 PractiSPIN 3 Functionality
1
5V via Jumper J207 (VCC PRACTI 1)
5V via Jumper J208 (VCC PRACTI 2)
5V via Jumper J209 (VCC PRACTI 3)
-
2 P2_10 P2_11 P2_12 Interrupt
3 P5_5 P5_6 P5_7 ADC
4 P0L.0 P0L.1 P0L.2 GPIO
5, 6 NC NC NC -
7 P1L.0 P1L.1 P1L.2 ADC
8 P0L.3 P0L.4 P0L.5 GPIO
9 NC NC NC -
10 P0L.6 P0L.7 P6.3 GPIO
11, 13 NC NC NC -
14 P6.0 P6.1 P6.2 GPIO
15, 16, 17, 18, 19 NC NC NC -
20 P2.0 P2.1 P2.2 GPIO / Capcom
21 NC NC NC -
22 P8.0 P8.1 P8.2 PWM / GPIO
23 GND GND GND -
24, 25 NC NC NC -
26 P7.4 P7.5 P7.6 GPIO / Capcom
27 NC NC NC -
28 P7.0 P7.1 P7.2 PWM / GPIO
29, 30 NC NC NC -
31 P2.13 P2.14 P2.15 GPIO / Capcom
32 P2.3 P2.4 P2.5 GPIO / Capcom
33 P1H.4 P1H.5 P1H.6 GPIO / Capcom
34 NC NC NC -
Hardware UM0289
8/29
eMotion kit can manage the evaluation board based on DMOS full bridge ICs (L6205,L6206,L6207).
Figure 4. Eval 6205N board
Refer to Section 5.1.2: Board configuration on page 23 for a description of the board configuration using eMotion.
2.2.2 L6235 Eval board (BLDC Motor)
(refer to application note AN1625 and the L6235 datasheet for more details)
eMotion kit can manage the evaluation board based on L6235 three phase brushless DC motor.
Figure 5. Eval 6235 board
Refer to Section 5.1.2: Board configuration on page 23 for a description of the board configuration using eMotion.
UM0289 Hardware
9/29
2.3 Feedback board
In order to interface the control system with encoder signals coming from motors, a special board, with two 20 pins connectors in the top side, is used (Feedback board).
This is a stackable board and has to be inserted using the four 36-pin connectors around the microcontroller in the MDK-ST10 board. The insertion orientation is indicated with a dot in a corner of the board (corresponding to pin 1 of the ST10 MCU)
The two connectors (Conn1 J3, Conn2 J4), used to allow the encoder feedback, are shielded with the pair of pins connected to GND.
The dimensions of this board are about 6.5 x 6.5 cm. The following tables show the pin assignments for each connector.
Table 2. Conn1 Feedback board
Table 3. Conn2 Feedback board
Conn.1 MDK-ST10 Pin Functionality
1 P3.7 T2IN (encoder_1 A)
2GND-
3 P5.15 T2EUD (encoder_1 B)
4GND-
5 P3.6 T3IN (encoder_2 A)
6GND-
7 P3.4 T3EUD (encoder_2 B)
8GND-
9 P3.5 T4IN (encoder_3 A)
10 GND -
11 P5.14 T4EUD (encoder_3 B)
12 GND -
13 P2.6 CC16 (capture / GPIO)
14 GND -
15 P1L.3 GPIO / ADC In
16 GND -
17 P1L.4 GPIO / ADC In
18 GND -
19 +5V -
20 GND -
Conn.2 MDK-ST10 Pin Functionality
1 P1L.5 GPIO/ ADC In
2GND-
3 P2.7 CC7 (capture / GPIO)
Loading...
+ 20 hidden pages