MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide 2013 Microchip Technology Inc. DS50002233A Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MTP, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. Analog-for-the-Digital Age, Application Maestro, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, SQI, Serial Quad I/O, Total Endurance, TSHARC, UniWinDriver, WiperLock, ZENA and Z-Scale are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. GestIC and ULPP are registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2013, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. ISBN: 9781620777800 QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS 16949 == DS50002233A-page 2 Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. 2013 Microchip Technology Inc. MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD USER’S GUIDE Table of Contents Preface ........................................................................................................................... 7 Introduction............................................................................................................ 7 Document Layout .................................................................................................. 7 Conventions Used in this Guide ............................................................................ 8 Recommended Reading........................................................................................ 9 The Microchip Web Site ........................................................................................ 9 Development Systems Customer Change Notification Service .......................... 10 Customer Support ............................................................................................... 10 Document Revision History ................................................................................. 10 Chapter 1. Product Overview 1.1 Introduction ................................................................................................... 11 1.2 What is the MCP8024 TQFP BLDC Motor Driver Evaluation Board? .......... 12 1.3 What the MCP8024 TQFP BLDC Motor Driver Evaluation Board Kit Includes ............................................................................................. 12 Chapter 2. Installation and Operation 2.1 Introduction ................................................................................................... 13 2.2 Features ....................................................................................................... 13 2.3 Getting Started ............................................................................................. 14 2.3.1 Connections .............................................................................................. 14 2.3.2 Operating a Motor ..................................................................................... 17 2.3.3 Indicator LEDs ........................................................................................... 18 2.3.4 Test Points ................................................................................................ 18 2.3.5 User Program Data Logging and Communications ................................... 19 2.3.6 Re-Programming the dsPIC DSC PIM ...................................................... 19 2.3.7 Configuring the MCP8024 ......................................................................... 19 2.3.8 MCP8024 Status ....................................................................................... 21 Appendix A. Schematic and Layouts A.1 Introduction .................................................................................................. 23 A.2 Board – Schematic ....................................................................................... 24 A.3 Board – Top Silk Layer ................................................................................ 25 A.4 Board – Top Metal Layer ............................................................................. 26 A.5 Board – Mid1 Metal Layer ............................................................................ 27 A.6 Board – Mid2 Metal Layer ............................................................................ 28 A.7 Board – Bottom Metal Layer ........................................................................ 29 Appendix B. Bill of Materials (BOM) 2013 Microchip Technology Inc. DS50002233A-page 3 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide Appendix C. Software C.1 Selected Software Constants and Definitions .............................................. 35 C.2 dsPIC33FJ32MC204 PIM Port Usage ......................................................... 36 C.3 MPLAB X IDE Compiler Startup .................................................................. 37 C.4 MPLAB X IDE and PICkit 3 Programmer Exercise ...................................... 37 Worldwide Sales and Service .....................................................................................40 DS50002233A-page 4 2013 Microchip Technology Inc. Object of Declaration: MCP8024 TQFP BLDC Motor Driver Evaluation Board 2013 Microchip Technology Inc. DS50002233A-page 5 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide NOTES: DS50002233A-page 6 2013 Microchip Technology Inc. MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD USER’S GUIDE Preface NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the document. For the most up-to-date information on development tools, see the MPLAB® IDE on-line help. Select the Help menu, and then Topics to open a list of available on-line help files. INTRODUCTION This chapter contains general information that will be useful to know before using the MCP8024 TQFP BLDC Motor Driver Evaluation Board. Items discussed in this chapter include: • • • • • • Document Layout Conventions Used in this Guide Recommended Reading The Microchip Web Site Customer Support Document Revision History DOCUMENT LAYOUT This document describes how to use the MCP8024 TQFP BLDC Motor Driver Evaluation Board. The manual layout is as follows: • Chapter 1. “Product Overview” – Important information about the MCP8024 TQFP BLDC Motor Driver Evaluation Board. • Chapter 2. “Installation and Operation” – Includes instructions on how to get started with this user’s guide and a description of the user’s guide. • Appendix A. “Schematic and Layouts” – Shows the schematic and layout diagrams for the MCP8024 TQFP BLDC Motor Driver Evaluation Board. • Appendix B. “Bill of Materials (BOM)” – Lists the parts used to build the MCP8024 TQFP BLDC Motor Driver Evaluation Board. • Appendix C. “Software” – Provides information about the application firmware and where the source code can be found. 2013 Microchip Technology Inc. DS50002233A-page 7 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Initial caps Quotes Underlined, italic text with right angle bracket Bold characters N‘Rnnnn Text in angle brackets < > Courier New font: Plain Courier New Represents Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB® IDE User’s Guide ...is the only compiler... the Output window the Settings dialog select Enable Programmer “Save project before build” A dialog button A tab A number in verilog format, where N is the total number of digits, R is the radix and n is a digit. A key on the keyboard Click OK Click the Power tab 4‘b0010, 2‘hF1 Italic Courier New Sample source code Filenames File paths Keywords Command-line options Bit values Constants A variable argument Square brackets [ ] Optional arguments Curly brackets and pipe character: { | } Ellipses... Choice of mutually exclusive arguments; an OR selection Replaces repeated text Represents code supplied by user DS50002233A-page 8 Examples File>Save Press <Enter>, <F1> #define START autoexec.bat c:\mcc18\h _asm, _endasm, static -Opa+, -Opa0, 1 0xFF, ‘A’ file.o, where file can be any valid filename mcc18 [options] file [options] errorlevel {0|1} var_name [, var_name...] void main (void) { ... } 2013 Microchip Technology Inc. Preface RECOMMENDED READING This user's guide describes how to use MCP8024 TQFP BLDC Motor Driver Evaluation Board. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources. • MCP8024 Data Sheet – “3-Phase Brushless DC (BLDC) Motor Gate Driver with Power Module” (DS20005228) This data sheet provides detailed information regarding the MCP8024 product family. • dsPIC33FJ32MC204 Data Sheet – “16-bit Digital Signal Controllers (up to 32 KB Flash and 2 KB SRAM) with Motor Control and Advanced Analog” (DS70283) This data sheet provides detailed information regarding the dsPIC33FJ32MC204 product family. • dsPIC33FJ32MC204 Plug-In-Module – “dsPIC33FJ32MC204 PIM Information Sheet” (DS70316) This data sheet provides detailed information regarding the dsPIC33FJ32MC204 PIM. • AN1078 Application Note – “Sensorless Field Oriented Control Of a PMSM” (DS01078). • AN1160 Application Note – “Sensorless BLDC Control with Back-EMF Filtering Using a Majority Function” (DS01160). • AN901 Application Note – “Using the dsPIC30F for Sensorless BLDC Control” (DS00901). THE MICROCHIP WEB SITE Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives 2013 Microchip Technology Inc. DS50002233A-page 9 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions. The Development Systems product group categories are: • Compilers – The latest information on Microchip C compilers, assemblers, linkers and other language tools. These include all MPLAB C compilers; all MPLAB assemblers (including MPASM™ assembler); all MPLAB linkers (including MPLINK™ object linker); and all MPLAB librarians (including MPLIB™ object librarian). • Emulators – The latest information on Microchip in-circuit emulators.This includes the MPLAB REAL ICE™ and MPLAB ICE 2000 in-circuit emulators. • In-Circuit Debuggers – The latest information on the Microchip in-circuit debuggers. This includes MPLAB ICD 3 in-circuit debuggers and PICkit™ 3 debug express. • MPLAB® IDE – The latest information on Microchip MPLAB IDE, the Windows® Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and MPLAB SIM simulator, as well as general editing and debugging features. • Programmers – The latest information on Microchip programmers. These include production programmers such as MPLAB REAL ICE in-circuit emulator, MPLAB ICD 3 in-circuit debugger and MPLAB PM3 device programmers. Also included are non-production development programmers such as PICSTART® Plus and PICkit 2 and 3. CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • • • • Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://www.microchip.com/support DOCUMENT REVISION HISTORY Revision A (December 2013) • Initial Release of this Document. DS50002233A-page 10 2013 Microchip Technology Inc. MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD USER’S GUIDE Chapter 1. Product Overview 1.1 INTRODUCTION The MCP8024 TQFP BLDC Motor Driver Evaluation Board is used to demonstrate the drive capabilities of the MCP8024. The board uses the MCP8024 3-Phase Brushless DC (BLDC) motor gate driver and dsPIC33FJ32MC204 Plug-In Module (PIM) to implement a 6-step trapezoidal BLDC motor controller. The MCP8024 TQFP BLDC Motor Driver Evaluation Board is used to evaluate Microchip’s MCP8024 in a BLDC motor application. As provided, the MCP8024 TQFP BLDC Motor Driver Evaluation Board is ready to operate a BLDC motor using one on-board push button to start and stop the motor, plus one on-board potentiometer to set motor speed. The evaluation board can drive a BLDC motor with a supply voltage of up to 28V and a motor current up to 15A. The MCP8024 TQFP BLDC Motor Driver Evaluation Board provides a 6-step trapezoidal control algorithm along with a 750 mW buck converter, 5V and 12V LDO, high-to-low level voltage translators, current sense operational amplifiers and Hall-effect inputs. The evaluation board provides a status indication for the power supplies and the six on-board Pulse-Width Modulation (PWM) inputs. This chapter covers the following topics. • What is the MCP8024 TQFP BLDC Motor Driver Evaluation Board? • What the MCP8024 TQFP BLDC Motor Driver Evaluation Board kit includes 7V to 28V Power Supply + - MCP8024 Evaluation Board dsPIC33FJ32MC204 PIM FIGURE 1-1: Diagram. 2013 Microchip Technology Inc. Phase B Phase C BLDC Motor Phase A MCP8024 TQFP BLDC Motor Driver Evaluation Board Block DS50002233A-page 11 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide 1.2 WHAT IS THE MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD? The MCP8024 TQFP BLDC Motor Driver Evaluation Board is a complete stand-alone motor controller for brushless DC motors (BLDC). The board is capable of driving a three-phase brushless DC motor rated at up to 15A and 28V. The input voltage range for the board is 7V to 28V. The on-board MCP8024 generates 5V and 12V using internal voltage regulators. The MCP8024 also contains an internal buck regulator which generates the power for the attached dsPIC33FJ32MC204 host microcontroller. An input terminal block is provided to apply the input voltage to the board. An output header and plated Printed Circuit Board (PCB) through-hole pads are also provided as a means to connect the external motor. Two programming headers are available for updating the firmware contained in the dsPIC33FJ32MC204 using either a PICkit™ 3 programmer/debugger, MPLAB® REAL ICE™ in-circuit emulator or an MPLAB ICD 3 In-circuit debugger. Two headers are also supplied on the board to allow users to create SPI and I2C™ communication connections. 1.3 WHAT THE MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD KIT INCLUDES This MCP8024 TQFP BLDC Motor Driver Evaluation Board kit includes: • MCP8024 TQFP BLDC Motor Driver Evaluation Board (ADM00557) • dsPIC33FJ32MC204 Plug-In-Module (MA330017) • Information Sheet DS50002233A-page 12 2013 Microchip Technology Inc. MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD USER’S GUIDE Chapter 2. Installation and Operation 2.1 INTRODUCTION The MCP8024 TQFP BLDC Motor Driver Evaluation Board demonstrates Microchip’s 3-Phase Brushless DC (BLDC) Motor Gate Driver with Power Module (MCP8024), used in a BLDC motor drive application. When used in conjunction with a microcontroller, the MCP8024 will provide the necessary drive signals to drive a 3-Phase BLDC motor. The MCP8024 contains the high-side and low-side drivers for external N-channel MOSFETs. The dsPIC33FJ32MC204 Motor Control processor is used to supply the PWM inputs to the MCP8024, as well as handle the high-speed Analog-to-Digital Conversion (ADC) required for 40 kHz PWM operation. The MCP8024’s UART interface is used to configure the device and to send fault information to the dsPIC® DSC controller. The evaluation board firmware, available on the Microchip website, uses a 6-step trapezoidal drive control algorithm to demonstrate the MCP8024 capabilities. 2.2 FEATURES The MCP8024 TQFP BLDC Motor Driver Evaluation Board has the following features: • • • • • • • • • • • • • • • • • Input Operating Voltage Range: +7.0V to +28V Maximum of 500 mA of gate drive current for external N-Channel MOSFETs Drives up to a 15A BLDC motor 750 mW Buck Regulator with resistor-programmable output voltage ON/OFF momentary contact switch Reset momentary contact switch Spare user-programmable momentary contact switch PWM signal LED indicators 100-pin dsPIC DSC PIM header for use with MA330017 compatible PIMs PICkit 3, MPLAB REAL ICE in-circuit emulator and MPLAB ICD 3 debugger interfaces Speed control potentiometer Terminal block for 5V and 12V Hall-effect sensors SPI and I2C headers for user communications Programmable external MOSFET overcurrent protection Programmable PWM dead-time protection Programmable PWM blanking time for current switching spikes Complete “C” source code (provided on the board web page) 2013 Microchip Technology Inc. DS50002233A-page 13 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide 2.3 GETTING STARTED The MCP8024 TQFP BLDC Motor Driver Evaluation Board is fully assembled and tested for driving a BLDC motor. This board requires the use of an external voltage source capable of supplying 7V to 28V at the rated motor current. A BLDC motor is also required to evaluate the motor driver. FIGURE 2-1: MCP8024 TQFP BLDC Motor Driver Evaluation Board Overlay. 2.3.1 Connections 2.3.1.1 JUMPER SETTINGS The MCP8024 TQFP BLDC Motor Driver Evaluation Board has several user-configurable jumpers. The jumpers are described in Table 2-1. TABLE 2-1: Jumper Position Description JP1 ON JP2 1-2 Disable Buck Regulator 2-3 Enable Buck Regulator 1-2 I2C™ Communications 2-3 SPI Communications JP4 ON Enable dsPIC® DSC to DE2 Communications JP5 ON Enable dsPIC DSC to DE2 Communications JP6 1-2 Enable dsPIC DSC to PICkit™ Serial Communications 3-4 Enable DE2 to PICkit Serial Communications JP3 DS50002233A-page 14 MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD JUMPERS SPI Communications 2013 Microchip Technology Inc. Installation and Operation TABLE 2-1: MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD JUMPERS (CONTINUED) Jumper JP9 Description 1-2 CE Pull Up 2-3 CE Pull Down JP10 ON Routes DE2 to dsPIC DSC RP20/CN25/RC4 pin JP11 1-2 Enable DE2 to PICkit Serial Communications 3-4 Enable dsPIC DSC to PICkit Serial Communications JP12 (MONITOR1) JP13 (MONITOR2) JP14 (MONITOR3) 1-2 Connect Phase Current to MONITORn JP15 3-4 Connect Filtered Phase Voltage to MONITORn 5-6 Connect Hall Sensor to MONITORn 1-2 5V Hall Sensor Power Supply 2-3 12V Hall Sensor Power Supply JP16 — Sums Individual Phase Currents (soldered wire) JP17 — Select Individual Phase Currents (soldered wire) JP18 1-2 Current Sense Offset = 0.992V 2-3 Current Sense Offset = 0.0V 2.3.1.1.1 TABLE 2-2: Position The jumpers and their use are described in Table 2-2. JUMPER DESCRIPTION Jumper Position Description Enables PICkit™ Serial SPI (J4) communications to the dsPIC® DSC JP1 (used with JP3) ON JP2 1-2 Disables the MCP8024 buck regulator by connecting the FB pin to +5V 2-3 Enables the MCP8024 buck regulator by connecting the FB pin to the buck output voltage divider 1-2 Enables PICkit Serial I2C™ (J4) communications to the dsPIC DSC 2-3 Enables PICkit Serial SPI (J4) communications to the dsPIC DSC JP4 ON Enables the dsPIC DSC to Transmit to the MCP8024 DE2 pin JP5 ON Enables the dsPIC DSC to Receive from the MCP8024 DE2 pin JP6 1-2 Enables PICkit Serial UART (J1) Transmissions to the dsPIC DSC 3-4 Enables PICkit Serial UART (J1) Transmissions to the MCP8024 DE2 pin JP3 (used with JP1) JP7 Permanent jumper wire connecting Digital ground to Power ground JP8 Permanent jumper wire connecting Analog ground to Power ground JP9 1-2 Connects the MCP8024 CE pin to a pull-up resistor 2-3 Connects the MCP8024 CE pin to a pull-down resistor JP10 ON Connects the dsPIC DSC RP20/CN25/RC4 pin to the MCP8024 DE2 pin JP11 1-2 Enables PICkit Serial UART (J1) Reception from the MCP8024 DE2 pin 3-4 Enables PICkit Serial UART (J1) Reception from the dsPIC DSC JP12 1-2 Connects the Phase A amplified motor current to the dsPIC DSC Monitor 1 input 3-4 Connects the Phase A filtered motor current to the dsPIC DSC Monitor 1 input 5-6 Connects the Phase A Hall-effect sensor input to the dsPIC DSC Monitor 1 input 1-2 Connects the Phase B amplified motor current to the dsPIC DSC Monitor 2 input 3-4 Connects the Phase B filtered motor current to the dsPIC DSC Monitor 2 input 5-6 Connects the Phase B Hall-effect sensor input to the dsPIC DSC Monitor 2 input JP13 2013 Microchip Technology Inc. DS50002233A-page 15 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide TABLE 2-2: JUMPER DESCRIPTION (CONTINUED) Jumper Position JP14 JP15 Description 1-2 Connects the Phase C amplified motor current to the dsPIC DSC Monitor 3 input 3-4 Connects the Phase C filtered motor current to the dsPIC DSC Monitor 3 input 5-6 Connects the Phase C Hall-effect sensor input to the dsPIC DSC Monitor 3 input 1-2 Sets the Hall effect supply to +5V 2-3 Sets the Hall effect supply to +12V JP16 (used with JP17) Jumper wire connecting Phase B and Phase C sense resistors to Phase A sense resistor for summing phase currents JP17 (used with JP16) Jumper wire connecting Phase B and Phase C sense resistors to ground for using individual phase currents JP18 1-2 Sets the current sense amplifier offset voltage to 0.992 volts 2-3 Sets the current sense amplifier offset voltage to 0.0 volts The jumper settings for use with the sensorless trapezoidal drive firmware are described in Table 2-3. TABLE 2-3: JUMPERS USED BY SENSORLESS TRAPEZOIDAL FIRMWARE Jumper Position Description JP2 2-3 Enable Buck Regulator JP4 ON Enable dsPIC® DSC to DE2 Communications JP5 ON Enable dsPIC DSC to DE2 Communications JP6 OFF Disable dsPIC DSC to PICkit™ Serial Communications OFF Disable DE2 to PICkit Serial Communications JP9 2-3 CE Pull Down JP10 OFF Disconnect DE2 to dsPIC DSC RP20/CN25/RC4 pin JP11 OFF Disable DE2 to PICkit Serial Communications OFF Disable dsPIC DSC to PICkit Serial Communications JP12 (MONITOR1) JP13 (MONITOR2) JP14 (MONITOR3) 3-4 Connect Filtered Phase Voltage to MONITORn JP16 OFF Deselect Summing Phase Currents JP17 ON Select Individual Phase Currents JP18 1-2 Current Sense Offset by 0.992V 2.3.1.2 POWERING THE MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD (REFERENCE Figure 2-2) 1. Apply the input voltage to the input terminal block J5. The input voltage source should be limited to the 0V to +28V range. For nominal operation, the input voltage should be between +7.0V and +24V. 2. Connect the positive side of the input source (+) to pin 2 of J5. Connect the negative or return side (-) of the input source to pin 1 of J5. Refer to Figure 2-2. DS50002233A-page 16 2013 Microchip Technology Inc. Installation and Operation J5 Input Power VDD GND M1 dsPIC® DSC PIM J6 Motor Connections J3 ICD 3 Header PICkit™ Header J2 Speed Adjust R75 FIGURE 2-2: RUN Switch RESET Switch SW2 Connection and Operation Diagram. 2.3.1.3 CONNECTING A MOTOR MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD Connect each phase winding of the three-phase BLDC motor to the appropriate terminal of the motor terminal block (J6), terminals A,B,C. The neutral winding, terminal N, is not necessary for the sensorless trapezoidal drive firmware provided for the evaluation board. 2.3.2 Operating a Motor 1. Turn the Speed Adjust potentiometer (R75) fully counter-clockwise to obtain the slowest speed setting. Now turn the Speed Adjust approximately ¼ turn clockwise to allow for 25% motor speed. 2. Turn on the power supply connected to the board. 3. Press and release the RUN switch (SW2) to start the motor. 4. Turn the Speed Adjust potentiometer clockwise to increase motor speed, and counter-clockwise to decrease motor speed. The Speed Adjust changes the PWM duty cycle of the PWM signals that are being sent to the MCP8024. 5. Press and release the RUN switch again to stop the motor. 2013 Microchip Technology Inc. DS50002233A-page 17 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide 2.3.3 Indicator LEDs The MCP8024 TQFP BLDC Motor Driver Evaluation Board has ten LEDs to indicate system status. Table 2-4 lists the LED indicators and their descriptions. TABLE 2-4: LED INDICATORS PCB Location Name Description D10 SPARE D11 +12V +12V LDO Voltage Operating D12 +5V +5V LDO Voltage Operating D13 +Buck D14 PWM3H PWM Phase 3 high-side input to MCP8024 D15 PWM3L PWM Phase 3 low-side input to MCP8024 D16 PWM2H PWM Phase 2 high-side input to MCP8024 D17 PWM2L PWM Phase 2 low-side input to MCP8024 D18 PWM1H PWM Phase 1 high-side input to MCP8024 D19 PWM1L PWM Phase 1 low-side input to MCP8024 2.3.4 Spare LED on RA4 port Buck Output Voltage Operating Test Points There are several test points on the board to allow probing of voltages, currents and signals. TABLE 2-5: Test Point Name TP1 VDD TP2 PGND Description Power Supply (+) Power Supply Ground (–) TP3 DE2 TP4 PGND Power Supply Ground (–) TP5 PGND Power Supply Ground (–) TP6 PGND Power Supply Ground (–) MCP8024 DE2 Communications Signal PHA_FIL PHA_FIL Filtered Phase A Signal PHB_FIL PHB_FIL Filtered Phase B Signal PHC_FIL PHC_FIL Filtered Phase C Signal NEU_FIL NEU_FIL Filtered Neutral Signal MON1 MON1 Monitor Signal 1: Connects to A/D Channel 3 MON2 MON2 Monitor Signal 2: Connects to A/D Channel 4 MON3 MON3 Monitor Signal 3: Connects to A/D Channel 5 MON4 MON4 Monitor Signal 4: Connects to A/D Channel 6 D14 PWM3H PWM Phase C High-side Input to MCP8024 D15 PWM3L PWM Phase C Low-side Input to MCP8024 D16 PWM2H PWM Phase B High-side Input to MCP8024 D17 PWM2L PWM Phase B Low-side Input to MCP8024 D18 PWM1H PWM Phase A High-side Input to MCP8024 D19 PWM1L PWM Phase A Low-side Input to MCP8024 PAD42 DS50002233A-page 18 TEST POINTS DESCRIPTION POT Speed Adjust Potentiometer. Clockwise increases voltage (speed), counter-clockwise decreases voltage (speed). 2013 Microchip Technology Inc. Installation and Operation 2.3.5 User Program Data Logging and Communications Headers J1 and J4 are provided for user-programmed serial communications using the PICkit Serial Analyzer. The user may add code to the firmware to allow communications between the PICkit Serial Analyzer and the dsPIC33FJ32MC204 processor. The communications mode may be UART, SPI or I2C. 2.3.6 Re-Programming the dsPIC DSC PIM The dsPIC33FJ32MC204 PIM included with the evaluation kit may be re-programmed with the user’s desired firmware. The PIM may be programmed on the evaluation board by using an external power source and either a PICkit 3 programmer, MPLAB REAL ICE in-circuit emulator or MPLAB ICD 3. 1. Connect the power source to the board as explained in Section 2.3.1.2. 2. Connect a PICkit 3 to the J2 header or connect either an MPLAB ICD 3 or MPLAB REAL ICE in-circuit emulator to the J3 (RJ12) jack. 3. Open up the MPLAB X Integrated Development Environment (IDE) and load the MCP8024 TQFP BLDC Motor Driver Evaluation Board firmware project. Note: Note that the following project options may need to be changed for the computer being used to build the firmware: • Add Library libdsp-elf.a located in XC16 ???\src\Libdsp\lib directory. • Add XC16-as ASM Include Directory in XC16 ???\src\Libdsp\asm. • Set Hardware tool to “ICD 3”, “MPLAB REAL ICE” or “PICkit3”. 4. Build the project. 5. Program the device. 6. Press the RESET switch on the board to reset the processor and allow the processor to execute the new firmware program. 2.3.7 Configuring the MCP8024 The MCP8024 has configuration registers that may be used to modify operating parameters of the device. The parameters are modified by sending commands to the MCP8024 using the DE2 communication bus. The DE2 communication bus is a half-duplex, 9600 baud, 8-data bits, 1-stop bit, 1-start bit, no parity, serial communication link. The user may add code to the evaluation board firmware to communicate with the registers. The evaluation board software contains a subroutine which initializes the MCP8024 registers. There are three configuration registers that may be written to. The registers are written to by sending a SET_CFG_x command byte followed by the desired register value byte. The configuration commands are listed in Table 2-6. 2013 Microchip Technology Inc. DS50002233A-page 19 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide TABLE 2-6: Command SET_CFG_0 CONFIGURATION REGISTERS Byte Bit Value 1 — 81H 2 7 0 Reserved 6 0 Disable disconnect of 30K level translator pull up when CE = 0 (default) Set Configuration Register 0 1 Enable disconnect of 30K level translator pull up when CE = 0 5 0 Reserved 4 0 Reserved 3 0 Enable driver undervoltage lockout (default) 1 Disable driver undervoltage lockout 2 0 Enable external MOSFET short circuit detection (default) 1 Disable external MOSFET short circuit detection 1-0 00 Set external MOSFET overcurrent limit to 0.250V (default) 01 Set external MOSFET overcurrent limit to 0.500V 10 Set external MOSFET overcurrent limit to 0.750V 11 SET_CFG_1 Description 1 — 2 7-0 83H Set external MOSFET overcurrent limit to 1.000V Set Configuration Register 1 00H – FFH Select DAC current reference value (4.503V - 0.991V)/255 = 13.77 mV/bit 00H = 0.991V 40H = 1.872V = 40H * 13.77 mV/Bit + 0.991V (default) FFH = 4.503V = FFH * 13.77 mV/Bit + 0.991V SET_CFG_2 1 — 87H 2 7-4 0000 3-2 — Driver PWM dead time 00 2 µs (default) 01 1 µs 10 500 ns 11 250 ns 1-0 DS50002233A-page 20 Set Configuration Register 2 Reserved — Driver Blanking Time (for Ignoring commutation spikes) 00 4 µs (default) 01 2 µs 10 1 µs 11 500 ns 2013 Microchip Technology Inc. Installation and Operation 2.3.8 MCP8024 Status The host may also solicit MCP8024 status information by issuing a STATUS_0 or STATUS_1 command. The MCP8024 may send an unsolicited STATUS_0 or STATUS_1 command to the host in the event of a fault or warning. The status registers are listed in Table 2-7. TABLE 2-7: STATUS REGISTERS Command Byte STATUS_0 1 — 85H Get Status Register 0 Command from Host to MCP8024 STATUS_1 1 — 86H Get Status Register 1 Command from Host to MCP8024 STATUS_0 1 — 45H Status Register 0 Response to Host from MCP8024 85H Status Register 0 Command to Host from MCP8024 (unsolicited) 2 STATUS_1 1 2 Bit 7-0 — 7-0 2013 Microchip Technology Inc. Value 00000000 Description Normal Operation 00000001 Temperature Warning (TJ > +125°C (Default Warning Level)) 00000010 Over Temperature (TJ > +160°C) 00000100 Input Undervoltage (VDD < 5.5V) 00001000 Reserved 00010000 Input Overvoltage (VDD > 32V) 00100000 Buck Regulator Overcurrent 01000000 Buck Regulator Output Undervoltage Warning 10000000 Buck Regulator Output Undervoltage (< 80%, brown-out error) 46H Status Register 1 Response to Host from MCP8024 86H Status Register 1 Command to Host from MCP8024 (unsolicited) 00000000 Normal Operation 00000001 5V LDO Overcurrent 00000010 12V LDO Overcurrent 00000100 External MOSFET Undervoltage Lockout (UVLO) 00001000 External MOSFET Overcurrent Detection 00010000 Brown-out Reset – Config Lost (Start-up default = 1) 00100000 Reserved 01000000 Reserved 10000000 Reserved DS50002233A-page 21 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide NOTES: DS50002233A-page 22 2013 Microchip Technology Inc. MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD USER’S GUIDE Appendix A. Schematic and Layouts A.1 INTRODUCTION This appendix contains the following schematics and layouts for the MCP8024 TQFP BLDC Motor Driver Evaluation Board: • • • • • • Board – Schematic Board – Top Silk Layer Board – Top Metal Layer Board – Mid1 Metal Layer Board – Mid2 Metal Layer Board – Bottom Metal Layer 2013 Microchip Technology Inc. DS50002233A-page 23 BOARD – SCHEMATIC PGC RX GND 5 4 3 6 JP6 SER_RX PGD 5 6 2 SER_TX C1 1uF 10V /MCLR_VPP 3 4 1 +3.3V 1 2 PAD1 PAD2 J1-4 J1-5 JP7 JP8 JP9 PAD3 DGND JP10 +3.3V ICD3 Debugger +V TX AUX DATA GND CLK 6 5 VDD 3 2 1 J3 /MCLR VDD GND ICSP DAT ICSP CLK Jumper Position Description JP1 ON SPI Communications 1-2 Disable Buck Regulator JP2 2-3 Enable Buck Regulator 1-2 I2C Communications JP3 2-3 SPI Communications JP4 ON Enable dsPIC/DE2 Communication ON JP5 Enable dsPIC/DE2 Communication PICKit Serial (UART) J1 4 /MCLR PICKit Prog J2 C2 1uF 10V JP11 DGND JP12 JP13 JP14 +3.3V 1 /CS SPI_/SS C3 1uF 10V RP23 2 +V JP15 JP16 3 GND J4 4 SDI SPI JP1 DGND I2C_SDA, SPI_SDI SDO 5 I2C_CLK, SPI_CLK 6 SPI_SDO Enable dsPIC/Serial PICkit Comms Enable DE2/Serial PICkit Comms 1-2 Enable DE2/Serial PICkit Comms Digital Ground Star Connection Analog Ground Star Connection CE Enabled CE Disabled Routes DE2 to dsPIC RP20/CN25/RC4 3-4 Enable dsPIC/Serial PICkit Comms 1-2 3-4 5-6 1-2 2-3 1-2 Connect Phase Current To MONITOR1 Connect Filtered Phase To MONITOR2 Connect Hall Sensor To MONITOR3 5V Hall Sensor Power Supply 12V Hall Sensor Power Supply Current Sense Offset = 0.992V 2-3 Current Sense Offset = 0.0V JP17 ---- JP18 ---- Selects Individual Phase Currents Sums Phase Currents PAD4 MCP8024 Buck Faraday Shield Ground Plane L1 Vbuck = 1.25 (RFB1 + RFB2)/RFB2 3.3 uH 744-042-003 D2 RP25 SPI C6 10 uF 16V SS24-TP R3 4.99 JP3 1-2 = I2C 2-3 = SPI PICKit Serial (SPI,I2C) 3.3V AVDD I2C RP24 +3.3V R1 1 D1 5V Transzorb Buck Feedback (FB) R2 18K RFB1 C4 1800 pF 50V RP22 1 SCK 1-2 3-4 --------------1-2 2-3 ON C5 10 uF 16V JP2 C7 10 uF 16V 1 AGND 5V_LDO VDD DGND TP1 R4 11K RFB2 PAD5 VDD VDD DGND J5 2 +3.3V C8 10 uF 16V PWM1H2 1 RC5 RP23 RP22 12V_LDO RA9 PWM1L2 DSPIC_RX SW2 PAD6 JP5 PWM1L1 DSPIC_TX SW1 JP4 SPARE_LED DGND R6 2K PWM1H1 47K R5 DE2 D4 D5 SS24-TP +3.3V C9 470 uF 50V D6 SS24-TP C11 1 uF 50V C10 470 uF 50V VDD VDD Max = 32V PGND 2 1 D3 SMCJ30A PAD9 SS24-TP PGND 76 35 FDD10AN06A0 FDD10AN06A0 18 AWG Wire FDD10AN06A0 D22 SMAJ33CA PHA PGND 34 33 32 31 PAD22 PAD23 PHA_FIL PHB_FIL R22 300 PHA_FIL PHB_FIL R26 30 R18 22K R25 300 Q6G Q6 29 10 28 R17 22K R20 22K 27 FDD10AN06A0 FB VDD VDD LX 10 PGND R27 300 PHC_FIL R30 300 26 NEU_FIL 25 R35 2.4K PGND LC LA LB 36 NEUT R36 2.4K R37 R38 2.4K 2.4K PAD34 NEU_FIL PAD35 PHC_FIL 24 23 22 PGND PGND 21 19 PGND ISENSE+ HC PGND MON3 ISENSE_CL R42 2.49K 5 R19 22K Q5 FDD10AN06A0 37 38 39 PWM1L2 PWM1H3 PWM1L3 40 41 CAP2 5VLDO CAP1 DE2 PWM3L PWM2L HB IOUT2 20 MONITOR_3 HA ISENSE3+ 18 + PHB 13 3 47K 3 R39 2.49K PHA PH_C R41 3.74K PGND R43 1K PGND ISENSE_B C24 0.047uF 25V ISENSE_C PGND R44 C25 0.047uF 25V C26 0.047uF 25V 5V_LDO C27 0.047uF 25V PGND +5V Hall Effect Supply JP15 ISENSE_BL +12V Hall Effect Supply ISENSE_BL Av=11 SPARE_LED R62 47K R75 10K SW3 2 3 PWM1L1 PWM1H1 PWM1L2 PWM1L3 PWM1H2 +3.3V PWM1H3 AGND R76 3.74K D10 D11 R79 1K R77 2K R80 1K R81 1K R82 1K R83 1K C40 1uF 10V DGND DGND DGND SW1 SW2 RESET R86 10.7K C42 0.1uF 10V R88 100 D12 PGND D13 D14 D15 D16 D17 D18 D19 Spare +12V +5V GREEN GREEN GREEN DGND DGND +BUCK GREEN PWM3H GREEN DGND PWM3L GREEN DGND PWM2H GREEN DGND PWM2L GREEN DGND PWM1H GREEN DGND PWM1L GREEN U3 MCP6021 C43 0.1uF 10V PGND DGND AGND 1 R85 1K R84 1K 1 4 2 4 5V_LDO R78 1K TP5 TP6 JP16 DNP AGND JP17 PGND R49 4.7K 5 PAD39 4 PAD40 HALL_B C33 100pF 25V R89 7.5K AVDD 0.992V HALL A R57 ISENSE_CL HALL_A 12V_LDO R50 4.7K R56 47K PAD38 HALL_C C34 100pF 25V HALL B R58 3 47K C35 100pF 25V C32 1 uF 50V HALL C 2 HALL + 1 HALL J7 GND JP18 0.992V 4 C41 0.1uF 10V AGND 2 4 2 R87 2K C39 1uF 10V R66 24.9K C36 0.1uF 10V C37 10 uF 16V PAD42 POT C38 1uF 10V R63 1K AVDD VDD SW2 AVDD VIN+ SW1 R64 47K R65 2.49K VOFFSET R48 4.7K Isense C R53 .01 5W 47K TP4 R61 3.74K IOUTA 12V_LDO POT 1 3 R74 30K PAD41 IOUT1 PGND SW2 3 1 3 1 R70 100 Isense B R55 .01 5W ILIMIT 1526 Hz Filter C31 3 VDD_DIV16 SW1 R69 47K Isense A R54 .01 5W PGND R60 3.74K 2 AVDD /MCLR_VPP +3.3V +3.3V +3.3V R59 1K 0.022uF 25V R68 47K R46 1K C30 100pF VOFFSET ISENSE_B R67 47K R45 3.74K R51 47K 152.6 Hz Filter C29 Av=11 0.022uF 25V R47 3.74K C28 100pF VOFFSET R52 1K 1 MONITOR_4 MON4 5 14 U1:4 + Vss 12 VOUT - MCP6024 NEU_FIL VOFFSET VIN- 13 VDD 2013 Microchip Technology Inc. 47K 1 6 R32 4 12 47K R40 VBC PHC ISENSE3- 11 Av=11 MCP8024 LV_OUT1 IOUT3 PAD33 IOUT2 IOUTB HALL_C MON3_SEL IOUTC PHC_FIL IOUTC 1 U1:1 VBB PGND 10 R34 3.74K 1526 Hz Filter C23 0.022uF C22 25V 100pF VBA HV_IN1 7 8 9 R33 1K R29 2.49K - MCP6024 1 HV_IN2 6 PGND 12VLDO U2 LV_OUT2 5 LVOUT1 PGND CE 4 +3.3V PWM3H PWM2H 50 49 48 47 46 45 R28 47K PAD30 MON2 PWM1H 3 HVIN2 HVIN1 PGND PH_B 2 PAD20 D21 SMAJ33CA PHB R21 PWM1L 2 PWM1H1 LVOUT2 ISENSE_C 2 Q4 10 42 48 NC NC NC 1 PWM1L1 MONITOR_4 44 RC3 MONITOR_3 43 42 MONITOR_1 DGND MONITOR_2 41 40 39 38 37 36 35 33 34 POT 32 31 30 29 28 AVDD R23 47K 3 1 PGND 43 51 IOUT1 5 D20 SMAJ33CA PHC R16 52 ISENSE1- R31 2.49K Q4G FDD10AN06A0 54 ILIMIT MONITOR_2 C21 1uF 10V AGND + C20 10 uF 16V 53 ISENSE2+ 5 JP14 2 5V_LDO 55 PWM1H2 RP23_RB7 RP21_RC5 RP22_RC6 NC RA4 RA9 RB4 NC NC NC NC VCAP NC NC NC NC NC C19 1 uF 50V 56 NC PH_A PAD17 12V_LDO 58 57 ISENSE2- 7 U1:2 MCP6024 3 4 59 17 1 10V 1uF C44 - +3.3V 6 IOUTC R24 2.49K 5 27 MON1 J6 MOTOR PAD14 PAD16 Q5G 26 + AGND 60 U1:3 10 PGND JP8 V12 PAD15 61 NC NC AN6_(Jumper) RP19_CN28_RC3 Q3G DGND 62 18 AWG Wire 77 78 81 82 84 83 79 80 86 87 88 89 85 90 94 91 92 95 93 97 96 NC NC PWM1L1 PWM1H1 RA8 AN5 MONITOR_1 AN4 PGEC3 VDD AGND 8 98 NC AN0 Q3 63 16 6 NC NC Q2G 10 15 4 NC AN1 25 10 R13 RA3 RA2 14 HALL_B 2 MON2_SEL IOUTB NC - MCP6024 3 JP13 PHB_FIL NC PGD 6 1 MON1_SEL 4 NC NC PGC HALL_A 2 24 NC RP9 AN7 AN3 4 11 9 JP12 IOUTA PHA_FIL IOUTA NC CN22_RB8 NC 22 23 IOUTB NC NC 21 NC 20 VDD 19 VSS VDD_DIV16 AN2 18 DSPIC_TX PAD19 R15 2.49K NC NC NC 17 +3.3V ILIMIT AGND VSS DGND Q2 PGND 65 64 OSCI/CN30/RA2 VDD NC 16 AN8_RP18_RC2 C18 1uF 10V DGND Q1 Q1G R11 66 NC AVDD AVDD R14 47K DSPIC_PIM_LNK NC JP7 R9 RP24 67 NC OSCO/CN29/RA3 /MCLR C15 1 uF 50V 10 RP25 68 10 uF 50V C14 1 uF 50V PGND C16 10 uF 16V DE2 DSPIC_RX 69 VSS DSPIC33FJ32MC204_PIM NC 15 70 C12 5V LDO PAD10 DGND 71 NC NC 12 72 C13 1 uF 50V TP3 DE2 To RC4 JP10 73 SCL1_RP24 NC 11 14 C17 1uF 10V RP7 SDA1_RP25 NC 10 13 /MCLR_VPP NC NC AVSS +3.3V RA7 NC 9 R12 47K NC R8 47K CE JP9 74 45 8 4 RP20_CN25_RC4 NC SER_RX 7 NC NC 3 DSPIC_TX 2 +3.3V SER_RX_SEL 1 6 NC 47 4 5 NC PWM1H3 1 75 NC NC 44 3 JP11 PWM1L2 NC 2 PGND 47K 46 1 RA10_(Jumper) 4 PWM1H3 TP2 R7 SER_TX PWM1H2 3 R10 2K 2 PGED3 1 DSPIC_RX PWM1L3 SER_TX_SEL M1 99 100 PWM1L3 JP6 R71 90.9K R72 90.9K R73 90.9K PGND MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide DS50002233A-page 24 A.2 Schematic and Layouts A.3 BOARD – TOP SILK LAYER 2013 Microchip Technology Inc. DS50002233A-page 25 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide A.4 BOARD – TOP METAL LAYER DS50002233A-page 26 2013 Microchip Technology Inc. Schematic and Layouts A.5 BOARD – MID1 METAL LAYER 2013 Microchip Technology Inc. DS50002233A-page 27 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide A.6 BOARD – MID2 METAL LAYER DS50002233A-page 28 2013 Microchip Technology Inc. Schematic and Layouts A.7 BOARD – BOTTOM METAL LAYER 2013 Microchip Technology Inc. DS50002233A-page 29 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide NOTES: DS50002233A-page 30 2013 Microchip Technology Inc. MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD USER’S GUIDE Appendix B. Bill of Materials (BOM) TABLE B-1: Qty BILL OF MATERIALS (BOM) Designator Description 3M Part Number 4 Bumpons 10 C1, C2, C3, C17, Cap Ceramic 1 µF 10V 10% X7R 0603 C18, C21, C38, C39, C40, C44 1 C4 Cap Ceramic 1800 pF 50V 10% X7R 0805 AVX Corporation 08055C182KAT2A 7 C5, C6, C7, C8, C16, C20, C37 Cap Ceramic 10 µF 16V 10% X7R 1206 TDK Corporation C3216X7R1C106K160 AC 2 C9, C10 Cap Alum-Elect 470 µF 50V 20% Radial 12.5 mm Dia, 5 mm lead spacing United Chemi-Con EKZE500ELL471MK20 S 6 C11, C13, C14, C15, C19, C32 Cap Ceramic 1 µF 50V 10% X7R 1210 Taiyo Yuden Co., Ltd. UMK325B7105KH-T 1 C12 Cap Ceramic 10 µF 50V 10% X5R 1210 Taiyo Yuden Co., Ltd. UMK325BJ106KM-T 6 C22, C28, C30, C33, C34, C35 Cap Ceramic 100 pF 50V 10% X7R 0603 TDK Corporation C1608X7R1H101K Vishay Intertechnology, Inc. VJ0603Y101KXACW1BC 3 C23, C29, C31 Cap Ceramic 0.022 µF 25V 10% X7R 0603 TDK Corporation C1608X7R1E223K 4 C24, C25, C26, C27 Cap Ceramic 0.047µF 25V 10% X7R 0603 Yageo Corporation CC0603KRX7R8BB473 4 C36, C41, C42, C43 Cap Ceramic 0.1 µF 25V 10% X7R 0603 Yageo Corporation CC0603KRX7R8BB104 1 D1 Transient Voltage Suppressor 400W 5% 5V SMA Vishay Intertechnology, Inc. SMAJ5.0A-E3/61 4 D2, D4, D5, D6 Diode Schottky 40V 2A SMA Micro Commercial Components Corporation/Diodes® Incorporated SS24-TP / B240A-13-F 1 D3 Transient Voltage Suppressor 1500W 30V SMC Vishay Intertechnology, Inc. SMCJ30A-E3/57T 10 D10, D11, D12, D13, D14, D15, D16, D17, D18, D19 Light Emitting Diode Green, 2 x 1.2 MM, 570 NM, WTR CLR, SMD Kingbright APT2012CGCK 3 D20, D21, D22 Transient Voltage Suppressor 400W 33V Bidirectional SMA Vishay Intertechnology, Inc. SMAJ33CA-E3/5A 3 J1, J2, J4 Header 1 x 6, 0.1 Centers Molex® 0022284360 (1 rows x 36 columns, cut as needed) 1 J3 RJ12 6P6C Right Angle Jack TE Connectivity, Ltd. 5555165-1 1 J5 Terminal Block 2 pin, 2.54mm Phoenix Contact GmbH & Co. Phoenix Contact 1725656 Note 1: BUMPON TALL TAPER SQ .50X.23 BK Manufacturer SJ-5518(BLACK) Taiyo Yuden Co., Ltd. LMK107B7105KA-T The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components. 2013 Microchip Technology Inc. DS50002233A-page 31 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide TABLE B-1: Qty BILL OF MATERIALS (BOM) (CONTINUED) Designator Description Manufacturer Part Number 1 J6 Terminal Block 4 pin, 2.54mm Phoenix Contact GmbH & Co. Phoenix Contact 1725672 1 J7 Terminal Block 5 pin, 2.54mm Phoenix Contact GmbH & Co. Phoenix Contact 1725686 JP** CONN JUMPER SHORTING GOLD FLASH Sullins Connector Solutions SPC02SYAN 4 JP1, JP4, JP5, JP10 Header 1 x 2, 0.1 Centers Molex 0022284360 (1 rows x 36 columns, cut as needed) 5 JP2, JP3, JP9, JP15, JP18 Header 1 x 3, 0.1 Centers Molex 0022284360 (1 rows x 36 columns, cut as needed) 2 JP6, JP11 Header 2 x 2, 0.1 Centers Molex 0702800448 (2 rows x 50 columns, cut as needed) 3 JP7, JP8, JP17 Wire 18 AWG, As needed — 18 AWG bare wire as needed 3 JP12, JP13, JP14 Header 2 x 3, 0.1 Centers Molex 0702800448 (2 rows x 50 columns, cut as needed) 1 L1 Inductor 3.3 µH Wurth® Group 744-042-003 1 M1 dsPIC33F GP 44P QFN TO 100P PIM dsPIC33FJ32MC204 Microchip Technology Inc. MA330017 4 M1 Headers Fine Pitch Header, 1 row 25 columns Samtec, Inc. MTMS-125-01-G-S-230 6 Q1, Q2, Q3, Q4, MOSFET N-CH 60V 50A D-PAK Q5, Q6 Fairchild Semiconductor® FDD10AN06A0 1 PCB Printed Circuit Board – MCP8024 TQFP BLDC Motor Driver Evaluation Board Microchip Technology Inc. 104-10239 1 R1 RES 1.00 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-071RL 1 R2 RES 18.0 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-0718KL 14 1 R3 RES 4.99 1/8W 1% 0805 SMD Yageo Corporation RC0805FR-074R99L 1 R4 RES 11.0 k 1/10W 1% 0603 SMD Yageo Corporation/ Panasonic® - ECG RC0603FR-0711KL/ ERJ-3EKF1102V 19 R5, R7, R8, R12, RES 47.0 k 1/10W 1% 0603 SMD R14, R23, R28, R32, R40, R44, R51, R56, R57, R58, R62, R64, R67, R68, R69 Yageo Corporation RC0603FR-0747KL 3 R6, R10, R87 RES 2.00 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-072KL 6 R9, R11, R13, R16, R21, R26 RES 10.0 1/8W 1% 0805 SMD Yageo Corporation RC0805FR-0710RL 7 R15, R24, R29, R31, R39, R42, R65 RES 2.49 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-072K49L 4 R17, R18, R19, R20 RES 22.0 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-0722KL 4 R22, R25, R27, R30 RES 300 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-07300RL Note 1: The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components. DS50002233A-page 32 2013 Microchip Technology Inc. Bill of Materials (BOM) TABLE B-1: Qty BILL OF MATERIALS (BOM) (CONTINUED) Designator Description Manufacturer Part Number 14 R33, R43, R46, R52, R59, R63, R78, R79, R80, R81, R82, R83, R84, R85 RES 1.00 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-071KL 7 R34, R41, R45, R47, R60, R61, R76 RES 3.74 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-073K74L 4 R35, R36, R37, R38 RES 2.40 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-072K4L 3 R48, R49, R50 RES 4.70 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-074K7L 3 R53, R54, R55 RES .010 5W 1% FLAT SMD TT Electronics Plc./IRC OARSXPR010FLF 1 R66 RES 24.9 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-0724K9L 2 R70, R88 RES 100 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-07100RL 3 R71, R72, R73 RES 90.9 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-0790K9L 1 R74 RES 30.0 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-0730KL 1 R75 Potentiometer 10 k 1/8W CARB VERTICAL CTS® Corporation 296UD103B1N 1 R77 RES 2.00 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-072KL 1 R86 RES 10.7 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-0710K7L 1 R89 RES 7.50 k 1/10W 1% 0603 SMD Yageo Corporation RC0603FR-077K5L 3 SW1, SW2, SW3 SWITCH TACTILE SPST-NO 0.05A 12V E-Switch®, Inc. TL330INF260QG 6 TP1, TP2, TP3, TP4, TP5, TP6 SMT Test Point Keystone Electronics Corp. 5016 1 U1 MCP6024 Quad Op Amp – Plastic TSSOP, Microchip 14-lead Technology Inc. MCP6024-E/ST 1 U2 3-Phase Brushless DC (BLDC) Motor Gate Microchip Driver with Power Module - Plastic Thin Technology Inc. Quad Flatpack with Exposed Pad - 7x7 mm body, 48-lead, Thermally Enhanced (EP) MCP8024-H/PT 1 U3 MCP6021 Single Op Amp - Plastic Small Outline Transistor (SOT-23), 5-lead MCP6021T-E/OT Note 1: Microchip Technology Inc. The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components. 2013 Microchip Technology Inc. DS50002233A-page 33 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide NOTES: DS50002233A-page 34 2013 Microchip Technology Inc. MCP8024 TQFP BLDC MOTOR DRIVER EVALUATION BOARD USER’S GUIDE Appendix C. Software C.1 SELECTED SOFTWARE CONSTANTS AND DEFINITIONS 1. FOSC Microprocessor Oscillator Frequency in Hz. based upon PLL scaling. 2. FPWM = 40000 Selects dsPIC DSC PWM period in Hz. 3. LOOPMODE = CLOSEDLOOPMODE Sets motor controller to use closed loop control. The PID control functions will be used to control motor speed. 4. LOOPMODE = OPENLOOPMODE Sets motor controller to use open loop control. The speed adjust input relative position will be used to set the motor speed. 5. PWM_MODE_SELECT = PWM_MODE_SELECT_INDEPENDENT Sets the low-side external MOSFET driver to operate independently of the high-side driver. 6. PWM_MODE_SELECT = PWM_MODE_SELECT_COMPLEMENTARY Sets the low-side external MOSFET driver to operate in complement of the high-side driver. 7. PWM_COUNTS_PER_PERIOD = (FCY/FPWM – 1) Defines the number of timer counts per PWM period. 8. RAMP_UP_PERIODS Defines the number of PWM periods to use to ramp the motor speed during startup. 9. MAX_DUTY_CYCLE Defines the maximum desired PWM duty cycle. 10. MIN_DUTY_CYCLE Defines the minimum desired PWM duty cycle. 11. MIN_SAMPLE_TIME Defines the minimum allowable PWM duty cycle based upon A/D sample time. 12. STARTUP_DUTY_CYCLE Defines the minimum desired PWM duty cycle during motor startup. 13. PHASE_ADVANCE_DEGREES Defines the number of electrical degrees (in timer tics) that will be subtracted from the calculated commutation timer reload count. This allows for compensating for any latencies in the system. 14. ZC_BLANKING_COUNT Defines the number of PWM periods that the ADC readings are ignored. This allows filtering of signals after commutation when high voltage spikes may be present. 15. unsigned int ReferenceSpeed Contains the motor target speed based upon the SPEED potentiometer input. 2013 Microchip Technology Inc. DS50002233A-page 35 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide 16. int DesiredSpeed Contains the desired motor target speed based upon the SPEED potentiometer input. 17. int CurrentSpeed Contains the current motor speed. 18. unsigned int SpeedControl_P Proportional term of the closed loop PID control function. Sets the motor gain coefficient for the current speed error. 19. unsigned int SpeedControl_I Integral term of the closed loop PID control function. Sets the motor gain coefficient for previous speed changes. 20. unsigned int SpeedControl_D Derivative term of the closed loop PID control function. Sets the motor gain coefficient for predicted errors in the motor control loop. 21. PWM_STATE[] Array containing the high-side and low-side gate driver output states for a given step of the six-step commutation algorithm. 22. BOOTSTRAP_CHARGE_STATE High-side and low-side gate driver output states for charging the bootstrap capacitors prior to motor startup. 23. MOTOR_SHUTDOWN_STATE High-side and low-side gate driver output states that may be used when shutting down the motor. 24. ADC_MASK[] A/D Back EMF mask used for majority detection. 25. ADC_XOR[] A/D Back EMF mask used for majority detection. 26. ADC_BEMF_FILTER[] A/D Back EMF filter table used to determine next commutation time. C.2 DSPIC33FJ32MC204 PIM PORT USAGE Port Name Description /* Port A */ PORTA.2 DEBUG_PORT1 General purpose debug port PORTA.3 DEBUG_PORT2 General purpose debug port PORTA.4 SPARE_LED Spare LED port PORTA.7 MCP8024_CE 1 = Enables MCP8024 output 0 = Disables MCP8024 output PORTA.8 SW1 Spare push button input /* Port B */ PORTB.4 SW2 ‘On/Off’ switch input PORTB.8 ILIMIT_OUT MCP8024 ILIMIT_OUT signal: 1 = OK 0 = Fault/Current Limit DEBUG_PORT3 General purpose debug port /* Port C */ PORTC.5 DS50002233A-page 36 2013 Microchip Technology Inc. Software C.3 MPLAB X IDE COMPILER STARTUP 1. Start the MPLAB X IDE compiler (not supplied, available on Microchip web page). 2. From the toolbar, select File > Open Project. 3. Browse to the evaluation board source code path. 4. Select the existing project file named MCP8024_ADM00557_EVAL. 5. In the Projects window, right mouse-click on MCP8024_ADM00557_EVAL and select Properties. The page contains the project properties. Processor, Compiler, Hardware and Config settings may be changed here. Note: The user may need to modify the paths to the source files and linker files based upon their locations on the host computer. Make sure to verify that the Libraries contains the correct path to libdsp-elf.a. 6. Right click on the MCP8024_ADM00557_EVAL again and select the “Make and Program Device” option. This will compile the firmware and download to the programming hardware. 7. The compiler results will be displayed in the Output window frame. Verify success. C.4 MPLAB X IDE AND PICkit 3 PROGRAMMER EXERCISE 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. Start the MPLAB X (not supplied, available on Microchip web page). From the toolbar, select File > Open Project. Browse to the evaluation board source code path. Select the existing workspace directory named MCP8024_ADM00557_EVAL or create a new one. Connect the PICkit 3 programmer to header J2 on the evaluation board. Align Pin 1 of the header with the Pin 1 mark on the programmer. Set the bench power supply voltage control to the minimum voltage output. Turn on the power supply and set the output voltage to 14V. Turn off the power supply. Connect the bench power supply to the evaluation board. Connect +V(14V) to J5-2 and –V (Ground) to J5-1. Turn on the power supply. Right click on MCP8024_ADM00557_EVAL in the Projects window and select the “Make and Program Device” option. This will compile the firmware and program the dsPIC33FJ32MC204 PIM module. The compiler results will be displayed in the Output window frame. Verify success. Connect a brushless DC (BLDC) motor to connector J6. Connect the motor phase wires to the PH_A(J6-4), PH_B (J6-3) and PH_C (J6-2) terminals. The NEUT terminal (J6-1) is not used with the demonstration firmware. Momentarily press the RESET switch on the evaluation board. This step is required to reset the dsPIC DSC device after programming. Turn the SPEED adjustment fully counter-clockwise. This sets the motor to the slowest speed. Momentarily press the SW2 switch to start the motor. Momentarily press the SW2 switch again to stop the motor. Momentarily press the SW2 switch again to start the motor. Turn the SPEED adjustment clockwise. The motor speed should increase. 2013 Microchip Technology Inc. DS50002233A-page 37 MCP8024 TQFP BLDC Motor Driver Evaluation Board User’s Guide 19. You may probe the different test points on the board to see the various signals being generated. The Q1G through Q6G test points will show the external MOSFET gate drive signals. The D14 through D19 LED’s show the state of the PWM inputs to the MCP8024. The MON1 through MON4 test points show the output of the jumper-selected signals. PHA_FIL, PHB_FIL and PHC_FIL are the filtered back EMF voltages from the motor. They are used to determine the commutation time in the demonstration firmware. 20. Stop the motor by pressing SW2 again. 21. Change the motor control from Closed Loop to Open Loop. This is done by editing the MCP8024_ADM00557_EVAL.C file. 22. Click on Source Files in the Projects window and then double click on the MCP8024_ADM00557_EVAL.C entry. 23. Search for the pre-processor definition LOOPMODE. 24. Change the LOOPMODE definition from CLOSEDLOOPMODE to OPENLOOPMODE. 25. Right click on MCP8024_ADM00557_EVAL in the Projects window and select “Make and Program Device”. This will compile the firmware and program the dsPIC33FJ32MC204 PIM module. 26. The compiler results will be displayed in the Output window frame. Verify success. 27. Momentarily press the RESET switch on the evaluation board. This step is required to reset the dsPIC DSC device after programming. 28. Turn the SPEED adjustment fully counter-clockwise. This sets the motor to the slowest speed. 29. Momentarily press the SW2 switch again to start the motor. 30. Turn the SPEED adjustment clockwise. The motor speed should increase. 31. In OPENLOOPMODE, the motor speed is forced based upon the position of the SPEED adjust potentiometer. If the SPEED adjust is set to 60%, the firmware will set the PWM duty cycle to 60%. While this allows for simple control of the motor, it is not efficient. If the motor is externally loaded, the motor may not be able to maintain the manually set commutation time which will result in a motor stall. The motor runs more efficiently when the motor is allowed to commutate based upon rotor location and not by an external reference. In CLOSEDLOOPMODE, the motor will commutate at the proper time based upon the Back EMF information. If the motor is externally loaded, the motor will automatically adjust for the load in order to maintain the correct commutation time. 32. Momentarily press the SW2 switch again to stop the motor. DS50002233A-page 38 2013 Microchip Technology Inc. Software NOTES: 2013 Microchip Technology Inc. DS50002233A-page 39 Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Austin, TX Tel: 512-257-3370 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Novi, MI Tel: 248-848-4000 Houston, TX Tel: 281-894-5983 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 New York, NY Tel: 631-435-6000 San Jose, CA Tel: 408-735-9110 Canada - Toronto Tel: 905-673-0699 Fax: 905-673-6509 DS50002233A-page 40 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8569-7000 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 China - Hangzhou Tel: 86-571-2819-3187 Fax: 86-571-2819-3189 China - Hong Kong SAR Tel: 852-2943-5100 Fax: 852-2401-3431 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8864-2200 Fax: 86-755-8203-1760 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-3019-1500 Japan - Osaka Tel: 81-6-6152-7160 Fax: 81-6-6152-9310 Japan - Tokyo Tel: 81-3-6880- 3770 Fax: 81-3-6880-3771 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Dusseldorf Tel: 49-2129-3766400 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Germany - Pforzheim Tel: 49-7231-424750 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Italy - Venice Tel: 39-049-7625286 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 Poland - Warsaw Tel: 48-22-3325737 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-5778-366 Fax: 886-3-5770-955 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Sweden - Stockholm Tel: 46-8-5090-4654 UK - Wokingham Tel: 44-118-921-5800 Fax: 44-118-921-5820 Taiwan - Kaohsiung Tel: 886-7-213-7830 Taiwan - Taipei Tel: 886-2-2508-8600 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 10/28/13 2013 Microchip Technology Inc.