TIDA PWM Brushless DC Motor Control TI Reference Design

Similar documents
Wireless Subwoofer TI Design Tests

Texas Instruments. FB PS LLC Test Report HVPS SYSTEM AND APPLICATION TEAM REVA

Multi-Transformer LED TV Power User Guide. Anderson Hsiao

AMC1100: Replacement of Input Main Sensing Transformer in Inverters with Isolated Amplifier

SDLS068A DECEMBER 1972 REVISED OCTOBER Copyright 2001, Texas Instruments Incorporated

LM5030 LM5030 Application: DC - DC Converter Utilizing the Push-Pull Topology

TI Designs Precision: Verified Design Comparator with Hysteresis Reference Design

August 2001 PMP Low Power SLVU051

AN2680 Application note

RETRIEVING DATA FROM THE DDC112

Analysis of Power Supply Topologies for IGBT Gate Drivers in Industrial

Application Note AN107

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Controlling TAS5026 Volume After Error Recovery

SN54165, SN54LS165A, SN74165, SN74LS165A PARALLEL-LOAD 8-BIT SHIFT REGISTERS

Theory of Operation. Figure 1 illustrates a fan motor circuit used in an automobile application. The TPIC kω AREF.

Designing Gain and Offset in Thirty Seconds

APPLICATION NOTE BUILDING A QAM MODULATOR USING A GC2011 DIGITAL FILTER CHIP

LM556 LM556 Dual Timer

Evaluating the complex configuration options of the Texas Instruments advanced fuel gauges can be

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Application Report. 1 Introduction. 2 Resolution of an A-D Converter. 2.1 Signal-to-Noise Ratio (SNR) Harman Grewal... ABSTRACT

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

USER GUIDE EDBG. Description

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

DC/DC LED Lighting Developer s Kit Hardware

Design Note DN304. Cebal CCxxxx Development Tools USB Driver Installation Guide By Åsmund B. Bø. Keywords. 1 Introduction

Application Report. 1 Description of the Problem. Jeff Falin... PMP Portable Power Applications ABSTRACT

Evaluation Board for the AAT1275 Boost Converter with USB Power Switch

How To Close The Loop On A Fully Differential Op Amp

Providing Continuous Gate Drive Using a Charge Pump

Data sheet acquired from Harris Semiconductor SCHS078C -- Revised October 2003

Ultrasonic Sensing Basics for Liquid Level Sensing, Flow Sensing, and Fluid

Motor Speed Measurement Considerations When Using TMS320C24x DSPs

Filter Design in Thirty Seconds

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

AN-1733 Load Transient Testing Simplified

Sierra Dual 24 Volt Brushless DC Motor Controller Product Specification

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

Output Filter Design for EMI Rejection of the AAT5101 Class D Audio Amplifier

AN3265 Application note

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

Current-Transformer Phase-Shift Compensation and Calibration

AAV003-10E Current Sensor

Simplifying System Design Using the CS4350 PLL DAC

Brushless DC Motor Controller Product Specification Assembly 025F0129

CUSTOM GOOGLE SEARCH PRO. User Guide. User Guide Page 1

AN3252 Application note

EMC6D103S. Fan Control Device with High Frequency PWM Support and Hardware Monitoring Features PRODUCT FEATURES ORDER NUMBERS: Data Brief

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Software Real Time Clock Implementation on MC9S08LG32

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

SN54HC157, SN74HC157 QUADRUPLE 2-LINE TO 1-LINE DATA SELECTORS/MULTIPLEXERS

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

DRV8312-C2-KIT How to Run Guide

ZigBee Sensor Monitor SWRU157D 2008 Low-Power RF

How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or

UM1613 User manual. 16-pin smartcard interface ST8034P demonstration board. Introduction

Designing an Induction Cooker Using the S08PT Family

AAT001-10E TMR Angle Sensor

QUADRO POWER GUIDELINES

Planar PIN diode in a SOD323 very small plastic SMD package.

AN3332 Application note

Quad 2-input NAND Schmitt trigger

USER GUIDE. ATWINC1500B Hardware Design Guidelines - IEEE b/g/n IoT Module. Atmel SmartConnect. Introduction

Microcontroller for Variable Speed BLDC Fan Control System. T.C. Lun System Engineer, Freescale Semiconductor, Inc.

AVR127: Understanding ADC Parameters. Introduction. Features. Atmel 8-bit and 32-bit Microcontrollers APPLICATION NOTE

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

DISCRETE SEMICONDUCTORS DATA SHEET. dbook, halfpage M3D088. BB201 Low-voltage variable capacitance double diode. Product specification 2001 Oct 12

LM709 LM709 Operational Amplifier

Pressure Transducer to ADC Application

Design Note DN004. Folded Dipole Antenna for CC25xx By Audun Andersen. Keywords. 1 Introduction CC2500 CC2550 CC2510 CC2511

AVR311: Using the TWI Module as I2C Slave. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

CryptoAuth Xplained Pro

High-Speed Gigabit Data Transmission Across Various Cable Media at Various Lengths and Data Rate

HEF4011B. 1. General description. 2. Features and benefits. 3. Ordering information. 4. Functional diagram. Quad 2-input NAND gate

54LS174,54LS175,DM54LS174,DM54LS175, DM74LS174,DM74LS175

Signal Conditioning Wheatstone Resistive Bridge Sensors

SM1231 USER GUIDE SM1231 RF MODULE USER GUIDE

MODFLEX MINI GATEWAY ETHERNET USER S GUIDE

AN3998 Application note

AN1991. Audio decibel level detector with meter driver

Design Note DN041. Using CC253X or CC254X with Dipole PCB Antennas. Keywords. 1 Introduction. By Espen Wium CC2530 CC2531 CC2533 CC2540 CC2541

AN LPC24XX external memory bus example. Document information

AN Designing RC snubbers

DUAL MONITOR DRIVER AND VBIOS UPDATE

QT1 Xplained Pro. Preface. Atmel QTouch USER GUIDE

Flexible Active Shutter Control Interface using the MC1323x

APPLICATION NOTE. Atmel AT01095: Joystick Game Controller Reference Design. 8-/16-bit Atmel Microcontrollers. Features.

Setup for PWM Tests of BLDC Motor

SKY LF: GHz Two-Way, 0 Degrees Power Divider

HG2 Series Product Brief

DISCRETE SEMICONDUCTORS DATA SHEET M3D848. CGD MHz, 20 db gain power doubler amplifier. Product specification 2002 Oct 08

Application Report SLVA051

SN54HC191, SN74HC191 4-BIT SYNCHRONOUS UP/DOWN BINARY COUNTERS

APPLICATION BULLETIN

PAC52XX Clock Control Firmware Design

Transcription:

TI Reference Design Design Overview TIDA-00645 is a 3-phase sensored BLDC controller that uses a single PWM input for controlling speed. The DRV8305's integrated commutation table simplifies the microcontroller firmware, while automatically handling dead time and gate drive current control. Design Resources TIDA-00645 DRV8305 MSP430G2553 CSD18533Q5A BLDC Motor Control Using MSP430 Switch Hall A Hall B Hall C MSP430G2553 MCU 3.3 Volt Regulator ENABLE INH_A INL_A INH_B INL_B SPI Bus Design Folder Product Folder Product Folder Product Folder Tools Folder Hall Sensor Outputs DRV8305 Gate Driver CSD18533Q5A MOSFETs PHASE A PHASE B BLDC Design Features 12 24 Volt Operation simple control scheme allowing for single PWM signal and three digital hall states for built in commutation table onboard header and pull-up resistors for direct connection of active high Hall Sensors SPI communication between MCU and Driver for fast parameter adjustments onboard JTAG header for easy flashing of microcontroller firmware simple MSP430G2553 microcontroller supplying all driver control small 3 x 2 board dimensions include both power stage and control stage Featured Applications CPAP and Pumps Robotics and RC Toys Power Tools Industrial Automation Speed ADC PHASE C Power Supply 1. Introduction Traditional brushless DC motor (BLDC) control relies on a trapezoidal motor control scheme used to drive the three motor phases by properly generating high and low side gate signals for each of the six MOSFETs used in three half bridges. Using a trapezoidal scheme requires that the control module be able to sample the current state of the hall sensors inside of the BLDC and output six independent gate signals. The DRV8305 used in a simple brushless motor control scheme allows for the utilization of the devices 1-PWM mode, where the driver will read in one continuous PWM signal and three digital signals. Based on the state of the three digital input bits the driver uses an internal commutation table to determine the required gate signals to the three phases of the brushless motor. 2. Functional Overview The block diagram above illustrates the connection scheme utilized to control a sample BLDC motor using an MSP430G2553 microcontroller and the DRV8305 BLDC gate driver. User inputs from a simple push button switch are used to set the direction the motor will spin and a potentiometer is used to control the duty cycle of the PWM signal sent to the gate driver. The three hall sensors in the BLDC are connected to 1

GPIO ports on the MSP430G2553. An internal voltage regulator in the DRV8305 is used to supply 3.3 V to the microcontroller and hall sensors as well as the speed potentiometer and direction switch. Six CSD18522 MOSFETs are used for each of the three phases. 3. Commutation Tables Figure 1 below illustrates the required BLDC motor commutation between the current input states of the three hall sensors, the programmed output of the MSP430, and finally the three phase outputs of the DRV8305. Using the datasheet for the DRV8305 each of the three digital control signals sent from the MSP430 to the driver can be determined from the commutation table. As an example, when the hall input state is 0-0-1 (A-B-C) the required motor commutation would be Phase A floating, Phase B PWM, and Phase C ground tied. This output state is found in the DRV8305 datasheet as an inputs state of 1-0-1 (INL_A-INH_B-INL_B), so the MSP430 outputs that state while the hall input state is 0-0-1 as shown in the graph below. 001 011 010 110 100 101 Hall A Hall B Hall C Hall Sensor Inputs 101 001 011 010 110 100 INH_A INL_A INH_B MSP430 Outputs INL_B Phase A Phase B Phase C DRV8305 Outputs Figure 1. TIDA-00645 Commutation Scheme Interpreting between the required input state for the DRV8305 and the desired output signals can be done by examining the commutation table in the DRV8305 datasheet which includes individual gate signals supplied to the three phases based on the three input bits set by the MSP430G2553 output. The internal commutation table includes states for both active freewheeling motors and diode freewheeling motors and can be selected using the SPI register associated with this function. 2

4. SPI Communication In order to initialize the 1-PWM mode on the DRV8305 a SPI signal must be sent to the driver to perform a write command to the register associated with 1-PWM mode. To write to the SPI register the MSP430G2553 uses a 4-wire 8-bit SPI bus to communicate with the driver. For this reference design the MSP430G2553 is writing to change only one function in the DRV8305 but there are many other uses for this bus and various other registers that are outside the scope of this reference design. Because the DRV8305 registers are all 16 bit registers the MSP430 utilizes two different commands, the first to send the MSB through the 8 th bit and the second to send the 7 th bit down to the LSB. Because the SPI bus communicates using shift registers on the two devices, the use of two different 8 bit commands to send a 16 bit word is continuous between each transmission buffer. Figure 2. SPI 16-bit Timing Chart 5. Firmware Overview An example of the firmware code used to send the 16-bit SPI command is shown below. This code would allow the MSP430 to send a command to write to the desired register, write the received bits from the first 8-bit command to a readable variable result, send the next 8-bits and wait until that transmission has been sent and finally write the last 8-bits received to the result variable. This system allows the user to read the 16-bit value written to the SPI bus after a transmission has taken place. /* activate */ UCB0CTL1 &= ~UCSWRST; P2OUT &= (~BIT7); // Select Device UCB0TXBUF = 0x3B; while (UCB0STAT & BUSY); result = (UCB0RXBUF<< 8); while (UCB0STAT & BUSY); UCB0TXBUF = 0x16; while (UCB0STAT & BUSY); result = UCB0RXBUF; P2OUT = (BIT7); // Unselect Device 3

The first important function in this firmware is the Hall_Output() function that controls the three driver commutation table bits based on the input hall states. This function uses a switch command to take the input GPIO hall connections and compare them against six different case examples, each case being one of the six possible hall states. Once the case statement finds a match to the current hall state the required output based on the current motor direction is set using three GPIO pins. void Hall_Output(void){ HALL_STATE = (P2IN & BIT2) + (P2IN & BIT3) + (P2IN & BIT4); switch(hall_state){ case 4 : if(direction == 0){ - SET OUTPUT STATE FOR CCW DIRECTION else{ - SET OUTPUT STATE FOR CW DIRECTION break; // REMAINDER OF SIX CASES NOT INCLUDED IN ABOVE CODE, SEE REFERENCE DESIGN FIRMWARE FOR FULL CASE STATEMENT Independent of this function the firmware will sample the voltage on the ADC input pin connected to the speed potentiometer. This voltage is sampled and then truncated to fit in an 8-bit register that is then used to compare against the current Timer A value of the MSP430G2553. Timer A is configured to count up to 255, meaning at the configured 8 MHz clock speed the switching frequency of the output PWM is approximately 31.372 khz. The Motor_Speed() function is used to control the start up speed of the motor allowing for gradual increase in the duty cycle of the single PWM signal. void Motor_Speed(void){ Speed = ADC10MEM/4; if(current_speed < Speed){ Current_Speed=Current_Speed + 2; TA0CCR1=Current_Speed; // Restart Stalled Motor Statement else if(speed <=10){ while(speed <=10){ Speed = ADC10MEM/4; Current_Speed=Speed; TA0CCR1=Speed; else{ TA0CCR1=Speed; Current_Speed=Speed; Using the Motor_Speed() function and the Hall_Output() function the firmware now has the ability to regulate the PWM signal supplied to the DRV8305 and the specific hall states for proper motor commutation. Calling both of these functions is done using the Port 2 ISR function. Because all of the hall sensor inputs are connecting to Port 2 pins in the MSP430 the firmware can rely on a rising or falling edge on this port to trigger the ISR and call the motor speed / hall output functions. Using the ISR allows the firmware to not constantly be poling the states of the GPIO pins to know when a change has occurred and the firmware needs to react. This ISR is also in charge of handling the push button event signaling the request to change the motor direction. When the direction button flag is set the ISR stops the motor and holds the stopped state for 1.25 seconds then calls the Direction_Change() function. #pragma vector=port2_vector interrupt void Port_2(void){ if(p2ifg & BIT5){ P2OUT &= ~BIT0; P1OUT &= ~BIT4 + ~BIT3; delay_cycles(10000000); Direction_Change(); else if( P2IFG & BIT2 P2IFG & BIT3 P2IFG & BIT4){ Motor_Speed(); P2IFG &= (~BIT2)+(~BIT3)+(~BIT4); else{ 4

If the user chooses to change the direction of the motor a separate function Direction_Change() is called when the push button GPIO pin changes from a high state to a low state. This function toggles the Direction variable between 1 and 0 to allow for the proper hall state outputs based on the desired motor direction. Then the function rewrites the Current_Speed variable and the TA0CCR1 register to allow the Motor_Speed() function to begin ramping up the speed PWM duty cycle from a stopped state. The function then calls the Hall_Ouput() function to begin sending commutation signals based on the current hall state and the Motor_Speed() function to begin increasing the PWM signal. void Direction_Change(void){ if(direction == 0){ Direction=1; Current_Speed=25; TA0CCR1=1; Motor_Speed(); P2IFG &= ~BIT5; else{ Direction=0; Current_Speed=25; TA0CCR1=1; Motor_Speed(); P2IFG &= ~BIT5; 6. PCB Layout This board layout allows for integrated hall sensor and MSP430G2553 power using the integrated 3.3 V regulator inside of the DRV8305. In the top right corner of Figure 3 below the five 50 mil headers are shown where the BLDC hall sensor connections can be tied to the MSP430G2553 and 3.3 V power supply. The three motor phases can be connected to the large three-terminal connector in the middle of the PCB below. R 8 in the circuit below is the current sense resistor used for current monitoring of the connected BLDC. While the DRV8305 supports individual phase current monitoring this design has the source of each low side MOSFET tied together and then routed through the same sense resistor to ground. In this configuration only one sense resistor is utilized but this scheme allows for the driver to monitor total current through each of the three phases. The value at which current limiting will occur can be set by adjusting the size of R 8 or by changing the SPI registers associated with this function. Each of the three phases within this design also have their own corresponding bulk capacitor as shown below with C 19, C 20, and C 21. Figure 3. TIDA-00645 PCB Layout 5

7. Lab Data Each of the figures below illustrates the signal progression from the hall sensor inputs to the MSP430, the output of the MSP430 to the DRV8305, and finally the three phase outputs of the DRV8305. Figure 6 shows the driver outputs with 50% duty cycle PWM and Figure 7 shows the driver output with 100% duty cycle PWM. The spikes present in Figure 7 are a result of the MOSFETs switching the signal path between turning on or off a ground reference / turning on or off a high side V M Connection. This is typical of a system with an inductive element being switched between different signal paths. Figure 4. Hall Sensor Outputs Figure 5. MSP430G2553 Outputs Figure 6. DRV8305 Outputs 50% Duty Cycle Figure 7. DRV8305 Outputs 100% Duty Cycle 6

IMPORTANT NOTICE FOR TI REFERENCE DESIGNS Texas Instruments Incorporated ("TI") reference designs are solely intended to assist designers ( Buyers ) who are developing systems that incorporate TI semiconductor products (also referred to herein as components ). Buyer understands and agrees that Buyer remains responsible for using its independent analysis, evaluation and judgment in designing Buyer s systems and products. TI reference designs have been created using standard laboratory conditions and engineering practices. TI has not conducted any testing other than that specifically described in the published documentation for a particular reference design. TI may make corrections, enhancements, improvements and other changes to its reference designs. Buyers are authorized to use TI reference designs with the TI component(s) identified in each particular reference design and to modify the reference design in the development of their end products. HOWEVER, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY THIRD PARTY TECHNOLOGY OR INTELLECTUAL PROPERTY RIGHT, IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information published by TI regarding third-party products or services does not constitute a license to use such products or services, or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. TI REFERENCE DESIGNS ARE PROVIDED "AS IS". TI MAKES NO WARRANTIES OR REPRESENTATIONS WITH REGARD TO THE REFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, EXPRESS, IMPLIED OR STATUTORY, INCLUDING ACCURACY OR COMPLETENESS. TI DISCLAIMS ANY WARRANTY OF TITLE AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO TI REFERENCE DESIGNS OR USE THEREOF. TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY BUYERS AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON A COMBINATION OF COMPONENTS PROVIDED IN A TI REFERENCE DESIGN. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN ANY WAY OUT OF TI REFERENCE DESIGNS OR BUYER S USE OF TI REFERENCE DESIGNS. TI reserves the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All semiconductor products are sold subject to TI s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI s terms and conditions of sale of semiconductor products. Testing and other quality control techniques for TI components are used to the extent TI deems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily performed. TI assumes no liability for applications assistance or the design of Buyers products. Buyers are responsible for their products and applications using TI components. To minimize the risks associated with Buyers products and applications, Buyers should provide adequate design and operating safeguards. Reproduction of significant portions of TI information in TI data books, data sheets or reference designs is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards that anticipate dangerous failures, monitor failures and their consequences, lessen the likelihood of dangerous failures and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components in Buyer s safety-critical applications. In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI s goal is to help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and requirements. Nonetheless, such components are subject to these terms. No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties have executed an agreement specifically governing such use. Only those TI components that TI has specifically designated as military grade or enhanced plastic are designed and intended for use in military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components that have not been so designated is solely at Buyer's risk, and Buyer is solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.IMPORTANT NOTICE Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright 2015, Texas Instruments Incorporated