MICROCHIP DG0598 SmartFusion2 Dual Axis Motor Control Starter Kit User Guide
- June 9, 2024
- MICROCHIP
Table of Contents
MICROCHIP DG0598 SmartFusion2 Dual Axis Motor Control Starter Kit User
Guide
Revision History
The revision history describes the changes that were implemented in the document. The changes are listed by revision, starting with the current publication.
Revision 7.0
The following is a summary of changes made in revision 7.0 of this document.
- Design Requirements, page 2 was edited to change the version of Libero SoC to v11.8 SP2 and the version of Microsemi Motor Control GUI to v5.8.
- Programming files and GUI files links were edited in Demo Design, page 2 with respect to Libero v11.8 SP2 release.
Revision 6.0
The following is a summary of the changes made in revision 6.0 of this
document.
- Added new section Register Dump Feature, page 24.
- Updated the document for Libero v11.7 software release.
Revision 5.0
Updated the document for GUI v5.3 release (SAR 75167).
Revision 4.0
The following is a summary of the changes in revision 4.0 of this document.
- Updated the document for GUI v5.2 release (SAR 72926).
- Updated the document for Libero v11.6 software release (SAR 72926).
Revision 3.0
Added Appendix: Connecting the Motor Terminals, page 29 (SAR 69108).
Revision 2.0
Updated Table 2, page 28 and added Figure 31, page 28 to update jumper
settings (SAR 66381).
Revision 1.0
Revision 1.0 was the first publication of this document.
SmartFusion2 Dual-Axis Motor Control Starter Kit
Introduction
The SmartFusion®2 Dual-Axis Motor Control Starter Kit gives designers a starting point to evaluate time-saving and proven motor control reference designs. The kit is supplied with the hardware IP blocks and software. A fully integrated solution along with a powerful and easy to use GUI that enables designers to quickly prototype the design is also provided. The kit helps designers in customizing and developing dual-axis motor control solution on the SmartFusion2 device for a specific application and reduces time-to-market. This document provides details about the hardware setup and connections for running the demo design.
Design Requirements
The following table lists the hardware and software requirements for this demo design.
Table 1 • Design Requirements
Design Requirements | Description |
---|
Hardware
SmartFusion2 Dual-Axis Motor Control Starter Kit board (SF2-MC-STARTER-KIT-SA)
with SOM| –
FlashPro4 programmer or later| –
Brush less DC (BLDC) motor (QBL4208-41-04-006)| One
Stepper motor (QSH4218-35-10-027)| One
USB A to mini-B USB cable| –
Power adapter (ETSA240270UDC-P5P-SZ)| 24 V
Operating System| Any 64-bit or 32-bit Windows 7 or Later Operating System
Software
Libero® System-on-Chip (SoC)| v11.8 SP2
Microsemi Motor Control GUI| v5.8
USB drivers for GUI| –
FlashPro programming software| v11.8 SP2
Demo Design
The programming files are available for download at:
http://soc.microsemi.com/download/rsc/?f=m2s_dg0598_liberov11p8sp2_pf
The programming files include:
- Programming File
- readme.txt
The GUI installers are available for download at:
http://soc.microsemi.com/download/rsc/?f=m2s_dg0598_liberov11p8sp2_gui
The GUI installer files include:
- GUI installer
- readme.txt
For the first time users, the GUI and drivers should be installed. The GUI can be installed using the GUI installer and the drivers can be installed using the instructions provided in GUI Driver Configuration, page 5. If a previous version of the GUI is installed, then SF2 Dual Axis Motor Control GUI.exe file must be executed to run the GUI.
Demo Design Features
The demo design runs:
- A single permanent-magnet synchronous motor (PMSM) using sensor less field oriented control (FOC) algorithm
- A single stepper motor using the micro-stepping algorithm
The GUI provided with the demo is used to configure and control the motors. The GUI can also plot certain debug variables and display motor speed and current values.
Setting Up the Demo Design
This following sections describe how to setup the demo design.
Setting Up the Hardware
The following figure shows the hardware setup for one BLDC motor in sensorless
FOC and a stepper motor in FOC.
**Figure 1 • SmartFusion2 Dual Axis Motor Control Demo Hardware Setup
**
Connecting the Board
The following steps describe how to connect the board:
- Connect the 24 V power supply to J12 connector.
- Connect the BLDC motor (QBL4208-41-04-006) to J2 connector.
- Black wire – U-Phase of the motor
- Red wire – V-Phase of the motor
- Yellow wire – W-Phase of the motor
- Connect the Stepper motor (QSH4218-35-10-027) to J3 connector.
- Black wire – A1 of the motor to be connected to PHS4
- Green wire – A2 of the motor to be connected to W
- Red wire – B1 of the motor to be connected to V
- Blue wire – B2 of the motor to be connected to U
- Set the required jumpers on the board. For information on jumper settings, see Table 2, page 28.
- Switch ON the power supply switch, SW3.
- Connect the FlashPro JTAG to the FP header.
- Open the FlashPro software and program the STAPL file (SK2ABLSLST10_5_2.stp).
- Power cycle the board using SW3.
Installing the Motor Control GUI
The following steps describe how to install the motor control GUI:
-
Go to the GUI folder and run setup.exe.
-
Click Yes for any message from User Account Control. Setup window is displayed with the default locations.
-
Click Next.
a. Accept the license agreement and click Next.
b. Confirm the installation location in the installation dialog box and click Next. A progress bar appears that shows the progress of the installation. On successful installation, Installation Complete message is displayed. -
Click Finish to exit the installation wizard.
-
Restart the host PC.
-
Check the device manager to see, if the USB drivers are already configured on the host machine.
-
Check if the drivers are configured correctly, after ensuring that the hardware is powered ON and connected to the host PC using USB cable (J17 connector on board).
-
Check if NI-VISA USB devices appears in the device manager as shown in the following figure. If they are configured, skip to Running the Demo Design,.
**Figure 2 • Identifying the SmartFusion2 Motor Control Kit USB Driver
**
GUI Driver Configuration
The following steps describe how to install the GUI driver on the host PC that
has Windows 7 or above installed. The downloaded programming file must be
programmed on the board before proceeding for driver installation.
-
Connect the host PC to the J17 connector on the SmartFusion2 Motor Control Kit using the USB A to mini-B USB cable.
-
Connect the power adapter to the kit and switch ON the SW3 switch.
-
Open Device Manager of the host PC and select USB Input Device under Human Interface Devices, as shown in the following figure.
Figure 3 • Device Manager
-
Right-click USB Input Device and select Properties.
**Figure 4 • Installing the USB Driver – Opening the Properties Window
** The following figure shows the USB Input Device Properties window.
-
In the Details tab, select Hardware Ids under Property.
-
Verify that the VID number is 1514. If not, go to Step 3 and select a different device and try again.
Figure 5 • Selecting the Right VID Number in the Properties Window
-
In the Device Manager window, right-click the USB Input Device with the specified VID number and select Update Driver Software, as shown in the following figure.
Figure 6 • Updating Driver Software
-
Select Browse my computer for driver software from the Update Driver Software – USB Input Device window.
Figure 7 • Updating Driver Software – Locate and Install the Driver Software Manually
-
Click Let me pick from a list of device drivers on my computer and click Next as shown in the following figure.
**Figure 8 • Updating Driver Software – Selecting the Driver Location
**
- Select MSCC_UsbHID and click Next.
**Figure 9 • Model Selection
**
- Click Install.
**Figure 10 • Windows Security Dialog
After successful installation, the following window is displayed.
Figure 11 • Successful Installation Message
**
- Check for NI-VISA-USB Devices in the Device Manager window to ensure that the driver is installed successfully.
**Figure 12 • Verifying the Installed Driver Software
**
Running the Demo Design
The following steps describe how to run the demo design:
- After installing the GUI, go to Start menu and select SF2 Dual Axis Motor Control GUI to open the GUI as shown in the following figure.
**Figure 13 • Launching the SmartFusion2 Dual-Axis Motor Control GUI
**
- In the SmartFusion2 Motor Control GUI, select the USB device with VID 0x1514 and PID 0x2015 (USB0::0x1514::0x2015..) from the USB DEVICE drop-down list.
**Figure 14 • SmartFusion2 Motor Control GUI – Launch Window
**
- Click Connect. On successful connection, the Connect button (highlighted in Figure 14, page 13) turns green.
Running the BLDC Motors
Use the GET and SET options to modify or verify the motor speed, motor ramp rate, current and speed loop PI controller parameters, and angle correction PI parameters. Click Configure to invoke the Configure Motor Parameters window.
**Figure 15 • SmartFusion2 Motor Control GUI – BLDC Motor Screen
The PI controller parameters (Kp and Ki values) can be modified using the
Configure Motor Parameters window shown in Figure 16, page 15.
The Configure Motor Parameters window allows to change PI controller
constants, startup mode, soft stop setting, Closed Loop Speed threshold, Open
Loop Current, and Voltage.
On clicking, Configure Motor Specification highlighted in the following
figure, Motor Specifications Configuration window opens, which allows to
change the listed parameters
Figure 16 • Configuring Motor Parameters Window
Figure 17 • Motor Specifications Configuration Window
**
* To modify a parameter, change the required field and click SET.
* To check the data in the hardware corresponding to each parameter, click GET.
* To run the motor, click RUN and to stop the motor, click STOP
- Click Run All to run all the motors and click Stop All to stop all the running motors. These buttons are highlighted in the following figure.
In the event of a fault occurrence, it is indicated in the indicator above the Clear Fault button. To clear a Fault, click Clear Fault highlighted in the following figure.
**Figure 18 • SmartFusion2 Motor Control GUI – Run or Stop All Motors
** Click Motor Direction to set the motor direction. This button also indicates the current motor direction.
- The GUI automatically plots waveforms when motor starts running. The plotting can be paused by clicking the pause button highlighted in the following figure.
**Figure 19 • SmartFusion2 Motor Control GUI – Start Plotting
**
- Click Expand Plot Window to display the debug waveforms in a separate window as shown in the following figure. Use the graph palette highlighted in the following figure to expand and analyze the waveforms.
**Figure 20 • Plot Waveforms Window
Note: The following figure shows the plots corresponding to the motor axis.
All plots are in per unit where a value of 65536 represents the rated value.
Figure 21 • Plot Waveforms Window with Options
**
-
Right-click on the plot menu to invoke the following options:
a. Click next to each plot to use the available options.
b. Use the graph palette highlighted in Figure 20, page 17 to move cursors, zoom, or to pan the display. The graph palette appears with the following options, in order from left to right:- Pointer Tool: Changes cursor mode to basic pointer
- Zoom: Zooms in and out of the display.
- Panning Tool: Picks up the plot and moves it around the display.
-
Click Close Zoom view to close the waveforms window.
-
To view the motor speed on a tachometer dial, click RPM and Current as highlighted in the following figure.
**Figure 22 • SmartFusion2 Motor Control GUI – Displaying Speed and Current
**
- Click Save Waveform to save the current waveform in the GUI as a.tdms file. The saved waveform can be reloaded by using the Load Waveform option and loading the.tdms file.
**Figure 23 • SmartFusion2 Motor Control GUI – Saving and Loading Waveforms
**
Running Stepper Motors
This design runs stepper motors in Continuous Mode and Position Mode:
Note: The Continuous Mode is selected by default.
Continuous Mode
In Continuous mode, the motor rotates continuously in the speed that is set by
the user. Click Stop to stop the running motor.
- Click Stepper to select the stepper motor.
- Verify that the Speed mode option is selected.
- Click GET to see the current parameters. Click Configure to open a list of configurable parameters.
**Figure 24 • SmartFusion2 Motor Control GUI – Stepper Motor Window
**
-
Click Reset to reset all the stepper parameters to their default values, and click SET to enter these values into the system.
-
Click RUN to run the motor with the current parameters.
-
Select step resolution value from the Step Resolution drop-down list.
-
Enter a speed value between 1 and 200 RPM in Speed (RPM) and click SET.
Note: It is not necessary to stop the motor to change motor speed or the step resolution.
Note: To change the direction of the motor, click Motor Direction. -
To increase motor torque, increase the current reference and click SET.
CAUTION: Increasing the current scaling value increases the motor current and the motor gets heated if run for a long time. -
Click STOP to stop the motor.
Position Mode
In Position mode, the motor rotates and stops as per the command steps. It rotates in the speed that is set by the user.
-
Select Position mode option and click SET.
-
Enter the required (absolute) position in Command Steps.
a. The motor provided with the kit has a step number of 200 by default. To run the motor through one revolution, enter 200 in Command Steps.
b. Click SET.
c. Click RUN. The motor runs through the specified number of steps.- In the Position mode, the motor moves through a fixed number of steps after which the motor stops rotating, but remains energized.
- To move to a different position, enter the new position and click SET.
- Click STOP to de-energize the motor. When the motor is de-energized, the current position is lost.
Plotting debug parameters by clicking Plot Waveforms, displays Id PI output as plot 0, d-axis motor current (Id) as plot 1, the number of steps moved (step count) as plot 2, and the angle generated as plot 3. The following figure shows the GUI in position mode.
**Figure 25 • SmartFusion2 Motor Control GUI – Stepper Motor in Position Mode
** The motor runs at the speed set by the user in Speed (RPM) through the number of steps entered in Command Steps as shown in the preceding figure.
- Click Configure to open the Configure Stepper Motor Parameters window, as shown in the following figure.
**Figure 26 • Configure Stepper Motor Parameters Window
**
- Click STOP to stop the motor/de-energize the motor.
- Click EXIT to exit the SmartFusion2 Motor Control GUI.
Register Dump Feature
The register dump feature generates a csv file with data to be programmed in each FPGA register, which is calculated based on motor configuration inputs.
- Click the icon marked in the following figure to open the Register Dump window.
**Figure 27 • Register Dump window
**
- The following figure shows the BLDC tab of the register dump window. The Save to File button opens a dialog box to specify the location and the name of the csv file. The generated csv file contains only the data corresponding to the BLDC blocks.
**Figure 28 • Register Dump window—BLDC Tab
**
- The following figure shows the Stepper tab of the register dump window. The Save to File button opens a dialog box to specify the location and the name of the csv file. The generated csv file contains only the data corresponding to the stepper blocks.
**Figure 29 • Register Dump window—Stepper Tab
**
- The following figure shows a sample csv file, which contains data calculated based on the inputs provided in the register dump window.
**Figure 30 • Sample Csv File
**
Appendix Jumper Settings
The following table lists the jumpers that are required to be set on the SmartFusion2 Starter Kit board.
Table 2 • Jumper Settings on the SmartFusion2 Starter Kit Board
Jumper | Function | Default Settings | Notes |
---|
Power Supply
J23| SOM power source| 1-3 Closed| On-board power to SOM
J22| JTAG Mode| 3-4 Closed| JTAG VPP to 3.3 V
J7, J13| Encoder – Single Ended selection| Open| To be set for single ended
encoder
J8| Encoder – Differential selection| Open| To be set for differential encoder
J19| Shunt resistor for power measurement| Open| Voltage can be measured
across shunt
J11| Encoder| Open| Port to connect encoder
The following figure shows the Jumpers on SmartFusion2 Starter Kit.
**Figure 31 • Jumpers on SmartFusion2 Starter Kit
**
Appendix Connecting the Motor Terminals
BLDC Motor Connections
The following steps describe how to connect to the BLDC motor:
- Identify and isolate the BLDC Motor Terminals (set of 3) and Hall Sensor Terminals (set of 5), as shown in the following figure. These terminals are tied together.
- Connect the BLDC Motor Terminals to the three pin plug.
- Connect the Hall Sensor Terminals to the five pin plug.
**Figure 32 • Wiring Diagram for BLDC Motor Connectors
**
Stepper Motor Connections
The stepper motor has four terminals. The motor terminals of the stepper motor
must be connected to the four pin plug, as shown in the following figure.
**Figure 33 • Wiring Diagram for Stepper Motor Connectors
**
Microsemi makes no warranty, representation, or guarantee regarding the
information contained herein or the suitability of its products and services
for any particular purpose, nor does Microsemi assume any liability whatsoever
arising out of the application or use of any product or circuit. The products
sold hereunder and any other products sold by Microsemi have been subject to
limited testing and should not be used in conjunction with mission-critical
equipment or applications. Any performance specifications are believed to be
reliable but are not verified, and Buyer must conduct and complete all
performance and other testing of the products, alone and together with, or
installed in, any end-products. Buyer shall not rely on any data and
performance specifications or parameters provided by Microsemi. It is the
Buyer’s responsibility to independently determine suitability of any products
and to test and verify the same. The information provided by Microsemi
hereunder is provided “as is, where is” and with all faults, and the entire
risk associated with such information is entirely with the Buyer. Microsemi
does not grant, explicitly or implicitly, to any party any patent rights,
licenses, or any other IP rights, whether with regard to such information
itself or anything described by such information. Information provided in this
document is proprietary to Microsemi, and Microsemi reserves the right to make
any changes to the information in this document or to any products and
services at any time without notice.
About Microsemi
Microsemi Corporation (Nasdaq: MSCC) offers a comprehensive portfolio of semiconductor and system solutions for aerospace & defense, communications, data center and industrial markets. Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs and ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world’s standard for time; voice processing devices; RF solutions; discrete components; enterprise storage and communication solutions, security technologies and scalable anti-tamper products; Ethernet solutions; Power-over-Ethernet ICs and midspans; as well as custom design capabilities and services. Microsemi is headquartered in Aliso Viejo, California, and has approximately 4,800 employees globally. Learn more at www.microsemi.com.
Microsemi Corporate Headquarters
One Enterprise, Aliso Viejo,
CA 92656 USA
Within the USA: +1 800-713-4113
Outside the USA: +1 949-380-6100
Fax: +1 949-215-4996
Email: sales.support@microsemi.com
www.microsemi.com
© 2016 Microsemi Corporation. All rights reserved. Microsemi and the Microsemi logo are trademarks of Microsemi Corporation. All other trademarks and service marks are the property of their respective owners.
References
- FPGA Documentation | Microchip Technology
- FPGA Documentation | Microchip Technology
- Microsemi | Semiconductor & System Solutions | Power Matters
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>