Top Banner
Interface Circuits: Hooking Up To The Outside World Prof. Greg Kovacs Department of Electrical Engineering Stanford University
61

4 Interfacing

May 12, 2017

Download

Documents

Micro Emission
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4 Interfacing

Interface Circuits:

Hooking Up To TheOutside World

Prof. Greg Kovacs

Department of Electrical Engineering

Stanford University

Page 2: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 2

Design Note: The Design Process

• Definition of function - what you want.

• Block diagram - translate into circuit functions.

• First Design Review.

• Circuit design - the details of how functions areaccomplished.

– Component selection– Schematic– Simulation– Prototyping of critical sections

• Second Design Review.

• Fabrication and Testing.

Page 3: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 3

Interface Circuits

• Interface circuits “connect” between conventionalelectronic circuits (op-amps, logic, etc.) to theoutside world.

• They include circuits to buffer, amplify, andprocess sensor signals - INPUT of information.

• Also, they can include circuits to drive actuators,relays, etc. - OUTPUT of information.

• In general, they translate between the “volts andmilliamps” of conventional circuits and theirequivalents within several orders of magnitude.

Page 4: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 4

Power Driver Circuits

• There are a variety of devices that one might wantto drive that require more current or highervoltages than inexpensive op-amps can produce.

• Of course, one solution is to purchase “specialty”op-amps with high current or high voltageoutputs.

• However, it is very useful to know how to extendthe capabilities of op-amp (and logic circuit)outputs to avoid this, particularly when the moreexpensive approach is not warranted.

Page 5: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 5

Power Transistors/Heatsinks

Page 6: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 6

Unipolar Power Switches

• For many output devices, one simply needs toswitch a drive voltage on and off.

• In this case, one can use a bipolar powertransistor with sufficient current gain (or aDarlington configuration) or a power MOSFET.

• Today, the most efficient choice is usually theMOSFET.

Page 7: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 7

Basic Switch• Can use BJT or

MOSFET.

• If loads areinductive, needflyback protectdiode.

• Can drive directlyfrom TTL/CMOSlogic instead(want logic-driveMOSFET or BJT).

• Use current-limitresistor for BJT.

V1

V

V-

+

V2

FlybackProtectDiode

Rg

Page 8: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 8

Example Flyback CircuitV+

High voltagepulses out!

2N34401 kΩ

30 mH

Pulse Source

Page 9: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 9

IRLZ-34 Logic-Level MOSFET60V, 30A, 0.05

5V VGS

Page 10: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 10

Relay

Page 11: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 11

Pulse-Width Modulation• Pulse-width modulation, or

PWM, offers a simple,DIGITAL output way ofmodulating power.

• The idea is to vary the dutycycle of pulses from zeroto 100% and if the timeconstants of the devicebeing driven are muchlonger than the pulsetimes, a low-pass filteredequivalent power isobtained.

10%

50%

90%

Page 12: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 12

Random PWM Ideas

SG3525A/SG3527A

LM3524

Dedicated PWM Chips

Source:NationalSemiconductorLinear 3Databook

TriangleWave

GeneratorV

V-

+

VMOD

VOUT

Page 13: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 13

DC Motors

Page 14: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 14

Bipolar Power Switches

V+

LoadDrive Drive

Page 15: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 15

Modern Vacuum Tube Audio

Page 16: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 16

Power Inverters

• Digital drive totransformer togenerate higher orlower voltage.

• Can use to powerfluorescent lights, ACappliances, or togenerate higher DCvoltages (needrectifier and filter).

• Can make negativesupply rail.

V+

Page 17: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 17

MOSFET Power Driver

Page 18: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 18

HV Inverter

Page 19: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 19

FashionStatement

Page 20: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 20

Power Voltage Sources

• In some cases, a “beefy” and variable voltagesource is needed (e.g., audio power amplifiers,signal generator outputs, power supplies, etc.)

• In this case, one can either purchase power op-amps and use them in the standardconfigurations, or use power booster circuits withconventional, low-cost op-amps.

Page 21: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 21

THE COMPLEMENTARY EMITTERFOLLOWER AMPLIFIER

("PUSH-PULL")• A COMPLEMENTARY PAIR OF

TRANSISTORS ARRANGED ASTWO EMITTER FOLLOWERS CANPROVIDE LOTS OF POWER WITHINEXPENSIVE PARTS!

• VERY EFFICIENT(APPROXIMATELY 80%)

• CAN ALSO PROVIDE ADISTORTED SIGNAL DUE TOCROSSOVER DISTORTION…

• CAN DO THE SAME WITHMOSFETS

-VCC

+VCC

Vin

Vout

THIS IS A "CLASS B" CIRCUIT

Page 22: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 22

CROSSOVER DISTORTION

-VCC

+VCC

Vin

Vout

• THERE IS A +/- 0.7 V"DEADBAND"WITHIN WHICH THENEITHERTRANSISTOR ISCONDUCTING...

Page 23: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 23

A CLOSE LOOK AT THE DISTORTION

Page 24: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 24

OUTPUT SPECTRUM OF CLASS AAMPLIFIER WITH CROSSOVER DISTORTION

Page 25: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 25

REDUCING CROSSOVER DISTORTIONWITH BIASING DIODES...

-VCC

+VCC

Vin

Vout THIS IS A "CLASS AB" CIRCUIT

Page 26: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 26

BETTER PERFORMANCE WITHFEEDBACK!

MAGIC SWITCH

R1

R2

-VCC

+VCC

Vin

Vout

• THE +/- 0.7V DEADBAND ISREDUCED TO

• THE SLEW-RATE LIMITATIONS OFTHE OP-AMP MEAN THAT THISDEADBAND WILL STILL BEAPPARENT AT HIGHFREQUENCIES....

± 0.7AVO

Page 27: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 27

HAYES & HOROWITZ SAY....

Page 28: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 28

SEE ANY DISTORTION?

Page 29: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 29

OUTPUT SPECTRUM OF THE SAMEPUSH-PULL AMPLIFIER WITH FEEDBACK

Page 30: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 30

Peltier Devices

Page 31: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 31

BeerCooler

#2

Page 32: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 32

Page 33: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 33

The Bridge Configuration

Source: NationalSemiconductor LM12Application Note.

Page 34: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 34

High Voltage Amplifiers• For high voltage op-

amp applications,recent pricereductions in HV op-amps make itpossible to usestandardconfigurationseasily.

• www.apexmicrotech.com is a goodsource of chips andapplication notes.

Page 35: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 35

Current Sources/Sinks/Pumps

• Many transducers require current sources to drivethem (e.g., electromagnetic coils in some settings,lasers, LEDs, etc.).

• There are several simple current driver circuitsthat use op-amps to provide closed-loop control,and the high output impedances required.

• The basic principle is to sense the sourced (orsunk) current and convert it into a signal forfeedback purposes.

• If the desired currents exceed the capabilities ofthe op-amp, external “pass” transistors are used.

Page 36: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 36

Classic Op-Amp Current Sink

V+

VIN

RF

Load

IL

IL =VIN

RF

Page 37: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 37

Beer-Locked-Loop

Page 38: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 38

Types of Sensors

• Electromagnetic Coils

• Strain Gauges

• Accelerometers

• Microphones

• Optical (covered elsewhere)

• Temperature Sensors

Page 39: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 39

Sensor Signal Processing

• Typical sensor signal processing involves(pre)amplification, filtering and sometimes somedownstream functions.

• Downstream functions may include a comparator(decision) or A/D converter, sometimes precededby a sample-and-hold circuit.

• In some cases (not covered in EE122), the sensorsignal (before or after digitization) is transmittedto another location using telemetry.

Page 40: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 40

LM334 Temperature Sensor

Source: Linear TechnologyLM334 Datasheet.

Note that current-output sensors allow quite longwire lengths, since they are pretty muchinsensitive to cable resistance.

Page 41: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 41

Transresistance Amplifiers

• Transresistanceamplifiers simplytranslate currentfrom a sensor into anoutput voltage.

• They are justinverting amplifierswithout the inputresistor. Thetransresistance gainis given in OHMS.

Rf

V

V-

+

V+

Vout

Page 42: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 42

Transresistance Frequency Response

• Quite often, high DCgain is desiredwithout much ACgain or controlledroll-off.

• These are twoexample approachesto achieve suchcharacteristics.

• In practice the topcircuit is most oftenused.

RF

C1

VOUT

V

V-

+iin

RP

RF

C1

VOUT

V

V-

+i in

AR = −R f

1

R f CS + 1

AR = −RPR fCS + R f

CS R f + RP( ) +1

Page 43: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 43

New Concepts to Enhance Productivity

Page 44: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 44

More on Instrumentation Amplifiers

LT1167AD620

Buffered voltagedivider to set“ground.”

Source: Analog Devices andLinear TechnologyDatasheets.

Page 45: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 45

Nerve Impulse Amplifier

This circuit amplifies the low levelnerve impulse signals received from a patient at Pins 2and 3. RG and the parallel combination of R3 and R4 seta gain of ten. The potential on LT1112’s Pin 1 creates aground for the common mode signal. C1 was chosen tomaintain thestabilityofthe patientground.TheLT1167’shigh CMRR ensures that the desired differential signal isamplified and unwanted common mode signals are at-tenuated. Since the DC portion of the signal is notimportant, R6 and C2 make up a 0.3Hz highpass filter.The AC signal at LT1112’s Pin 5 is amplified by a gain of101 set by (R7/R8) +1. The parallel combination of C3and R7 form a lowpass filter that decreases this gain atfrequencies above 1kHz. The ability to operate at ±3V on0.9mA of supply current makes the LT1167 ideal forbattery-powered applications. Total supply current forthis application is 1.7mA. Proper safeguards, such asisolation, must be added to this circuit to protect thepatient from possible harm.

Source: Linear TechnologyDatasheet.

Page 46: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 46

Switched Capacitor Filters

• It is possible to buildanalog filters where insteadof resistors to make RCtime constants, analogswitches and capacitorsare used to “simulate”resistances.

• In some filter types (state-variable or biquad), builtwith integrators, theintegrator gain controls thecutoff frequency -therefore, you can sweepthe cutoff frequency withthe clock frequency!

R1

C1

VOUT

V

V-

+

VIN

iin

C2

VOUT

V

V-

+

VIN

C1

Clock

Vout = −1

R1C1

Vindt∫

Vout = − fclock

C1

C2

Vindt∫

Page 47: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 47

LTC1064 Switched Capacitor Filter

Source: Linear TechnologyLTC1064 Datasheet.

Page 48: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 48

Analog Multipliers

• These devices can be usedfor modulation (AM), basicmultiplication, and a varietyof other functions.

• The AD633 is a particularlyeasy to use chip.

Source: Analog DevicesDatasheet.

Page 49: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 49

More AD633 StuffSquaring Circuit

Square Root Circuit

(Note errors!)

Source: Analog DevicesDatasheet.

Page 50: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 50

Squarer

sin2 t( ) =1

21− cos 2 t( )( )

AD 633

Vsupply = ± 15V

Input f = 200 kHz

Output f = 400 kHz

Page 51: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 51

Triangle Wave Input

Page 52: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 52

More AD633 Stuff

Amplitude Modulator

Divider Circuit

Source: Analog DevicesDatasheet.

Page 53: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 53

TremoloBox

Page 54: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 54

Multipliersin Filters

Voltage ControlledFilter Circuits

Divider Circuit

Source: Analog DevicesDatasheet.

Page 55: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 55

Example:Cheesy

Accelerometer

Gluing a 6-32 nutonto aninexpensivepiezoelectricbuzzer yields acheesy, butfunctionalaccelerometer.

Page 56: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 56

Page 57: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 57

Cheesy Peak-Reading Accelerometer

Page 58: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 58

Voltage-to-Frequency Converters

Source: NationalSemiconductorLM331 Datasheet.

Page 59: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 59

Voltage-to-Frequency Converters

Source: NationalSemiconductorLM331 Datasheet.

Page 60: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 60

Temperature-To-Frequency

Source: NationalSemiconductorLM331 Datasheet.

Page 61: 4 Interfacing

EE122, Stanford University, Prof. Greg Kovacs 61

Frequency-to-Voltage Converters

Source: NationalSemiconductorLM331 Datasheet.