ST AN1794 APPLICATION NOTE

AN1794

Application note

PractiSPIN evaluation system configuration and set up guide

Introduction

PractiSPIN is an evaluation and demonstration system that can be used with several STMicroelectronics motor driver integrated circuit devices. The system consists of a Graphical User Interface (GUI) program which runs on an IBM-PC under windows, a common ST7 based interface board that communicates with the PC and the practiSPIN software via a serial COMM port, and a device specific evaluation or target board that connects to the ST7 interface board via a standard 34 pin ribbon cable interface, as shown in Figure 1. The target PCB connects to the motor or motors and to a user supplied DC power supply generally in the range of 12 to 48 Vdc.

The practiSPIN system is designed to operate the device being evaluated (the target device) under control of the practiSPIN software. Depending on which target device is being used, the practiSPIN software can operate the device to drive a stepper motor, 1 or 2 DC motors or a brushless DC (BLDC) motor.

Figure 1. System block diagram

January 2008

Rev 2

1/34

www.st.com

Contents

AN1794

 

 

Contents

1

System overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 5

 

1.1

Target board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

1.2

Control interface board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

2

Starting practiSPIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

3

Stepper motor drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

 

3.1

Constant speed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

 

3.2

Indexing mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4

DC motor drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

 

4.1

Dual DC motor control mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

5

BLDC motor drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

 

5.1

BLDC motor control mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

6

EVAL6205N board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

6.1

Vref offset adjustment (R18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

6.2

Current scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

7

EVAL6206N board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

 

7.1

Vref offset adjustment (R18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

 

7.2

Current scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

8

EVAL6206PD board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

 

8.1

Vref offset adjustment (R18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

 

8.2

Current scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

9

EVAL6207N board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

9.1

Vref offset adjustment (R18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

 

9.2

Current scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

10

EVAL6208N board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

10.1

Vref offset adjustment (R18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

2/34

AN1794

 

 

Contents

 

 

 

 

 

10.2

Current scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . 26

11

EVAL6208PD board configuration . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

11.1

Vref offset adjustment (R18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 29

 

11.2

Current scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 29

12

EVAL6235 board configuration . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 30

 

12.1

Vref offset adjustment (R18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 32

 

12.2

Current scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 32

13

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3/34

List of figures

AN1794

 

 

List of figures

Figure 1. System block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Figure 2. ST7 interface board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Figure 3. EVAL6205N schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Figure 4. EVAL6206 schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Figure 5. EVAL6206PD schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Figure 6. EVAL6207N schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Figure 7. EVAL6208N schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Figure 8. EVAL6208PD schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Figure 9. EVAL6235 schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4/34

AN1794

System overview

 

 

1 System overview

To illustrate the operation of the practiSPIN system, we will look at one typical device supported by the system.

The L6207 includes two independent full or H bridges with separate logic inputs and current control functions.

The two bridges are designated A and B and their output pins designated as OUT1A, OUT2A, OUT1B, and OUT2B. These outputs are controlled independently by logic inputs IN1A, IN2A, IN1B, and IN2B respectively.

A logic high or low on any of these inputs will drive its corresponding output to the positive supply rail or to ground. Both of the A outputs will be forced to an off (high impedance) state if the ENA pin is taken logic low, as will the B outputs if ENB is taken low. The L6207 is thus controlled by six logic inputs: IN1A, IN2A, and ENA controlling bridge A and IN1B, IN2B, and ENB controlling bridge B. Each bridge also has an analog control signal, VREFA and VREFB, which control the current.

1.1Target board

The L6207 target board gives access to the bridge A and B outputs at connectors CN3 and CN4 respectively.

When driving a stepper motor, the two wires from one of the motor windings will connect to CN3 and the other winding will connect to CN4. Swapping between the two connectors or swapping the polarity at a given connector will only reverse the sense of motor direction. DC supply power in the range of 12 to 48 Vdc is connected at CN1. The polarity marked on the board silkscreen must be strictly observed! The eight control signals are taken from the 34pin ribbon header (CN5) and are driven by the control interface PCB via a short flat cable.

1.2Control interface board

The control interface PCB is based on an ST72F264 microcontroller. The micro includes a UART and communicates with the practiSPIN software via 9 pin D connector P1 employing a standard RS232 interface.

The micro is based on flash memory and its firmware includes a write protected boot-loader routine that allows the practiSPIN software to update or change the operating program in the ST7 as required for different target boards. 5 Vdc power for the board is received via the 34pin ribbon cable from the target board or can be directly supplied at J2 if jumper WJ1 is removed. The eight control signals for the target board are generated by the ST7 micro. The six logic signals are generated directly by six of the eight pins of port B while the two analog current references (VREFA and VREFB) are generated by pulse width modulated (PWM) signals generated by the ST7 along with an offset adjusting circuit controlled by potentiometer R18.

5/34

ST AN1794 APPLICATION NOTE

System overview

AN1794

 

 

Figure 2. ST7 interface board

6/34

AN1794

Starting practiSPIN

 

 

2 Starting practiSPIN

Since the practiSPIN system is capable of supporting several driver IC's and driving different types of motors the user must first select the type of motor to be driven and the driver IC that will be evaluated.

1.Target board set up: configure the jumpers/switches on the target board and the ST7 interface board as described in the paragraph for the specific evaluation board being used.

2.Control board - PC connection: connect the ST7 interface board to a serial COMM port of the PC via a standard (straight through) 9 pin D connector cable.

3.Power up: energize the power supply.

4.Start practiSPIN software: on the PC, start the practiSPIN program.

5.Motor type selection: on the first screen of the practiSPIN software, the user can select the appropriate type of motor for the device under evaluation. Click on the appropriate motor type.

6.Communication settings: click the drop down list under "port selection" and select the COMM port being used. Baud rate and other communication parameters are fixed on both sides of the link and do not need to be set.

7.Establish COMM link: click the "Connect With ST7 Hardware". At this point the practiSPIN software will transmit several commands to the ST7 to initialize the processor. The practiSPIN software will read the revision code of the firmware currently stored in the flash memory of the ST7 and determine if the correct version of firmware resides in the ST7. If the practiSPIN software detects that a firmware update is necessary, either because there is an old version of firmware or the firmware currently in the flash memory is not the correct firmware for the motor type selected, one or more dialogue boxes will appear asking if the program should proceed with the update. Accept the updates and the practiSPIN software will automatically update the firmware. The system will then initialize the settings to the last stored settings and open the appropriate practiSPIN software for the selected motor type.

8.Calibrate current setting: when communication is established the user has the option to adjust the offset and maximum current settings. If this is the first time you use the system, calibration may be needed to adjust out the offset in the reference bias circuitry. Calibration ensures that the reference voltage provided to L62XX IC follows the practiSPIN software current settings. Calibration is a two-step process; first the offset is adjusted then the maximum current is set.

a)To null out the offset, click on CALIBRATE ZERO then adjust R18 (on ST7 board) until voltage at Vref pin(s) of the L62XX device is zero. Measurement points on each board are listed in the set up section for each target board.

b)The maximum current, corresponding to 100% current setting in the practiSPIN software, can be adjusted using the Vref potentiometers on the target board. If the potentiometers are set to full scale (clockwise) the reference applied to the input of the device is typically about 0.88 V. The full-scale peak current is equal to Vref/Rsense where Rsense is the composite value of the sense resistor on the board. To set the maximum current, click on CALIBRATE MAX and trim the Vref potentiometer(s) on the EVAL62XX board to set the desired reference. If you plan to use microstepping, consider reducing the maximum Vref to the real peak value you will use, allowing setting the software current controls near to 100%, avoiding poor Vref resolution.

7/34

Stepper motor drive

AN1794

 

 

3 Stepper motor drive

After the system has established the connection to the interface board, it will initialize the settings to the last stored settings and open the appropriate GUI for the selected motor type. For the Stepper motor, the system can operate in either a constant speed or positioning (indexing) mode. The constant speed mode can easily be used to see that the system is working.

3.1Constant speed mode

1.Speed control screen: a large blue button at the bottom of the screen should read, "switch to INDEXING MODE". If the button reads, "switch to SPEED CONTROL MODE", click the button once to go to speed control mode.

2.Stepping mode: in the stepping mode box, select either Normal or Half Step. Microstepping mode is only available when using the L6208.

3.Device selection: in the device selection box, select the device being evaluated.

4.direction: in the direction box, click the toggle switch to pick forward or reverse. This is somewhat arbitrary since we probably don't know what the direction sense of the motor will be. Once the motor is running, toggle this switch to reverse the motor direction if desired. To reverse the meaning of the forward and reverse designations, disable the motor (orange disable button at bottom of screen) and then swap the motor wires at either CN3 or CN4.

5.Decay mode: only the L6208 allows the selection of fast or slow decay. Set the toggle switch to slow decay.

6.Accel rate: set the accel rate to about 1000 steps per second per second (steps/sec2). In the practiSPIN system all motion parameters are given in terms of the basic units of steps and seconds: position in steps, velocity in steps/sec, and accel/decel in steps/sec2. In order to relate these settings to rotations, RPM, and RPM/second it is necessary to know the number of steps (or half steps) per rotation for the stepper motor being used. A common value is 200 steps or 400 half steps per rotation.

7.Running speed: set running speed to about 100 steps/sec.

8.Decel rate: set decel. rate to about 1000 steps/sec2.

9.Accel current: set accel current to about 25%. This is an initial guess as to the required setting and may need further adjustment. Generally higher accel rate settings require higher accel current settings so that the stepper motor does not start to "slip poles" and fall behind the desired position. Since we have initially set the acceleration rate setting quite low, 25% is probably adequate.

10.Running current: set the running current to 25%. In practice the running current can often be set to a lower value than the accel current since the torque requirement is generally less during the constant speed part of the move. A lower running current setting can help to keep the device and the motor running cooler.

11.Decel current: set the decel current to 25%. Since friction aids in decelerating the motor it may also be possible to set the decel current lower.

12.Holding current: set the holding current to 25%. Whenever the motor is stopped (after a run,) this level of current will circulate in the motor so that it will hold position against any mechanical disturbance.

8/34

AN1794

Stepper motor drive

 

 

 

In the case of a strong static load (perhaps a gravity load of some sort) it may be necessary

 

to increase this setting. If not much holding torque is required, then the setting can be

 

reduced so that operating temperatures can be held to a minimum.

Note:

Holding current will be turned off (bridge completely disabled) whenever the disable button

 

is clicked.

 

13. Run: make sure that the motor is free to turn in either direction and click the run button.

 

The motor should quickly come up to speed ((100 steps/sec) / (1000 steps/sec2) = 0.1

 

sec.). To change the motor direction, click the direction toggle switch. If the motor does

 

not run click the stop button, increase all four current settings to 50%, and click run

 

button. If the motor still does not run an oscilloscope and current probe should be used

 

to observe the motor current.

 

14. Stop: click stop to stop the motor.

 

After the basic operation of the system has been verified, the acceleration rates, top speed,

 

and current settings can be adjusted to see how the motor responds.

3.2 Indexing mode

The system can be switched to operate in the positioning (indexing) mode by clicking on "switch to INDEXING MODE". In the indexing mode a new box appears on the right of the screen. You can enter up to twelve indexed movements in the box and the wait time between each movement. When started, the software will execute each movement by accelerating up to the peak speed, moving the required number of steps and then decelerating back to a stop so that the total distance moved is the number of steps indicated, then wait the indicated time before starting the next movement. A negative number entered in the relative position will cause the motor to run in the "reverse" direction.

9/34

DC motor drive

AN1794

 

 

4 DC motor drive

After the system has established the connection to the interface board, it will initialize the settings to the last stored settings and open the appropriate practiSPIN software for the selected motor type. For DC motor drive, the system operates in an open loop duty cycle control mode with cycle-by-cycle current limit.

4.1Dual DC motor control mode

1.Direction: in the direction box for each motor, click the toggle switch to pick forward or reverse. This is somewhat arbitrary since we probably don't know what the direction sense of the motor will be. Once the motor is running, toggle this switch to reverse the motor direction if desired. To reverse the meaning of the forward and reverse designations, disable the motor (orange disable button at bottom of screen) and then swap the motor wires at either CN3 or CN4.

2.Braking: toggle the "Brake when Stop" switch to the OFF position for both motors. This will cause the motor to coast to rest when stopped, with the bridge placed in a high impedance state. If desired this function can later be toggled on but some care should be exercised. Braking will effectively short out the motor armature through two transistors in the bridge, which could cause excessive current and power dissipation if the motor and load have a large moment of inertia (thus a large amount or stored mechanical to be dissipated) or the motor has a very low resistance (resulting in a large current flow). Most smaller DC motors with several ohms of resistance do not pose a risk.

3.Current: set the current for both motors to approximately 25%. This is an initial guess as to the required setting and may need further adjustment.

4.Voltage: set the voltage for both motors to approximately 50%.

5.Run: make sure that the motors are free to turn in either direction and click the run button. the motors should come up to approximately half of the speed that would be expected at this supply voltage. To change the motor direction, click the direction toggle switch. If the motors do not run click the STOP button, increase both current settings to 50%, and click RUN button. If the motors still do not run an oscilloscope and current probe should be used to observe the motor current

6.Stop: click stop to stop the motor.

After the basic operation of the system has been verified, adjust voltage, current, direction and other parameters to evaluate the system.

10/34

AN1794

BLDC motor drive

 

 

5 BLDC motor drive

After the system has established the connection to the interface board, it will initialize the settings to the last stored settings and open the appropriate practiSPIN software for the selected motor type. For BLDC motor drive, the system operates in an open loop duty cycle control mode with cycle-by-cycle current limit.

5.1BLDC motor control mode

1.Direction: in the direction box for each motor, click the toggle switch to pick forward or reverse. This is somewhat arbitrary since we probably don't know what the direction sense of the motor will be. Once the motor is running, toggle this switch to reverse the motor direction if desired.

2.Braking: toggle the "Brake when Stop" switch to the OFF position. This will cause the motor to coast to rest when stopped, with the bridge placed in a high impedance state. If desired this function can later be toggled on but some care should be exercised. Braking will effectively short out the motor armature through three transistors in the bridge, which could cause excessive current and power dissipation if the motor and load have a large moment of inertia (thus a large amount or stored mechanical to be dissipated) or the motor has a very low resistance (resulting in a large current flow). Most smaller BLDC motors with several ohms of resistance do not pose a risk.

3.Current: set the current to approximately 25%. This is an initial guess as to the required setting and may need further adjustment.

4.Voltage: set the voltage to approximately 50%.

5.Run: make sure that the motor is free to turn in either direction and click the run button. The motor should come up to approximately half of the speed that would be expected at this supply voltage. To change the motor direction, click the direction toggle switch. If the motor does not run click the stop button, increase the current settings to 50%, and click run button. If the motor still does not run an oscilloscope and current probe should be used to observe the motor current.

6.Stop: click stop to stop the motor.

After the basic operation of the system has been verified, adjust voltage, current, direction and other parameters to evaluate the system.

11/34

Loading...
+ 23 hidden pages