Flap Motor Control Based On HVAC Platform

Transcription

1 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 Flat Motor Type Hardware Design Software Design Reference Flat Motor Type 2.1 Stepper Motor Description Stepper motor is an electromechanical device which converts electrical pulses to discrete mechanical movements Freescale Semiconductor, Inc.

2 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 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.

3 Flat Motor Type 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 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

4 Flat Motor Type 2.3 Flap Motor Control Theory Stepper Motor 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)) 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 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.

5 Table 1. 8 Step Control (continued) Flat Motor Type A A~ B B~ Table 2. 4 Step Control A B C D A A~ B B~ Servo Motor Control 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 D~ Freescale Semiconductor, Inc. 5

6 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.

8 Software Design 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 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.

10 How to Reach Us: Home Page: Web Support: USA/Europe or Locations Not Listed: Freescale Semiconductor Technical Information Center, EL East Elliot Road Tempe, Arizona or Europe, Middle East, and Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen Muenchen, Germany (English) (English) (German) (French) Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo Japan or Asia/Pacific: Freescale Semiconductor China Ltd. Exchange Building 23F No. 118 Jianguo Road Chaoyang District Beijing China 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 or contact your Freescale sales representative. For information on Freescale's Environmental Products program, go to Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners Freescale Semiconductor, Inc. Document Number: AN4616 Rev. 0, 10/2012

Application Note Rev. 3, 3/2011 General Purpose Amplifier and MMIC Biasing INTRODUCTION s GaAs MMICs and General Purpose Amplifier (GPA) devices are all designed to operate from a single positive voltage

Freescale Semiconductor How to install and run Classic CodeWarrior products on 64-bit Windows 7 PC Classic CodeWarrior products were built and delivered prior to the release of Windows 7 host OS, but it

Technical Data RF Power Field Effect Transistor N- Channel Enhancement- Mode Lateral MOSFET Designed for broadband commercial and industrial applications with frequencies up to 00 MHz. The high gain and

Laboratory Short Course Exploring Embedded C Programming www.freescale.com/universityprograms Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service

EVERSPIN s New 2mm Exposed Pad DFN Package Meets Both SOIC-8 and DFN8 PCB Layouts This Application Note is to inform Everspin customers that a new, DFN8 package with a 2mm bottom exposed pad has been added

Technical Data RF Power Field Effect Transistor N-Channel Enhancement-Mode Lateral MOSFET Designed for broadband commercial and industrial applications with frequencies up to 1000 MHz. The high gain and

Techniques and Tools for Software Analysis Freescale Semiconductor Document Number: CODETESTTECHWP Rev. 0 11/2005 Understanding how software development can be optimized through the use of software analysis