Drawing Circles on a Tight Budget Using an 8-pin PIC12F675 microcontroller, harmonic oscillator theory and software PWM to generate in-phase sine and cosine.

Slides:



Advertisements
Similar presentations
Chapter 14 Finite Impulse Response (FIR) Filters
Advertisements

Design of Digital IIR Filter
Envelope Detector Conventional DSB-AM signals are easily demodulated by an envelope detector It consists of a diode and an RC circuit, which is a simple.
A Stabilization Technique for Phase-Locked Frequency Synthesizers Tai-Cheng Lee and Behzad Razavi IEEE Journal of Solid-State Circuits, Vol. 38, June 2003.
EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Practical Considerations for Digital Design
Computer Vision Lecture 7: The Fourier Transform
INVERTERS (DC-AC Converters).
Experiment 17 A Differentiator Circuit
IntroductionIntroduction Most musical sounds are periodic, and are composed of a collection of harmonic sine waves.Most musical sounds are periodic, and.
Lecture 25 Pulse-Width Modulation (PWM) Techniques
EE445S Real-Time Digital Signal Processing Lab Spring 2014 Lecture 15 Quadrature Amplitude Modulation (QAM) Transmitter Prof. Brian L. Evans Dept. of Electrical.
Phun With Sound Basic Concepts For Hardware (and other) Hackers.
FREQUENCY SHIFT KEYING
Analog-to-digital Conversion and Digital-to-analog Conversion (with DSP) ES-3.
Computer Graphics Recitation 6. 2 Motivation – Image compression What linear combination of 8x8 basis signals produces an 8x8 block in the image?
CHAPTER 16 Fourier Series.
Solar Tracking Project Team Members: –Cristian Ruvalcaba –Ken Seal –David Clark –Mark McKinley –Richard DeJarnatt.
Chapter 6 FM Circuits.
Precision Variable Frequency Drive Group May07-13 Jason Kilzer Nick Nation Dave Reinhardt Matt Shriver Client: Jim Walker Faculty Advisor: Professor Ajjarapu.
Spectrum Analyzer Ray Mathes, Nirav Patel,
Digital to Analog Converters
M.S.P.V.L. Polytechnic College, Pavoorchatram
LECTURE 9 INTRO TO POWER ELECTRONICS
Pulse Width Modulation (PWM) LED Dimmer Circuit
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
PULSE MODULATION.
A Differentiator Circuit.  All of the diagrams use a uA741 op amp. ◦ You are to construct your circuits using an LM 356 op amp.  There is a statement.
Experiment 17 A Differentiator Circuit
Chapter 2 Basic Concepts of Electronics. Figure 2.1 Electric current within a conductor. (a) Random movement of electrons generates no current. (b) A.
Synthesis Basics (1) Analog Synthesis Intro to Digital Oscillators.
Lecture 1 Signals in the Time and Frequency Domains
Anthony Gaught Advisors: Dr. In Soo Ahn and Dr. Yufeng Lu Department of Electrical and Computer Engineering Bradley University, Peoria, Illinois May 7,
Kyle Merkert ECE 791/792 Senior Design Project October 2009 – May 2010 Faculty Advisor: Dr. Wayne Smith.
Reconfigurable Communication System Design
Chapter 21 Frequency Modulation GMSK Modulation DSP C5000 Copyright © 2003 Texas Instruments. All rights reserved.
DLS Digital Controller Tony Dobbing Head of Power Supplies Group.
Quadrature Amplitude Modulation (QAM) Transmitter
PWM Circuit Based on the 555 Timer. Introduction In applications LED Brightness Control we may want to vary voltage given to it. Most often we use a variable.
Lecture 15: Digital to Analog Converters Lecturers: Professor John Devlin Mr Robert Ross.
Capacitive transducer. We know that : C=kЄ° (A/d) Where : K=dielectric constant Є° =8.854 *10^-12 D=distance between the plates A=the area over lapping.
ECE 4710: Lecture #7 1 Overview  Chapter 3: Baseband Pulse & Digital Signaling  Encode analog waveforms into baseband digital signals »Digital signaling.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
Experiment 17 Two Differentiators Circuit. Analog Computing Analog computers – First were mechanical systems. Electrical analog computers were developed.
ECE 448: Lab 7 Design and Testing of an FIR Filter.
ECE 4710: Lecture #26 1 BPSK  BPSK   m(t) is binary baseband signal, e.g. m i = ±1 and i = 1, 2  Two possible phase states for carrier »  i = 0°,
Software Defined Radio PhD Program on Electrical Engineering Sampling Theory and Quantization José Vieira.
DCTI Duty Cycle Timing Information A synchronous method for the clock recovery in the transport of Constant bit rate services over ATM.
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.
What do these abbreviations stand for? PWM PPM PAM PCM ASK FSK PSK AM FM IF AF RF TRF amp Pulse width modulation Pulse position modulation Pulse amplitude.
Digital Oscillators. Everything is a Table A table is an indexed list of elements (or values) A digital oscillator or soundfile is no different.
PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
SGDRS Software System Design Justin A. King WWU EET Senior project 2013.
Throttle Arduino RC Receiver Stock Golf Cart Motor Controller Motor 1 PWM signal: Voltage: 0 – 5V Period = 22ms Positive Pulse Width: 1ms – 2ms Digital.
Measurement and Instrumentation
 The differentiator or differentiating amplifier is as shown in figure.  This circuit will perform the mathematical operation of differentiation.
FUNCTION GENERATOR.
Demodulation PWM Signal
(4) Filters.
Software Defined Radio PhD Program on Electrical Engineering
MODULE 2: Circuits, Signals and the Analog Discovery Board SUMMER CHALLENGE Electrical Engineering: Smart Lighting Michael Rahaim, PhD Candidate Multimedia.
UNIT-IV Application of Special I.C’s.
CBC Fundamentals Lecture is based on material from Robotic Explorations: A Hands-on Introduction to Engineering, Fred Martin, Prentice Hall, 2001.
Two Differentiators Circuit
Telecommunications Engineering Topic 2: Modulation and FDMA
Quadrature Amplitude Modulation (QAM) Transmitter
Quadrature Amplitude Modulation (QAM) Transmitter
Integrated Circuits Computer Signals
INVERTERS. What is an Inverter? A static device that converts DC power into AC power at desired output voltage and frequency is called an Inverter. Applications.
Presentation transcript:

Drawing Circles on a Tight Budget Using an 8-pin PIC12F675 microcontroller, harmonic oscillator theory and software PWM to generate in-phase sine and cosine signals Catalin Patulea Second year Software Engineering student Carleton University

Overview Microchip PIC12F675 Reconstruction Filter Reconstruction Filter Oscilloscope X Y Software PWM Harmonic Oscillator (90° out of phase) Harmonic Oscillator

Harmonic Oscillator: Theory Second order recursive relation Can be modeled using the z-transform Can verify stability and period over integers (FSM) Y(n) = K·Y(n-1) - Y(n-2) Y(n-1)Y(n-2) Y(n)

Harmonic Oscillator: Design “Angular increment” Frequency determined by K Phase and amplitude determined by Y(0) and Y(1)

Harmonic Oscillator: Implementation Three 16-bit state variables “Seed” the oscillator Compute next sample (2cos(5°) ≈ K = ) Shift samples down static signed int x0, x1, x2; x0 = 0; x1 = 11; x2 = (x1 > 7) - x0; x0 = x1; x1 = x2;

Software PWM PWM is Pulse Width Modulation Constant frequency, variable duty cycle Average value proportional to duty factor Easily generated on a digital μC output pin PWM + reconstruction filter = poor man’s DAC 10% 40% 100%

Reconstruction Filter Intuitively, a short-term averager Low-pass filter with corner frequency between output frequency and PWM frequency –Cut out high-frequency “garbage” –Avoid attenuating useful signal If PWM frequency is high enough (compared to output frequency), RC will do just fine 70% Re- construction Filter

Summary 8-pin PIC12F675, two resistors, two capacitors 62 lines of C code (17% ROM, 46% RAM) –Room for optimization in assembly ~ 1 Hz in-phase sine and cosine, sampled at ~ 70 Hz Applications –QAM (Quadrature Amplitude Modulation)

Pros and Cons Small, few components –No external oscillator Cheap –About 3 $ Low footprint –No look-up table Dynamically changing the frequency requires recomputing only 3 coefficients Dynamic frequency variations are limited by reconstruction filter Probably needs an amplifier to drive anything significant Probably not well-suited for high frequency or high quality conditions

Demo

Q & A Microchip PIC12F675 Reconstruction Filter Reconstruction Filter Oscilloscope X Y Software PWM Harmonic Oscillator (90° out of phase) Harmonic Oscillator