Upload
leliem
View
223
Download
6
Embed Size (px)
Citation preview
MnSLEEP
IN1 ± IN3
8 V to 60 V
V3P3
EN1 ± EN3
nFAULT 2.5-A max/phase
Three-Phase Stepper Motor
MSP430G2553Controller DRV8313
Potentiometer
Spi-By-Wire
Copyright © 2017, Texas Instruments Incorporated
1 2
STATUS
GreenGND
1 2
nFAULT
Red
1TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
TI DesignsDriving Three-Phase Stepper Motor With BLDC MotorDriver Reference Design
DescriptionThe TIDA-01362 reference design demonstrates howto drive a three-phase stepper motor using the samehardware structure of a brushless DC (BLDC) driver.By regulating the pulse-width modulation (PWM) signalschemes, the design achieves a smooth sinusoidal-output current. The DRV8313 device is used for theimplementation of this design.
Resources
TIDA-01362 Design FolderDRV8313 Product FolderMSP430G2553 Product FolderDRV8313EVM Product Folder
ASK Our E2E Experts
Features• Smooth Current• Low Noise Operation• Compact Design• Open Loop; No Current Feedback Required• Can Be Driven With Most TI BLDC Driver• Very Low to Zero Vibrations
Applications• Textile Equipment• Dome Cameras• Gimbals• Analytical and Medical Instruments• Robotics
An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and otherimportant disclaimers and information.
MnSLEEP
IN1 ± IN3
8 V to 60 V
V3P3
EN1 ± EN3
nFAULT 2.5-A max/phase
Three-Phase Stepper Motor
MSP430G2553Controller DRV8313
Potentiometer
Spi-By-Wire
Copyright © 2017, Texas Instruments Incorporated
1 2
STATUS
GreenGND
1 2
nFAULT
Red
System Overview www.ti.com
2 TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
1 System Overview
1.1 System DescriptionThis TIDA-01362 TI Design achieves a three-phase, high-resolution, micro-stepping module using TexasInstruments DRV8313 brushless DC (BLDC) motor driver. This design demonstrates how to create aPWM signal sequence to control the three-phase currents, sinusoidal, and 120º of phase shift.
1.2 Key System Specifications
Table 1. Key System Specifications
PARAMETER DESCRIPTION VALUEVoltage Input voltage for motor 10 V to 18 V
Current Maximum motor phasecurrent 3.5 A
Resistance Motor windingresistance 4.5 Ω
Inductance Motor windinginductance 20 mH
Frequency Microcontroller PWMsignal frequency 20 kHz
1.3 Block Diagram
www.ti.com System Overview
3TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
1.4 Highlighted Products
1.4.1 DRV8313The DRV8313 provides three individually-controllable, half-H-bridge drivers (see Figure 1). The device isintended to drive a three-phase BLDC motor, although it can also be used to drive solenoids or otherloads. Each output driver channel consists of N-channel power MOSFETs configured in a ½-H-bridgeconfiguration. Each ½-H-bridge driver has a dedicated ground terminal, which allows independent externalcurrent sensing.
An uncommitted comparator is integrated into the DRV8313, which allows for the construction of current-limit circuitry or other functions.
Internal protection functions are provided for undervoltage, charge pump faults, overcurrent, short circuits,and overtemperature. Fault conditions are indicated by the nFAULT pin.
Features:• Triple ½-H-bridge driver IC
– Three-phase BLDC motors• High Current-drive capability: 2.5-A peak• Low MOSFET ON-resistance• Independent ½-H-bridge control• Uncommitted comparator can be used for current limit or other functions• Built-in 3.3-V, 10-mA low-dropout (LDO) regulator• 8-V to 60-V operating supply-voltage range• Sleep mode for standby operation• Small package and footprint
– 28-Pin HTSSOP (PowerPAD™ integrated circuit package)– 36-Pin VQFN
System Overview www.ti.com
4 TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
Figure 1. DRV8313 Block Diagram
1.4.2 MSP430G2533The Texas Instruments MSP430™ family of ultra-low-power microcontrollers (MCUs) consists of severaldevices featuring different sets of peripherals targeted for various applications. The architecture, combinedwith five low-power modes, is optimized to achieve extended battery life in portable measurementapplications. The device features a powerful 16-bit reduced instruction set computing (RISC) CPU, 16-bitregisters, and constant generators that contribute to maximum code efficiency. The digitally controlledoscillator (DCO) allows wake-up from low-power modes to active mode in less than 1 µs.
The MSP430G2x13 and MSP430G2x53 series are ultra-low-power mixed signal MCUs with built-in 16-bittimers, up to 24 I/O capacitive-touch enabled pins, a versatile analog comparator, and built-incommunication capability using the universal serial communication interface (see Figure 2). In addition,the devices in the MSP430G2x53 family have a 10-bit analog-to-digital (ADC) converter.
Clock
System
Brownout
Protection
RST/NMI
DVCC DVSS
MCLK
Watchdog
WDT+
15-Bit
Timer0_A3
3 CC
Registers
16MHz
CPU
incl. 16
Registers
Emulation
2BP
JTAG
Interface
SMCLK
ACLK
MDB
MAB
Port P1
8 I/O
Interrupt
capability
pullup/down
resistors
P1.x
8
P2.x
Port P2
8 I/O
Interrupt
capability
pullup/down
resistors
Spy-Bi-
Wire
Comp_A+
8 Channels
Timer1_A3
3 CC
Registers
XIN XOUT
Port P3
8 I/O
pullup/
pulldown
resistors
P3.x
8 8
RAM
512B
256B
Flash
16KB
8KB
4KB
2KB
USCI A0
UART/
LIN, IrDA,
SPI
USCI B0
SPI, I2C
ADC
10-Bit
8 Ch.
Autoscan
1 ch DMA
Copyright © 2017, Texas Instruments Incorporated
www.ti.com System Overview
5TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
Features:• Low supply-voltage range: 1.8 V to 3.6 V• Ultra-low-power consumption
– Active mode: 230 µA at 1 MHz, 2.2 V– Standby mode: 0.5 µA– Off mode (RAM retention): 0.1 µA
• Five power-saving modes• Ultra-fast wake-up from standby mode in less than 1 µs• 16-bit RISC architecture, 62.5-ns instruction cycle time• Basic clock module configurations
– Internal frequencies up to 16 MHz with four calibrated frequency– Internal very-low-power low-frequency (LF) oscillator– 32-kHz crystal– External digital clock source
• Two 16-bit Timer_A with three capture/compare registers• Up to 24 capacitive-touch enabled I/O pins• Universal serial communication interface (USCI)
– Enhanced universal asynchronous receiver/transmitter (UART) supporting auto baudrate detection(LIN)
– IrDA encoder and decoder– Synchronous serial peripheral interface (SPI)– I2C
• On-chip comparator for analog signal compare function or slope analog-to-digital conversion• 10-bit 200-ksps ADC with internal reference, sample-and-hold, and autoscan• Brownout detector• Serial onboard programming, no external programming voltage required, programmable code
protection by security fuse• On-chip emulation logic with Spy-Bi-Wire interface
Figure 2. MSP430G2553 Functional Block Diagram
VM C3
0.01µF
V3P3
IN1
EN
IN2
IN3
EN
nRESET
nSLEEP
OUT3
OUT2
OUT1
CPH
CPL
10µFC6
GND
10k
R13
GND
0.47µFC4
GND
GND
D3082-05
GNDGNDCOMPN
22COMPP
21
CPH6
CPL5
EN11
EN235
EN333
GND3
GND17
GND23
GND24
GND30
GND31
GND32
RSVD18
GND20
IN12
IN236
IN334
NC14
NC4
NC8
OUT110
OUT213
OUT315
PAD37
PGND111
PGND212
PGND316
V3P325
VCP7
VM9
VM19
COMPO29
FAULT28
RESET26
SLEEP27
DRV8313
DRV8313RHHR
0.1µFC7
0.1µFC8
5
4
1
2
3
6
J3
IN1IN2IN3EN
EN
nFAULT
0.1µF
C5
VM
nFAULTV3P3
VCP
GND
GND
Copyright © 2016, Texas Instruments Incorporated
System Design Theory www.ti.com
6 TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
2 System Design TheoryThree-phase stepper motors are useful in applications that require very-high resolution (micro-stepping) aswell as minimal noise and vibration. This TIDA-01362 design achieves all of these requirements by drivinga three-phase stepper motor using Texas Instruments DRV8313 brushless DC (BLDC) motor driver. Thethree half-bridges of the BLDC device drive the three phases of the stepper motor in an open-loop system.Any TI BLDC device can be used to drive a three-phase stepper motor; for practicality, the DRV8313device has been selected for its compact design because it offers integrated power MOSFETs.
Driving the three-phase stepper motor is achieved by implementing and controlling the duty cycle of PWMsignals of the MCU. The modulated signal controls the ON and OFF time of the power MOSFETs in thehalf-bridges, which in turn controls the output current and voltage supplied to the windings of the three-phase stepper motor.
The three phases of the motor are driven by the three outputs of the DRV8313, as Figure 3 shows.
Figure 3. DRV8313
Pins IN1, IN2, and IN3 are the three PWM inputs from the microcontroller into the DRV8313 (seeFigure 4). Also, the enable pin, EN, is driven from the MCU. The EN1, EN2, and EN3 input pins in theDRV8313, enable or disable the outputs of the driver OUT1, OUT2, and OUT3, respectively. For thisdesign, the three EN pins always remain high because the implementation only depends on the PWMsignals.
GND
TEST
RESET
nFAULT
0.1µFC2
GND
V3P3
DVCC1
P1.0/TA0CLK/ACLK/A0/CA02
P1.1/TA0.0/UCA0RXD/UCA0SOMI/A1/CA13
P1.2/TA0.1/UCA0TXD/UCA0SIMO/A2/CA24
P1.3/ADC10CLK/A3/VREF-/VEREF-/CA3/CAOUT5
P1.4/SMCLK/UCB0STE/UCA0CLK/A4/VREF+/VEREF+/CA4/TCK6
P1.5/TA0.0/UCB0CLK/UCA0STE/A5/CA5/TMS7
P2.0/TA1.08
P2.1/TA1.19
P2.2/TA1.110
P2.3/TA1.011
P2.4/TA1.212
P2.5/TA1.213
P1.6/TA0.1/A6/CA6/UCB0SOMI/UCB0SCL/TDI/TCLK14
P1.7/A7/CA7/CAOUT/UCB0SIMO/UCB0SDA/TDO/TDI15
RST/NMI/SBWTDIO16
TEST/SBWTCK17
P2.7/XOUT18
P2.6/XIN/TA0.119
DVSS20
MSP430G2553
MSP430G2553IPW20R
0
R12PWMB
PWMC
EN
POT
nRESET
STATUS
PUSH
nSLEEP
0
R9
0
R7PWMA IN1
IN2
IN3
0
R6
0
R8
0
R11
0
R10
Copyright © 2016, Texas Instruments Incorporated
www.ti.com System Design Theory
7TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
Figure 4. MSP430G2553
The three PWM signals implemented from the MSP430G2553 MCU follow a sine-wave scheme. For eachoutput phase of the stepper motor, the same scheme is executed with a 120° phase shift.
The duty cycle of the modulated signals are set to change between 10% to 90% duty cycle. These ONand OFF time variations create the sine waves required to drive the stepper motor.
The following Figure 5 shows the PWM scheme to produce the microstepping-sine waveform output.
As Figure 5 shows, the three PWM signals from the MCU create the three current waves. The sequencestarts at 50% duty cycle and increases to maximum, which represents the peak of the sine wave. Then,the duty cycle starts decreasing down to 50% all the way to the minimum, which is the valley of the wave.This commutation is the same for all three phases with the 120º delay.
System Design Theory www.ti.com
8 TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
Figure 5. PWM Scheme for Sine Waveform Output
STATUSLED
nFAULT Spy-Bi-Wire Connector
Potentiometer
Stepper Motor Connection
Input Voltage
W V U
www.ti.com Getting Started Hardware
9TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
3 Getting Started Hardware
3.1 HardwareThe VM pin headers are the input voltage supply for the board. The output to the three-phase steppermotor is through the VOUT pin header connectors, as Figure 6 shows.
Figure 6. Input and Output Connections
The board has two light-emitting diodes (LEDs), the status LED (green) to acknowledge a functional boardand the nFAULT LED (red) when a fault occurs in the DRV8313 driver. The board also has apotentiomenter for speed, direction input control, or both, and a Spy-Bi-Wire connector to program theMCU of the board, MSP430G2553. Figure 7 shows the board hardware.
Figure 7. Board Hardware
Potentiometer ADC
0
1
2
3,4
5
6
7
Read Convert
<
<<
<<<
<
<<
<<<
EN pin Disabled
Update Interrupt(Change Frequency)
50 ��± 1 N�� 3-Bit Resolution
Getting Started Hardware www.ti.com
10 TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
3.2 SoftwareThe firmware for this TI Design was developed using the TI Code Composer Studio™ software version6.1.3. The code uploaded to the MSP430G2553 MCU was programmed through Spy-Bi-Wire protocol(two-wire Joint Test Action Group (JTAG)).
This firmware can be downloaded from the TIDA-01362 design folder (see Section 6). The high-leveldescription implemented in the design is as follows.1. Define the pins used in the MCU then set the PWM frequency.2. Create a sine look-up table for the stepper motor3. Configure the clock and timers. TA0CCR1 is used for phase U, TA1CCR1 is used for phase V, and
TA1CCR2 is used for phase W.4. Set the timer interrupt and update the values for each phase according to the sine look-up table
values.
Although firmware for the speed control and direction feature is not implemented in the code provided withthe reference design, it can easily be implemented to reproduce a typical stepper motor application bysetting the ADC feature of the MCU (see Figure 8).
Figure 8. Speed and Direction Implementation
www.ti.com Testing and Results
11TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
4 Testing and ResultsTwo different type of motors are tested with this design, the first being a Nema 34 and the second a Nema17 stepper motor. The captures in Figure 9 through Figure 13 have been generated while running theNema 34 stepper motor at 10 V. Motor specificaitions are listed on Table 1
Figure 9. Three PWM Input Signals and Current Output Phase U
Figure 10. Output Currents of Three-Phase Stepper Motor
Testing and Results www.ti.com
12 TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
Figure 11. IN2 (PWM_V) 50% DC, Output Phase V at 0º
Figure 12. IN2 (PWM_V) 90% DC, Output Phase V at 90º
www.ti.com Testing and Results
13TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
Figure 13. IN2 (PWM_V) 10% DC, Output Phase V at 270º
Add ground through stitching to reduce impedances (good
practice to reduce EMI.)
Placing small vias directly under the PowerPadTM is
recommended to aid thermal dissipation to the ground
plane.
Short path from Input Voltage to VCC pins. Low ESR
capacitors placed in between VM and VCC.
Design Files www.ti.com
14 TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
5 Design Files
5.1 SchematicsTo download the schematics, see the design files at TIDA-01362.
5.2 Bill of MaterialsTo download the bill of materials (BOM), see the design files at TIDA-01362.
5.3 PCB Layout RecommendationsFigure 14 shows a few layout guidelines for this design. The complete layout can be downloaded fro thedesign files at TIDA-01362.
Figure 14. TIDA-01362 Layout Recommendations
5.3.1 Layout PrintsTo download the layer plots, see the design files at TIDA-01362.
5.4 Altium ProjectTo download the Altium project files, see the design files at TIDA-01362.
5.5 Gerber FilesTo download the Gerber files, see the design files at TIDA-01362.
www.ti.com Design Files
15TIDUCN7–January 2017Submit Documentation Feedback
Copyright © 2017, Texas Instruments Incorporated
Driving Three-Phase Stepper Motor With BLDC Motor Driver ReferenceDesign
5.6 Assembly DrawingsTo download the assembly drawings, see the design files at TIDA-01362.
6 Software FilesTo download the software files, see the design files at TIDA-01362.
7 Related Documentation
1. Texas Instruments, DRV8313EVM User’s Guide, DRV8313EVM User’s Guide (SLVU815)
7.1 TrademarksPowerPAD, MSP430, Code Composer Studio are trademarks of Texas Instruments.
8 About the AuthorLUIS RIVEROS-LUQUE is an applications engineer at Texas Instruments where he is currently part of theApplications Rotational Program. He supports a broad portfolio of motor drivers. Luis earned hisbachelor's of science in electrical engineering from Virginia Tech in Blacksburg VA.
IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES
Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to,reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who aredeveloping applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you(individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms ofthis Notice.TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TIproducts, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections,enhancements, improvements and other changes to its TI Resources.You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing yourapplications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications(and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. Yourepresent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1)anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures thatmight cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, youwill thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted anytesting other than that specifically described in the published documentation for a particular TI Resource.You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that includethe TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TOANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTYRIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, orother intellectual property right relating to any combination, machine, or process in which TI products or services are used. Informationregarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty orendorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of thethird party, or a license from TI under the patents or other intellectual property of TI.TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES ORREPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TOACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUALPROPERTY RIGHTS.TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOTLIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IFDESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL,COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH ORARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THEPOSSIBILITY OF SUCH DAMAGES.You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your non-compliance with the terms and provisions of this Notice.This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services.These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluationmodules, and samples (http://www.ti.com/sc/docs/sampterms.htm).
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2017, Texas Instruments Incorporated