F1 LV Evaluation Platform Motor Control Add-Ons User’s Guide 2012 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.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Table of Contents Chapter 1. F1 LV Evaluation Platform Overview 1.1 1.2 Introduction ............................................................................................. 13 Hardware Overview ................................................................................ 13 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3 1.4 Evaluation Platforms .............................................................................. 13 Add-on Boards ......................
F1 LV Evaluation Platform Motor Control Add-Ons 3.1.4 3.2 3.3 Board Setup ............................................................................................ 30 Hardware ................................................................................................ 30 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4 Reference Documents ...........................................................................30 General Architecture ...............................................................
.3.6 5.3.7 5.3.8 5.4 5.5 UNI/O® Memory Chip ............................................................................ 44 Speed Control ........................................................................................ 44 Current Control ...................................................................................... 44 Demo Software ....................................................................................... 45 5.4.1 5.4.2 Introduction ........................................
F1 LV Evaluation Platform Motor Control Add-Ons NOTES: DS41629A-page 6 2012 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS 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.
F1 LV Evaluation Platform Motor Control Add-Ons 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 Gui
Preface 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 F1 LV Evaluation Platform Motor Control Add-ons User’s Guide. Other useful documents are listed below.
F1 LV Evaluation Platform Motor Control Add-Ons 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 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.
F1 LV Evaluation Platform Motor Control Add-Ons NOTES: DS41629A-page 12 2012 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Chapter 1. F1 LV Evaluation Platform Overview 1.1 INTRODUCTION This user’s guide offers a quick start-up and eventual troubleshooting for the motor control add-ons used together with the F1 LV Evaluation Platform. For more details regarding the supported applications, control algorithms, hardware and software support, please visit the reference sections inside this user’s guide. 1.2 HARDWARE OVERVIEW 1.2.
F1 LV Evaluation Platform Motor Control Add-ons 1.2.3 USB Interface The F1 LV Evaluation Platform includes a USB to serial interface. This provides the capability to control the motors in real time without entering Debug mode. PC control software communicates with the F1 LV Evaluation Platform software to create an integrated motor control evaluation system. The PC software and interface driver are available for free download from the Microchip web site at www.microchip.com/F1Eval. 1.2.
F1 LV Evaluation Platform Overview FIGURE 1-1: 18 17 16 15 14 13 12 1 11 10 9 2 3 4 5 1. Motor Parameters pull-down menu. Save and recall to and from disc. 2. Speed control (relative 0 to 255): • Commutation rate in open loop • Drive level in closed loop 3. Zero cross advance/retard (BLDC only). 4. Motor drive voltage control (open loop). In BLDC closed loop this control reverts to a balance control. 5. BLDC open-loop single-step button. 6.
F1 LV Evaluation Platform Motor Control Add-ons FIGURE 1-2: 33 32 31 30 19 29 20 28 21 22 23 24 19. BLDC flyback voltage blanking time. 20. BLDC dwell time at each start-up step. 21. BLDC milliseconds to remain in Open-Loop mode at start-up before closing the loop. 22. BLDC minimum commutation time below which a stall is detected. 23. BLDC error feedback multiplication factor. Each shift divides error by 2. 24. Stepper motor steps in each drive phase when microstepping is selected. 25.
F1 LV Evaluation Platform Overview 1.4 USING THE F1LVDEMO CONTROL SOFTWARE 1.4.1 Software Updates The software supplied and preloaded into the F1 LV Evaluation Platform supports all four of the add-on motor control boards. The preloaded software is the latest version available at time of manufacture. Source code including any updates is available for free download from the Microchip web site: www.microchip.com/F1Eval. All motors can be controlled with the PC-based F1LVDemo control GUI.
F1 LV Evaluation Platform Motor Control Add-ons 10. Click the Open button. After the link to the F1 LV Evaluation Platform is established, the F1 LV Evaluation Platform software version will be displayed, as well as the detected motor type. When the link is established, all user accessible motor parameters stored in the add-on board will be retrieved and shown in the corresponding controls of the GUI. Controls not applicable to the detected motor will be disabled and grayed out. 1.4.
F1 LV Evaluation Platform Overview 1.4.7.1 CATASTROPHIC RECOVERY In the unlikely event the UNI/O memory becomes erased or damaged, the memory can be completely restored with the File->Restore->(add-on type) option. This option should only be used if the add-on board fails the automatic detection process. Take care to select the add-on type corresponding to the attached board. Failure to do so will cause unexpected operation possibly resulting in permanent damage to the add-on board hardware. 1.4.
F1 LV Evaluation Platform Motor Control Add-ons TABLE 1-2: Motor Type BLDC (EBM) DS41629A-page 20 GUI Parameter Header File Parameter Start-up: Percent Drive MED_START_DRIVE_PCT Conversion Factor 1 Start-up: Speed (RPM) START_RPM 1 Poles NUM_POLES 1 Blanking BLANKING_COUNT_us 1 Slow Step TIMEBASE_SLOW_STEP 10 Open Loop OPEN_LOOP_ms 1 Stall STALL_COUNT_us 1 Run Percent LOW_RESTORE_REQUEST_PCT 1 Stop Percent LOW_OFF_REQUEST_PCT 1 Error Scale ERROR_SCALE 1 BDC (PAN14) Run Perce
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Chapter 2. The BLDC Add-on Board 2.1 OVERVIEW The BLDC add-on (DM164130-2) allows you to drive virtually most sensorless three-phase brushless DC motors used in consumer electronics, ranging from small HVAC applications to complex media reading/writing drives. The add-on is shipped together with the ebm-papst BLDC motor, to which it connects through a ribbon cable to a special connector on the board (J5).
F1 LV Evaluation Platform Motor Control Add-ons 2.1.3 Reference Documents This section points you to technical application support.
The BLDC Add-on Board FIGURE 2-1: THE BLDC MOTOR CONTROL ADD-ON ARCHITECTURE V_MOTOR J1 PIC16LF1947 Q1 Q3 Q2 HU LU Motor HV LV HW U Bipolar Transistor Inverter LW W Q7 Current meas. autoshutdown + _ R19 V Q9 Q8 R15 Scaling Zero Cross R21 + __ VU, VV, VW V_MOTOR U1 Vout Vin 3.3V 2.3.2 J3 Attaching the Motor The BLDC add-on kit includes the three-phase 24V ebm-papst motor. This motor can be attached through a dedicated 28AWG 8-wire ribbon cable using connector J5.
F1 LV Evaluation Platform Motor Control Add-ons Motor current is measured by using the R15 shunt resistor, placed in-between the Power Stage lowside and ground, and connected to the PIC16F1947 through the J1 connector. (Current sensing is not implemented in the F1 LV Evaluation software.) 2.3.5 Protection Two 5A fuses (F1 and F2) are used to protect your add-on in case of an overcurrent situation in the output drivers.
The BLDC Add-on Board 2.4.3 BLDC Parameter Optimization Brushless motors depend on the software to commutate the motor. The software must determine the rotor position relative to the stator so as to commutate the driver circuitry at specific rotor positions. The rotor position is determined in sensorless motors by voltages induced into the stator by rotor motion. The induced voltage is referred to as back EMF or BEMF.
F1 LV Evaluation Platform Motor Control Add-ons 11. Enter the % Drive number into the % Drive start-up value. 12. Click the Parameters tab and verify or enter the following nominal values: a) Blanking: 100 us b) Slow Step: 200 ms. c) Open Loop: 500 ms. d) Run: % Drive entered in step 13. e) Stop: 2 less than Run f) Stall: 900 us g) Error Scale: 3 13. Click the Operate tab and select Closed-Loop mode. 14.
The BLDC Add-on Board 2.4.3.5 STALL A motor that stalls may appear to the control algorithm as if it is still running at high speed. Blanking, modulation, and intrinsic motor characteristics all play a part in a false BEMF indication. When this happens, the commutation rate will ramp up to a rate much higher than the motor is able to operate. This feature is used to detect a stall condition. Determine an appropriate stall detection time by measuring the commutation period of the motor at maximum speed.
F1 LV Evaluation Platform Motor Control Add-ons NOTES: DS41629A-page 28 2012 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Chapter 3. The Brushed DC Add-on Board 3.1 GETTING STARTED 3.1.1 Overview The BDC add-on (DM164130-6) allows you to drive virtually most brushed DC motors used in consumer electronics. The add-on is shipped together with the NMB brushed DC motor (PAN14EE12AA1) mounted on the board. The motor voltage is supplied through jumper J5.
F1 LV Evaluation Platform Motor Control Add-Ons 3.1.4 Reference Documents This section points you to application technical support.
The Brushed DC Add-on Board FIGURE 3-1: THE BDC MOTOR CONTROL ADD-ON ARCHITECTURE J1 PIC16LF1947 A B C Bipolar Transistor Command Bridge D V_MOTOR Q1 Q2 U V Q5 + ISENSE - R15 Detect add-on type read/write parameters 3.3V 3.3.2 R13 VREF IRef 1K EEPROM V_MOTOR Current measurement Q6 U1 Vout Vin J3 Attaching the Motor The BDC add-on kit includes a 12V NMB PAN14EE12AA1 motor. This motor is mounted on the board. The voltage is supplied to the motor through jumper J5.
F1 LV Evaluation Platform Motor Control Add-Ons The stage contains four PWM (A, B, C, D) inputs and two driver outputs (VU and VV) to be attached to each terminal of the BDC motor (U, V). The current on the H-bridge is measured on the R15 shunt resistor, placed in-between the Power Stage lowside and ground, and connected to the PIC16F1947 through the J1 connector. 3.3.5 Protection Two 5A fuses (F1 and F2) are used to protect your add-on in case of an overcurrent situation in the output drivers.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Chapter 4. The Bipolar Stepper Add-on Board 4.1 GETTING STARTED 4.1.1 Overview The bipolar stepper add-on (DM164130-7) allows you to drive common two-phase bipolar stepper motors used in consumer electronics, ranging from CNCs, printers, optical disc drives and small load positioning systems. The add-on is shipped together with the Leadshine 39HS02 bipolar stepper motor pre-wired to plug directly into add-on connector J3.
F1 LV Evaluation Platform Motor Control Add-Ons You can obtain these reference documents from your nearest Microchip sales office (listed in the last page of this document) or by downloading them from the Microchip web site. 4.3 GETTING STARTED WARNING The Bipolar Motor Control Add-on Board is intended to drive two-phase bipolar stepper motors. Before connecting the motor, make sure the power rating of the motor is equal to or less than the power rating of the board, as shown in Appendix B.
The Bipolar Stepper Add-on Board FIGURE 4-1: THE BIPOLAR STEPPER MOTOR CONTROL ADD-ON ARCHITECTURE J1 PIC16LF1947 ECCP1_A ECCP1_B ECCP1_C ECCP1_D ECCP2_A ECCP2_B ECCP2_C ECCP2_D Bipolar Transistor Command Bridge V_MOTOR V_MOTOR Q4 Q1 Q7 Q10 Q9 Q12 Y W M Z X Q3 _ + Q6 I1 R8 CVREF R15 Current control _ I2 CVREF Detect add-on type read/write parameters 1k x 8 EEPROM U1 Vout Vin 3.3V 4.4.
F1 LV Evaluation Platform Motor Control Add-Ons The stage contains eight PWM (ECCP1_A, ECCP2_A, ECCP1_B, ECCP2_B, ECCP1_C, ECCP2_C, ECCP1_D, ECCP2_D) inputs and four driver outputs (W, X, Y, Z) to be attached to the bipolar motor terminals. Outputs W and X should be attached to one motor phase, and outputs Y and Z should be attached to the other motor phase.
The Bipolar Stepper Add-on Board Figure 4-2 below gives an insight on how to use the PIC MCU modules as part of a current chopper: FIGURE 4-2: CURRENT CHOPPER CIRCUITRY EMULATED WITH PIC16LF1947 INTERNAL MODULES ECCPx: PWM Auto-Shutdown PWM Auto-Restart Bipolar Transistor Command Bridge V_MOTOR Q4 Q1 CCPxAS PWMxCON FVR W [1.024V:1x/2x/4x] X CMxCON1 Vdd + DAC Q3 [4:0] _ 4.5 Q6 I1 GND PIC16LF1947 M R8 J1 DEMO SOFTWARE 4.5.
F1 LV Evaluation Platform Motor Control Add-Ons 4.6 OPTIMIZING STEPPER MOTOR PARAMETERS 4.6.1 Stepper Motor Closed-Loop Drive Overview Stepper motor closed-loop operation is technically not closed loop. When Closed-Loop mode is selected, then both the motor voltage and speed outputs simultaneously follow the single-speed control input as independent open-loop functions of the minimum and maximum speed and drive parameters.
The Bipolar Stepper Add-on Board 4.6.2 Optimizing DUTY_SCALE and SPEED_SCALING_CONST The DUTY_SCALE and SPEED_SCALING_CONST are the slope constants of the two equations that determine the drive voltage and commutation rate for any given speed request input. Optimization involves controlling the speed and drive voltage independently to determine the line endpoints. The slope constants can then be calculated from the endpoints.
F1 LV Evaluation Platform Motor Control Add-Ons NOTES: DS41629A-page 40 2012 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Chapter 5. The Unipolar Stepper Add-on Board 5.1 GETTING STARTED 5.1.1 Overview The unipolar stepper add-on (DM164130-7) allows you to drive common two-phase unipolar stepper motors used in consumer electronics, ranging from CNCs, printers, optical disc drives and small load positioning systems. The add-on is shipped together with the Leadshine 42HS03 unipolar stepper motor pre-wired to plug directly into add-on connector J3.
F1 LV Evaluation Platform Motor Control Add-Ons 5.1.4 Reference Documents This section points you to application technical support. AN907, ”Stepping Motors Fundamentals” AN906, ”Stepper Motor Control Using the PIC16F684” AN822, ”Stepper Motor Microstepping with PIC18C452” AN1307, ”Stepper Motor Control with dsPIC® DSCs” You can obtain these reference documents from your nearest Microchip sales office (listed in the last page of this document) or by downloading them from the Microchip web site. 5.
The Unipolar Stepper Add-on Board FIGURE 5-1: THE UNIPOLAR STEPPER MOTOR CONTROL ADD-ON ARCHITECTURE J1 PIC16LF1947 V_MOTOR M A B C D + I1 R3 DAC Detect add-on type read/write parameters V_MOTOR _ Current control 1K EEPROM U1 3.3V 5.3.2 Vout Vin J3 Attaching the Motor The unipolar stepper add-on kit includes the two-phase Leadshine 42HS03 unipolar stepper motor.
F1 LV Evaluation Platform Motor Control Add-Ons 5.3.5 Protection Two 5A fuses (F1 and F2) are used to protect your add-on in case of an overcurrent situation of the supply voltage. In case one or both of them get burnt, remove power immediately from the board and inspect the add-on for further damage. Do not replace the burnt fuses with other values than the ones provided with the board. 5.3.6 UNI/O® Memory Chip The UNI/O® memory chip stores the board ID and the application parameters.
The Unipolar Stepper Add-on Board FIGURE 5-2: CURRENT CHOPPER CIRCUITRY EMULATED WITH PIC16LF1947 INTERNAL MODULES V_MOTOR A ECCPx: PWM Auto-Shutdown PWM Auto-Restart B FVR CCPxAS PWMxCON M C [1.024V:1x/2x/4x] CMxCON1 D Vdd + DAC [4:0] _ I1 GND PIC16LF1947 5.4 R3 J1 DEMO SOFTWARE 5.4.1 Introduction The F1 LV Evaluation demonstration program uses a single combined demo. The combined demo source code is organized into sectional code for ease of accommodating several motor types.
F1 LV Evaluation Platform Motor Control Add-Ons 5.5 OPTIMIZING STEPPER MOTOR PARAMETERS 5.5.1 Stepper Motor Closed-Loop Drive Overview Stepper motor closed-loop operation is technically not closed loop. When Closed-Loop mode is selected, then both the motor voltage and speed outputs simultaneously follow the single-speed control input as independent open-loop functions of the minimum and maximum speed and drive parameters.
The Unipolar Stepper Add-on Board 5.5.2 Optimizing DUTY_SCALE and SPEED_SCALING_CONST The DUTY_SCALE and SPEED_SCALING_CONST are the slope constants of the two equations that determine the drive voltage and commutation rate for any given speed request input. Optimization involves controlling the speed and drive voltage independently to determine the line end points. The slope constants can then be calculated from the end points.
F1 LV Evaluation Platform Motor Control Add-Ons NOTES: DS41629A-page 48 2012 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Appendix A. Board Layout and Schematics A.1 INTRODUCTION This appendix contains the F1 LV board layout and schematics. FIGURE A-1: F1 UNIPOLAR STEPPER MOTOR ADD-ON (SHEET 1 OF 5) 2012 Microchip Technology Inc.
F1 LV Evaluation Platform Motor Control Add-Ons FIGURE A-2: DS41629A-page 50 BLDC ADD-ON BD (SHEET 2 OF 5) 2012 Microchip Technology Inc.
Board Layout and Schematics FIGURE A-3: F1 BIPOLAR STEPPER MOTOR ADD-ON (SHEET 3 OF 5) 2012 Microchip Technology Inc.
F1 LV Evaluation Platform Motor Control Add-Ons FIGURE A-4: DS41629A-page 52 F1 FV EVALUATION PLATFORM (SHEET 4 OF 5) 2012 Microchip Technology Inc.
Board Layout and Schematics FIGURE A-5: F1 BDC MOTOR ADD-ON (SHEET 5 OF 5) 2012 Microchip Technology Inc.
F1 LV Evaluation Platform Motor Control Add-Ons NOTES: DS41629A-page 54 2012 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM MOTOR CONTROL ADD-ONS Appendix B. Conversion Factors B.1 SYSTEM CONSTANTS Many of the conversion factors are based on operating parameters of the PIC® microcontroller. Those parameters are determined at compile time and are assumed to be fixed.
F1 LV Evaluation Platform Motor Control Add-Ons B.4 STEPPER RUN AND STOP PERCENTAGES The Run and Stop thresholds in the stepper motor include files are expressed as raw speed request numbers. The speed request is an 8-bit unsigned integer entered either from the Analog-to-Digital conversion of the potentiometer voltage, or specified directly from the PC controller through the serial input. The maximum speed request is the maximum value of a byte or 255.
Conversion Factors EQUATION B-6: DUTY_CYCLE = (MAX_DUTY – MIN_DUTY + 1) * 256 / Max Speed Request The 256 factor in the numerator is the multiplier which scales the result up by one byte width. Max Speed Request normalizes the constant to the speed request range. Notice that Max Speed Request is 255, which is approximately equal to the 256 multiplier. The difference is insignificant, so the 256 multiplier cancels out the Max Speed Request, allowing the DUTY_CYCLE to be stored as an 8-bit integer. B.7.
F1 LV Evaluation Platform Motor Control Add-Ons During microstepping, the LinearSpeedProfile look-up table is not used: The drive values go directly from the microstep table into the CCP duty cycle registers without any additional scaling. The microstepping tables consist of pre-scaled sine wave data for one quarter of a full cycle. The factory default scaling factor for the two types of stepper motors is 100% for the bipolar (250 maximum), and 50% for the unipolar (125 maximum).
F1 LV Evaluation Platform Motor Control Add-Ons NOTES: 2012 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://www.microchip.com/ support Web Address: www.microchip.