PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

47
PHY 202 (Blum) 1 Analog-to-Digital Converter and Multi-vibrators

Transcript of PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

Page 1: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 1

Analog-to-Digital Converter and Multi-vibrators

Page 2: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 2

Simple Digital to Analog Converter

V15 V

J1

Key = AJ2

Key = B

J3

Key = CR11.0k

R22.0k

R34.02k

R44.02k

U1DC 10M4.377 V

+

-

.111 corresponds to 7/8

7/8 of 5 is 4.375

Page 3: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 3

Simple Digital to Analog Converter

V15 V

J1

Key = AJ2

Key = B

J3

Key = CR11.0k

R22.0k

R34.02k

R44.02k

U1DC 10M2.503 V

+

-

.100 corresponds to 1/2

1/2 of 5 is 2.5

Page 4: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 4

Analog-to-Digital• We have seen a simple digital-to-analog converter,

now we consider the reverse process• For this purpose we introduce a new circuit

element — the comparator • We have seen last semester a digital comparator, a

logic circuit that determined whether the input word A is larger than the input word B

• Now we look at an analog comparator, it determines whether voltage A is larger than voltage B

Page 5: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 5

Page 6: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 6

Comparator (analog)

U1

COMPARATOR_VIRTUALV13.1 V V2

3 V

R11.0k

U2DC 10M4.651 V

+

-

+ Input higher than – input, output is high

Page 7: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 7

Comparator (analog)U1

COMPARATOR_VIRTUALV12.9 V V2

3 V

R11.0k

U2DC 10M0.000 V

+

-

+ Input lower than – input, output is low

Page 8: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 8

1-bit analog-digital converter

V15 V

R11.0k

R21.0k

V22.4 V

U1

COMPARATOR_VIRTUAL

X1

2.5 V

Reference Voltage

Input voltage

Input voltage is less than half of reference voltage, result is low.

Page 9: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 9

1-bit analog-digital converter

Reference Voltage

Input voltage

Input voltage is more than half of reference voltage, result is high.

V15 V

R11.0k

R21.0k

V22.6 V

U1

COMPARATOR_VIRTUAL

X1

2.5 V

Page 10: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 10

Toward a 2-bit analog-digital converter

V15 V

R11.0k

R21.0k

V24 V

U1

COMPARATOR_VIRTUAL

X1

2.5 VGreater than 3/4

R41.0k

R51.0k

U2

COMPARATOR_VIRTUALU3

COMPARATOR_VIRTUAL

X2

2.5 VGreater than 1/2

X3

2.5 VGreater than 1/4

Page 11: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 11

Toward a 2-bit analog-digital converter

V15 V

R11.0k

R21.0k

V22.6 V

U1

COMPARATOR_VIRTUAL

X1

2.5 VGreater than 3/4

R41.0k

R51.0k

U2

COMPARATOR_VIRTUALU3

COMPARATOR_VIRTUAL

X2

2.5 VGreater than 1/2

X3

2.5 VGreater than 1/4

Page 12: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 12

Toward a 2-bit analog-digital converter

V15 V

R11.0k

R21.0k

V22.2 V

U1

COMPARATOR_VIRTUAL

X1

2.5 VGreater than 3/4

R41.0k

R51.0k

U2

COMPARATOR_VIRTUALU3

COMPARATOR_VIRTUAL

X2

2.5 VGreater than 1/2

X3

2.5 VGreater than 1/4

Page 13: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 13

Toward a 2-bit analog-digital converter

V15 V

R11.0k

R21.0k

V21.1 V

U1

COMPARATOR_VIRTUAL

X1

2.5 VGreater than 3/4

R41.0k

R51.0k

U2

COMPARATOR_VIRTUALU3

COMPARATOR_VIRTUAL

X2

2.5 VGreater than 1/2

X3

2.5 VGreater than 1/4

Page 14: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

Finish this truth table

>3/4 Comparator

>1/2 Comparator

>1/4 Comparator

½’s place ¼’s place

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

PHY 202 (Blum) 14

Doesn’t occur

Page 15: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 15

Integrated circuit version

Warning: may need to flip switch back and forth.

Page 16: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 16

3.7 / 5 (in Scientific Mode)

Page 17: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 17

* 2 x^y 8 =

Page 18: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 18

Binary Mode

Page 19: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 19

Compare

Page 20: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 20

Scientific Mode

Page 21: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 21

Multi-vibrators

http://www.ee.ed.ac.uk/~kap/Hard/555/node1.html

Page 22: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 22

Multi-vibrator

• A multi-vibrator is an electronic circuit that can exist in a number of “states” (voltage and/or current outputs).

• A flip-flop is a bi-stable multi-vibrator, bi-stable means it has two stable states.

• A state is stable if it is robust against the fluctuations (noise) that are always occurring.

Page 23: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 23

Mono-stable multi-vibrator• A mono-stable multi-vibrator has one stable

output (usually zero). • It also has an unstable state. Certain input will

put the circuit into its unstable state, which lasts for a set length of time before returning to the stable state.– Unstable states are still robust to noise but do not last

indefinitely long.

• In wave terminology, this provides one with a single pulse.

Page 24: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 24

Pulse

STABLE UNSTABLESTABLE

Page 25: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 25

One shots• One purpose of a mono-stable multi-vibrator is to

output a signal of a specified duration. • The input (trigger) may be short (or unknown) in

duration, but the output pulse has a predictable duration (can be controlled by the time constant of an RC circuit). = RC– The time constant and duration are not equal but

are proportional.

• Such a circuit is called a “one shot.”

Page 26: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 26

Shapers

• Another purpose of mono-stable multi-vibrators is to “shape” input signals.

• Recall in digital circuits we want signals to be clearly high or low; a mono-stable multi-vibrator can take signals which are not of this form and create signals which are.

Page 27: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 27

Schmitt trigger

Page 28: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 28

Schmitt trigger

• If the voltage is above a certain value (the upper trip point) and rising, the output is high.

• If the voltage is below another value (the lower trip point) and falling, the output is low.

• Otherwise, it remains whatever it was.

Page 29: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 29

Schmitt trigger

The upper trip point

The lower trip point

Above the upper trip and going up

Below the lower trip and going down

Page 30: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 30

A-stable multi-vibrator

• In an a-stable multi-vibrator, there are typically two states, neither of which is stable.

• The circuit repeatedly flips back and forth between the states.

Page 31: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 31

A-stable multi-vibrator

R11.0kR2

10.0k

V15 V

C1

2.0uF

C2

2.0uF

J1

Key = Space

Q1

BJT_NPN_VIRTUAL

Q2

BJT_NPN_VIRTUAL

R31.0k R4

10.0k

XSC1

A B

G

T

Page 32: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 32

A-stable Multi-vibrator

• Assume a state where the transistor on left is ON and transistor on right is OFF and the capacitor on the left has no charge.

• Since the left transistor is on (hard) it is not dropping much voltage, therefore “all” the voltage is being dropped by the resistors

• The capacitor on the left begins to charge through the 10K resistor on the right

Page 33: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

A-stable Multi-vibrator

PHY 202 (Blum) 33

Page 34: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

A-stable Multi-vibrator Oscilloscope

PHY 202 (Blum) 34

Page 35: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 35

A-stable

ON OFF

low

high

Charge building up

Page 36: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 36

A-stable

• Charge builds up on the left capacitor, “pulling-up” the voltage presented to the base of the transistor on the right.

• When the base reaches about 0.7v the transistor on the right turns on.

• Current now starts to flow through the 1K resistor on the far right, thus dropping the voltage level at the collector.

• That low voltage makes its way to the base of the transistor on the left turning it off.

• The cycle repeats itself.

Page 37: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 37

A-stable

ON

low

Turns off

Page 38: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 38

Duty cycle

• In a square wave (e.g. a computer’s clock), the wave is characterized by its frequency, its amplitude and its duty cycle.

• The duty cycle is the percent of time that the signal is high.

• Duty cycle = thigh/(thigh+tlow)*100%

Page 39: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 39

Duty cycle example: thigh = 1.407 ms

Page 40: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 40

Duty cycle example: thigh + tlow = 2.111 msDuty cycle = (1.407/2.111) = 66.65%

Page 41: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 41

555 Timer

• A similar circuit uses the 555 chip (Integrated circuit)

• The resistors and capacitors are external to the chip so that the period and duty cycle of the circuit can be controlled.

Page 42: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 42

555

Page 43: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 43

555 as Monostable multivibrator

Page 44: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 44

555 as Astable Multivibrator

Page 45: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 45

555 Timer (WorkBench version)

U1

LM555CM

GND

1

DI S7

OUT 3RST4

VCC

8

THR6

CON5

TRI2

V15 V

C11.0uF

C210nF

R11.0k

R21.0k

XSC1

A B

G

T

Page 46: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 46

Crystals

• The very high frequency square wave used for the CPU clocks are not generated in the manner described on the previous slides.

• The high frequency signal is supplied by crystals subjected to an electric field.

Page 47: PHY 202 (Blum)1 Analog-to-Digital Converter and Multi-vibrators.

PHY 202 (Blum) 47

References

• http://www.ee.ed.ac.uk/~kap/Hard/555/node2.html#modes

• http://en.wikipedia.org/wiki/555_timer_IC

• http://www.kpsec.freeuk.com/555timer.htm