EML 4314C - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

EML 4314C

Description:

the 8 bits of PORTA correspond to the pins RA0RA7 ... setting bit 3 in PORTA to 1 will cause pin RA3 to have a potential of 5V ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 41
Provided by: Carl1163
Category:
Tags: 4314c | eml | porta

less

Transcript and Presenter's Notes

Title: EML 4314C


1
EML 4314C
  • Exam 1 Review

2
Topics
  • Digital Data Acquisition
  • Lab 1 characteristics of A/D and D/A
    converters, aliasing
  • AC Circuits and Filtering
  • Lab 2 filter response amplitude and phase
    shift of output signal compared to that of input
    signal
  • Microcontrollers
  • Lab 3 microprocessors
  • Modeling of 2nd Order Systems
  • Lab 4 modeling and solving equations of motion
  • Parameter Identification
  • Lab 5 From set of system responses determined m,
    k, c, and Lo

3
Data Acquisition
  • description of A/D converter
  • number of bits
  • range, resolution, quantization error
  • how digital value is calculated based on bins

4
Data Acquisition
  • discrete sampling

5
Data Acquisition
  • incorrect conclusions
  • clipping
  • aliasing

6
Data Acquisition
  • aliasing

7
Data Acquisition
  • folding diagram

8
Topics
  • Digital Data Acquisition
  • Lab 1 characteristics of A/D and D/A
    converters, aliasing
  • AC Circuits and Filtering
  • Lab 2 filter response amplitude and phase
    shift of output signal compared to that of input
    signal
  • Microcontrollers
  • Lab 3 microprocessors
  • Modeling of 2nd Order Systems
  • Lab 4 modeling and solving equations of motion
  • Parameter Identification
  • Lab 5 From set of system responses determined m,
    k, c, and Lo

9
Filtering
  • sinusoidal signals v(t) Vm sin(?tf)
  • frequency and phase angle
  • period (time to complete one cycle)

10
Filtering
  • Eulers formula for representing sinusoidal
    signals ej?t cos (?t) j sin (?t)
  • imaginary part represents sine wave (projection
    of rotating vector on imaginary axis)
  • often written as v(t) Vm ej?t

11
  • circuit analysis
  • resistor
  • v(t) Vm sin(?t)
  • i(t) Vm/R sin(?t)
  • inductor
  • v(t) Vm sin(?t)
  • capacitor
  • v(t) Vm sin(?t)
  • i(t) ?C Vm sin(?t 90º)

current in phase
current lags
current leads
12
  • now lets use the complex notation to describe
    the relationship between current and voltage
  • resistor VR R IR
  • inductor VL j ? L IL (current
    lags voltage by 90º)
  • capacitor VC 1/(j?C) IC (current leads
    voltage by 90º)

13
Filtering
  • low-pass
  • high-pass
  • band-pass
  • band-stop

14
Filtering
  • design of 1st order low-pass filter using
    capacitor and resistor

f arctan(-?RC)
15
Filtering
  • design of 1st order high pass filter

16
Filtering
  • first order band-pass filter

17
Filtering
  • 2nd order low-pass filter

18
Topics
  • Digital Data Acquisition
  • Lab 1 characteristics of A/D and D/A
    converters, aliasing
  • AC Circuits and Filtering
  • Lab 2 filter response amplitude and phase
    shift of output signal compared to that of input
    signal
  • Microcontrollers
  • Lab 3 microprocessors
  • Modeling of 2nd Order Systems
  • Lab 4 modeling and solving equations of motion
  • Parameter Identification
  • Lab 5 From set of system responses determined m,
    k, c, and Lo

19
Microprocessors
20
our chip
16F627
This powerful (200 nanosecond instruction
execution) yet easy-to-program (only 35 single
word instructions) CMOS Flash-based 8-bit
microcontroller packs Microchip's powerful PIC
architecture into an 18-pin package and is
upwards compatible with the PIC16C62XA, PIC16C5X
and PIC12CXXX devices. The PIC16F627 features
4MHz internal oscillator, 128 bytes of EEPROM
data memory, a capture/compare/PWM, a USART, 2
Comparators and a programmable voltage reference
that make it ideal for advantage analog /
integrated level applications in automotive,
industrial, appliances and consumer applications.
21
power circuitry
22
our application
23
reading and writing to pins
  • by default, TRISA and TRISB are set to 1111 1111
    which means that all the pins RA0?RA7 and RB0?RB7
    are set as input pins
  • clearing bit n in TRISB will set pint RBn as an
    output pin
  • the 8 bits of PORTA correspond to the pins
    RA0?RA7
  • the 8 bits of PORTB correspond to the pins
    RB0?RB7
  • output pin example
  • if bit 3 in TRISA has been cleared (set to 0),
    i.e. 1101 1111, then pin RA3, is set as an output
    pin
  • setting bit 3 in PORTA to 1 will cause pin RA3 to
    have a potential of 5V
  • clearing bit 3 in PORTA will cause pin RA3 to
    have a potential of 0V
  • input pin example
  • if bit 2 in TRISA has been set, then pin RA2 is
    set as an input pin
  • pin 2 of the register PORTA can be checked at any
    time to determine whether pin RA2 is at 5V or 0V

24
our program
  • set pin 17 as an input pin
  • set pin 6 as an output pin
  • loop_label
  • read state of pin 17
  • set state of pin 6 to state of pin 17
  • goto loop_label

25
Topics
  • Digital Data Acquisition
  • Lab 1 characteristics of A/D and D/A
    converters, aliasing
  • AC Circuits and Filtering
  • Lab 2 filter response amplitude and phase
    shift of output signal compared to that of input
    signal
  • Microcontrollers
  • Lab 3 microprocessors
  • Modeling of 2nd Order Systems
  • Lab 4 modeling and solving equations of motion
  • Parameter Identification
  • Lab 5 From set of system responses determined m,
    k, c, and Lo

26
Spring-Mass-Damper System
27
Solution of Diff E Using Laplace Transform
  • L(f '(t)) sL (f) - f(0)
  • L (f "(t)) s2L (f) - sf(0) - f'(0)

28
Analysis of system with no damping
  • no driving force no initial velocity

29
Analysis of system with no damping
30
Analysis of system with damping
31
Analysis of system with damping
32
Analysis of system with damping
c25
c250
c2.5
33
Analysis of system with damping
  • solved for time response when there is small
    damping, i.e. c2 lt 4 m1 k1

34
Topics
  • Digital Data Acquisition
  • Lab 1 characteristics of A/D and D/A
    converters, aliasing
  • AC Circuits and Filtering
  • Lab 2 filter response amplitude and phase
    shift of output signal compared to that of input
    signal
  • Microcontrollers
  • Lab 3 microprocessors
  • Modeling of 2nd Order Systems
  • Lab 4 modeling and solving equations of motion
  • Parameter Identification
  • Lab 5 From set of system responses determined m,
    k, c, and Lo

35
Parameter Identification
36
Parameter Identification
37
Parameter Identification
  • we can measure the frequency that will give us

38
Parameter Identification
Use the logarithmic decrement, d, to find ?
  • L01 can be obtained from the data as the steady
    state position
  • (x1(t1)-L01) and (x1(tn)-L01) can be measured
  • solve for ?

39
Parameter Identification
  • add a known mass ?m to the car and obtain ?2 and
    then ?n2
  • use a large ?m so ?n and ?n2 will differ enough
    so that any error in measuring the frequencies
    will not significantly impact the calculations
  • Lastly, determine c for
  • the two cases from ?

40
Topics
  • Digital Data Acquisition
  • Lab 1 characteristics of A/D and D/A
    converters, aliasing
  • AC Circuits and Filtering
  • Lab 2 filter response amplitude and phase
    shift of output signal compared to that of input
    signal
  • Microcontrollers
  • Lab 3 microprocessors
  • Modeling of 2nd Order Systems
  • Lab 4 modeling and solving equations of motion
  • Parameter Identification
  • Lab 5 From set of system responses determined m,
    k, c, and Lo
Write a Comment
User Comments (0)
About PowerShow.com