PICDEM™ MC LV Development Board User’s Guide © 2006 Microchip Technology Inc.
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.
PICDEM™ MC LV DEVELOPMENT BOARD Table of Contents Preface ........................................................................................................................... 1 Chapter 1. Introduction to the PICDEM MC LV Development Board 1.1 Introduction ..................................................................................................... 7 1.2 Highlights ........................................................................................................ 7 1.3 Motor Control Kit .
PICDEM™ MC LV Development Board Chapter 7. Using dsPIC DSCs to Run a Sensorless BLDC Motor 7.1 Introduction ................................................................................................... 27 7.2 Highlights ...................................................................................................... 27 7.3 Sensorless Control of a BLDC Motor ........................................................... 27 7.4 Using the PICDEM MC LV Development Board for Higher Motor Voltage ........
PICDEM™ MC LV DEVELOPMENT BOARD 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.
PICDEM™ MC LV Development Board DOCUMENT LAYOUT This document describes how to use the PICDEM MC LV Development Board as a development system for Microchip Technology’s PIC18F2331/2431 Microcontrollers (MCUs) and dsPIC30F2010/3010 Digital Signal Controllers (DSCs). The manual layout is as follows: • Chapter 1. Introduction to the PICDEM MC LV Development Board – What the PICDEM MC LV Development Board is, what makes it a desirable development tool for motor control and what features are available.
Preface CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Represents Examples Arial font: Italic characters and quotes Initial caps Referenced books “MPLAB® IDE User’s Guide” Emphasized text ...is the only compiler...
PICDEM™ MC LV Development Board 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.
Preface PICmicro® Mid-Range MCU Family Reference Manual (DS33023) and PICmicro® 18C MCU Family Reference Manual (DS39500) These manuals explain the general details and operation of the mid-range and advanced MCU family architecture and peripheral modules. They are designed to complement the device data sheets.
PICDEM™ MC LV Development Board CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • • • • • Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Development Systems Information Line Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers.
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 1. Introduction to the PICDEM MC LV Development Board 1.1 INTRODUCTION The PICDEM MC LV Development Board is targeted to control Brushless DC (BLDC) motors in sensor or in sensorless operation. This flexible and low-cost board can be configured in different ways to use with Microchip’s specialized motor control microcontrollers and digital signal controllers.
PICDEM™ MC LV Development Board 1.5 BOARD CONNECTORS The PICDEM MC LV Development Board has a PIC18FXX31/dsPIC30F device-based control section and 3-phase power inverters. The board has a power connector (J20), motor connector (J9), ICD 2 connector (J6) and serial interface connector (J1), as shown in Figure 1-1.
Introduction to the PICDEM MC LV Development Board 1.5.1 Power Connector (J20) The power connector (J20) has the facility to connect 3 different types of connectors. A barrel connector is mounted on the board when it is shipped. If necessary, the user can replace it with a standard DIN connector or a screw terminal with a 5 mm pitch. A 24V DC power supply is connected to J20. Use the recommended power supply listed as an accessory (Part Number AC002013) on the Microchip web site (www.microchip.
PICDEM™ MC LV Development Board NOTES: DS51554B-page 10 © 2006 Microchip Technology Inc.
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 2. System Level Architecture of the Board 2.1 HIGHLIGHTS This items discussed in this chapter are: • • • • 2.2 Board Block Diagram Control Section Power Inverter Section Power Supply BOARD BLOCK DIAGRAM Figure 2-1 gives a system level architecture of the PICDEM MC LV Development Board. The board has three sections: control, power inverter and power supply.
PICDEM™ MC LV Development Board 2.3 CONTROL SECTION Microchip’s PIC18F2431/2331 and many versions of the dsPIC30F DSCs have specialized hardware peripherals, like the power control PWM, high-speed ADC, motion control feedback, integrated EEPROM and the power supervisory function, that are required for efficient motor control.
System Level Architecture of the Board 2.3.4 Hall Sensor Interface Hall sensors on the motor are open-collector outputs. Individual pull-up resistors are provided on the board for each Hall sensor. The Hall sensor signals, HA, HB and HC, are connected to the input capture pins, IC1, IC2 and IC3, respectively. 2.3.5 Back EMF Signal Conditioning When a sensorless algorithm is used to control the BLDC motor speed, Back EMF (BEMF) signals are used.
PICDEM™ MC LV Development Board 2.5 POWER SUPPLY A 24V DC block power supply connected to J20 serves as the main power supply to the board. A +15V power supply is generated for the gate drivers using a 15V regulator (VR2). This 15V regulator is passed through a 5V regulator to drive a +5V power supply to the MCU and the control circuit around the MCU. 2.5.1 Connecting an Alternate Power Supply The board can support the motors up to the rated voltage of 48V.
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 3. Getting Started with PIC18FXX31 MCUs 3.1 INTRODUCTION This chapter provides instructions on how to set up the PICDEM MC LV Development Board using the PIC18FXX31 devices. WARNING The PICDEM MC LV Development Board is intended to drive 3-phase BLDC motors. Before connecting the motor, make sure that the power rating of the motor is equal or less than the power rating of the board, as given in Appendix B. “Electrical Specifications”.
PICDEM™ MC LV Development Board TABLE 3-1: JUMPER SETTINGS Jumper Sensored Control J7, J11, J13 Short between 1-2 Sensorless Control Short between 1-2 J15 Short between 2-3 Short between 2-3 J8, J12, J14 Open Short J10, J16, J17, J19 Short Short TABLE 3-2: MOTOR CONNECTIONS Label on Connector J9 Sensored Control Sensorless Control M1 Phase C (red) Phase C (red) M2 Phase B (black) Phase A (white) M3 Phase A (white) Phase B (black) G Ground (green) Ground (green) +5V Power-on
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 4. Using the Microchip Motor Control GUI 4.1 HIGHLIGHTS The items discussed in this chapter are: • • • • 4.2 Software Overview Starting the Program The Main Window (Control Panel) The Setup Window SOFTWARE OVERVIEW The Microchip Motor Control GUI provides a convenient computer-based interface for most PICmicro® device-based motor control applications.
PICDEM™ MC LV Development Board FIGURE 4-1: 4.4 THE CONTROL PANEL VIEW THE MAIN WINDOW (CONTROL PANEL) The control panel allows the user to control motor speed and rotation direction in a way that is similar to Stand-Alone mode. It also allows users to access the Setup and Pattern programming displays.
Using the Microchip Motor Control GUI • Speed Set Control – The user can set the target run speed for the motor with this spin box by either direct entry or using the up/down controls. The input is specified in RPM for all applications. Left clicking on the control, or pressing the or keys after entering a speed, starts the motor running. • Phase Current Display – Displays the current draw for the indicated motor windings in amperes.
PICDEM™ MC LV Development Board 4.5 THE SETUP WINDOW FIGURE 4-2: TYPICAL SETUP WINDOW Clicking on the Setup button in the control panel launches a second window, the Setup window (Figure 4-2). From here, users can define the individual settings for the motor being used. If the appropriate information is included in the firmware, most of the values will auto-populate, or at least be limited to a smaller subset of choices. Features or parameters that are not used will be masked or greyed out.
Using the Microchip Motor Control GUI The configuration for motion feedback sensors is selectively enabled by selecting the appropriate check boxes in Feedback Device. When Hall effect sensors alone are used, the Hall Sensor Phase Angle and MFM Filter Prescaler (Motion Feedback Module) may be configured; the other options are disabled.
PICDEM™ MC LV Development Board 4.5.4 Storing and Using Setting Profiles Once the parameters for a particular motor are established, it would be nice to preserve them for future use. Users have several options from the Setup window display to do just that. Clicking on the Save button allows the current settings to be stored in a file, while clicking on Load selects and loads a file with saved settings. Both commands use the conventional Windows® dialogs for opening and saving files.
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 5. Creating Motor Control Firmware Projects 5.1 HIGHLIGHTS The items discussed in this chapter are: • Included Applications • Beyond the Included Applications: Creating New Projects 5.2 INCLUDED APPLICATIONS The PICDEM MC LV Development Board comes with two complete firmware solutions. One of these is the BLDC control application (installed on the board). It assumes a 3-phase BLDC motor using Hall effect sensors at 120-degree spacing application.
PICDEM™ MC LV Development Board NOTES: DS51554B-page 24 © 2006 Microchip Technology Inc.
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 6. Getting Started with dsPIC Digital Signal Controllers 6.1 HIGHLIGHTS This item discussed in this chapter is: • Initial Setup 6.2 INITIAL SETUP The following procedure describes how to set up the PICDEM MC LV Development Board to run with a dsPIC® device. WARNING Note 1: The PICDEM MC LV Development Board is intended to drive the 3-phase BLDC motor.
PICDEM™ MC LV Development Board WARNING Note 1: When programming the dsPIC device on the PICDEM MC LV Development Board, the two DIP switches must be in the PRGM position. This will ensure the programming pins are connected to the programmer. If the user has generated independent code, the user must select EMUC2/EMUD2 pins for emulation in the MPLAB Configuration menu. These alternate pins will then be programmed and will be used for the debugging or run phase.
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 7. Using dsPIC DSCs to Run a Sensorless BLDC Motor 7.1 INTRODUCTION The PICDEM MC LV Development Board can be used to run a BLDC motor without a Hall effect sensor. To find out more and get a full description of the application, refer to Application Note AN992, “Sensorless BLDC Motor Control Using dsPIC30F2010” (DS00992). For jumper settings and details on how to connect the motor, refer to Chapter 6. “Getting Started with dsPIC Digital Signal Controllers”.
PICDEM™ MC LV Development Board There are 6 sectors, each 60 degrees wide, which accumulate to give one 360 degree electrical revolution of the motor. In each sector, two windings are excited: one with a high voltage and the other with a low voltage. The third winding is not excited. As the rotor rotates from one sector to another, a new set of windings is excited. The sequence of excitation in each sector is provided by the motor manufacturer.
Using dsPIC DSCs to Run a Sensorless BLDC Motor 7.4 USING THE PICDEM MC LV DEVELOPMENT BOARD FOR HIGHER MOTOR VOLTAGE The PICDEM MC LV Development Board can be used to drive a motor at a voltage higher than 24V, but not exceeding 36V. The new high voltage can be supplied to the system at the Plus (+) and Minus (–) terminals on J9. For the sensorless algorithm to work, the user will have to modify the resistor pairs to drive the same full-scale (2.4V) and zero-cross (1.2V) voltages (see Section 7.
PICDEM™ MC LV Development Board NOTES: DS51554B-page 30 © 2006 Microchip Technology Inc.
PICDEM™ MC LV DEVELOPMENT BOARD Chapter 8. Troubleshooting 8.1 HIGHLIGHTS This item discussed in this chapter is: • Common Problems 8.2 COMMON PROBLEMS 8.2.1 The Power LED D7 is Not Lit Check the PICDEM MC LV Development Board for power: • • • • Check the power supply and make sure it is connected to the board. Check the power cable and make sure it is plugged into the outlet. Check and verify that the power source is working properly.
PICDEM™ MC LV Development Board 8.2.3 The Motor Does Not Start When S2 or S3 is Pressed Verify the power supply and motor connections: • Verify that the power supply is connected to the board and is in working condition. • Verify that the controller is in the correct socket; PIC18F on the “PIC” socket and DSC on the “dsPIC” socket. • Make sure the jumper settings are correct for the type of control selected. • Verify that the motor connections on J9 are making proper contact.
0.1 μF © 2006 Microchip Technology Inc. VBUS 33 pF 33 pF 5 MHz VREF IMOTOR 0.1 μF PIC18F2431 AVSS VSS AVDD VDD 0.1 μF 47 μF 0.1 μF VIN GND VDD VSS AVDD AVSS VOUT 47 μF VIN GND 47 μF 0.1 μF VOUT MC7815CD2T/R4 100 μF dsPIC30F3010 VDD AVSS MC7805CD2T/R4 IMOTOR VBUS TC74 NC GND 0.1 μF 0.1 μF 1 μF 0.1 μF VBUS 1 μF 1 μF VCC 1 μF 1 μF FIGURE A-1: SDA SCLK VDD PICDEM™ MC LV DEVELOPMENT BOARD Appendix A.
DS51554B-page 34 VCC LO COM VB HO VS VCC LO COM VB HO VS 1 5 4 8 7 6 VCC LO COM VB HO VS 1 5 4 8 7 6 1 5 4 8 7 6 3.3 μF 3.3 μF 47 nF 47 nF MCP6002 47 nF 47 nF 47 nF 0.1 μF 33 pF IMOTOR 33 pF MCP6544 MCP6544 MCP6544 MCP6544 MCP6002 0.1 μF FIGURE A-2: 2 3 HIN LIN 2 HIN 3 LIN 2 HIN 3 LIN 3.3 μF PICDEM™ MC LV Development Board CIRCUIT SCHEMATIC (SHEET 2 OF 2) © 2006 Microchip Technology Inc.
PICDEM™ MC LV DEVELOPMENT BOARD Appendix B. Electrical Specifications TABLE B-1: Parameter DC INPUT RATING Min Typical Supply Voltage 15 Supply Voltage 12 Standby Current Standby Power TABLE B-2: Parameter Max Unit Note 24 — V DC input on J5 — 48 V DC input between ‘+’ and ‘–’ on J9 (open jumper J3) — 30 — mA With 24V DC supply — 0.
PICDEM™ MC LV Development Board NOTES: DS51554B-page 36 © 2006 Microchip Technology Inc.
PICDEM™ MC LV DEVELOPMENT BOARD Appendix C.
PICDEM™ MC LV Development Board NOTES: DS51554B-page 38 © 2006 Microchip Technology Inc.
PICDEM™ MC LV DEVELOPMENT BOARD Index B J Block Diagrams Hardware .......................................................... 28 Board Connectors ...................................................... 8 ICD 2 (J6) ........................................................... 9 Motor (J9) ........................................................... 9 Power (J20) ........................................................ 9 RS-232 Serial Interface (J1) ............................... 9 Board Layout (figure) ......
PICDEM™ MC LV Development Board S T Sensorless Control of a BLDC Motor ....................... 27 Higher Motor Voltage ........................................ 29 Lower Motor Voltage ......................................... 29 Serial Port ................................................................ 19 Software Overview ................................................... 17 Stand-Alone Mode ................................................... 18 Troubleshooting Common Problems ........................
Index NOTES: © 2006 Microchip Technology Inc.
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://support.microchip.com Web Address: www.microchip.