You are on page 1of 75

Practical Design Tips To Optimize Stepper

Motor Designs with ST Digital Motion


Engine Drivers
Jiri Keprda
STMicroelectronics

Webinar Agenda
Introduction
STs digital motion engine drivers

STSpin Family Overview (L6470, L6472, L6480, L6482, Powerstep01)


L6472,L6470
L6480, L6482
Powerstep01

Selecting the right DME for your application

Digital Motion Engine


STSpin Logic Core Basics
Voltage Mode
Advance Current Mode Control (Adaptive Current Mode Control,
Predictive Current Mode Control)
Gate Drivers Setup

Tools available from ST for getting started on your next design

STSPINFamily Evaluation GUI Introduction


Evaluation Boards

Q&A/Wrap-up

STSPINdigital Family Overview


Best-in-class for Stepper Motor Control

Stand-alone
controllers
Monolithic dual
full-bridge drivers

L6480
L6482

L6474
L6470
L6472

Power SiP
(digital controller +
power discrete
MOSFETs)
PowerSTEP01

STSPINdigital -

Applications

Home
automation
ATM, vending
machines
Security
cameras
Industrial
2D\3D
printers
Medical
equpments
Robotics
Healthcare

Portable
Toys

44

Important Messages
Digital Motion Engine features/advantages/benefits
The SPI programmable controller provides a fully digital control of the motion through a speed profile
generation and positioning calculations. It allows operation with either voltage mode driving or advanced
current control fitting different application needs. The digital control core can generate user defined motion
profiles with acceleration, deceleration, speed or a target position easily programmed through a dedicated
register set. All application commands and data registers, including those used to set analog values (i.e.
current protection trip point, deadtime, PWM frequency, etc.) are sent through a standard 5-Mbit/s SPI.
FEATURE:
SPI interface

ADVANTAGE
High level commands (position, speed
profile)

Average current control, smooth current


profile, extremely low current ripple, no
tuning of the decays, the best decay is
Voltage mode control
always guaranteed, Constant switching
frequency, torque ripple and EMI are under
control
Predictive current control Regulates average current vs. the
conventional peak current control
(auto regulation of IAVG)
Automatic selection of the best decay
during motor driving
Adaptive decay
Slow, fast or combination of both
mixed decay
Monolithic and SiP
technology

BENEFIT:

Easy to control
Digital diagnostics
No need of complex subroutines
Smaller MCU can be used

Smooth current transients reduces mechanical


vibrations. Motor movement is accurate, soft and
silent!
Stall detection easily implemented
Best smoothness
Most accurate positioning

Torque ripple reduction


Less vibrations
Soft and silent Motion
Precise positioning

Low additional component count, minimized


Robustness, lower total solution cost
layout, high immunity to noise, low EMI

STSPIN Family Common Features


STMicroelectronics
motor drivers are moving the future

Digital. Accurate. Versatile.


The STSPIN family ICs integrate a complex logic core providing a set
of high level features

Current control/Voltage
control algorithms

Microstepping

Logic

Programmable speed
profile
Comprehensive
command set

Protections

A Full-Digital Interface to MCU

MCU

The fast SPI interface with


daisy-chain capability allows a single
MCU to manage multiple devices
Programmable alarm FLAG open
drain output for interrupt-based FW

MCU

FAIL!

In daisy-chain configuration, FLAG pins of different devices


can be or-wired to save host controller GPIOs

BUSY open drain output allows the


MCU to know when the last
command has been performed

MCU

BUSY

MCU

BUSY

In daisy-chain configuration, BUSY pins of different devices


can be or-wired to save host controller GPIOs

BUSY can be used as SYNC signal


giving a feedback of the step-clock
to the MCU
(programmable # of microsteps)

Diagnostic Register
The devices integrate a diagnostic register collecting the information
about the status of the system

STATUS
Register

Power stage enabled/disabled

Command under execution (BUSY)

Motor status (direction, acc., dec., etc.)

Step-clock mode

Overcurrent

Thermal status

Under voltage (it also indicates the power-up status)

Stall detection, only for L6470/L6480,PowerStep01

SW status

SW input falling edge (limit switch turn-on)

Wrong command received or command which


cannot be executed

Thermal Shutdown

10

Tj
TSD
TWRN

Warning region
The device operates
normally but it is
approaching the thermal
shutdown temperature

Thermal shutdown
The power stage is disabled
and cannot be turned on in
any way.

Safe region
Normal
operation is
restored

STSPIN L6470 and L6472


STMicroelectronics
motor drivers are moving the future

L6470 and L6472 Characteristics


Supply voltage from 8 to 45 V
Power stage
3 Arms
RDS(ON) = 0.28

Integrated Current Sensing


(no external shunt)

Up to 128 microsteps (L6470)


Current control
L6470: Voltage mode driving
L6472: Advanced current control

Sensorless stall detection (L6470)


Digital Motion Engine
Programmable speed profile
High level commands

8-bit 5 MHz SPI interface


(Daisy Chain compatible)

Integrated 16 MHz oscillator


Integrated 5-bit ADC
Integrated 3 V voltage regulator
Over Current, Over Temperature
and Under Voltage protections
HTSSOP and POWERSO
packages

12

Intelligence Integration

13

Before L6470 and L6472


dedicated
MCU

many digital + analog


connections
MCU

system MCU

MCU

dedicated
MCU

many digital + analog


connections
MCU

dedicated
MCU

many digital + analog


connections
MCU

Intelligence Integration

14

with L6470 and L6472


System is greatly simplified
No more dedicated MCU to
perform speed profile and
positioning calculations
Less components
Single MCU can drive more
devices at the same time

SPI

MCU

SPI

SPI

system MCU

SPI

Programmable Overcurrent Protection


Each MOSFET of the power stage is protected by an overcurrent
protection system.
The overcurrent threshold can be programmed from 375 mA to 6 A.
When the current in one of the MOSFET exceeds the threshold the
entire power stage is immediately turned OFF.
The power stage cannot be enabled until a GetStatus command
releases the failure condition.

15

Typical Application

Minimal component count

MCU needs only 1 SPI interface and 2-4 optional GPIOs

L6470\72

16

STSPIN L6480 and L6482


STMicroelectronics
motor drivers are moving the future

L648X characteristics
Supply voltage 7.5V 85V
Dual full-bridge gate drivers
Fully programmable gate driving
Overcurrent protection based on
MOSFET drain-source drop
Up to 128 microsteps (L6480)
Current control

L6480: Voltage mode driving


L6482: Advanced current control

Sensorless stall detection (L6480)


Digital Motion Engine
Programmable speed profile
High level commands

8bit 5Mhz SPI interface


(Daisy Chain compatible)

Integrated 16MHz oscillator


Integrated 5bit ADC
Integrated 15V/7.5V voltage
regulator
Integrated 3.3 V voltage regulator
Over Current, Over Temperature
and Under Voltage protections
HTSSOP and POWERSO
packages

18

Intelligence integration
Before L648X
dedicated
MCU

many digital + analog


connections
MCU

Gate drv.s

+ 8x

system MCU

MCU

dedicated
MCU

many digital + analog


connections
MCU

dedicated
MCU

Gate drv.s

many digital + analog


connections
MCU

+ 8x

Gate drv.s

+ 8x

19

Intelligence integration
with L648X
System is heavily simplified
No more dedicated MCU to
perform speed profile and
positioning calculations
Less components
Single MCU can drive more
devices at the same time

SPI

MCU

SPI

SPI

8x

8x

8x

system MCU

SPI

20

Programmable gate drivers

Gate sink/source
current

Controlled current time


(charging time)

Turn-off current boost


time

Dead time

Blanking time

LESS EMI

LESS POWER

Integrated gate drivers are fully programmable, allowing


L648X to fit a wide variety of MOSFET and adjusting output
slew-rate according to application requirements.

21

Typical application

Minimal component count


MCU needs only 1 SPI interface and 24 optional GPIOs

22

Typical application

Minimal component count


MCU needs only 1 SPI interface and 24 optional GPIOs

23

PowerStep01 System-in-Package
STMicroelectronics
Motor Drivers are moving the future

PowerSTEP01 Power SiP


Squeeze the Power in a compact board

High Power available


in a compact QFN package:
14mm x 11mm x 1mm
Exposed PADs
Thermally efficient
Compact and simplified layout

BetterPerformance

First SiP For Stepper Motor Applications


Stepper motor controller
featuring:
Fully programmable gate
driving
Overcurrent protection
Up to 128 microsteps
Current control

PMOS

PMOS

PMOS

PMOS

Stepper
motor
controller

Voltage mode driving


Advanced current control

Sensorless stall detection


Digital Motion Engine
Programmable speed profile
High level commands

QFN 11 x 14 mm package

8 x power MOSFETs
Maximum current 10 Arms
Rds(ON) = 16 m

PMOS

PMOS

PMOS

PMOS

26

Intelligence Integration

27

before powerSTEP01
dedicated
MCU

many digital + analog


connections
MCU

Gate drv.s

+ 8x

system MCU

MCU

dedicated
MCU

many digital + analog


connections
MCU

dedicated
MCU

Gate drv.s

many digital + analog


connections
MCU

+ 8x

Gate drv.s

+ 8x

Intelligence Integration
with powerSTEP01
System is greatly simplified
No more dedicated MCU to
perform speed profile and
positioning calculations
Less components
Single MCU can drive more
devices at the same time

SPI

MCU

SPI

SPI

system MCU

SPI

28

Suggested Gate Driving Configurations

Slew-rate

Igate

tCC

tDT

tblank

tboost

790 V/s

64 mA

500 ns

125 ns

375 ns

0 ns

980 V/s

96 mA

375 ns

125 ns

500 ns

0 ns

520 V/s

32 mA

875 ns

125 ns

250 ns

0 ns

400 V/s

24 mA

1000 ns

125 ns

250 ns

0 ns

220 V/s

16 mA

1600 ns

125 ns

250 ns

0 ns

114 V/s

8 mA

3125 ns

125 ns

250 ns

0 ns

(VS = 48V)

29

Two Driving Modes More Flexibility


Voltage mode
System applies a sinusoidal
voltage to the motor and phase.
Phase current is not directly
controlled.
It is an open-loop approach.
Extreme smoothness at all
speeds

Current mode
System tries to impose phase
current applying a switching
voltage.
It is a closed-loop approach
Robust to variation of the motor
and application characteristics
Robust to resonances

Precise positioning

30

STSPIN Logic Core Basics


L6470\72, L6480\82
and powerSTEP01

Basic Features

32

The logic core integrated into the L6470\72, L6480\82


and powerSTEP01 ICs provides advanced features for the control of
the stepper motor position:
Programmable speed profile
Absolute and relative positioning
Speed tracking
External limit switch management

19/05/2016

Positioning commands
Name

Description

Notes

Move

Perform the target number of microsteps in the


requested direction.

Only in stop condition.

GoTo

Reach the target absolute position (ABS_POS


register) using the shortest path.

Only when not BUSY.

GoTo_DIR

Reach the target absolute position (ABS_POS


register) running in the requested direction.

Only when not BUSY.

GoHome

Reach the home position (all zeroes) using the


shortest path.

Only when not BUSY.

GoMark

Reach the position stored into the MARK register


using the shortest path.

Only when not BUSY.

19/05/2016

33

Speed tracking and stop commands


Name

Description

Run

Reach the target speed in the requested direction.

SoftStop

Stop the motor in accordance to the programmed


speed profile.

HardStop

Immediately stop the motor (infinite deceleration).

SoftHiZ

Stop the motor in accordance to the programmed


speed profile and then disable the power bridges.

HardHiz

Immediately disable the power bridges.

Notes
Always accepted and
immediately executed
(if present, the previous
command is aborted)
Always accepted and
immediately executed
(if present, the previous
command is aborted)
Always accepted and
immediately executed
(if present, the previous
command is aborted)
Always accepted and
immediately executed
(if present, the previous
command is aborted)
Always accepted and
immediately executed
(if present, the previous
command is aborted)

19/05/2016

34

Speed tracking and stop commands


Run
The Run command makes the motor reach the target speed following
the programmed speed profile boundaries (acceleration and
deceleration).

19/05/2016

35

Speed tracking and stop commands


SoftStop
The SoftStop command makes the motor decelerate down to zero
speed.

HardStop
The HardStop command immediately stops the motor.
Speed

HardStop
SoftStop

Time

19/05/2016

36

Speed tracking and stop commands


SoftHiZ
The SoftHiz command executes a SoftStop and then disables the
power bridges.

HardHiZ
The HardHiZ command executes a HardStop and then disables the
power bridges.

19/05/2016

37

What you can\cannot do


When

You can

Power stage is disabled

Read and write all the registers


Perform any motion command

Read all registers


Write most of the registers except the
critical ones (IC configuration, current
control setup, step mode, electrical
position)
Perform any motion command

Power stage is enabled and the motor is


stopped

Power stage is enabled, the motor is


moving and the BUSY is high (no
command under execution)
Power stage is enabled, the motor is
moving and the BUSY is low (command
under execution)

Read all registers


Write some registers
Perform absolute positioning, speed
tracking and stop commands

Read all registers.


Write some registers
Perform speed tracking and stop
commands

19/05/2016

38

L6470,L6480
Voltage mode driving

Voltage mode basics


Voltage mode is based on the linear model of stepper motors
If a voltage sinewave is applied to a stepper motor phase the
resulting current is sinusoidal too.

40

Voltage mode vs. Current mode


Current mode driving
Abrupt current changes cause strong mechanical vibrations.
Current mode tries to follow even non idealities
(reference quantization and sampling)
Noisy and jerky motion.

Non constant switching freq.


Torque ripple is difficult to control.

Peak current is controlled.


Average current value is
different from target one.
Inaccurate positioning

41

Voltage mode vs. Current mode


Voltage mode driving
Smooth current transient reduces
mechanical vibrations.

Average current is controlled.

Motor movement is soft and silent.

Accurate positioning.

Constant switching freq.


Torque ripple is under control.

42

Voltage mode advantages summary


The main advantages of the voltage mode are:
Extreme smoothness
Precise positioning (control of the average current)
Controlled current ripple
Stall condition is easy to be detected
Main drawbacks are:
Algorithm must be tuned according to motor characteristics
Sensitive to the motor resonances

19/05/2016

43

BEMF Compensation
44

Without BEMF Compensation

Current (torque) decreasing

With BEMF Compensation

Current (torque) constant!

Sensorless stall detection


Using integrated current sensing and the adjustable STALL current
threshold a cheap and easy stall detection can be implemented

Vphase
Normal operation
STALL
threshold

Iphase

BEMF

45

Sensorless stall detection


Using integrated current sensing and the adjustable STALL current
threshold a cheap and easy stall detection can be implemented

Vphase

STALL
threshold

Iphase

BEMF

STALL!
BEMF is null and
current is suddenly
increased

46

Sensorless stall detection limitations


Stall detection performances can be reduced in the
following conditions:
Low speed
(negligible BEMF value)

High speed
(current can be low because the low pass filtering effect of the
inductor)

47

Supply voltage compensation


The voltage sinewaves are generated through a PWM modulation.
As a consequence the actual phase voltage depends on the supply
voltage of the power stage.
VS

VS

Vph
Power
stage

Vph

48

Phase resistances variation comp.


Motor phase resistance increases during
operation causing a phase current reduction and
a torque loss

L6470
PWM
+
H-Bridge

KTHERM

Sinewave
Amplitude

Resistance variation can be compensated by


a programmable KTHERM coefficient
(1 to 1.47)

49

L6472,L6482
Advanced current control

Challenges to perform the right decay


One possible solution is to use a combination of the two decay
modes: mixed decay
IOUT

IREF

In the region where the simple slow


decay could be enough to keep the
current under control there is an extra
ripple.

In other cases the fast part of


the decay helps to keep the
current under control

The best solution is to select the right decay time by time.

51

STSPIN
Advanced current control
Automatic selection of the decay mode
Stable current control in all conditions, in
particular with microstep driving
Slow decay and fast decay balancing
Reduced current ripple
Predictive current control
Average current control

52

Automatic decay adjustment

Auto-adjusted decay
In a PWM current control with fixed OFF time the slow decay is always
the preferred method in order to minimize the current ripple.
In order to discriminate a good control condition (current can be
controlled through the slow decay) from a potentially unstable
condition (fast decay is needed) the tON of each single control
cycle is monitored.
When the control is stable (tON > tON_MIN) the system apply a slow
decay of tOFF.
Target current level

tON

tOFF

54

Tuning parameters of the control algorithm


The advanced control system is based on the following parameters:
Parameter
name

Function

tON_MIN

Target minimum ON time: the control system tries to


force an ON time which is always longer than this value.

tOFF_FAST

Maximum fast decay: define the maximum duration of


a fast decay when it is performed to control the peak
current value.

tOFF

Fixed OFF time: the duration of the OFF time during a


normal control cycle.

tFAST_STEP

Maximum step decay: define the maximum duration of


a fast decay when it is performed to change the current
level to a new reference value.

Tuning parameters of the control algorithm


Lower values

Less frequent use


of the fast decay
Lower ripple
Higher probability of control
fail

Higher values

More frequent use of the fast


decay
Higher ripple
Higher control stability

tOFF

Lower switching frequency


Higher ripple
Higher control stability

Higher ripple
Shorter on-fast sequences
Higher control stability

Shorter on-fast sequences


during falling steps

tON_MIN

Higher switching frequency


Lower ripple
Higher probability of
control fail

Lower ripple
Longer on-fast sequences
Higher probability of
control fail

tOFF_FAST

Longer on-fast sequences


during falling steps

tFAST_STEP

56

Predictive current control

Predictive current control


Peak current
Mean current
tOFF
tSW1

tOFF
tSW2

The peak current control with fixed OFF time has two main cons:
The average current (actual motor position) could be significantly
different from the controlled peak current
The switching frequency can vary significantly
The predictive current algorithm allows to control the average
current and reduces the switching frequency variation.

58

Predictive current control


Summary
An extra on time (tPRED) is added after current threshold crossing.
The duration of the extra on time is equal to the two step average of
the previous on times.
When the system reaches the stability tPRED should be equal to tON.
At every change of current reference the off time is adjusted in order
to keep the switching time almost equal to tSW.

59

STSPIN
Configurable gate driving circuitry
L6480, L6482, powerSTEP01
Technical details

Configurable gate drivers


The controllers of the STSPIN family integrate a gate
driving circuitry which allows driving a wide range of power
MOSFETs.
The following parameters can be set:
Gate sink/source current
Controlled current time (charging time)
Turn-off current boost time
Dead time
Blanking time

19/05/2016

61

Gate drivers setup


The gate drivers should be set in order to obtain a gate charge greater
than the total gate charge required by the target MOSFET when it is
turned-on at VCC (Vgs = VCC).

The total gate charge Qtot is a parameter which can be found in the
datasheet of the MOSFET.

19/05/2016

62

Gate drivers setup


The same gate charge value can be obtained using different
combination of tCC and Igate.
The proper pair of parameters depends on the application
requirements.
High gate currents allows reducing the
commutation time.
This way the power dissipation is
lower, but the EMI increases

Igate

Qtot

Longer commutation times requires


less gate current.
This way the power dissipation is
high, but the EMI are lower.

tCC
19/05/2016

63

Gate drivers setup


The dead time is a safe-guard time during which both MOSFETs of the
half bridge are kept OFF.
Increasing this value avoids cross-conduction which is a potentially
destructive event, but could increase the power dissipation of the power
stage (the current flows into the MOSFET body diodes).
Its duration must be adjusted according to the tCC and Igate values:
faster commutations usually allow lower dead time values.

19/05/2016

64

Gate drivers setup


The blanking time is a period, after the commutation of the bridge,
during which the sensing circuitry is disabled.
Increasing this value avoids spurious overcurrent or stall detections
(L6480) such as errors of the current control algorithm (L6482).
Its duration must be adjusted according to the tCC and Igate values:
faster commutations usually need higher blanking time values.

19/05/2016

65

Incorrect Setups

66

When the gate current and the controlled current time are not properly
set the following failures could occurs:
The gate charge is too low:
The MOSFETs are not turned-on as result an overcurrent event is
detected and the power stage is immediately disabled.
The MOSFETs are turned-on with a lower VCC as result the Rds(ON)
value is higher and the power dissipation increases. An overcurrent
event could also be detected.
The gate charge is too high:
The commutation time is excessively long and the control
algorithm is limited (both voltage mode and current mode).

19/05/2016

Competitive advantages of STSPIN Family


High level of integration
Voltage mode driving and
advanced current control
Protected power stage
Advanced diagnostic
Extended power range
Suitable for multi-motor application

67

Technical Support

SPINFamily Evaluation Tool

69

19/05/2016

SPINFamily Evaluation Tool

70

19/05/2016

SPINFamily Evaluation Tool

71

19/05/2016

Application Notes
AN4144 - Voltage mode control operation and parameter optimization
AN4158 - Peak current control with automatic decay adjustment and
predictive current control: basics and setup
AN4354 - cSPIN family gate drivers setup
AN4290 - L647x, L648x and powerSTEP01 family communication protocol
AN4241 - dSPIN family: fully integrated stepper motor drivers
AN4355 - cSPIN family: high power stepper motor controllers

72

Evaluation Boards

73

Evaluation Boards:
EVAL6470H, EVAL6470PD, EVAL6470H-DISC,
EVAL6470H, EVAL6472PD, EVAL6472H-DISC
EVAL6480H, EVAL6480H-DISC
EVAL6482H, EVAL6482H-DISC
EVLPOWERSTEP01
STEVAL-PCC009V2 - All boards require this interface board, except DISC versions

Nucleo Based Evaluation Boards:


X-NUCLEO-IHM03A1 (Powerstep01)
X-NUCLEO-IHM02A1 (L6470)

19/05/2016

Why ST in Motor Control


ST is a solution provider for any sort application needs, thanks to
broad portfolio of drivers and digital based solutions, suitable for
portable applications, system in package for higher power (350W) up
to solutions with external MOSFETs
ST offers state of the art technology (high performance system in
package technology), featured devices (non-dissipative current
sensing, high speed SPI bus, sensor less stall detection, built in
LDOs) and algorithm innovator (voltage mode driving, predictive
current mode control, auto adjusted decay mode) and more.
Many application notes, technical tips and design tools available on
www.st.com, labs and application teams located in key areas of the
country (East Coast, Mid-West and Silicon Valley), new series of
evaluation boards based on Nucleo (STM32) shield platform

74

Thank You
Please enter your questions for the Q&A section now

STSPINTM Family

You might also like