56F8300 BLDC Motor Control Application

Similar documents
56F805. BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers

56F Phase AC Induction Motor V/Hz Control using Processor ExpertTM Targeting Document 56F bit Digital Signal Controllers

56F Phase Switched Reluctance Motor Control With Hall Sensors using Processor Expert Targeting Document

56F805. Digital Power Factor Correction using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers. freescale.

Upgrade the Solution With No Changes 2 Upgrade the Solution With No Changes If a Codebase does not contain updates to its properties, it is possible t

56F Phase Switched Reluctance Motor Sensorless Control using Processor Expert Targeting Document

PCB Layout Guidelines for the MC1321x

Electrode Graphing Tool IIC Driver Errata Microcontroller Division

Component Development Environment Installation Guide

MPC8349E-mITX-GP Board Errata

Mechanical Differences Between the 196-pin MAP-BGA and 196-pin PBGA Packages

Using the Project Board LCD Display at 3.3 volts

HC912D60A / HC912Dx128A 0.5µ Microcontrollers Mask sets 2K38K, 1L02H/2L02H/3L02H & K91D, 0L05H/1L05H/2L05H

ColdFire Convert 1.0 Users Manual by: Ernest Holloway

MC33696MODxxx Kit. 1 Overview. Freescale Semiconductor Quick Start Guide. Document Number: MC33696MODUG Rev. 0, 05/2007

Updating the Firmware on USB SPI Boards (KITUSBSPIEVME, KITUSBSPIDGLEVME)

Using IIC to Read ADC Values on MC9S08QG8

Using the Multi-Axis g-select Evaluation Boards

USB Bootloader GUI User s Guide

Symphony SoundBite: Quick Start with Symphony Studio. Installation and Configuration

Using the PowerQUICC II Auto-Load Feature

Interfacing MPC5xx Microcontrollers to the MFR4310 FlexRay Controller David Paterson MCD Applications, East Kilbride

Freescale BeeStack Documentation Overview Document Number: BSDO Rev /2008

Functional Differences Between the DSP56307 and DSP56L307

MC56F825x/MC56F824x (2M53V) Chip Errata

etpu General Function Set (Set 1) David Paterson MCD Applications Engineer

MPC8260 IDMA Timing Diagrams

MPC5200(b) ATA MDMA, UDMA Functionality BestComm Setup Recommendations

Design Recommendations to Implement Compatibility Between the MC13783VK and the MC13783VK5

MC33794 Touch Panel System Using E-Field Sensor Setup Instructions

etpu Automotive Function Set (Set 2)

Introduction to LIN 2.0 Connectivity Using Volcano LTP

SGTL5000 I 2 S DSP Mode

MC33897 Single-Wire CAN Transceiver Reliability and Quality Documents

Affected Chips Description Impact and Workaround

Clock Mode Selection for MSC8122 Mask Set K98M

DSP56F827 Digital Signal Controller

Optically-Isolated Multilink BDM Interface for the S08/S12 Microcontrollers by Michael A. Steffen

Power Cycling Algorithm using the MMA73x0L 3-Axis Linear Accelerometer

Functional Differences Between DSP56302 and DSP56309 (formerly DSP56302A)

EchoRemote Evaluation Software for Windows

MTIM Driver for the MC9S08GW64

MPC7410 RISC Microprocessor Hardware Specifications Addendum for the MPC7410TxxnnnLE Series

Pad Configuration and GPIO Driver for MPC5500 Martin Kaspar, EMEAGTM, Roznov Daniel McKenna, MSG Applications, East Kilbride

Programming the Keyboard Interrupt Module (KBI) on HC(S)08 MCUs

Migrating from the MPC852T to the MPC875

Interfacing HCS12 Microcontrollers to the MFR4200 FlexRay Controller

MCF5216 Device Errata

MPR083 Proximity Evaluation Kit User s Guide

MSC8144AMC-S Getting Started Guide

Gallium Arsenide PHEMT RF Power Field Effect Transistor

2005: 0.5 PQ-MDS-PCIEXP

MPR121 Jitter and False Touch Detection

Integrating FreeMASTER-Time Debugging Tool with CodeWarrior for Microcontrollers v10.x Project

XGATE Library: ATD Average Calculating a rolling average from ATD results

Differences Between the DSP56301, DSP56311, and DSP56321

TLB Translation Setup for MPC745x and MPC744x in Non-Extended Mode

XGATE Library: Using the Freescale XGATE Software Library Steve McAslan MCD Applications, East Kilbride

MCF5445x Configuration and Boot Options Michael Norman Microcontroller Division

Managing Failure Detections and Using Required Components to Meet ISO7637 pulse 1 on MC33903/4/5 Common Mode Choke Implementation

Getting Started with the Student Learning Kit Application Module Using the MC9S12DT256 Microcontroller Application Module

16-bit MCU: S12XHY256 Automotive Cluster Demo by: Jose M. Cisneros Steven McLaughlin Applications Engineer Microcontroller Solutions Group, Scotland

Utilizing Extra FC Credits for PCI Express Inbound Posted Memory Write Transactions in PowerQUICC III Devices

Using the ColdFire+ Family Enhanced EEPROM Functionality Melissa Hunter Derrick Klotz

MCF54451, MCF54452, MCF54453, MCF54454,

Sensorless BLDC Motor Control Based on MC9S08PT60 Tower Board User Guide

Using the Knock Window etpu Function

MPXHZ6400A. Freescale Semiconductor Technical Data. MPXHZ6400A Rev 0, 08/2005

SynkroRF Network. User s Guide

Integrated Silicon Pressure Sensor On-Chip Signal Conditioned, Temperature Compensated and Calibrated

Using the Serial Peripheral Interface (SPI) Module on 68HC(9)08 Microcontrollers

Implementing a Double-Precision (32-Bit) Complex FIR Filter on the MSC8101 Device

Using the Kinetis Family Enhanced EEPROM Functionality

IIC Driver for the MC9S08GW64

Introduction to the S12G Family EEPROM Including a Comparison between the S08DZ, S12XE, and S12P Families

Ordering Information Industry standard SOT343R package Device weight = g (typical) Available only in tape and reel packaging Available only in

LFAE Bootloader Example and Interface for use with AN2546 Daniel McKenna MCD Applications, East Kilbride Scotland

Converting Earlier Versions of CodeWarrior for StarCore DSPs Projects to Version

MPR121 Proximity Detection

Keil uvision 4 Kinetis Support for Freescale MQX RTOS Release Notes

PQ-MDS-QOC3 Module. HW Getting Started Guide. Contents. About This Document. Required Reading. Definitions, Acronyms, and Abbreviations

1 Introduction. 2 Problem statement. Freescale Semiconductor Engineering Bulletin. Document Number: EB727 Rev. 0, 01/2010

MPC8260 SDRAM Timing Diagrams

3-Phase BLDC Motor Control on Kinetis. User s Guide

Using the CAU and mmcau in ColdFire, ColdFire+ and Kinetis

Use of PGA on MC56F800x Interaction of PDB, PGA and ADC

Simplified Device Data Structures for the High-End ColdFire Family USB Modules Melissa Hunter Applications Microcontroller Solutions Group

PowerQUICC II Parity and ECC Capability

PDB Driver for the MC9S08GW64

Using the ColdFire EMAC Unit to Improve RSA Performance Jim Stephens Freescale Semiconductor

Using an I 2 C EEPROM During MSC8157 Initialization

Data Visualization for Software Development Tools

Using DMA to Emulate ADC Flexible Scan Mode on Kinetis K Series

i.mx31 PDK Power Measurement with GUI

Using the Asynchronous DMA features of the Kinetis L Series

PowerQUICC HDLC Support and Example Code

Configuring the MCF5445x Family for PCI Host Operation

Interfacing MPC5500 Microcontrollers to the MFR4310 FlexRay Controller Robert Moran MCD Applications, East Kilbride, Scotland

NetComm Software Errata

MPXH6250A SERIES. Freescale Semiconductor Technical Data MPXH6250A. Rev 2, 01/2007

Transcription:

56F8300 BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document 56F8300 16-bit Digital Signal Controllers 8300BLDCQETD Rev. 2 08/2005 freescale.com

Document Revision History Version History Description of Change Rev 0 Rev 1 Rev 2 Initial release Editing document to make more generic to 8300 family Updating format; adding reference to 56F8100 family and 56F8367EVM 2 Freescale Semiconductor

BLDC Motor Control Application with Quadrature Encoder This application exercises simple control of the BLDC motor with the Quadrature Encoder on the 56F8346EVM, 56F8357EVM or 56F8367EVM board and the EVM Motor Kit. Applications developed for this demonstration board were not designed for the 56F8100 devices. The 56F8300 demonstration board does, however, fully support 56F8100 software development. 1. Specifications This application performs simple control of the BLDC motor with the Quadrature Encoder and closed-loop speed control on a 56F8300 processor. In the application, the PWM module is set to complementary mode with a 16kHz switching frequency. The masking and swapping of PWM channels is controlled by the PWM Channel Control Register. The content of this register is derived from Quadrature Encoder signals. The required voltage is set independently on the commutation by the speed PI controller. The speed is measured by the Quadrature Timer. The RUN/STOP switch enables/disables motor spinning. The allowable range of speed is from 50rpm to 1000rpm in both directions. The application can run on: External RAM or Flash The BLDC Motor Control Application with Quadrature Encoder can operate in two modes: 1. Manual Operating Mode The drive is controlled by the RUN/STOP switch (S3). The motor speed is set by the UP (S2) and DOWN (S1) push buttons; see Figure 1-1. If the application runs and motor spinning is disabled (i.e., the system is ready), the USER LED (LED2, shown in Figure 1-2) will blink. When motor spinning is enabled, the USER LED is on. Refer to Table 1-1 for application states. Freescale Semiconductor 3

UP / DOWN Buttons RUN / STOP Switch Figure 1-1 RUN/STOP Switch and UP/DOWN Buttons on the Daughter Card 4 Freescale Semiconductor

User LEDs Yellow Green PWM Output LEDs Figure 1-2 USER and PWM LEDs on the Daughter Card Table 1-1 Motor Application States Application State Motor State Green LED State Stopped Stopped Blinking at a frequency of 2Hz Running Spinning On Fault Stopped Blinking at a frequency of 8Hz Freescale Semiconductor 5

2. PC master software (Remote) Operating Mode The drive is controlled remotely from a PC through the SCI communication channel of the device via an RS-232 physical interface. The drive is enabled by the RUN/STOP switch, which can be used to safely stop the application at any time. The following control actions are supported: Set the Required Speed of the motor PC master software displays the following information: Required Speed Actual Speed Applied Voltage DCBus Voltage RUN/STOP Switch Status Application Mode Project files for the PC master software are located in the project directory in:..\pcmaster\sdm_external_memory.pmp, which uses Map file to run in the small memory model of the external memory..\pcmaster\ldm_external_memory.pmp, which uses the Map file to run in the large memory model of the external memory..\pcmaster\sdm_prom-xram.pmp, which uses the Map file to run in the small memory model of the internal memory..\pcmaster\ldm_prom-xram.pmp, which uses the Map file to run in the large memory model of the internal memory..\pcmaster\sdm_xrom-xram.pmp, which uses the Map file to run in the small memory model of the internal memory..\pcmaster\ldm_xrom-xram.pmp, which uses the Map file to run in the large memory model of the internal memory 6 Freescale Semiconductor

The Motor Start the PC master software window s application, sdm_external_memory.pmp. Figure 1-3 illustrates the PC master software control window after this project has been launched. 2. Hardware Set-up 2.1 The Motor Figure 1-3 PC Master Software Control Window The default hardware and software configuration is set up to support a BLDC motor with one wiring hole. Since there are two available motor types, please check to see if your BLDC motor has a single wiring hole in the motor housing from which the power stage and Hall Sensor connections are located (See motor photos in Figure 2-1). When using a BLDC motor with two wiring holes, it is necessary to turn over the yellow power stage connector from the position shown in Figure 2-2 (left photo) to inverted connection (right photo in Figure 2-2). Freescale Semiconductor 7

Figure 2-1 Possible Motor Types Figure 2-2 Default (left photo) and Inverted (right photo) Motor Cable Connections 8 Freescale Semiconductor

Application Hardware Setup 2.2 Application Hardware Setup Figure 2-3 illustrates the hardware set-up for the BLDC Motor Control Application with Quadrature Encoder. BLDC Motor Encoder Connector Power Motor Connector EVM Motor Board Controller Board Power Supply Serial Cable to PC Parallel Cable to PC Figure 2-3 Set-up of the BLDC Motor Control Application For detailed information, see the 56F8346 Evaluation Module Hardware User s Manual, 56F8357 Evaluation Module Hardware User s Manual or 56F8367 Evaluation Module Hardware User s Manual. The serial cable is needed for the PC master software debugging tool only. 2.3 EVM Jumper Settings For jumper settings, see the 56F8346 Evaluation Module Hardware User s Manual, 56F8357 Evaluation Module Hardware User s Manual or 56F8367 Evaluation Module Hardware User s Manual. Freescale Semiconductor 9

To execute the BLDC Motor Control Application with Quadrature Encoder, the 56F8300 Daughter Card requires the strap settings shown in Figure 2-4 and Table 2-1. Note: When running the EVM target system in a stand-alone mode from Flash, the JG9 jumper on the 56F8346EVM and JG3 on the 56F8357EVM or 56F8367EVM must be set in the 1-2 configuration to disable the command converter parallel port interface. Figure 2-4 56F8300EVM - Daughter Card Jumper Reference Table 2-1 56F8300EVM Daughter Card Jumper Settings Jumper Group Comment Connections JG1 Primary PFC 1-2, 3-4, 5-6,7-8, 9-10 JG2 Secondary PFC NC JG3 Phase_IS / Over_I 1-2 JG4 Primary Zero-Crossing / Encoder 2-3, 5-6, 8-9 JG5 Secondary Zero-Crossing / Encoder 2-3, 5-6, 8-9 JG6 Primary Back-EMF / Phase-IS 1-2, 4-5, 7-8 JG7 Secondary Back-EMF / Phase-IS 1-2, 4-5, 7-8 JG8 Fault A Monitor 1-2, 3-4, 5-6 JG9 Fault B Monitor 1-2, 3-4, 5-6 JG10 Switch 1 1-2 10 Freescale Semiconductor

EVM Jumper Settings Table 2-1 56F8300EVM Daughter Card Jumper Settings Jumper Group Comment Connections JG11 Switch 2 1-2 JG12 Switch 3 (Run / Stop) 1-2 3. Build When building the BLDC Motor Control Application with Quadrature Encoder, the user can create an application that runs from internal Flash or External RAM. To select the type of application to build, open the bldc_encoder.mcp project and choose the target build type; see Figure 3-1. A definition of the projects associated with these target build types may be viewed under the Targets tab of the project window. Figure 3-1 Target Build Selection The project may now be built by executing the Make command, as shown in Figure 3-2. This will build and link the BLDC Motor Control Application with Quadrature Encoder and all needed Metrowerks and Processor Expert libraries. Freescale Semiconductor 11

Figure 3-2 Execute Make Command For more information about these commands, see: <...>\CodeWarrior Manuals\PDF\Targeting_56800E.pdf 4. Execute To execute the BLDC Motor Control Application with Quadrature Encoder, select the Project\Debug command in the CodeWarrior IDE, followed by the Run command. For more help with these commands, refer to the CodeWarrior tutorial documentation in the following file, located in the CodeWarrior installation directory: <...>\CodeWarrior Manuals\PDF\Targeting_56800E.pdf If the Flash target is selected, CodeWarrior will automatically program the device s internal Flash with the executable generated during Build. If the External RAM target is selected, the executable will be loaded to off-chip RAM. Once Flash has been programmed with the executable, the EVM target system may be run in a stand-alone mode from Flash. To do this on the 56F8346EVM, set jumper JG9 to disable the JTAG port and JG3 to enable boot from internal Flash, then push the RESET button. On the 56F8357EVM or 56F8367EVM, set jumper JG3 to disable the JTAG port and JG4 to enable boot from internal Flash, then push the RESET button. 12 Freescale Semiconductor

EVM Jumper Settings Once the application is running, move the RUN/STOP switch to the RUN position, and set the required speed with the UP/DOWN push buttons. Pressing the UP/DOWN buttons should incrementally increase the motor speed until it reaches maximum speed. If successful, the BLDC motor will be spinning. Note: If the RUN/STOP switch is set to the RUN position when the application starts, toggle the RUN/STOP switch between the STOP and RUN positions to enable motor spinning. This is a protection feature that prevents the motor from starting when the application is executed from CodeWarrior. You should also see a lighted green LED, which indicates that the application is running. If the application is stopped, the green LED will blink with a 2Hz frequency. If an Undervoltage fault occurs, the green LED will blink at a frequency of 8Hz. Freescale Semiconductor 13

14 Freescale Semiconductor

EVM Jumper Settings Freescale Semiconductor 15

How to Reach Us: Home Page: www.freescale.com E-mail: support@freescale.com USA/Europe or Locations Not Listed: Freescale Semiconductor Technical Information Center, CH370 1300 N. Alma School Road Chandler, Arizona 85224 +1-800-521-6274 or +1-480-768-2130 support@freescale.com Europe, Middle East, and Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen, Germany +44 1296 380 456 (English) +46 8 52200080 (English) +49 89 92103 559 (German) +33 1 69 35 48 48 (French) support@freescale.com Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo 153-0064, Japan 0120 191014 or +81 3 5437 9125 support.japan@freescale.com Asia/Pacific: Freescale Semiconductor Hong Kong Ltd. Technical Information Center 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T., Hong Kong +800 2666 8080 support.asia@freescale.com For Literature Requests Only: Freescale Semiconductor Literature Distribution Center P.O. Box 5405 Denver, Colorado 80217 1-800-441-2447 or 303-675-2140 Fax: 303-675-2150 LDCForFreescaleSemiconductor@hibbertgroup.com Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including Typicals, must be validated for each customer application by customer s technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. This product incorporates SuperFlash technology licensed from SST. Freescale Semiconductor, Inc. 2004, 2005. All rights reserved. 8300BLDCQETD Rev. 2 08/2005