Академический Документы
Профессиональный Документы
Культура Документы
Motor Chopper
Based on the
MC68HC908QT4
Microcontroller
Reference Design
MOTOROLA.COM/SEMICONDUCTORS
MC68HC908QT4
Microcontroller
Designer Reference Manual Rev 0
MOTOROLA 3
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Revision history
http://www.motorola.com/semiconductors
Revision history
Revision Page
Date Description
Level Number(s)
4 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Table of Contents
Section 1. Introduction
1.1 Overview of the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Freescale Semiconductor, Inc...
1.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
MOTOROLA 5
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Table of Contents
6 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
List of Figures
MOTOROLA 7
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
List of Tables
List of Tables
8 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Section 1. Introduction
Washing machines
Vacuum cleaners
Hand tools
Food processors
Dishwashers
Single-phase variable-speed drives
Low-cost, medium-power applications with variable voltage output
MOTOROLA Introduction 9
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Introduction
1.1.2 Features
10 Introduction MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Introduction
Intended Functionality of the Application
type of motor and its drive have a high impact on many home appliance
features, such as cost, size, noise and efficiency. Electronic control
usually becomes necessary when variable speed or energy savings are
required.
Motor Voltage
50% duty cycle
DC Voltage
Gate Signal
MOTOROLA Introduction 11
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Introduction
12 Introduction MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Introduction
References
1.5 References
1. PWM_setup.xls - placed into project [2] sources.
2. UM_Chopper.mcp - project, debugged under CodeWarrior CW08
V3.0.
3. Schematic, PCB.
MOTOROLA Introduction 13
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Introduction
Freescale Semiconductor, Inc...
14 Introduction MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
This section deals with system hardware and software constraints and
requirements that must be met by the design.
Freescale Semiconductor, Inc...
4. The PWM ramp has 18 steps (duty cycles), and the number of
steps can be set using a defined constant.
5. The PWM ramp time duration can be set using a defined constant.
6. The PWM signal can be set to invert the IGBT driver by a defined
constant.
7. The required PWM duty cycle is processed by an 8-sample
moving average filter.
Freescale Semiconductor, Inc...
Power stage
12 V power supply
Driving stage
5 V power supply
Microcontroller, with user interface.
The power stage consists of the input power bridge rectifier D2 with
capacitor C1, the power IGBT transistor Q2, and the freewheeling diode
D4. Diode D7 protects the IGBT against negative spikes.
The 12 V power supply contains diode D1, and resistors for decreasing
input voltage. This follows on to an adjustable precision shunt regulator
TL431, with setting resistors R3 and R9, filtration capacitor C3, and
smoothing capacitor C2. The primary function of the 12 V source is to
feed the driving stage; a secondary function is to feed the 5 V supply.
The driving stage switches the power IGBT Q2 on the base of input logic
signal from pin 7 of the microcontroller MC68HC908QT4. The IGBT is
switched on via resistor R11; it is switched off via resistor R17 and a
Schottky diode D6.
NOTE: The potentiometer R16 should be connected to the PCB in the required
manner. This means that if the potentiometer R16 is in a zero position,
a 0% duty cycle is required, and the 0 resistance must be between
runner and - of the potentiometer R16.
MOTOROLA
J1CON/FASTON F1Fuse 8A D1 1N4006
R1 68k/2W
DRM057 Rev 0
1 +12 V
2 R2 68k/2W
D2 R3 R4 R5
R6 68k/2W
27k 10k 6k8
230V AC - + C1
R7 68k/2W + C2
U1 C3 Q1
1M/275V
R8 68k/2W
KBU8J TL431 100n
J2CON/FASTON R9 BC557
6k8
1 D3
470u/25V
2 6V8
J3CON/FASTON
D6 BAT42 R10
1 6k8
2 R17 47
D4 D7 R12 6k8
Q3
MOTOR BC547
Q2 R11 30
STTH8L06D MUR160 R13 3k3
IGBT PAD Q4
J4CON/FASTON 1 BC547
PAD
1 1 R14 6k8
2 PAD
1 MC68HC908QT4CP
R15 510 +5V U2
Hardware Design
+12 V 1 8
2 Vdd Vss 7
PTA5/OSC1PTA0/AD0/TCH0 PWM
+ C4 C5 3 6
4 PTA4/OSC2PTA1/AD1/TCH1 5 SW1
T+
100n PTA3/RST PTA2/IRQ
D5
Go to: www.freescale.com
5V1 R16 PUSH BUTTON
C6 C7
TR
PWM ON/OFF
100u/16V
10K
T-
19
Hardware Description
Hardware Design
High current in the power stage is a limiting factor in the PCB design.
Due to this current, the PCB copper thickness must be 0.35 m at the
minimum.
All power devices (rectifier, IGBT, freewheeling diode) and the board are
mounted onto the heat sink placed under the board. The size of the heat
Freescale Semiconductor, Inc...
sink depends on the size of the load, the switching devices used, and
PWM frequency.
This section describes the design of the driver software blocks. The
software is described in terms of:
Pre-programming phase
Program restart
Main program loop
During the pre-programming phase, the user can set the program
behavior. For this purpose, some constants that determine system
behavior are defined. More about constants setup is presented in this
section.
Start
Set initial output value on port A,
Delay system start for 1.5 s to stabilize
void set_ADC(void)
void set_IRQ(void) Pre-programming phase
Enable interrupts
-
10ms interval flag
+
+
IRQ pressed flag IRQ oscillation filter
-
Is system switched on ?
+
Get sample of required speed and
compute moving average
-
Ramp step time over
-
+
Is actual PWM value< required? Increment actual PWM value
Timer overflow
subroutine
set output PWM value to TCH0H, set output PWM value to TCH1H,
TCH0L registers TCH1L registers
reti
IRQ subroutine
reti
The constant sets the timer clock prescaler, thus allowing changes
to PWM frequency in a given range (see the following note).
3. #define K_AD 15 /*see PWM_setup.xls*/
The following auxiliary system constants are used in the program, and
some of them depend upon the system setup definitions.
Prior to running the main program loop the system setup sets the
microcontroller operation mode and peripherals. The quickest way to set
Freescale Semiconductor, Inc...
For setting unbuffered PWM, the timer registers must be set correctly.
As an example, Table 4-3 presents the PWM setup for 3.2 MHz bus
frequency. The sequence of constants selection is as follows:
System timing.
The whole system is timed in 10 ms intervals given by the
definition of the constant K_10MS.
PWM switch on/off testing.
Testing consists of comparison value of the variable
ucOn_Off_PWM. If the value is 0, then a 0% PWM duty cycle is
Freescale Semiconductor, Inc...
Table 4-2 summarizes the use of the I/O pins. It can be seen that three
pins are still available.
AC alternating current.
A/D converter, ADC analog to digital converter: the module is a 4-channel, multiplexed-input
successive-approximation analog to digital converter.
Freescale Semiconductor, Inc...
Buffered a system that uses two registers for data; new data is read alternately.
Bus clock the clock signal on the CPUs internal bus. See CPU cycles.
Clear to change a bit from logic 1 to logic 0; the opposite of to set.
Clock a square wave signal used to synchronize events in a computer.
COP computer operating properly.
CPU central processing unit.
CPU cycles a CPU cycle is one period of the internal bus clock, normally derived by
dividing a crystal oscillator source by two or more so the high and low times
will be equal. The length of time required to execute an instruction is
measured in CPU clock cycles.
CISC complex instruction set computer.
Cycle time The period of the operating frequency: tcyc = 1/fop.
DC direct current.
Duty cycle the ratio of the amount of time the signal is on to the time it is off. Duty cycle
is usually represented by a percentage.
EMC electromagnetic compatibility.
Interrupt a temporary break in the sequential execution of a program to respond to
signals from peripheral devices by executing a subroutine.
Interrupt request a signal from a peripheral to the CPU intended to cause the CPU to execute
a subroutine.
IGBT insulated gate bipolar transistor.
I/O input/output.
Logic 1 a voltage level approximately equal to the input power voltage (Vdd).
JAPAN:
ASIA/PACIFIC:
Information in this document is provided solely to enable system and software
Motorola Semiconductors H.K. Ltd.;
implementers to use Motorola products. There are no express or implied copyright
Freescale Semiconductor, Inc...
TECHNICAL INFORMATION CENTER: Motorola reserves the right to make changes without further notice to any products
herein. Motorola makes no warranty, representation or guarantee regarding the
1-800-521-6274
suitability of its products for any particular purpose, nor does Motorola assume any
HOME PAGE: liability arising out of the application or use of any product or circuit, and specifically
http://motorola.com/semiconductors disclaims any and all liability, including without limitation consequential or incidental
damages. Typical parameters which may be provided in Motorola 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 customers technical experts.
Motorola does not convey any license under its patent rights nor the rights of
others. Motorola 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 Motorola product could create a situation where personal injury or
death may occur. Should Buyer purchase or use Motorola products for any such
unintended or unauthorized application, Buyer shall indemnify and hold Motorola
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 Motorola
was negligent regarding the design or manufacture of the part.
Motorola and the Stylized M Logo are registered in the U.S. Patent and Trademark
Office. digital dna is a trademark of Motorola, Inc. All other product or service
names are the property of their respective owners. Motorola, Inc. is an Equal
Opportunity/Affirmative Action Employer.
DRM057