Texas Instruments | DRV8889-Q1EVM Software (Rev. A) | User Guides | Texas Instruments DRV8889-Q1EVM Software (Rev. A) User guides

Texas Instruments DRV8889-Q1EVM Software (Rev. A) User guides
User's Guide
SLVUBM4A – April 2019 – Revised October 2019
DRV8889-Q1EVM GUI User's Guide
This document is provided with the DRV8889-Q1 customer evaluation module (EVM) as a supplement to
the DRV8889-Q1 Automotive Stepper Motor Driver datasheet. This document only describes the
installation and usage of the DRV8889-Q1EVM GUI. For additional details on hardware connections refer
to the DRV8889-Q1EVM User's Guide.
1
2
3
4
Contents
Overview ...................................................................................................................... 2
Hardware and Software Setup ............................................................................................. 2
GUI Application .............................................................................................................. 2
3.1
Installation ........................................................................................................... 2
3.2
Getting Started with DRV8889-Q1EVM GUI .................................................................... 2
3.3
Use the DRV8889-Q1EVM GUI .................................................................................. 2
Errata ........................................................................................................................ 12
List of Figures
1
DRV8889-Q1 EVM GUI (Home Page) .................................................................................... 3
2
Figure 2. DRV8889-Q1 EVM GUI (Device Connection pane) ......................................................... 3
3
Serial port configuration..................................................................................................... 4
4
DRV8889-Q1 EVM GUI (Stepper Motor Control page) ................................................................. 4
5
Controls available for Speed Mode........................................................................................ 5
6
Controls for Step Mode ..................................................................................................... 6
7
Stop conditions ............................................................................................................... 7
8
DRV8889-Q1 EVM GUI (Decay mode) ................................................................................... 8
9
DRV8889-Q1 EVM GUI (Registers Page) ................................................................................ 9
10
Stall detection configuration panel in Automatic Mode ................................................................ 10
11
Stall detection configuration panel in Manual Mode ................................................................... 11
12
DRV8889-Q1 EVM GUI (Menu bar – Help Option) .................................................................... 12
Trademarks
MSP430 is a trademark of Texas Instruments.
Windows is a registered trademark of Microsoft Corporation.
All other trademarks are the property of their respective owners.
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
DRV8889-Q1EVM GUI User's Guide
Copyright © 2019, Texas Instruments Incorporated
1
Overview
1
www.ti.com
Overview
The DRV8889-Q1EVM is a platform to support prototyping and evaluation for the DRV8889-Q1, a
medium-voltage dual H-bridge driver for stepper-driving applications. The DRV8889-Q1 drives a single
bipolar stepper with microstep settings ranging from full-stepping to 1/256 resolution with internallyregulated microstep levels. It provides a variety of programmable decay settings and can detect stall
conditions while driving.
The EVM uses an MSP430™ microcontroller and a USB interface chip to manage communication from
the GUI software application installed on a PC computer with Windows®. The GUI sends serial commands
to the MSP430 to control the device signals, monitor faults, read and write SPI registers, and drive a
stepper motor by issuing the step commands at the desired rate. This document describes the software
and tools used to evaluate DRV8889-Q1 device for stepper motor driving on the DRV8889-Q1EVM.
2
Hardware and Software Setup
The hardware (HW) and software (SW) tools that follow are required for the evaluation of DRV8889-Q1:
• DRV8889-Q1EVM
• Stepper motor
• Voltage supply from 4.5 V to 45 V
This document only describes the installation and usage of the DRV8889-Q1EVM GUI. For additional
details on hardware connections refer to the DRV8889-Q1EVM User's Guide.
3
GUI Application
3.1
Installation
Installation (For Desktop Version Only)
• Download the installable DRV8889-Q1_x.y.z_installer_win.zip file (x.y.z is GUI revision number: 1.0.0
for the EVM were ordered before August, 2019; 1.1.1 or up for the EVM were ordered after Sempter,
2019.).
• Extract the zip file.
• Double click on the installer to install the GUI Application. Install it.
3.2
Getting Started with DRV8889-Q1EVM GUI
The DRV8889-Q1EVM GUI and DRV8889-Q1EVM allows the user to configure various settings required
for stepper motor driving. The DRV8889-Q1EVM GUI lets the user adjust the motor speed, control the
direction, control the step movement, configure various device settings, and monitor the device status.
Perform the following steps to begin using the GUI:
• Connect the stepper motor to the EVM.
• Plug in the micro-USB cable to the PC.
• Enable the motor power supply. For additional details on hardware connections refer to the DRV8889Q1EVM User's Guide.
Click on DRV8889-Q1EVM GUI shortcut either on the desktop or from the start menu to run the GUI
application.
3.3
Use the DRV8889-Q1EVM GUI
•
2
The Application opens with launch page shown in Figure 1.
DRV8889-Q1EVM GUI User's Guide
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
GUI Application
www.ti.com
Figure 1. DRV8889-Q1 EVM GUI (Home Page)
•
For GUI 1.0.0, the application will try to establish communication with the device connected. A
message showing ‘Connected to Cloud Agent. Connecting to target…’ will be displayed in the
hardware connection status pane at the bottom of the screen. G1.0.0 serial port baud rate has to be
9600. If the connection is successful, ‘COMxx:9600 Connected to Target’ message appears as shown
in Figure 2 below.
Figure 2. Figure 2. DRV8889-Q1 EVM GUI (Device Connection pane)
•
•
•
•
For GUI 1.1.1 or later version, the application won't need network connection to "Cloud Agent" and
serial port baud rate has to be 115200.
If the GUI fails to connect to the EVM, the hardware connection status pane will show the message
‘Hardware Not Connected.’
If the GUI is opened without connecting the EVM, the hardware connection status pane will show
‘Error: no serial ports found.’
If there are more than one DRV8889-Q1EVM boards connected, the first matching device will be
connected automatically. In order to switch to another EVM,
– Click Options -> Serial Port. A serial port configuration popup is displayed as shown below in
Figure 3.
– Choose the appropriate port and baud rate: G1.0.0 baud rate has to be 9600. GUI1.1.1 or later
version baud rate has to be 115200.
– Click OK.
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
DRV8889-Q1EVM GUI User's Guide
Copyright © 2019, Texas Instruments Incorporated
3
GUI Application
www.ti.com
Figure 3. Serial port configuration
•
•
3.3.1
Once the correct device is connected, the home page will show a message ‘Device Connected’ with a
green check mark as shown in Figure 1.
Click on the ‘Stepper Motor’ button to open the stepper control page.
Stepper Control Page
The Stepper Control page (shown in Figure 4) includes various controls to sleep/wake the driver, control
the stepper motor, and configure various parameters such as slew rate, torque, full scale current, and so
forth. Hovering over the (?) icon to the right of a control displays a brief description about the control.
Figure 4. DRV8889-Q1 EVM GUI (Stepper Motor Control page)
3.3.1.1
Stepper Control Modes
The GUI allows the user to control the stepper motion profile in two modes – Speed Mode and Step Mode.
To toggle between the modes, use the toggle button at the top of the screen.
4
DRV8889-Q1EVM GUI User's Guide
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
GUI Application
www.ti.com
3.3.1.1.1
Speed Mode
Speed Mode allows the user to spin the stepper motor continuously at a desired speed. The user
configures the starting speed, stopping speed, acceleration rate, and target speed. Stepper controls are
enabled only when 'Motor Driver' control is enabled in other words, DRVOFF pin is set to low. The ‘Start
Steps’ button is enabled only when ‘Driver Outputs' control is enabled for example, DRVOFF pin is set to
low. When the ‘Start Steps’ button is clicked, the motor begins spinning at the starting speed and
accelerates to the target speed according to the configured acceleration rate. The acceleration profile in
the microcontroller firmware accepts the starting-speed and target-speed PPS values and calculates the
appropriate PWM clock period to create the stepping signal on the STEP pin. When the ‘Start steps’
button is clicked, the PWM timer generates steps at a rate specified by the 'Starting Speed' PPS
parameter. When ‘Stop Steps’ is clicked, the motor starts decelerating at the ‘Acceleration Rate’
configured to reach the stopping speed and eventually stop. The configuration is visualized by the
embedded graph shown on the GUI screen (Figure 5).
When accelerating or decelerating, the PPS signal is adjusted every 32 ms based on the integer value of
PPSPS / 32 ms. Acceleration rates must be between 1 and 65,535 PPSPS. The step rate increases by
the calculated value until the target speed is reached.
The starting speed must be less than or equal to the target speed. If the starting speed and target speed
are equal, the EVM firmware will not perform an acceleration routine. The stopping speed must also be
less than or equal to the target speed. The target speed is limited to a range between 50 and 65,535 PPS.
The 'Start Steps' command computes how frequently automatic speed updates are issued and a second
timer is used to change the speed according to the programmed acceleration rate profile. Once clicked,
the motor will begin spinning according to the parameters set in the GUI.
When the target speed PPS value is reached, the acceleration profile ends, and the motor continues
running at the target speed until the 'Stop Steps' button is clicked. When the stepper is commanded to
stop, the controller performs the same actions as it did while accelerating, but in reverse order, to
decelerate until the stopping speed PPS value is reached. At this point, the motor fully stops.
Figure 5. Controls available for Speed Mode
3.3.1.1.2
Step Mode
Step Mode allows the user to move the stepper motor a configured number of steps. Stepper controls are
enabled only when the 'Motor Driver' control is enabled for example, DRVOFF pin is set to low. When the
‘Start Steps’ button is clicked, the motor starts spinning at the starting speed and accelerates at the rate
configured. When the number of steps is reached, the motor stops.
The acceleration and deceleration profiles work similarly as before, except when the deceleration routine
starts and when the motor stops are a function of the 'Steps to Stop' and deceleration rate parameters.
The configuration can be visualized in the graph embedded in the GUI. If the "Reciprocate" button is
enabled, the stepper will travel the set number of steps, then reverse direction. It will do this continuously
until 'Stop Steps' is clicked. Figure 6 shows the controls available in Step Mode
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
DRV8889-Q1EVM GUI User's Guide
Copyright © 2019, Texas Instruments Incorporated
5
GUI Application
www.ti.com
Figure 6. Controls for Step Mode
The parameters from 'Speed Mode' are reused as well, and they operate the same as described in
Section 3.3.1.1.1. Two new parameters have been added to properly control the limited number of steps
actuation. These parameters are described as follows:
Number of Steps — This parameter is the number of steps that the controller will issue.
Steps to Stop — The controller is continuously monitoring the step being issued and when the current
step is equal to the 'Steps to Stop' parameter, a deceleration profile is issued. If the value of the
'Steps to Stop' parameter is larger than the number of steps, then the motor stops abruptly and
without undergoing a deceleration profile.
When a deceleration profile is issued, the controller decreases the speed until reaching the 'Stopping
Speed' value. If the 'Number of Steps' parameter is met before the deceleration profile is complete, then
the motor stops at the current speed. If the stopping speed is met before all the number of steps is issued,
then the motor rotates at the stopping speed value until all the steps are executed.
Ideally, the system should resemble the case in which the controller executes all the commanded steps at
a speed as close as possible to the stop speed. In the event this is not possible because of the particular
parameters that were selected, stopping the motor at a speed very close to the 'Stopping Speed'
parameter is often good enough to ensure good motion quality and application performance.
Figure 7 shows the three conditions possible when stopping and the action taken.
6
DRV8889-Q1EVM GUI User's Guide
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
GUI Application
www.ti.com
1. Motor reaches stop speed at the stop speed.
2. Motor reaches stop speed before the stop speed is reached.
3. Motor runs out of steps before reaching stop speed.
Figure 7. Stop conditions
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
DRV8889-Q1EVM GUI User's Guide
Copyright © 2019, Texas Instruments Incorporated
7
GUI Application
3.3.2
www.ti.com
Decay Mode
Decay refers to how the driving currents recirculate in H-bridge FETs during the off time. Using the GUI,
the user configure the decay mode. To configure,
• Click the Decay Mode button at the top center-right of the screen. A popup appears as shown below in
Figure 8.
Figure 8. DRV8889-Q1 EVM GUI (Decay mode)
•
3.3.3
Decay mode and appropriate TOFF values can be configured in the popup. The configurations can be
visualized in the graph shown. For information about the different decay modes, refer to the DRV8889Q1 Automotive Stepper Motor Driver datasheet.
Fault Monitoring
The fault monitor section at the right side of the screen allows the user to configure monitor the various
device faults. The LED staying green indicates ‘No Fault’. When the LED turns red, it indicates that a fault
has occurred. The user can also configure Fault reporting options by clicking the ‘Configure’ button.
3.3.4
•
•
•
•
•
•
•
8
Register Map
Enabling the Motor Driver enables the Register page.
The page can be opened by clicking ‘Pencil’ icon from the side-bar menu
This page displays all the registers and their fields present on the DRV8889-Q1 device.
The page allows reading and writing any register, field, or bit.
To read a particular register, click on the register and click ‘Read Register’ button.
To read all the registers, click ‘Read All Registers’ button
To update the register values:
– Edit the ‘Value’ field directly to update a register’s hex value.
DRV8889-Q1EVM GUI User's Guide
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
GUI Application
www.ti.com
•
•
•
– Change the field value from the field view at the right of the screen.
– Double click on any of the register bit to flip the bit (from 0 to 1 or vice versa).
By default, the write mode is Immediate which writes values to the registers immediately upon change.
Write mode can be changed to ‘Deferred’ which will write queue all changes and update the device
registers only when ‘Write Register’ or ‘Write All Registers’ is clicked.
Click on the question mark icon on any register or field to get in-place data sheet help.
Figure 9. DRV8889-Q1 EVM GUI (Registers Page)
3.3.5
Stall Detection
This section covers three different ways to evaluate stall detection using the DRV8889-Q1EVM GUI.
3.3.5.1
Automatically Learn Stall Threshold
1. Configure desired motion profile in the GUI in Speed Mode. The stall detection will not be available for
Step Mode.
2. Configure device settings as desired. The default values should be acceptable for immediate
evaluation. If motor torque is too high while evaluating, change the 'Full-Scale Current' setting or
'Torque' setting to reduce it.
3. Click 'Start Steps' to begin spinning the motor.
4. Enable ‘Stall Detection’ toggle button available on the ‘Stall Detection Panel’.
5. By default, ‘Stall Detection Mode’ is set to ‘Automatic Mode’.
6. Once the target speed is reached, the microcontroller will write the STL_LRN bit to begin learning the
stall threshold value, STALL_TH.
7. After 16 electrical cycles, the GUI displays the message “Please stall motor to complete Stall
Threshold learning sequence.” At this point, the user must physically stall the stepper motor.
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
DRV8889-Q1EVM GUI User's Guide
Copyright © 2019, Texas Instruments Incorporated
9
GUI Application
www.ti.com
8. Once the motor stalls, The nFAULT pin asserts low which turns the Fault indicator on the right panel of
the GUI to RED. If this happens, the STL_LRN_OK and STALL bits should be set, and the GUI
displays the message “Stall Threshold learning sequence complete”.
9. To reset the stall fault, remove the stall condition from the motor so it spins again, or click 'Stop Steps'
to stop the motor. Then click on ‘Clear Fault’ button to clear the stall fault.
For demonstration purposes, click the 'Reverse direction on stall fault' toggle button. After learning the stall
threshold, this EVM feature will drive the motor until it stalls. After a stall event occurs, the motor will
pause briefly, then begin driving in the opposite direction.
If for some reason stall threshold (STALL_TH) is not properly learned, clicking the ‘Relearn Stall
Threshold’ button will tell the EVM to re-run the learning algorithm starting at step 6 in the list above. If the
motor is physically stalled, but the GUI continues to display “Please stall motor to complete Stall Threshold
learning sequence,” the DRV8889 may not have properly learned the stall detection threshold. This can
happen at low motor speeds, which cause the stepper back EMF to be low, and a valid STALL_TH value
may not be determined.
‘Stall Threshold Graph’ shown in periodically plots the Torque Count (TRQ_COUNT) and Stall Threshold
(STALL_TH) values.
Figure 10. Stall detection configuration panel in Automatic Mode
3.3.5.2
Manually Set Stall Threshold
The stall threshold can be manually set by switching to Manual Mode using the ‘Stall Detection Mode’
control. In this mode, the user sets the stall threshold to any desired value. If a valid stall threshold is
chosen, the stall fault will be reported as described in the previous section Section 3.3.5.1. To correctly
detect a stall, the stall threshold should be less than the torque count while the motor is spinning. If the
stall threshold value is too close to torque count value, then false stalls may be detected as the motor
torque increases. The 'Reverse direction on stall fault' toggle button operates the same way in Manual
Mode as described in the previous section. Figure 11 shows the Stall Detection panel in Manual Mode.
10
DRV8889-Q1EVM GUI User's Guide
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
GUI Application
www.ti.com
Figure 11. Stall detection configuration panel in Manual Mode
3.3.5.3
Using Register Map
1. Configure desired motion profile in the GUI in Speed Mode. The default values will be acceptable for
immediate evaluation. When configuring stall detection using the register map, it is not necessary to
click the 'Stall Detection' toggle button on the Speed Control page.
2. Configure device and motion profile settings as desired. The default values should be acceptable for
immediate evaluation. If motor torque is too high while evaluating, change the 'Full-Scale Current'
setting or 'Torque' setting to reduce it.
3. Click 'Start Steps' to begin spinning the motor.
4. Go to the Register Map page, and click 'CLR_FLT' in CTRL4 to clear any existing faults. Click 'READ
ALL REGISTERS' to refresh the register map.
5. Once the stepper reaches the target speed, set the STL_LRN bit in the CTRL5 register in the register
map. This will begin the algorithm that learns the stall threshold.
6. After a few seconds, stall the motor. The Fault LED on the board should light, if the STL_REP bit in
CTRL5 is set to 1 (default). The STL bit in the FAULT Status register, and the STALL bit in the DIAG
Status 2 register will also set when a stall condition is detected. Click 'READ ALL REGISTERS' to
refresh the register map in the GUI to see these bits change.
7. To reset the stall fault, remove the stall condition from the motor so it spins again, or click 'Stop Steps'
to stop the motor. Then click 'CLR_FLT' in CTRL4 to clear the stall fault.
After "Initiate Stall" turns to green, "Stall status" synchonizes to register EN_STL bit.
Clicking "Export Torque Count Values" can allow up to half hour Torque_count values (8ms/sample) save
to torque_values.csv.
3.3.6
Use the Side-Bar Menu
Use the side-bar menu in the left pane to navigate to the different pages at any time. Click on the
hamburger button in the top-left corner of the GUI to expand the side-bar menu. The following pages that
are displayed in the side-bar menu:
• Home
• Registers
• Stepper Motor Control
3.3.7
Menu bar Options
The following menus are available in the menu bar displayed at the top of the GUI as shown in Figure 12.
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
DRV8889-Q1EVM GUI User's Guide
Copyright © 2019, Texas Instruments Incorporated
11
Errata
www.ti.com
Figure 12. DRV8889-Q1 EVM GUI (Menu bar – Help Option)
3.3.7.1
File Menu
The File Menu has the following options:
• Program Device - The user can load the firmware (.out) file onto the device by clicking this option. For
the firmware load to work, MSP430 FET needs to be plugged into the J2 connector on the EVM board.
• Load/Save Registers – The user can save (and load) a particular configuration of the registers. This
saves time when the user need to reconfigure the registers after power cycle.
3.3.7.2
Options Menu
This menu provides the option to configure the serial port communication settings.
3.3.7.3
Help Menu
The Help Menu contains options to view Readme File and About Section. The about section displays the
installed software information including the application version.
4
Errata
This section outlines known errata with the DRV8889-Q1EVM and GUI.
1. When the board is powered, and the "Motor Driver" status is set to "Awake", UVLO and CPUV faults
will display in the fault monitor and in the register map for 1p0 sample (CTRL8 register=0000b). These
do not interfere with the operation of the EVM, and they can be cleared by setting the CLR_FLT bit in
the register map. If the UVLO fault is not be clear after try 2 or 3 time Clear command, please re-start
the GUI.
2. There is 1-4 seconds delay between the GUI and EVM when updating settings between the GUI and
the board. If the setting is not gone through or is ignored, please try updating settings multiple times in
register map page. Updates and faults may not occur immediately in the GUI, but the EVM board will
display faults on the nFAULT LED in real time. STALL_TH and TRQ_COUNT updates in the 'Stall
Threshold Graph' are also delayed.
3. If 'Step and direction control' is set to 'SPI' and a high step rate is chosen for 'Target Speed,' the GUI
may lose communication with the EVM due to the large number of SPI transactions in a given amount
of time.
12
DRV8889-Q1EVM GUI User's Guide
SLVUBM4A – April 2019 – Revised October 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
IMPORTANT NOTICE AND DISCLAIMER
TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATASHEETS), DESIGN RESOURCES (INCLUDING REFERENCE
DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS”
AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD
PARTY INTELLECTUAL PROPERTY RIGHTS.
These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate
TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable
standards, and any other safety, security, or other requirements. These resources are subject to change without notice. TI grants you
permission to use these resources only for development of an application that uses the TI products described in the resource. Other
reproduction and display of these resources is prohibited. No license is granted to any other TI intellectual property right or to any third
party intellectual property right. TI disclaims responsibility for, and you will fully indemnify TI and its representatives against, any claims,
damages, costs, losses, and liabilities arising out of your use of these resources.
TI’s products are provided subject to TI’s Terms of Sale (www.ti.com/legal/termsofsale.html) or other applicable terms available either on
ti.com or provided in conjunction with such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable
warranties or warranty disclaimers for TI products.
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2019, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising