dsPICDEM™ MCSM Development Board User’s Guide © 2009 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.
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Table of Contents Chapter 1. Introduction 1.1 Overview ...................................................................................................... 11 1.2 Features ....................................................................................................... 13 1.3 What’s Included ............................................................................................ 13 1.4 Reference Documents and Webinars ................................
dsPICDEM™ MCSM Development Board User’s Guide NOTES: DS70610A-page 4 © 2009 Microchip Technology Inc.
dsPICDEM™ MCSM DEVELOPMENT 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.
dsPICDEM™ MCSM Development Board User’s Guide • Appendix A. “Board Layout and Schematics” – This appendix provides diagrams of the hardware layout, as well as schematic diagrams for the dsPICDEM MCSM Development Board. • Appendix B. “Electrical Specifications” – This appendix provides pertinent electrical specifications for the dsPICDEM MCSM Development Board. DS70610A-page 6 © 2009 Microchip Technology Inc.
Preface CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Represents Examples 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...
dsPICDEM™ MCSM Development Board User’s Guide WARRANTY REGISTRATION Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users to receive new product updates. Interim software releases are available at the Microchip web site. RECOMMENDED READING This user’s guide describes how to use the dsPICDEM MCSM Development Board.
Preface dsPIC33FJ32MC302/304, dsPIC33FJ64MCX02/X04, and dsPIC33FJ128MCX02/ X04 Data Sheet (DS70291) This data sheet contains device specific information for the dsPIC33FJ32MC302/304, dsPIC33FJ64MCX02/ X04 and dsPIC33FJ128MCX02/X04 motor control family of devices. dsPIC33FJXXXMCX06/X08/X10 Data Sheet (DS70287) This data sheet contains device specific information for the dsPIC33FJXXXMCX06/ X08/X10 motor control family of devices. To download these documents, visit Microchip web site at www.microchip.com.
dsPICDEM™ MCSM Development Board User’s Guide 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.
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Chapter 1. Introduction The dsPICDEM MCSM Development Board is targeted to control both unipolar and bipolar stepper motors with no hardware configuration changes. This flexible and cost-effective board can be configured in different ways for use with Microchip’s specialized dsPIC33F Motor Control Digital Signal Controllers (DSCs).
dsPICDEM™ MCSM Development Board User’s Guide FIGURE 1-1: DS70610A-page 12 dsPICDEM MCSM DEVELOPMENT BOARD © 2009 Microchip Technology Inc.
Introduction 1.
dsPICDEM™ MCSM Development Board User’s Guide The dsPICDEM MCSM Development Board with the part number DM330022 contains the following: • dsPICDEM MCSM Development Board • dsPIC33FJ32MC204 Plug-In-Module • USB-to-mini-USB cable • Screwdriver • dsPICDEM MCSM Development Board CD ROM, which includes: - This user’s guide - Data sheets for dsPIC families - Example programs for use with the dsPIC DSC devices The dsPICDEM MCSM Development Board Kit with part number DV330021 contains the following: • dsPICDEM MCSM
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Chapter 2. Getting Started This chapter describes how to set up the dsPICDEM MCSM Development Board hardware and software; and how to run the included demonstration software. Refer to Chapter 3. “Hardware” for detailed information on the board and its components. Topics in this chapter include: • Board Setup • Programming and Debugging Application Code 2.
dsPICDEM™ MCSM Development Board User’s Guide 4. 5. 6. 7. Connect the 24V power supply to J6. Press S1 to run the motor. Vary the motor’s speed with the potentiometer. Press S1 to switch to full-step wave mode, full-step, half-step and various microstepping modes. Pushing S1 after the 256th microstep step setting stops the motor. Press S1 again to repeat the cycle.
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Chapter 3. Hardware This chapter describes the hardware used in the dsPICDEM MCSM Development Board. Topics covered include: • • • • 3.
dsPICDEM™ MCSM Development Board User’s Guide 3.1.1 Power Stage The dsPICDEM MCSM Development Board features two full-bridge inverters to accommodate a bipolar stepper motor. MOSFET gate signals are powered from a 15V permanent supply while the full-bridge inverters can be powered from a supply up to 80V. 3.1.1.1 MOSFET DRIVER Although the dsPIC DSC devices can operate in Complementary PWM mode, Independent PWM mode is still possible.
Hardware 3.1.2 Current Sensing Two shunt resistors are available for current sensing, one for each of the two motor windings. In order to read both positive and negative currents, the amplifier circuit is designed with an offset of VREF = AVDD/2. The amplifier gain allows for a maximum current range of ±2.2A.
dsPICDEM™ MCSM Development Board User’s Guide 3.2 PIM CONFIGURATION This section summarizes the resistor configurations required to connect the PIM pins to the dsPIC DSC pins. The following PIMs can be configured on the dsPICDEM MCSM Development Board: • • • • dsPIC33FJ256MC710 PIM (MA330013) dsPIC33FJ12MC202 PIM (MA330014) dsPIC33FJ32MC204 PIM (MA330017) dsPIC33FJ128MC804 PIM (MA330018) Table 3-1, Table 3-2 and Table 3-3 describe the PIM configuration details.
Hardware TABLE 3-1: PIM Pin Number dsPIC33FJ256MC710 CONFIGURATION DETAILS(1) Labels on the MCSM Board dsPIC33FJ256MC710 Pin Number Pin Name Comment/Board Resistor Configuration 3 PWM1H3 3 PWM3H/RE5 — 4 PWM2L1 4 PWM4L/RE6 — 5 PWM2H1 5 PWM4H/RE7 — 13 MCLR 13 MCLR — 18 PWM2H1 — AN20/FLTA/INT1/RE8 Not used, set pin as input 19 FAULT_1 19 AN21/FLTB/INT2/RE9 Solder R86, remove R87 20 POT 20 AN5/QEB/CN7/RB5 Not used, set pin as input 22 POT 22 AN3/INDX/CN5/RB3 — 23 DC
dsPICDEM™ MCSM Development Board User’s Guide dsPIC33FJ12MC202 CONFIGURATION DETAILS(1,2) TABLE 3-2: PIM Pin Number Labels on the MCSM Board dsPIC33FJ12MC202 Pin Number 3 4 5 PWM1H3 PWM2L1 PWM2H1 13 MCLR 26 MCLR — PWM2H1 14 TCK/PWM2H1/SCL1/RP8/CN22/RB8 Solder R11 PWML1 15 TDO/PWM2L1/SDA1/RP9/CN21/RB9 Solder R14, solder R13 POT 2 PGC1/EMUC1/AN3/RP1/CN5/RB1 Solder R31, remove R21 POT — — Remove R9 DC_REF — — — IMOTOR2 28 PGC2/EMUC2/AN1/VREF-/CN3/RA1 Solder R25, remove R26 IMOTOR1 27 PGD2/EMUD2/AN0/VREF
Hardware TABLE 3-3: PIM Pin Number dsPIC33FJ32MC204 AND dsPIC33FJ128MC804 CONFIGURATION DETAILS Labels on the MCSM Board dsPIC33FJ32MC204 dsPIC33FJ128MC804 Pin Number Pin Name 3 PWM1H3 8 PGED2/EMUD2/PWM1H3/RP10/CN16/RB10 4 5 PWM2L1 PWM2H1 — — — — PIM Resistor Configuration Solder R6 — — — MCLR 18 MCLR PWM2H1 44 SCL1/RP8/CN22/RB8 Not used, set pin as input PWM2L1 1 SDA1/RP9/CN21/RB9 Not used, set pin as input POT 26 AN7/RP17/CN9/RC1 Not used, set pin as input POT — — — DC_REF — — — IMOTOR2 20 AN
dsPICDEM™ MCSM Development Board User’s Guide 3.3 BOARD CONNECTORS Figure 3-3 shows the various user interface components available on the dsPICDEM MCSM Development Board. Table 3-4 describes the hardware connection between the PICkit™ 3, MPLAB® ICD 3 or MPLAB REAL ICE™ In-Circuit Emulator, the power supply, and the dsPICDEM MCSM Development Board connectors.
Hardware 3.3.1 Input Power Connector (J6, BP1-BP2) The dsPICDEM MCSM Development Board receives the power for control circuits from a +24V power supply. The 24V supply is always needed as it supplies 15V and 3.3V necessary for the dsPIC DSC and for the interface between the dsPIC DSC and the power stage. The power stage DC bus voltage can be connected to the development board through the J6 or BP1-BP2 connectors. 3.3.
dsPICDEM™ MCSM Development Board User’s Guide The connector is configured in such a way so that all eight motor wires can be connected in all possible configurations. Considering an eight-wire motor in a bipolar configuration (series- or half-winding), two wires will be left floating. The NC pins are available to accommodate the two floating wires. The DC bus connection is placed between wires of two different phases to accommodate the center tap of a winding in unipolar configurations.
Hardware 3.4 USER INTERFACE HARDWARE The dsPICDEM MCSM Development Board consists of the following push buttons, LEDs and potentiometers: • • • • • • • One push button One potentiometer Eight PWM LEDs One power-on status LED Two USB LEDs One Fault LED Device Reset push button TABLE 3-7: Label INDICATORS AND HUMAN INTERFACES Hardware Element Description S1 Push button; this push button is connected to a port pin. When momentarily pressed, the switch connects the respective port pin to Ground.
dsPICDEM™ MCSM Development Board User’s Guide NOTES: DS70610A-page 28 © 2009 Microchip Technology Inc.
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Chapter 4. Troubleshooting This chapter provides information for troubleshooting problems encountered while using the dsPICDEM MCSM Development Board. 4.1 COMMON PROBLEMS 1. Problem: USB connection in DMCI fail (amber and green LEDs are ON) This condition is accompanied by the following error message: FIGURE 4-1: DMCI CONNECTION FAILURE Solution: a) Disconnect the USB cable. When disconnected, the green LED turns OFF. b) Reconnect the USB cable.
dsPICDEM™ MCSM Development Board User’s Guide NOTES: DS70610A-page 30 © 2009 Microchip Technology Inc.
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Appendix A. Board Layout and Schematics FIGURE A-1: dsPICDEM™ MCSM DEVELOPMENT BOARD LAYOUT (TOP) © 2009 Microchip Technology Inc.
dsPICDEM™ MCSM Development Board User’s Guide dsPICDEM™ MCSM DEVELOPMENT BOARD SCHEMATIC (SHEET 1 OF 3) PWM1L1 PWM1H1 PWM1L2 PWM1H2 PWM1L3 PWM1H3 PWM2L1 PWM2H1 FIGURE A-2: DS70610A-page 32 © 2009 Microchip Technology Inc.
Board Layout and Schematics 8 6 5 B A 2 3 © 2009 Microchip Technology Inc.
dsPICDEM™ MCSM Development Board User’s Guide FIGURE A-4: DS70610A-page 34 dsPICDEM™ MCSM DEVELOPMENT BOARD SCHEMATIC (SHEET 3 OF 3) © 2009 Microchip Technology Inc.
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Appendix B. Electrical Specifications This appendix provides important electrical specifications for the dsPICDEM MCSM Development Board.
dsPICDEM™ MCSM Development Board User’s Guide NOTES: DS70610A-page 36 © 2009 Microchip Technology Inc.
dsPICDEM™ MCSM DEVELOPMENT BOARD USER’S GUIDE Index A R Amplifier Gain Calculation Formula.......................... 19 Reading, Recommended ........................................... 8 B S Block Diagram.......................................................... 12 Board Layout............................................................ 31 Connectors and Jumpers ......................................... 24 Current Sensing .......................................................
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.