You are on page 1of 61

Interface Circuits: Hooking Up To The Outside World

Prof. Greg Kovacs Department of Electrical Engineering Stanford University

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 are accomplished.
Component selection Schematic Simulation Prototyping of critical sections

Second Design Review. Fabrication and Testing.


EE122, Stanford University, Prof. Greg Kovacs 2

Interface Circuits
Interface circuits connect between conventional electronic circuits (op-amps, logic, etc.) to the outside world. They include circuits to buffer, amplify, and process 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 and milliamps of conventional circuits and their equivalents within several orders of magnitude.

EE122, Stanford University, Prof. Greg Kovacs

Power Driver Circuits


There are a variety of devices that one might want to drive that require more current or higher voltages than inexpensive op-amps can produce. Of course, one solution is to purchase specialty op-amps with high current or high voltage outputs. However, it is very useful to know how to extend the capabilities of op-amp (and logic circuit) outputs to avoid this, particularly when the more expensive approach is not warranted.

EE122, Stanford University, Prof. Greg Kovacs

Power Transistors/Heatsinks

EE122, Stanford University, Prof. Greg Kovacs

Unipolar Power Switches


For many output devices, one simply needs to switch a drive voltage on and off. In this case, one can use a bipolar power transistor with sufficient current gain (or a Darlington configuration) or a power MOSFET. Today, the most efficient choice is usually the MOSFET.

EE122, Stanford University, Prof. Greg Kovacs

Basic Switch
Can use BJT or MOSFET. If loads are inductive, need flyback protect diode. Can drive directly from TTL/CMOS logic instead (want logic-drive MOSFET or BJT). Use current-limit resistor for BJT.
EE122, Stanford University, Prof. Greg Kovacs 7

V2

V1

Flyback Protect Diode

VV+
Rg

Example Flyback Circuit


V+ 30 mH High voltage pulses out! 2N3440 1 k Pulse Source

EE122, Stanford University, Prof. Greg Kovacs

IRLZ-34 Logic-Level MOSFET


60V, 30A, 0.05 5V VGS

EE122, Stanford University, Prof. Greg Kovacs

Relay
EE122, Stanford University, Prof. Greg Kovacs 10

Pulse-Width Modulation
Pulse-width modulation, or PWM, offers a simple, DIGITAL output way of 10% modulating power. The idea is to vary the duty cycle of pulses from zero 50% to 100% and if the time constants of the device being driven are much 90% longer than the pulse times, a low-pass filtered equivalent power is obtained.
EE122, Stanford University, Prof. Greg Kovacs 11

Random PWM Ideas


Triangle Wave Generator

VV+

VOUT

VMOD

Source: National Semiconductor Linear 3 Databook

SG3525A/SG3527A LM3524 Dedicated PWM Chips

EE122, Stanford University, Prof. Greg Kovacs

12

DC Motors

EE122, Stanford University, Prof. Greg Kovacs

13

Bipolar Power Switches


V+

Drive

Load

Drive

EE122, Stanford University, Prof. Greg Kovacs

14

Modern Vacuum Tube Audio

EE122, Stanford University, Prof. Greg Kovacs

15

Power Inverters
Digital drive to transformer to generate higher or lower voltage. Can use to power fluorescent lights, AC appliances, or to generate higher DC voltages (need rectifier and filter). Can make negative supply rail.
EE122, Stanford University, Prof. Greg Kovacs 16

V+

MOSFET Power Driver

EE122, Stanford University, Prof. Greg Kovacs

17

HV Inverter

EE122, Stanford University, Prof. Greg Kovacs

18

Fashion Statement

EE122, Stanford University, Prof. Greg Kovacs

19

Power Voltage Sources


In some cases, a beefy and variable voltage source is needed (e.g., audio power amplifiers, signal generator outputs, power supplies, etc.) In this case, one can either purchase power opamps and use them in the standard configurations, or use power booster circuits with conventional, low-cost op-amps.

EE122, Stanford University, Prof. Greg Kovacs

20

THE COMPLEMENTARY EMITTER FOLLOWER AMPLIFIER ("PUSH-PULL")


A COMPLEMENTARY PAIR OF TRANSISTORS ARRANGED AS TWO EMITTER FOLLOWERS CAN PROVIDE LOTS OF POWER WITH INEXPENSIVE PARTS! VERY EFFICIENT (APPROXIMATELY 80%) CAN ALSO PROVIDE A DISTORTED SIGNAL DUE TO CROSSOVER DISTORTION CAN DO THE SAME WITH MOSFETS
V +V
CC

in

out

-VCC

THIS IS A "CLASS B" CIRCUIT


EE122, Stanford University, Prof. Greg Kovacs 21

CROSSOVER DISTORTION
+V
CC

in

out

-VCC

THERE IS A +/- 0.7 V "DEADBAND" WITHIN WHICH THE NEITHER TRANSISTOR IS CONDUCTING...

EE122, Stanford University, Prof. Greg Kovacs

22

A CLOSE LOOK AT THE DISTORTION

EE122, Stanford University, Prof. Greg Kovacs

23

OUTPUT SPECTRUM OF CLASS A AMPLIFIER WITH CROSSOVER DISTORTION

EE122, Stanford University, Prof. Greg Kovacs

24

REDUCING CROSSOVER DISTORTION WITH BIASING DIODES...


+V
CC

in

Vout

THIS IS A "CLASS AB" CIRCUIT

-VCC

EE122, Stanford University, Prof. Greg Kovacs

25

BETTER PERFORMANCE WITH FEEDBACK!


MAGIC SWITCH
+V
CC

R2

R1

V V
in

out

THE +/- 0.7V DEADBAND IS REDUCED TO

0.7 AVO

THE SLEW-RATE LIMITATIONS OF THE OP-AMP MEAN THAT THIS DEADBAND WILL STILL BE APPARENT AT HIGH FREQUENCIES....
EE122, Stanford University, Prof. Greg Kovacs

-VCC

26

HAYES & HOROWITZ SAY....

EE122, Stanford University, Prof. Greg Kovacs

27

SEE ANY DISTORTION?

EE122, Stanford University, Prof. Greg Kovacs

28

OUTPUT SPECTRUM OF THE SAME PUSH-PULL AMPLIFIER WITH FEEDBACK

EE122, Stanford University, Prof. Greg Kovacs

29

Peltier Devices

EE122, Stanford University, Prof. Greg Kovacs

30

Beer Cooler #2

EE122, Stanford University, Prof. Greg Kovacs

31

EE122, Stanford University, Prof. Greg Kovacs

32

The Bridge Configuration

Source: National Semiconductor LM12 Application Note.

EE122, Stanford University, Prof. Greg Kovacs

33

High Voltage Amplifiers


For high voltage opamp applications, recent price reductions in HV opamps make it possible to use standard configurations easily. www.apexmicrotech. com is a good source of chips and application notes.

EE122, Stanford University, Prof. Greg Kovacs

34

Current Sources/Sinks/Pumps
Many transducers require current sources to drive them (e.g., electromagnetic coils in some settings, lasers, LEDs, etc.). There are several simple current driver circuits that use op-amps to provide closed-loop control, and the high output impedances required. The basic principle is to sense the sourced (or sunk) current and convert it into a signal for feedback purposes. If the desired currents exceed the capabilities of the op-amp, external pass transistors are used.
EE122, Stanford University, Prof. Greg Kovacs 35

Classic Op-Amp Current Sink


V+

VIN IL = RF

VIN

Load

IL

EE122, Stanford University, Prof. Greg Kovacs

36

Beer-Locked-Loop
EE122, Stanford University, Prof. Greg Kovacs 37

Types of Sensors
Electromagnetic Coils Strain Gauges Accelerometers Microphones Optical (covered elsewhere) Temperature Sensors

EE122, Stanford University, Prof. Greg Kovacs

38

Sensor Signal Processing


Typical sensor signal processing involves (pre)amplification, filtering and sometimes some downstream functions. Downstream functions may include a comparator (decision) or A/D converter, sometimes preceded by a sample-and-hold circuit. In some cases (not covered in EE122), the sensor signal (before or after digitization) is transmitted to another location using telemetry.

EE122, Stanford University, Prof. Greg Kovacs

39

LM334 Temperature Sensor

Source: Linear Technology LM334 Datasheet.

Note that current-output sensors allow quite long wire lengths, since they are pretty much insensitive to cable resistance.
EE122, Stanford University, Prof. Greg Kovacs 40

Transresistance Amplifiers
Transresistance amplifiers simply translate current from a sensor into an output voltage. They are just inverting amplifiers without the input resistor. The transresistance gain is given in OHMS.

V+
Rf

VV+
Vout

EE122, Stanford University, Prof. Greg Kovacs

41

Transresistance Frequency Response


Quite often, high DC gain is desired without much AC gain or controlled roll-off. These are two example approaches to achieve such characteristics. In practice the top circuit is most often used.
EE122, Stanford University, Prof. Greg Kovacs
RF

1 AR = R f R f CS + 1

C1

Viin V+
RF

VOUT

RP

C1

Vi in V+ VOUT

R R CS + R f AR = P f CS R + R + 1 ( f P)

42

New Concepts to Enhance Productivity

EE122, Stanford University, Prof. Greg Kovacs

43

More on Instrumentation Amplifiers

Buffered voltage divider to set ground.

AD620

LT1167

Source: Analog Devices and Linear Technology Datasheets.


44

EE122, Stanford University, Prof. Greg Kovacs

Nerve Impulse Amplifier

Source: Linear Technology Datasheet.

This circuit amplifies the low level nerve impulse signals received from a patient at Pins 2 and 3. RG and the parallel combination of R3 and R4 set a gain of ten. The potential on LT1112s Pin 1 creates a ground for the common mode signal. C1 was chosen to maintain thestabilityofthe patientground.TheLT1167s high CMRR ensures that the desired differential signal is amplified and unwanted common mode signals are attenuated. Since the DC portion of the signal is not important, R6 and C2 make up a 0.3Hz highpass filter. The AC signal at LT1112s Pin 5 is amplified by a gain of 101 set by (R7/R8) +1. The parallel combination of C3 and R7 form a lowpass filter that decreases this gain at frequencies above 1kHz. The ability to operate at 3V on 0.9mA of supply current makes the LT1167 ideal for battery-powered applications. Total supply current for this application is 1.7mA. Proper safeguards, such as isolation, must be added to this circuit to protect the patient from possible harm.

EE122, Stanford University, Prof. Greg Kovacs

45

Switched Capacitor Filters


It is possible to build analog filters where instead of resistors to make RC time constants, analog switches and capacitors are used to simulate resistances. In some filter types (statevariable or biquad), built with integrators, the integrator gain controls the cutoff frequency therefore, you can sweep the cutoff frequency with the clock frequency!

Vout

1 = Vin dt R1 C1
C1 R1

VIN

VV+ VOUT

in

C2

C1

VIN

VV+ VOUT

Clock

Vout

C1 = f clock Vin dt C2
46

EE122, Stanford University, Prof. Greg Kovacs

LTC1064 Switched Capacitor Filter

Source: Linear Technology LTC1064 Datasheet.


EE122, Stanford University, Prof. Greg Kovacs 47

Analog Multipliers
These devices can be used for modulation (AM), basic multiplication, and a variety of other functions. The AD633 is a particularly easy to use chip.

Source: Analog Devices Datasheet.

EE122, Stanford University, Prof. Greg Kovacs

48

More AD633 Stuff


Squaring Circuit

Square Root Circuit (Note errors!)

Source: Analog Devices Datasheet.

EE122, Stanford University, Prof. Greg Kovacs

49

Squarer
AD 633 Vsupply = 15V Input f = 200 kHz Output f = 400 kHz

1 sin ( t ) = (1 cos(2 t )) 2
2
EE122, Stanford University, Prof. Greg Kovacs 50

Triangle Wave Input

EE122, Stanford University, Prof. Greg Kovacs

51

More AD633 Stuff


Amplitude Modulator

Source: Analog Devices Datasheet.

Divider Circuit
EE122, Stanford University, Prof. Greg Kovacs 52

Tremolo Box

EE122, Stanford University, Prof. Greg Kovacs

53

Multipliers in Filters

Divider Circuit Voltage Controlled Filter Circuits

Source: Analog Devices Datasheet.

EE122, Stanford University, Prof. Greg Kovacs

54

Example: Cheesy Accelerometer


Gluing a 6-32 nut onto an inexpensive piezoelectric buzzer yields a cheesy, but functional accelerometer.

EE122, Stanford University, Prof. Greg Kovacs

55

EE122, Stanford University, Prof. Greg Kovacs

56

Cheesy Peak-Reading Accelerometer

EE122, Stanford University, Prof. Greg Kovacs

57

Voltage-to-Frequency Converters

EE122, Stanford University, Prof. Greg Kovacs

Source: National Semiconductor LM331 Datasheet.

58

Voltage-to-Frequency Converters

Source: National Semiconductor LM331 Datasheet.


EE122, Stanford University, Prof. Greg Kovacs 59

Temperature-To-Frequency

Source: National Semiconductor LM331 Datasheet.


EE122, Stanford University, Prof. Greg Kovacs 60

Frequency-to-Voltage Converters

Source: National Semiconductor LM331 Datasheet.


EE122, Stanford University, Prof. Greg Kovacs 61