Manual Freescale Semiconductor DRM079

34 pages 0.25 mb
Download

Go to site of 34

Summary
  • Freescale Semiconductor DRM079 - page 1

    RS08 Micr ocontr oller s freescale.com DRM079 Rev. 0 5/2006 Designer Reference Manual Variable Speed DC Fan Control using the MC9RS08KA2 ...

  • Freescale Semiconductor DRM079 - page 2

    ...

  • Freescale Semiconductor DRM079 - page 3

    V ariable Speed DC F an Control using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 3 Variable Speed DC Fan Control using the MC9RS08KA2 Designer Reference Manual by: Vincent Ko Freescale Semiconductor, Inc. Hong Kong To provide the most up-to-date information, the revisi on of our docume nts on the World Wide Web will be the most current. Your p ...

  • Freescale Semiconductor DRM079 - page 4

    Revision History V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 4 Freescale Semiconductor ...

  • Freescale Semiconductor DRM079 - page 5

    V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 5 Table of Contents Chapter 1 Introduction 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2 Freescale’s New Generation Ultra Low Cost MCU . . . . . . . . . . ...

  • Freescale Semiconductor DRM079 - page 6

    Table of Contents V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 6 Freescale Semiconductor ...

  • Freescale Semiconductor DRM079 - page 7

    V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 7 Chapter 1 Introduction 1.1 Introduction This document describes the imp lementation of a DC brushless fan controller using the Freescale ultra low cost MC9RS08KA2 8-bit microcontroller (MCU). The design contains a temperature sensor the MCU reads with control o ...

  • Freescale Semiconductor DRM079 - page 8

    Introduction V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 8 Freescale Semiconductor 1.2 Freescale’s New Genera tion Ultra Low Cost MCU The MC9RS08KA2 microcontroller unit (MCU) is an extremely low cost, small pin count device for home appliances, toys, and small g eometry applications, such as a DC fan controller. This device is ...

  • Freescale Semiconductor DRM079 - page 9

    Bi-Phase BLDC Motor V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 9 1.4 Bi-Phase BLDC Motor The brushless DC motor (BLDC) design for DC fan is commonly consist of a permanent magnet attached on the rotor and the stator phase co il windings are mounted on the moto r shaft as illustrated in Figure 1-2 . The BL ...

  • Freescale Semiconductor DRM079 - page 10

    Introduction V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 10 Freescale Semiconductor ...

  • Freescale Semiconductor DRM079 - page 11

    Commutation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 11 Chapter 2 Motor Control 2.1 Commutation The typical bi-phase BLDC has one pole-pair per phase. Each commuta tion rotates the rotor by 90 degrees and four commutation ste ps complete a mechan ical revolution. Each pole-pair is implemented by two coi ...

  • Freescale Semiconductor DRM079 - page 12

    Motor Control V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 12 Freescale Semiconductor 2.3 Commutation Waveforms In general, in a bi-phase motor design, alternate co ils are tied together and give a single connection to the driver. In this design, the driver conne ction for coil A and coil C is called L1 (see Figure 2-1 ). Similarl ...

  • Freescale Semiconductor DRM079 - page 13

    Motor Startup V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 13 Dramatic changes in the dead-time val ue will cause the motor to stall. In this design a software loop in the MCU will control the dead-time variation. Even with the drama tic change in the temperature sensor reading, the software loop will only ...

  • Freescale Semiconductor DRM079 - page 14

    Motor Control V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 14 Freescale Semiconductor ...

  • Freescale Semiconductor DRM079 - page 15

    Block Diagram V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 15 Chapter 3 Implementation 3.1 Block Diagram The block diagram of the DC fan design is illustrated in Figure 3-1 . A 12V low cost bi-phase BLDC motor is used in this application. The MCU performs alter nate outputs to the two NPN transistors that d ...

  • Freescale Semiconductor DRM079 - page 16

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 16 Freescale Semiconductor Hall sensor output is conn ected to the MCU’s GP IO port, PTA2, wh ich has a programmable edge trigger keyboard interrupt (KBI). The programmable e dge trigger feature provides an effective way to monitor the Hall sensor signal. As mentioned i ...

  • Freescale Semiconductor DRM079 - page 17

    Control Loop V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 17 Figure 3-2. Firmware Control Loop START TargetPWMPeriod = L ongest ActualPWMPeriod = Longest Drive L1 De-energized coils = DeadTime Drive L2 Read Temp. Sensor Read Temp. Sensor 128ms? Update TargetPWMPeriod Increment DeadTime Target > Actual? T ...

  • Freescale Semiconductor DRM079 - page 18

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 18 Freescale Semiconductor 3.4 Temperature Sensor Measurement The temperature sensor measurement is perfo rmed based on the methodology of an emulated ADC described in the applica tion note, AN3266 “Getting Started with RS08”. Figure 3-3. Emulated ADC Schematic The sc ...

  • Freescale Semiconductor DRM079 - page 19

    Temperature Sensor Measurement V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 19 Table 3-2 shows the entire dynamic range of the temper ature sensor voltage can be covered by about 44 timer counts. For convenience, the timer overflow period is set to 63, which is identical to the size of the paging window ($0 ...

  • Freescale Semiconductor DRM079 - page 20

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 20 Freescale Semiconductor As described in the previous section the ove rall dead-time duration should be deterministic, the double WAIT statements in the sub routine can ensure the execution time to be mostly constant. When the MCU is woken up from the first WAIT (whi ch ...

  • Freescale Semiconductor DRM079 - page 21

    Temperature Sensor Measurement V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 21 T able 3-3. T emperature Conver sion T able Temperatu re (°C) Channel Resistan ce (k Ω ) (from sensor data sheet) Voltage across Sensor (V) Predefined Motor Speed (rpm) Target PWM Period (Timer Counts (1) ) NO TES: 1. The reso ...

  • Freescale Semiconductor DRM079 - page 22

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 22 Freescale Semiconductor ...

  • Freescale Semiconductor DRM079 - page 23

    Temperature Sensor Measurement V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 23 Appendix A. Schematic R2 1 2 10K 220 R1 1 2 C2 1 2 2u2F/25V C3 1 2 2u2F/25V R8 12 1K5 22nF C7 1 2 10K VR1 1 2 3 NDS7002A Q3 1 2 3 4K7(1%) R10 1 2 PA3/AO/BKGD PA2/K2/RST VDD VSS PA5/K5 PA4/K4 PA1/K1/A- PA0/K0/A+ 9RS08KA2DN U1 1 2 ...

  • Freescale Semiconductor DRM079 - page 24

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 24 Freescale Semiconductor ...

  • Freescale Semiconductor DRM079 - page 25

    Temperature Sensor Measurement V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 25 Appendix B. Program Listing ;************************************************************** ; ; (c) copyright Freescale Semiconductor. 2006 ; ALL RIGHTS RESERVED ; ;************************************************************** ; ...

  • Freescale Semiconductor DRM079 - page 26

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 26 Freescale Semiconductor MTIM_TCLK_FALLING equ $20 MTIM_TCLK_RISING equ $30 ;========================================================================= ; ACMP Definition ;========================================================================= ACMP_OUTPUT_FALLING equ $0 ...

  • Freescale Semiconductor DRM079 - page 27

    Temperature Sensor Measurement V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 27 TargetPeriod ds.b 1 ActualPeriod ds.b 1 DriveTime ds.b 1 SensorReading ds.b 1 MotorRunning ds.b 1 org RAMStart ; variable/data section org ROMStart ; code section main: Entry: ;---------------------------------------------------- ...

  • Freescale Semiconductor DRM079 - page 28

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 28 Freescale Semiconductor sta KBIES ;HALL rising Edge Trigger sta KBIPE ;KBI Enable ;------------------------------------------------------- ;Config MTIM ; ;Timer prescalar=256 -> Timer clk = 16kHz ;Bus = 4MHz ;Max OF period = 16.384ms ;Timer resolution = 64us ;------ ...

  • Freescale Semiconductor DRM079 - page 29

    Temperature Sensor Measurement V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 29 ;5) Read Temp Sensor Again bsr ReadSensor ; Read Sensor value ;6) Dead time control StartTimer ;7) During the dead time, update dead time period every 128ms brclr SRTISC_RTIF, MAP_ADDR_6(SRTISC), UpdateLater; Update PWM duty cycl ...

  • Freescale Semiconductor DRM079 - page 30

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 30 Freescale Semiconductor ; X indicate the coil to be driven ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetPWM: mov #255, MTIMMOD ; OF period mov #(mMTIMSC_TRST|mMTIMSC_TOIE), MTIMSC; Reset and Start Timer lda #20 mov #(mKBISC_KBIE), KBI ...

  • Freescale Semiconductor DRM079 - page 31

    Temperature Sensor Measurement V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 Freescale Semiconductor 31 NoReading: mov #$00, SensorReading ; Smallest Number clr ACMPSC ; disable ACMP mov #(mMTIMSC_TSTP|mMTIMSC_TRST), MTIMSC ; mask interrupt and clear flag mov #(MTIM_BUS_CLK|MTIM_DIV_256), MTIMCLK; Reset Timer resolution rts ;%%%%%% ...

  • Freescale Semiconductor DRM079 - page 32

    Implementation V ar iable Speed DC Fan Contr ol using the MC9RS08KA2, Rev . 0 32 Freescale Semiconductor lda #255 Quiet: bclr BUZZER, PTAD ; Clear buzzer mov #30, MTIMMOD mov #(mMTIMSC_TRST|mMTIMSC_TOIE), MTIMSC; Reset and Start Timer wait mov #(mMTIMSC_TSTP|mMTIMSC_TRST), MTIMSC; mask interrupt and clear flag sta MAP_ADDR_6(SRS) ; Bump COP dbnza Q ...

  • Freescale Semiconductor DRM079 - page 33

    ...

  • Freescale Semiconductor DRM079 - page 34

    How t o Reach Us: Home P age: www .freescale.com E-mail: suppor t@freescale.com USA/Eur ope or Locatio ns Not Listed: F reescale Semiconductor T echnical Information Center, CH370 1300 N. Alma School Road Chandler , Arizona 85224 +1-800-521-6274 or +1-480-768-2130 suppor t@freescale.com Europe, Middle East, and Africa: F reescale Halbleiter Deutsch ...

Manufacturer Freescale Semiconductor Category Welding System

Documents that we receive from a manufacturer of a Freescale Semiconductor DRM079 can be divided into several groups. They are, among others:
- Freescale Semiconductor technical drawings
- DRM079 manuals
- Freescale Semiconductor product data sheets
- information booklets
- or energy labels Freescale Semiconductor DRM079
All of them are important, but the most important information from the point of view of use of the device are in the user manual Freescale Semiconductor DRM079.

A group of documents referred to as user manuals is also divided into more specific types, such as: Installation manuals Freescale Semiconductor DRM079, service manual, brief instructions and user manuals Freescale Semiconductor DRM079. Depending on your needs, you should look for the document you need. In our website you can view the most popular manual of the product Freescale Semiconductor DRM079.

A complete manual for the device Freescale Semiconductor DRM079, how should it look like?
A manual, also referred to as a user manual, or simply "instructions" is a technical document designed to assist in the use Freescale Semiconductor DRM079 by users. Manuals are usually written by a technical writer, but in a language understandable to all users of Freescale Semiconductor DRM079.

A complete Freescale Semiconductor manual, should contain several basic components. Some of them are less important, such as: cover / title page or copyright page. However, the remaining part should provide us with information that is important from the point of view of the user.

1. Preface and tips on how to use the manual Freescale Semiconductor DRM079 - At the beginning of each manual we should find clues about how to use the guidelines. It should include information about the location of the Contents of the Freescale Semiconductor DRM079, FAQ or common problems, i.e. places that are most often searched by users in each manual
2. Contents - index of all tips concerning the Freescale Semiconductor DRM079, that we can find in the current document
3. Tips how to use the basic functions of the device Freescale Semiconductor DRM079 - which should help us in our first steps of using Freescale Semiconductor DRM079
4. Troubleshooting - systematic sequence of activities that will help us diagnose and subsequently solve the most important problems with Freescale Semiconductor DRM079
5. FAQ - Frequently Asked Questions
6. Contact detailsInformation about where to look for contact to the manufacturer/service of Freescale Semiconductor DRM079 in a specific country, if it was not possible to solve the problem on our own.

Do you have a question concerning Freescale Semiconductor DRM079?

Use the form below

If you did not solve your problem by using a manual Freescale Semiconductor DRM079, ask a question using the form below. If a user had a similar problem with Freescale Semiconductor DRM079 it is likely that he will want to share the way to solve it.

Copy the text from the picture

Comments (0)