IE1206 Embedded Electronics Le1 Le2 PIC-block Documentation, - - PowerPoint PPT Presentation

ie1206 embedded electronics
SMART_READER_LITE
LIVE PREVIEW

IE1206 Embedded Electronics Le1 Le2 PIC-block Documentation, - - PowerPoint PPT Presentation

IE1206 Embedded Electronics Le1 Le2 PIC-block Documentation, Seriecom Pulse sensors I , U , R , P , serial and parallell Le3 Ex1 Pulsesensors, Menuprogram KC1 LAB1 Start of programing task Ex2 Le4 Kirchhoffs laws Node


slide-1
SLIDE 1

IE1206 Embedded Electronics

Transients PWM Phasor jω PWM CCP KAP/IND-sensor

Le1 Le3 Le6 Le8 Le2 Ex1 Le9 Ex4 Le7

Written exam

William Sandqvist william@kth.se

PIC-block Documentation, Seriecom Pulse sensors I, U, R, P, serial and parallell

Ex2 Ex5

Kirchhoffs laws Node analysis Two ports R2R AD Trafo, Ethernetcontact

Le13

Pulsesensors, Menuprogram

Le4

KC1 LAB1 KC3 LAB3 KC4 LAB4

Ex3 Le5

KC2 LAB2

Two ports, AD, Comparator/Schmitt Step-up, RC-oscillator

Le10 Ex6

LC-osc, DC-motor, CCP PWM

LP-filter Trafo

Le12 Ex7

Display

Le11

  • Start of programing task
  • Display of programing task
slide-2
SLIDE 2

William Sandqvist william@kth.se

τ t

e t x

− =1 ) (

τ t

e t x

= ) (

  • Rising process
  • Falling process

The Quick Formula directly provides the equation for a rising/falling exponential process: x0 = process start value x∞ = process end value τ = process time constant

τ t

e x x x t x

− ∞ ∞

− − = ) ( ) (

Quick Formula for exponential

slide-3
SLIDE 3

William Sandqvist william@kth.se

Time constants

C R⋅ = τ R L = τ

  • More complex circuits one simplifies with equivalent circuits to one of

these elementary shapes. (If this is not possible advanced courses will have a transform methood available).

slide-4
SLIDE 4

William Sandqvist william@kth.se

Continuity requirements

In a capacitor, charging is always continuous The capacitor voltage is always continuous. In an inductor the magnetic flux is always continuous In an inductor current is always continuous.

The Capacitor has voltage inertia

Summary

The Inductor has current inertia

slide-5
SLIDE 5

William Sandqvist william@kth.se

”All” by ”the rest”

rest" " all" " ln ln ln 1 ln 1 ) 1 ( ⋅ = − ⋅ = − ⋅ − =

=

=

=

− −

τ τ τ τ

τ τ

x X X t X x X t t X x e X x e X x

t t

”all” ”rest”

slide-6
SLIDE 6

William Sandqvist william@kth.se

slide-7
SLIDE 7

William Sandqvist william@kth.se

Capacitor charging (10.5)

R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-8
SLIDE 8

William Sandqvist william@kth.se

Capacitor charging (10.5)

R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V? uC0 = 5 V uC∞ = 15 V τ = 2000⋅1000⋅10-6 = 2 s

slide-9
SLIDE 9

William Sandqvist william@kth.se

Capacitor charging (10.5)

t t C t

e e t u e x x x t x

⋅ − − − ∞ ∞

⋅ − = ⋅ − − = ⋅ − − =

5 , 2

10 15 ) 5 15 ( 15 ) ( ) ( ) (

τ

uC0 = 5 V uC∞ = 15 V τ = 2000⋅1000⋅10-6 = 2 s R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-10
SLIDE 10

William Sandqvist william@kth.se

Capacitor charging (10.5)

t t C t

e e t u e x x x t x

⋅ − − − ∞ ∞

⋅ − = ⋅ − − = ⋅ − − =

5 , 2

10 15 ) 5 15 ( 15 ) ( ) ( ) (

τ

uC0 = 5 V uC∞ = 15 V τ = 2000⋅1000⋅10-6 = 2 s Note: Capacitor voltage is continuous – If you put a voltage across a capacitor it can not charge instantaneously (would require infinite current). The voltage will not change at once. R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-11
SLIDE 11

William Sandqvist william@kth.se

Capacitor charging (10.5)

R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-12
SLIDE 12

William Sandqvist william@kth.se

Capacitor charging (10.5)

R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-13
SLIDE 13

William Sandqvist william@kth.se

Capacitor charging (10.5)

R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-14
SLIDE 14

William Sandqvist william@kth.se

Capacitor charging (10.5)

R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-15
SLIDE 15

William Sandqvist william@kth.se

Capacitor charging (10.5)

s 39 , 1 695 , 2 10 15 5 15 ln 2 rest" " all" " ln = ⋅ = = − − ⋅ = ⋅ =τ t

R = 2000 Ω and C = 1000 µF Obtain an expression for uC(t) Draw function uC(t) Calculate how long it takes for uC to reach +10V?

slide-16
SLIDE 16

William Sandqvist william@kth.se

slide-17
SLIDE 17

William Sandqvist william@kth.se

Neon lamp (10.9)

Flash-circuit with neon lamp.

slide-18
SLIDE 18

William Sandqvist william@kth.se

Neon lamp (10.9)

The circuit’s Thevenin equivalent: RI = 600||400 = 240 kΩ E0 = 200⋅400/1000 = 80V

s rest all t C RI 88 , 65 80 80 ln 528 , ln 528 , 10 2 , 2 10 240

6 3

= − − ⋅ = ⋅ = = ⋅ ⋅ ⋅ = ⋅ =

τ τ

a) When will the first flashing light be?

The capacitor is charged from 0V up to 80V at 65V the neon lamp lights up (and discharges the capacitor to 55V when it goes off).

slide-19
SLIDE 19

William Sandqvist william@kth.se

Neon lamp (10.9)

s rest all t 27 , 65 80 55 80 ln 528 , ln 528 , = − − ⋅ = ⋅ = = τ τ

b) How long will it take until the next blink?

The capacitor is now charging from 55V up to 80V at 65V when the neon lamp lights up (and discharges the capacitor to 55V, then it goes off).

Hz 7 , 3 27 , 1 1 = = = T f Flash frequency:

slide-20
SLIDE 20

William Sandqvist william@kth.se

Neon lamp (10.9)

If R2 is removed E will not be votage divded. E = 200. Timeconstant will be changed.

s rest all t C R 094 , 65 200 55 200 ln 32 , 1 ln 32 , 1 10 2 , 2 10 600

6 3 1

= − − ⋅ = ⋅ = = ⋅ ⋅ ⋅ = ⋅ =

τ τ

c) If R2 is removed, how long does it then between flashes?

The capacitor is charging now from 55V up to 200V at 65V when the neon lamp lights up (and discharges the capacitor to 55V when it goes off).

Hz 11 094 , 1 1 = = = T f Flash frequency:

slide-21
SLIDE 21

William Sandqvist william@kth.se

slide-22
SLIDE 22

William Sandqvist william@kth.se

Schmitt-trigger (10.10)

slide-23
SLIDE 23

William Sandqvist william@kth.se

Trigger levels? (10.10)

0V 5V ? ?

3 1 5 5 , 1 5 , 5 = +

? 0V 5V

3 2 5 5 , 1 1 5 = +

?

Voltage divider. Voltage divider.

slide-24
SLIDE 24

William Sandqvist william@kth.se

RC-oscillator (10.10)

The comparator charges the capacitor to the upper trigger level, then it turns the output on and discharges the capacitor to the lower trigger

  • level. The frequency of the output of the comparator depends on the

product R·C. Since C is constant so will the R controls the frequency.

3 2 3 1

slide-25
SLIDE 25

William Sandqvist william@kth.se

RC-oscillator frequency (10.10)

Hz 962 10 4 , 10 1 1 ms 4 , 10 10 2 , 5 2 2 ms 2 , 5 2 ln 10 75 , 5 5 5 ln 10 75 , ln 10 75 , 10 150 10 5

3 3 1 1 2 3 3 1 3 1 3 1 3 9 3

= ⋅ = = = ⋅ ⋅ = ⋅ = = = ⋅ ⋅ = ⋅ ⋅ − ⋅ ⋅ = ⋅ = ⋅ = ⋅ ⋅ ⋅ = ⋅ =

− − − − − −

T f t T t t rest all t C R τ τ

2 1

t t = Ω = k 5 R

The supply voltage 5V went shorten away. The frequency is thus independent of changes in the supply voltage!

slide-26
SLIDE 26

William Sandqvist william@kth.se

slide-27
SLIDE 27

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

E is a DC source. At the time t1 the switch is closed.

slide-28
SLIDE 28

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

a) How large is the current through the coil in the first moment? E is a DC source. At the time t1 the switch is closed.

slide-29
SLIDE 29

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

Answer: The inductor has has ”current inertia”. The first moment (t1) the current will be the ”same” i = 0. a) How large is the current through the coil in the first moment? E is a DC source. At the time t1 the switch is closed.

slide-30
SLIDE 30

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

b) How large is the current through the inductor after a long time interval?

slide-31
SLIDE 31

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

uL = 0

b) How large is the current through the inductor after a long time interval?

slide-32
SLIDE 32

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

Answer: After a long time, the changes have faded away. The voltage across the inductor (is due to changes) then is 0, the inductor is "shorting" the 100 Ω parallel resistor. The 100 Ω series resistor limits the current from the voltage

  • source. i = 10V/100Ω = 0,1 A.

uL = 0

b) How large is the current through the inductor after a long time interval?

slide-33
SLIDE 33

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

uL = 0 0,1 A

i i

b) How large is the current through the inductor after a long time interval? Answer: After a long time, the changes have faded away. The voltage across the inductor (is due to changes) then is 0, the inductor is "shorting" the 100 Ω parallel resistor. The 100 Ω series resistor limits the current from the voltage source. i = 10V/100Ω = 0,1 A.

slide-34
SLIDE 34

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

c) Later at time t2 the switch is opened. Now set up an expression of current through the coil as a function of time t for the time after t2. Let t2 be a new starting time t = t2 = 0.

slide-35
SLIDE 35

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

Before switch opening

Without current

slide-36
SLIDE 36

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

After switch opening Before switch opening

Without current

slide-37
SLIDE 37

William Sandqvist william@kth.se

After t2 the current starts from the ”same value” 0,1 A ( i0 ) as before the switch opening, and then the current will decrease down to 0 ( i∞ ). Time constant will be τ = L/R = 1/100 = 0,01 s.

Inductor connection and disconnection (10.8)

After switch opening Before switch opening

Without current

slide-38
SLIDE 38

William Sandqvist william@kth.se

t t t

e e t i e t i

⋅ − − −

⋅ = ⋅ = ⇔ ⋅ − − =

100 01 , L 01 , L

1 , 1 , ) ( ) 1 , ( ) (

τ t

e x x x t x

− ∞ ∞

− − = ) ( ) ( Quick formula:

L

i

∞ L

i

∞ L

i

After t2 the current starts from the ”same value” 0,1 A ( i0 ) as before the switch opening, and then the current will decrease down to 0 ( i∞ ). Time constant will be τ = L/R = 1/100 = 0,01 s.

Inductor connection and disconnection (10.8)

After switch opening Before switch opening

Without current

slide-39
SLIDE 39

William Sandqvist william@kth.se

t t t

e e t i e t i

⋅ − − −

⋅ = ⋅ = ⇔ ⋅ − − =

100 01 , L 01 , L

1 , 1 , ) ( ) 1 , ( ) (

τ t

e x x x t x

− ∞ ∞

− − = ) ( ) ( Snabbformeln: 0,1 A

∞ L

i

L

i

After t2 the current starts from the ”same value” 0,1 A ( i0 ) as before the switch opening, and then the current will decrease down to 0 ( i∞ ). Time constant will be τ = L/R = 1/100 = 0,01 s.

Inductor connection and disconnection (10.8)

After switch opening Before switch opening

Without current

slide-40
SLIDE 40

William Sandqvist william@kth.se

slide-41
SLIDE 41

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

When the voltage source 10 V is disconnected, the current is driven by the

  • inductor. The voltage drop over the 100 Ω

resistor UR at first is -100·0,1 = -10 V. The minus sign comes from the fact that the current is entering the resistor in the part of the resistor we defined negative.

slide-42
SLIDE 42

William Sandqvist william@kth.se

Inductor connection and disconnection (10.8)

When the voltage source 10 V is disconnected, the current is driven by the

  • inductor. The voltage drop over the 100 Ω

resistor UR at first is -100·0,1 = -10 V. The minus sign comes from the fact that the current is entering the resistor in the part of the resistor we defined negative.

slide-43
SLIDE 43

William Sandqvist william@kth.se

  • Suppose the resistor is 1000 Ω. Then uR at

first moment had been -100 V !

Inductor connection and disconnection (10.8)

When the voltage source 10 V is disconnected, the current is driven by the

  • inductor. The voltage drop over the 100 Ω

resistor UR at first is -100·0,1 = -10 V. The minus sign comes from the fact that the current is entering the resistor in the part of the resistor we defined negative.

slide-44
SLIDE 44

William Sandqvist william@kth.se

  • Suppose the resistor is 10000 Ω then the

voltage had been -1000V !

  • Suppose the resistor is 1000 Ω. Then uR at

first moment had been -100 V !

Inductor connection and disconnection (10.8)

When the voltage source 10 V is disconnected, the current is driven by the

  • inductor. The voltage drop over the 100 Ω

resistor UR at first is -100·0,1 = -10 V. The minus sign comes from the fact that the current is entering the resistor in the part of the resistor we defined negative.

slide-45
SLIDE 45

William Sandqvist william@kth.se

  • When the circuit is broken the inductor tries to ”keep” the current, until all

the magnetic energy has been consumed. If you omit the resistor from the circuit, ie, R = ∞ there will be a very high voltage.

  • Suppose the resistor is 10000 Ω then the

voltage had been -1000V !

  • Suppose the resistor is 1000 Ω. Then uR at

first moment had been -100 V !

Inductor connection and disconnection (10.8)

When the voltage source 10 V is disconnected, the current is driven by the

  • inductor. The voltage drop over the 100 Ω

resistor UR at first is -100·0,1 = -10 V. The minus sign comes from the fact that the current is entering the resistor in the part of the resistor we defined negative.

slide-46
SLIDE 46

William Sandqvist william@kth.se

  • Ex. To break the current to a coil

will produce a high voltage

slide-47
SLIDE 47

William Sandqvist william@kth.se