Interface Circuits: Hooking Up To The Outside World Prof. Greg Kovacs Department of Electrical Engineering Stanford University
Interface Circuits:
Hooking Up To TheOutside World
Prof. Greg Kovacs
Department of Electrical Engineering
Stanford University
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.
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.
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.
EE122, Stanford University, Prof. Greg Kovacs 5
Power Transistors/Heatsinks
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.
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
EE122, Stanford University, Prof. Greg Kovacs 8
Example Flyback CircuitV+
High voltagepulses out!
2N34401 kΩ
30 mH
Pulse Source
EE122, Stanford University, Prof. Greg Kovacs 9
IRLZ-34 Logic-Level MOSFET60V, 30A, 0.05
5V VGS
EE122, Stanford University, Prof. Greg Kovacs 10
Relay
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%
EE122, Stanford University, Prof. Greg Kovacs 12
Random PWM Ideas
SG3525A/SG3527A
LM3524
Dedicated PWM Chips
Source:NationalSemiconductorLinear 3Databook
TriangleWave
GeneratorV
V-
+
VMOD
VOUT
EE122, Stanford University, Prof. Greg Kovacs 13
DC Motors
EE122, Stanford University, Prof. Greg Kovacs 14
Bipolar Power Switches
V+
LoadDrive Drive
EE122, Stanford University, Prof. Greg Kovacs 15
Modern Vacuum Tube Audio
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+
EE122, Stanford University, Prof. Greg Kovacs 17
MOSFET Power Driver
EE122, Stanford University, Prof. Greg Kovacs 18
HV Inverter
EE122, Stanford University, Prof. Greg Kovacs 19
FashionStatement
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.
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
EE122, Stanford University, Prof. Greg Kovacs 22
CROSSOVER DISTORTION
-VCC
+VCC
Vin
Vout
• THERE IS A +/- 0.7 V"DEADBAND"WITHIN WHICH THENEITHERTRANSISTOR ISCONDUCTING...
EE122, Stanford University, Prof. Greg Kovacs 23
A CLOSE LOOK AT THE DISTORTION
EE122, Stanford University, Prof. Greg Kovacs 24
OUTPUT SPECTRUM OF CLASS AAMPLIFIER WITH CROSSOVER DISTORTION
EE122, Stanford University, Prof. Greg Kovacs 25
REDUCING CROSSOVER DISTORTIONWITH BIASING DIODES...
-VCC
+VCC
Vin
Vout THIS IS A "CLASS AB" CIRCUIT
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
EE122, Stanford University, Prof. Greg Kovacs 27
HAYES & HOROWITZ SAY....
EE122, Stanford University, Prof. Greg Kovacs 28
SEE ANY DISTORTION?
EE122, Stanford University, Prof. Greg Kovacs 29
OUTPUT SPECTRUM OF THE SAMEPUSH-PULL AMPLIFIER WITH FEEDBACK
EE122, Stanford University, Prof. Greg Kovacs 30
Peltier Devices
EE122, Stanford University, Prof. Greg Kovacs 31
BeerCooler
#2
EE122, Stanford University, Prof. Greg Kovacs 32
EE122, Stanford University, Prof. Greg Kovacs 33
The Bridge Configuration
Source: NationalSemiconductor LM12Application Note.
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.
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.
EE122, Stanford University, Prof. Greg Kovacs 36
Classic Op-Amp Current Sink
V+
VIN
RF
Load
IL
IL =VIN
RF
EE122, Stanford University, Prof. Greg Kovacs 37
Beer-Locked-Loop
EE122, Stanford University, Prof. Greg Kovacs 38
Types of Sensors
• Electromagnetic Coils
• Strain Gauges
• Accelerometers
• Microphones
• Optical (covered elsewhere)
• Temperature Sensors
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.
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.
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
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
EE122, Stanford University, Prof. Greg Kovacs 43
New Concepts to Enhance Productivity
EE122, Stanford University, Prof. Greg Kovacs 44
More on Instrumentation Amplifiers
LT1167AD620
Buffered voltagedivider to set“ground.”
Source: Analog Devices andLinear TechnologyDatasheets.
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.
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∫
EE122, Stanford University, Prof. Greg Kovacs 47
LTC1064 Switched Capacitor Filter
Source: Linear TechnologyLTC1064 Datasheet.
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.
EE122, Stanford University, Prof. Greg Kovacs 49
More AD633 StuffSquaring Circuit
Square Root Circuit
(Note errors!)
Source: Analog DevicesDatasheet.
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
EE122, Stanford University, Prof. Greg Kovacs 51
Triangle Wave Input
EE122, Stanford University, Prof. Greg Kovacs 52
More AD633 Stuff
Amplitude Modulator
Divider Circuit
Source: Analog DevicesDatasheet.
EE122, Stanford University, Prof. Greg Kovacs 53
TremoloBox
EE122, Stanford University, Prof. Greg Kovacs 54
Multipliersin Filters
Voltage ControlledFilter Circuits
Divider Circuit
Source: Analog DevicesDatasheet.
EE122, Stanford University, Prof. Greg Kovacs 55
Example:Cheesy
Accelerometer
Gluing a 6-32 nutonto aninexpensivepiezoelectricbuzzer yields acheesy, butfunctionalaccelerometer.
EE122, Stanford University, Prof. Greg Kovacs 56
EE122, Stanford University, Prof. Greg Kovacs 57
Cheesy Peak-Reading Accelerometer
EE122, Stanford University, Prof. Greg Kovacs 58
Voltage-to-Frequency Converters
Source: NationalSemiconductorLM331 Datasheet.
EE122, Stanford University, Prof. Greg Kovacs 59
Voltage-to-Frequency Converters
Source: NationalSemiconductorLM331 Datasheet.
EE122, Stanford University, Prof. Greg Kovacs 60
Temperature-To-Frequency
Source: NationalSemiconductorLM331 Datasheet.
EE122, Stanford University, Prof. Greg Kovacs 61
Frequency-to-Voltage Converters
Source: NationalSemiconductorLM331 Datasheet.