How To Control A Motor Control On An Hvac Platform



Similar documents
Connecting Low-Cost External Electrodes to MED-EKG

Software Real Time Clock Implementation on MC9S08LG32

IRTC Compensation and 1 Hz Clock Generation

Flexible Active Shutter Control Interface using the MC1323x

Windows 7: Using USB TAP on a Classic CodeWarrior Installation (MGT V9.2 DSC V8.3)

Cyclic Redundant Checker Calculation on Power Architecture Technology and Comparison of Big-Endian Versus Little-Endian

Connecting to an SMTP Server Using the Freescale NanoSSL Client

How To Build A Project On An Eclipse Powerbook For Anarc (Powerbook) On An Ipa (Powerpoint) On A Microcontroller (Powerboard) On Microcontrollers (Powerstation) On Your Microcontroller 2 (Powerclock

Using WinUSB in a Visual Studio Project with Freescale USB device controller

etpu Host Interface by:

MC13783 Buck and Boost Inductor Sizing

Freescale Embedded GUI Converter Utility 2.0 Quick User Guide

Blood Pressure Monitor Using Flexis QE128 Gabriel Sanchez RTAC Americas

Local Interconnect Network (LIN) Physical Interface

Hardware Configurations for the i.mx Family USB Modules

How To Measure Power Of A Permanent Magnet Synchronous Motor

How to Convert 3-Axis Directions and Swap X-Y Axis of Accelerometer Data within Android Driver by: Gang Chen Field Applications Engineer

Using the Performance Monitor Unit on the e200z760n3 Power Architecture Core

Installation of the MMA955xL CodeWarrior Service Pack Author: Fengyi Li Application Engineer

Handling Freescale Pressure Sensors

Using eflexpwm Module for ADC Synchronization in MC56F82xx and MC56F84xx Family of Digital Signal Controllers

3-Phase BLDC Motor Control with Hall Sensors Using 56800/E Digital Signal Controllers

Freescale Semiconductor. Integrated Silicon Pressure Sensor. On-Chip Signal Conditioned, Temperature Compensated and Calibrated MPX4080D.

Programming Audio Applications in the i.mx21 MC9328MX21

Improving Embedded Software Test Effectiveness in Automotive Applications

Understanding LCD Memory and Bus Bandwidth Requirements ColdFire, LCD, and Crossbar Switch

USB HID bootloader for the MC9S08JM60

Initializing the TSEC Controller

Generate Makefiles from Command Line Support in Eclipse-Based CodeWarrior Software

Point-of-Sale (POS) Users Guide Lech José Olmedo Guerrero Jaime Herrerro Gallardo RTAC Americas

Configuring the FlexTimer for Position and Speed Measurement with an Encoder

Performance Monitor on PowerQUICC II Pro Processors

MCF54418 NAND Flash Controller

PowerQUICC II Pro (MPC83xx) PCI Agent Initialization

Using the Kinetis Security and Flash Protection Features

NOT RECOMMENDED FOR NEW DESIGN

Data Movement Between Big-Endian and Little-Endian Devices

User Interface Design using CGI Programming and Boa Web Server on M5249C3 Board

Freescale Semiconductor. Integrated Silicon Pressure Sensor. On-Chip Signal Conditioned, Temperature Compensated and Calibrated MPX5500.

Freescale Variable Key Security Protocol Transmitter User s Guide by: Ioseph Martínez and Christian Michel Applications Engineering - RTAC Americas

NOT RECOMMENDED FOR NEW DESIGN

MLPPP in the Evolving Radio Access Network

VGA Output using TV-Out Extension Solution i.mx21

How To Fit A 2Mm Exposed Pad To A Dfn Package

VLE 16-bit and 32-bit Instruction Length Decode Algorithm

Ref Parameters Symbol Conditions Min Typ Max Units. Standby μa. 3 Range kpa. 4 Resolution 0.15 kpa. 5 Accuracy -20ºC to 85ºC ±1 kpa

Emulated EEPROM Implementation in Dual Flash Architecture on MC9S08LG32 With Demo Description

3-Phase BLDC Motor Control with Hall Sensors Using the MC56F8013

Detecting a CPM Overload on the PowerQUICC II

Real Time Development of MC Applications using the PC Master Software Visualization Tool. 1. Introduction. 2. Development of Motor Control.

i.mx28 Ethernet Performance on Linux

Using XGATE to Implement LIN Communication on HCS12X Daniel Malik 8/16-Bit Products Division East Kilbride, Scotland

Processor Expert Software Microcontrollers Driver Suite Getting Started Guide

Understanding Pressure and Pressure Measurement

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

Techniques and Tools for Software Analysis

NOT RECOMMENDED FOR NEW DESIGN

RF Power Field Effect Transistors N- Channel Enhancement- Mode Lateral MOSFETs

Robust Over-the-Air Firmware Updates Using Program Flash Memory Swap on Kinetis Microcontrollers

BLDC Motor Control with Hall Effect Sensors Using the 9S08MP

Pressure Freescale Semiconductor

MPC8245/MPC8241 Memory Clock Design Guidelines: Part 1

DRM for Driver Information System on S12G128. Reference Design

Enhanced Serial Interface Mapping

Using the High Input Voltage Charger for Single Cell Li-Ion Batteries (KIT34671EPEVBE)

Developing an Application for the i.mx Devices on the Linux Platform

Implementing Positioning Algorithms Using Accelerometers

KIT34845EPEVME Evaluation Board

Adding SDIO Wi-Fi Solution to i.mx Windows CE 5.0/Windows CE 6.0

Freescale Semiconductor. Integrated Silicon Pressure Sensor

MPXAZ6115A MPXHZ6115A SERIES. Freescale Semiconductor Technical Data. MPXAZ6115A Rev 4, 01/2007

Avoiding Read While Write Errors When Developing In-Software Flash Programming Applications for Kinetis and ColdFire+ MCUs

MSC8156 and MSC8157 PCI Express Performance

White Paper. Freescale s Embedded Hypervisor for QorIQ P4 Series Communications Platform

ColdFire Security SEC and Hardware Encryption Acceleration Overview

Efficient Low-Level Software Development for the i.mx Platform

Using Program Memory As Data Memory. 1. Introduction Program Memory and Data. Contents. Memory. Freescale Semiconductor Application Note

Frequency Analysis in the Industrial Market Using Accelerometer Sensors

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

Comparison of MC9S08QE128 and MCF51QE128 Microcontrollers Scott Pape and Eduardo Montanez Systems Engineering, Freescale Microcontroller Division

Motion and Freefall Detection Using the MMA8451, 2, 3Q

AND8008/D. Solid State Control Solutions for Three Phase 1 HP Motor APPLICATION NOTE

CodeWarrior Development Studio Floating Licensing Quick Start

How To Improve Performance On A P4080 Processor

Genesi Pegasos II Setup

ITU-T V.42bis Data Dictionary Search on the StarCore SC140/SC1400 Cores

LC898300XA. Functions Automatic adjustment to the individual resonance frequency Automatic brake function Initial drive frequency adjustment function

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

AND9190/D. Vertical Timing Optimization for Interline CCD Image Sensors APPLICATION NOTE

CS3341, CS3351, CS387. Alternator Voltage Regulator Darlington Driver

How to Do EEPROM Emulation Using Double Flash Array on MC9S08LC60 Ronald Gonzalez and Tatiana Orofino RTAC Americas

AND8365/D. 125 kbps with AMIS-4168x APPLICATION NOTE

NTMS4920NR2G. Power MOSFET 30 V, 17 A, N Channel, SO 8 Features

RF Power Field Effect Transistors N--Channel Enhancement--Mode Lateral MOSFETs

SEMICONDUCTOR TECHNICAL DATA

LOW POWER SCHOTTKY. GUARANTEED OPERATING RANGES ORDERING INFORMATION

MC14008B. 4-Bit Full Adder

Transcription:

Freescale Semiconductor Document Number:AN4616 Application Note Rev. 0, 10/2012 Flap Motor Control Based On HVAC Platform by: Shawn Shi, Albert Chen, Alex Liu 1 Introduction According to the world market for electrical motors in automotive applications, there will be around 38 motors per car on an average by 2016, 80% of the motors are DC brushed type. Flap motors which include stepper and servo motors are widely used in Automotive heating, ventilation, and air conditioning (HVAC) systems. Flap motors are used in air mix control, air circulation control, outlet mode control functions for automotive HVAC applications. Contents 1 Introduction...1 2 Flat Motor Type...1 3 Hardware Design...6 4 Software Design...7 5 Reference...9 2 Flat Motor Type 2.1 Stepper Motor 2.1.1 Description Stepper motor is an electromechanical device which converts electrical pulses to discrete mechanical movements. 2012 Freescale Semiconductor, Inc.

Flat Motor Type The shaft or spindle of a stepper motor rotates in discrete step increments when electrical command pulses are applied to it in the proper sequence. The motor rotation has several direct relationships to these applied input pulses. The sequence of the applied pulses is directly related to the direction of motor shafts rotation. The speed of the motor shafts rotation is directly related to the frequency of the input pulses and the steps of rotation is directly related to the number of input pulses applied. 2.1.2 Control Port The stepper given below in Figure 1 which used in HVAC platform is the 2 phase/5 wire type stepper motor, the connection is as given below: 1. Common line: connected to GND or 12V DC 2. 4 drive lines: connected to power drive as A, A~, B, B~ Figure 1. Stepper Motor 2.2 Servo Motor 2 Freescale Semiconductor, Inc.

Flat Motor Type 2.2.1 Description The servo motor is actually an assembly of three parts: a normal DC motor, a gear reduction unit and a position-sensing device. The function of the servo is to apply power drive to its DC motor until its shaft turns to the expected position. It uses the position-sensing device to determine the rotational position of the shaft, so that it knows which way the motor must turn to move the shaft to the commanded position. The shaft typically does not rotate freely round and round like a DC motor, but rather can only turn 200 degrees or so back and forth. 2.2.2 Control Port Servo motor in Figure 2 used in HVAC platform is 2 poles servo motor, connection is as given below: 1. 2 drive line: connected to power drive as D/D~; 2. 5V DC: connected to 5V supply to position sensing circuit; 3. Feedback: connected to MCU ADC input; 4. GND: connected to GND; Typical servo has a 5 wire connection as given below: 2 power drive, 5V DC, ground and position feedback. Figure 2. Servo Motor Freescale Semiconductor, Inc. 3

Flat Motor Type 2.3 Flap Motor Control Theory 2.3.1 Stepper Motor 2.3.1.1 Stepper Motor Basics The stepper motor inner structure is as given below: Figure 3. Stepper Motor Illustration As listed in Figure 3, A, A~ as connected group_a, B, B~ as connected group_b. In two phase 4 wire/5 wire/6 wire stepper motor, inner structure is the same as listed and the difference is that whether or not common node exists for group_a and group_p. Phases:number of coil poles to N,S magnet field, is indicated as m. Steps: number of pulses to finish one cycle magnet change or rotate one gear angle of motor, is indicated as n(n is related to m). Gears:gear number of the motor, is indicated as J. Step Angle: the rotated angle of the motor rotor while applied on one pulse, is indicated as θ. θ=360/(j(gear number)*n(steps)). 2.3.1.2 Stepper Motor Control The sequence of the applied pulses is directly related to the direction of motor shafts rotation. Stepper motor drive could be 8 or 4 step control for 2 phase/5 wire stepper motor. 1. 8 step control Table 1. 8 Step Control A B C D E F G H Table continues on the next page... 4 Freescale Semiconductor, Inc.

Table 1. 8 Step Control (continued) Flat Motor Type A 1 1 0 0 0 0 0 1 A~ 0 0 0 0 1 1 1 0 B 0 1 1 1 0 0 0 0 B~ 0 0 0 0 0 1 1 1 Table 2. 4 Step Control A B C D A 1 1 0 1 A~ 0 0 1 0 B 1 0 0 0 B~ 0 1 1 1 2.3.2 Servo Motor Control 2.3.2.1 DC Motor Control Basics Figure 4. Servo Motor Mechanical Structure Servo motor structure is as given above in Figure 4, if suitable DC power is applied to the coil of stator, the motor will rotate continuously, commutator will take effect insider of servo motor. At the same time, the feedback voltage signal will be in the range of 0-5V, and it will be corresponding to the rotator position of the servo motor. Table 3. Servo Motor Control Clockwise Anti-clockwise Static D 1 0 0 D~ 0 1 0 Freescale Semiconductor, Inc. 5

Hardware Design 3 Hardware Design 3.1 Control Signal Flap motor control signals are given in Figure 5. For each servo motor, control signals are as given below: IN1_SMx,IN2_SMx,EN_SMx,/INT_SMx,DCMx_ADC. For each stepper motor(2 phase/5 wire), control signals will be IN1_SMx,IN2_SMx, EN_SMx,/INT_SMx, IN1_SMy,IN2_SMx, EN_SMy,/INT_SMy. Figure 5. Flap Motor Control Signals 3.2 Motor Drive and Protection MC33932 control signals are given in Figure 6. For each drive pair such as OUT1_SMx,OUT2_SMx, if current in the drive path is exceeding the limitation, the /SFA will generate an interrupt(high to know), then MCU will acklowledge the level change and stop the drive signals. 6 Freescale Semiconductor, Inc.

Software Design Figure 6. MC33932 Control Signals 4 Software Design 4.1 Basic Concepts In the HVAC platform, it uses mc33932 H-Bridge Power IC to control flap motor. One mc33932 IC can control two servo motors or one step motor respectively, signals are listed in the table given below: Table 4. HW resources used for flap motor HW Resources Usage Step Motor Servo Motor One periodic timer Control Motor run/stop Y Y Enable/Disable PIN Control H-Birdge of MC33932 Y Y GPIO Interrupt Report HW over-current protection D/D~: 2 GPIO PINs Control servo motor direction N Y ADC Get current motor position N Y A,A~,B,B~: 4 GPIO PINs Control step motor move Y N Y Y 4.2 Control Algorithm All operational way to stepper motor and servo motor are asynchronous. Freescale Semiconductor, Inc. 7

Software Design 4.2.1 Servo Motor In the HVAC platform, it uses D/D~ and one ADC channel to control one servo motor. 1. Sample the voltage value by ADC, and this value is proportional with motor position. 2. Drive high to D pin and low to D~, motor will rotate clockwise, vice versa. 3. Once the Motor reaches the position with specified ADC feedback, then stop driving the coil, motor will stop immediately. 4.2.2 Step Motor In the HVAC platform, it uses the full step drive two phases each time. 1. PWM period decides the motor speed, since PWM resource is limited, it uses periodic timer to generate the PWM(50% duty) and every timer interrupt will triger phase change. 2. The phase change order for clockwsie is: AB -> A~B -> A~B~ -> AB~. For anticlockwise: AB -> AB~ -> A~B~ -> A~B. 4.3 Control Flowchart The control flowchart given in Figure 7 shows how after initializing the hardware resources, system software will monitor the motor position in the timer interrupt and decides how to control motor in next step. Figure 7. Stepper Motor 8 Freescale Semiconductor, Inc.

Reference 4.4 Software Protection When over-current happens, MC33932 will produce an interrupt. Motor driver will stop motor and report this event to upper level. 5 Reference MC9S12GRMV1 Rev.1.10 February 10, 2012 MC33932 Rev. 3.0, 1/2009 Freescale Semiconductor, Inc. 9

How to Reach Us: Home Page: www.freescale.com Web Support: http://www.freescale.com/support USA/Europe or Locations Not Listed: Freescale Semiconductor Technical Information Center, EL516 2100 East Elliot Road Tempe, Arizona 85284 +1-800-521-6274 or +1-480-768-2130 www.freescale.com/support 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) www.freescale.com/support 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 China Ltd. Exchange Building 23F No. 118 Jianguo Road Chaoyang District Beijing 100022 China +86 10 5879 8000 support.asia@freescale.com Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductors 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 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 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 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 claims alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. RoHS-compliant and/or Pb-free versions of Freescale products have the functionality and electrical characteristics as their non-rohs-complaint and/or non-pb-free counterparts. For further information, see http://www.freescale.com or contact your Freescale sales representative. For information on Freescale's Environmental Products program, go to http://www.freescale.com/epp. Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2012 Freescale Semiconductor, Inc. Document Number: AN4616 Rev. 0, 10/2012