3 Phase Wave Generation 3 Phase waveform generation using Timer/Counter1 and 3 on atmega128.

Slides:



Advertisements
Similar presentations
Ch8 Inverters (converting DC to AC)
Advertisements

INVERTERS (DC-AC Converters).
More fun with Timer/Counters
C Examples 1.
Chapter 4 DC to AC Conversion (INVERTER)
Abstract Conclusion PWM Modulating Signal Results Generation of DSP-based patterns to control three phase inverters substantially helped the development.
ECE Electric Drives Topic 7: Pulse Width Modulation
1. Output signal alternates between on and off within specified period Controls power received by a device The voltage seen by the load is directly proportional.
Drives & Control June 2003 A. Jansen 1 Brushless DC Motor Control with C868 and CAPCOM6.
Mark Neil - Microprocessor Course 1 Timers and Interrupts.
Copyright by UNIT-IV INVERTERS 4/16/2017 Copyright by
Chapter 4 DC to AC Conversion (INVERTER)
8-Bit Timer/Counter 0 Counter/Timer 0 and 2 (TCNT0, TCNT2) are nearly identical. Differences: -TCNT0 can run off an external 32Khz clock (Tosc) or the.
ATtiny2313 Timers/Counters CS-423 Dick Steflik. What Do You Use Timers For? Timing of events (internal or external)‏ Scheduling Events Measuring the width.
ECE Electric Drives Topic 10: Cycloconverters.
5-1 Timer/Counters In many microprocessor systems we need to:  count logic pulses  measure the frequency of signals  measure the period of pulses 
Chapter 4 AC to AC Converters
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
Pulse Width Modulation modes
SPEED CONTROL OF THREE PHASE INDUCTION MOTOR WITH ENERGY SAVING
Three-Phase AC machines Three-Phase Cage Rotor Induction Motor – Electronic Methods of Starting and Speed Control Resource 4.
Single Phase Induction Motor Adjustable Speed Control Using DSP and Micro-Controller Jianming Yao ECE734 Project Fall 2000.
LECTURE 9 INTRO TO POWER ELECTRONICS
16-Bit Timer/Counter 1 and 3 Counter/Timer 1,3 (TCNT1, TCNT3) are identical in function. Three separate comparison registers exist. Thus, three separate.
Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects.
CH3 Half-wave rectifiers (The basics of analysis)
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
Timer/counter Chapter 12
AC-AC Converter.
A Few Words From Dilbert
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
CoE3DJ4 Digital Systems Design Chapter 4: Timer operation.
Al-Najah National University
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
Counter/Timer/PWM. incoming Lab. Counter counter is a device which stores the number of times a particular event or process has occurred synchronous/asynchronous.
1 Lecture on Lab 6 Lab 7 Lab 8. 2 Lab 6: Open Loop Controller As you learned in lab 5, there are two kinds of control systems: open loop and closed loop.
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects.
CS-280 Dr. Mark L. Hornick 1 Atmel Timer/Counter System Most microcontrollers include some type of timer system Facilitates real-time monitoring and control.
ECE 448: Lab 7 Design and Testing of an FIR Filter.
June 9, s Massachusetts Institute of Technology 6.11s: Design of Motors, Generators and Drive Systems Switching Patterns and Simple Implementation.
PWM TECHNIQUES The output voltage of the inverter needs to be varied as per load requirement. Whenever the input DC varied, the output voltage can change.
Mark Neil - Microprocessor Course 1 Timers and Interrupts.
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
One more PIC18F252 example and revision for exam B222L Branislav Vuksanovic, UoP, ECE.
16-Bit Timer/Counter 1 and 3
Why are Timer Functions Important?
MICROCONTROLLER AND INTERFACING
V.V.P. ENGINEERING COLLEGE,RAJKOT
An FPGA Implementation of a Brushless DC Motor Speed Controller
UNIT-IV Application of Special I.C’s.
IMPEDENCE - SOURCE INVERTER FOR MOTOR DRIVES
BITS EDU. CAMPUS , VARNAMA
AVR Addressing Modes Subject: Microcontoller & Interfacing
Inverters Dr John Fletcher.
AC Voltage Controllers AC to ac Converters
8-Bit Timer/Counter 0 Counter/Timer 0 and 2 (TCNT0, TCNT2) are nearly identical. Differences: -TCNT0 can run off an external 32Khz clock (Tosc) or the.
Timer/Counter Modified from Dr. Lam Phung’s Slides.
8-bit Timer/Counter0 with PWM
Inverters Dr John Fletcher.
Introduction to H-Bridge
UNIT-8 INVERTERS 11/27/2018.
DC motor and PWM.
8-bit Timer/Counter2 with PWM and Asynchronous Operation
Dr. Unnikrishnan P.C. Professor, EEE
Equalizing Average Source Power with Pattern Swapping
Timer/Counter Timer/Counter 0 Timer/Counter 1 Timer/Counter 2 8 bit
Presentation transcript:

3 Phase Wave Generation 3 Phase waveform generation using Timer/Counter1 and 3 on atmega128

Topics ► Sinusoidal Wave Generation Theory ► Atmega128 setup and considerations ► Results

3 Phase line to line voltages ► uC used to control switch states ► +E or 0 is shown to the load on each phase  Depends on if upper or lower switch is on

3 Phase line to line voltages ► 2/3 on switching scheme used ► Allowing switches to be off for 1/3 of the time reduces switching power losses ► Line to neutral voltages are not sinusoidal, but line to line are!!! *U, V, W are the desired line to neutral voltages

Topics ► Sinusoidal Wave Generation Theory ► Atmega128 setup and considerations ► ► Results

uC Sinusoidal PWM ► Line to neutral voltages approximated using PWM switching ► Average output voltage controlled by duty cycle ► uC duty cycle = OCRnA:C/Top ► Top and pre-scaler are set so switching frequency is at 20kHz

Lookup Table Generation ► Using Excel duty cycle of was approximated ► One cycle broken up into 192 steps ► Sin(2*PI*i/192), i = ► OCRnA:C = Round(Sin(2*PI*i/192)*TOP) ► TOP value is 400 for my 20kHz switching frequency ► Looking up values frees up uC for other tasks

sine Look-Up Table sin(2*PI*i/192)‏ Round(U*TOP)‏ i i

Sin lookup table array const uint16_t sin_lookup[192*3] = { //OCRnA,OCRnB, OCRnC 0,0,346, 13,0,353, 26,0,359, 39,0,364, 52,0,370, 65,0,374, 78,0,379, … }

Timer/Counter 1/3 Setup ► Phase & Frequency correct PWM ► Dual Slope Operation ► Used to control switches  Timer/Counter1 Upper Switches  Timer/Counter3 Lower Switches ► Timer/Counter 3 switches inverse of Timer/Counter 1 ► Output bit is set or cleared on compare match

Timer/Counter 2 ► Updates Timer/Counter1/3 OCRnA,OCRnB,OCRnC to control duty cycle ► Counter variable incremented by 3 every time Timer/Counter 2 interrupts ► OCRnA:C value generated from lookup table  OCRnA = sin_lookup[counter]  OCRnB = sin_lookup[counter+1]  OCRnC = sin_lookup[counter+2] ► Interrupts occur f desired *192 times per second

My epiphany + + ≈ One output port of uC looks like one switching stage Switches between 0 and Vcc Upper and Lower switches never on at same time (no shoot-thru) Using OCR1A:C of one Timer/Counter1 and the counters three output pins a three phase waveform can be generated **Bonus** I don’t have to buy anything to implement the design

Viewing Wave forms RC filters and Resistive loads were used to view the waveforms PortB.5 PortB.6 PortB.7

Topics ► Sinusoidal Wave Generation Theory ► ► Atmega128 setup and considerations ► Results

Results Waveform growth

Results CBA A-B

Shoot Thru If S + and S - on at same time the circuit would short

Shoot Thru To avoid shoot-thru add a switching delay Amount to increment or decrement by depends on switching frequency OCR1A = OCRA-1 (cleared sooner) OCR3A = OCRA+1 (set later)

Setting TSM, asserts a reset signal to PSR0 and PSR321. Upon clearing TSM PSR0 and PSR321 are set to zero and timers/counters begin counting synchronously Other Considerations Make sure TCCR1 and TCCR3 are synchronous Using SFIOR Stop pre-scalers (stop the clocks) Set TCCR1 and TCCR3 to zero Restart prescalers

References Generate advanced PWM signals using 8-bit mCs Michael Copeland, Infineon AP16097: Different PWM Waveforms Generation for 3-Phase AC Induction Motor with XC164CS Infineon Infineon 2dfc0756 AVR447: Sinusoidal driving of three-phase permanent magnet motor using ATmega48/88/168 AVR494: AC Induction Motor Control Using the constant V/f Principle and a Natural PWM Algorithm AVR