ST AN3991 APPLICATION NOTE

AN3991
Application note
How to drive multiple stepper motors with the L6470 motor driver
Introduction
The L6470 is a flexible device for the driving of bipolar stepper motors in multiple motor systems. This application note describes how to drive three bipolar stepper motors in a daisy chain configuration. Each motor position and its velocity can be controlled individually or a sequence of position and velocity commands can be implemented by using the IronPython scripting language included in the dSPIN evaluation tool. With the dSPIN evaluation tool and STEVAL-PCC009V2 interface board, up to eight stepper motors can be controlled in a daisy chain configuration.
March 2012 Doc ID 022332 Rev 1 1/20
www.st.com
Contents AN3991
Contents
1 Hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4 Interconnection diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5 Stepper motor characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6 Running the motor evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7 Controlling three motors individually . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.1 Individual motor position control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.2 Individual motor speed control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8 Controlling three motors with scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.1 Three_motors script text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Appendix A Additional instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
A.1 Communication board driver installation procedure . . . . . . . . . . . . . . . . . 12
A.2 Motor back-EMF constant (Ke) measurement. . . . . . . . . . . . . . . . . . . . . . 15
9 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2/20 Doc ID 022332 Rev 1
AN3991 List of figures
List of figures
Figure 1. Daisy chain example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 2. Communication board driver installation - step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 3. Communication board driver installation - step 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 4. Communication board driver installation - step 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 5. Communication board driver installation - step 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 6. Communication board driver installation - step 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 7. Motor back-EMF constant measurement - step 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 8. Motor back-EMF constant measurement - step 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 9. Motor back-EMF constant measurement: bad back-EMF waveform . . . . . . . . . . . . . . . . . 16
Figure 10. Motor back-EMF constant measurement: good back-EMF waveform . . . . . . . . . . . . . . . . 16
Figure 11. Motor back-EMF constant measurement - step 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Doc ID 022332 Rev 1 3/20
Hardware requirements AN3991

1 Hardware requirements

Each stepper motor being evaluated requires an EVAL6470H demonstration board. Also required is an STEVAL-PCC009V2 interface board that is connected between the PC USB port and the first EVAL6470H. A 10-pin flat cable is needed for each EVAL6470H. A standard USB male to mini USB male cable connects the STEVAL-PCC009V2 to the PC.
In addition to the interface boards and cables, a DC power supply with a voltage output between 8 V and 45 V is required.
4/20 Doc ID 022332 Rev 1
AN3991 Software requirements

2 Software requirements

The software needed is the dSPIN evaluation tool (revision 1.7 or higher) which can be downloaded at www.st.com/dspin.
Choose L6470 in the Product Listed section, then the Design support option, software & development tools, and then SW DEMOS.

3 Software installation

Uninstall any previous versions of the dSPIN evaluation tool.
Install the dSPIN evaluation software by clicking on setup Windows installer package.
After installation is complete, the dSPIN software tool is located at C:\Program Files\STMicroelectronics\ dSPIN evaluation tool.
Download the Three_motors.py script from the same page where this application note can be found.
Doc ID 022332 Rev 1 5/20
Interconnection diagram AN3991
$0Y
,QWHUIDFH
ERDUG
67(9$/3&&9
(9$/
- -
-3
(9$/
- -
-3
7HUPLQDWLRQ MXPSHUFORVHG
7HUPLQDWLRQ
MXPSHURSHQ
VWERDUG /DVWERDUG

4 Interconnection diagram

With reference to the AN3103 application note, on each EVAL6470H connect the power supply to VS and ground and connect one stepper motor coil to OUT1A and OUT2A. Connect the other stepper motor coil to OUT1B and OUT2B.
Jumper connections: on the EVAL6470H, jumper JP2 is located between the OUT1A/OUT2A and OUT1B/OUT2B screw connections, just below the VDD test point. In the daisy chain connection, JP2 must be open on all EVAL6470Hs except the last one. On the last EVAL6470H, JP2 is shorted. Additional EVAL6470H demonstration boards can be connected in daisy chain mode. Up to eight motors can be controlled using a single STEVAL-PCC009V2 interface board.

Figure 1. Daisy chain example

To drive two or more boards in daisy chain configuration:
1. Open the termination jumpers on all EVAL6470H demonstration boards except the last one.
2. Verify the termination jumper of the last evaluation board is closed.
3. Plug the interface board into the PC through the USB cable.
4. If requested, install interface board drivers.
5. Connect the interface board 10-pin connector to the SPI_IN connector of the first demonstration board.
6. Connect the SPI_OUT connector of the previous demonstration board to the SPI_IN connector of the next one.
7. Repeat item 6 until all the others boards in the chain are connected.
Information about the termination jumper and the SPI connectors can be found in the AN3103 application note.
Warning: Increasing the number of the devices connected in daisy
chain configuration may degrade SPI communication performance. If communication issues are found, try to reduce SPI clock speed.
6/20 Doc ID 022332 Rev 1
Loading...
+ 14 hidden pages