You are on page 1of 29

Computer Interface

Lecture
MSE-315
Lecture Mudassar Shehzad
Computer Interface
• In computer interface the interface is a shared
boundary across which two separate
components of a computer system exchange
the information.
• The exchange can be between
– Software
– Computer hardware
– Peripheral devices
– Humans and combination of these etc
P-N Junction diode
• Neither conductor nor insulator
– Called semiconductor
• Most are
Forming covalent
– Germanium Belong to group 4
Bond with neighboring
Tetravalent having
– Silicon Valency = 4 Atoms

• At room temperature the resistivity of


semiconductor is in-between the conductor
and insulator
– Show the negative temperature coefficient
P-N Junction Diode
• When temperature increases
– Valence bond breaks
– Electron sets free
– Jump to the conduction band
INTRINSIC Semiconductors
EXTRINSIC Semiconductors
Pure Si or Ge
No of P = No of N type or
 N-Type
No of Holes = No of Electrons
Majority careers
= Electrons
Minority Careers
= Holes

When P, As, Sb (Pentavalent elements) is/are doped with Silicon called N Type semiconductor
P-N Junction Diode
 P-Type
Majority careers
= Holes
Minority Careers
= Electrons

Notation of PNP and NPN


C= Collector, E= Emitter and B= Base

Forward Bias Reverse Bias Forward Bias Reverse Bias

Circuit= ON Circuit= OFF Circuit= ON Circuit= OFF


P-N Junction Diode

Forward Bias Reverse Bias Forward Bias Reverse Bias

Circuit= ON Circuit= OFF

For Forward Bias = Output= 1


For Reverse Bias = Output = 0

1
1
1 1
0 0 0
P-N Junction Diode

1
1
1 1
0 0 0

(1010110)2 =0110101

2
1x2
0 So on
0x2

1x21
Logic Gates
Operational Amplifier
Important basic properties of an Op
– Amp
output
High input impedance
Low output impedance
+
Large gain (104 to 106)
Only three critical connections: Wide unity gain bandwidth
• Inverting Input (–) Negligible output when inputs are equal
• Non-inverting Input (+)
• Output Basic operating principles
1. It draws negligible current into its inputs.
2. It will do whatever it can to make the difference between the inputs 0.
3. It is an active device which drives its output from its power supply. Its
response is limited by what its power supply can deliver.
The Inputs

The notation on the inputs has nothing to do with the polarity of the signal but
instead indicates the phase relationship an input signal has with an output
signal.


V
time +

+
Open Loop Configuration

Voutput = b (V+ – V–)

Gain b = 106

V– –
Voutput
V+ +

When input difference is 15 µV, the output is 15 V, the power supply maximum.
+15
15 µV

15 µV Open Loop Configuration is not useful.

–15
Frequency Response of Op Amp

Note how the extremely high gain is applicable only at very low frequencies.
The gain decreases as the frequency increases.

Thanks again to Tony van Roon for the figure.


Closed Loop Configuration

Op Amps are employed usefully when the output signal is fed back into one of
the inputs through some passive electronic device.

diode
resistor
capacitor
wire

V– –
Voutput
V+ +
Voltage Follower

This configuration uses negative feedback : the output is connected to the


inverting input.

b(V+–V– )=Vo V– –
Voutput
but Vo = V– +
V+
so b(V+–Vo )=Vo
Purpose: A voltage follower buffers a delicate
bV+=Vo + bVo investigation system from a demanding
bV+=(1 + b)Vo measurement system.

But b is huge (106) Op amp draws negligible input current (not


disturbing the investigation system) while
b  (1 + b) being able to deliver significant output
 V+=Vo current (to meet the demands of the
measurement system) in such a way that the
output voltage is the same as the input
voltage.
Current Amplifier

This configuration will convert a small input current into an output voltage that can
be easily measured.

iin = i– + ifeed
Rfeedback
but i–  0
iin = ifeed ifeed
iin i– –
Iin
and since V– = V+ = 0
Vo
Vo = -if Rf = - iin Rf +

If iin = 1 µA and Rf = 100 k, then Vo = 0.1 V = 100 mV


Voltage Amplifier

Perhaps the most widely used op amp configuration is that of a voltage amplifier.

Vin produces an Iin Rf


to flow through Rin.
By the same Rin
analysis as for the Vin –
current amplifier, Vo
we find that +

Vin / Rin = – Vo / Rf
or
Vo = – [Rf/Rin] Vin The output voltage is scaled to the input voltage by the
ratio of the two resistors. The gain of the circuit is now
controlled by the resistor values and not the inherent op
amp open loop gain. If Rf is larger than Rin, we have an
amplifier; if Rf is less than Rin, we have an attenuator.
Integrator

The input current demands a matching feedback current which is delivered by


the op amp by changing the output voltage.
Cf

Rin Reset switch


dq dV
 iin  –C f 0 Vin –
dt dt Vo
Vin dV +
 –C f 0
Rin dt
Vin The reset switch
dV0  – dt discharges the
Rin C f
capacitor and
V0 f
1 t prepares the circuit
 dV0  –  Vin t ) dt
Rin C f 0
for another charging
0 cycle.
Differentiator

By switching the capacitor and resistor in the integrator circuit, we obtain a


differential response for the output voltage.
Rf
Vo(t) = – Rf Cin dVin(t)/dt
Cin
Vin –
Vo
+

The output voltage is large when the rate of change of the input voltage is
large. This circuit can be used for detecting “spikes” in a signal that need to
be identified or guarded against or eliminated.
Logarithmic Amplifier

Many chemical properties have an exponential response (think pH, for example).
This circuit can nicely linearize such a response.

diodef
Vo  – log(Vin/Rin)
Rin
Vin –
Vo
+

By switching the diode and resistor, we can make an antilogarithmic


(exponential) amplifier. Circuits are more commonly made using a transistor
instead of a diode.
Comparator

A useful circuit that answers the question “Is the input voltage greater than or
less than a given reference voltage?”

Because of the huge open loop gain of Vin –


the op amp, the output voltage is driven Vo
to the power supply limits (±15 V) Vref +
whenever the input exceeds or remains
below the reference voltage.

When Vin is on the inverting input, Vo • This circuit turns a sine wave into
assumes the reverse sign; a non- a square wave.
inverting comparator can be formed by
switching the input and reference. • Often finds use as a trigger circuit.
• Charge a capacitor and feed it
back to the reference input –
“remembers” peak value.
Summing Amplifier

We can run several voltages in parallel to produce a summing effect at the output.
R1 Rf
V1
R2
V2 –
R3 Vo
If R1 = R2 = R3 = R then +
V3
Vo = – [Rf/R] (V1 + V2 + V3)

V V V 
If R1 = R2 = R3 = Rf then V0  – R f  1  2  3 
 R1 R2 R3 
Vo = – (V1 + V2 + V3)

If R1 = R2 = R3 = 3Rf then
Vo = – [1/3] (V1 + V2 + V3)
Multiplying Amplifier

By combining a summing circuit with logarithmic and antilogarithmic circuits, we


can multiply two voltages together.

R R
log log A
A
amp

R antilog
log AB
B amp
amp log B +
log A + log B
Difference Amplifier

With this, we can determine the difference between two voltages.


Rf
R1 = R2 and Rf = R3, then
R1
Vo = [Rf/R1] (V2 - V1) –
V1
Vo
+
V2
R2
R1 = R2 = Rf = R3, then R3
Vo = (V2 - V1)
Dividing Amplifier

Combining a difference amplifier with log/antilog circuits allows us to divide to


voltages.

A log R
amp –
antilog
B/A
+ amp
B log
amp R
R
Instrumentation Amplifier

This is a high precision, very stable difference amplifier which is at the core of
most modern instrumental measurements.
+
V1 R6
• Very high CMRR –
R2 R4
• Fixed, precision, internal gain –
R1 Vo
• Always used as difference amp +
R3 R5
– R7
V2 +
Note: The op amp common-mode rejection
ratio (CMRR) is the ratio of the common-mode
 R6  R1  2 R2 
V0      V2  V1 ) gain to differential-mode gain. For example, if
 R4  R1  a differential input change of Y volts produces
when R2  R3 ; R4  R5 ; R6  R7 a change of 1 V at the output, and a common-
mode change of X volts produces a similar
change of 1 V, then the CMRR is X/Y.
Example: A Spectrometer

A simple spectrometer can be built around an op amp. A photodiode can be


used as a transducer; its resistance changes when light impinges on it.
Resistance is inversely proportional to the power of the impinging light source.

Vo = -(Rref/Rsample) Vsource
Vo = k (Psample/Pref) Sample Reference
solution solution (blank)

Rsample Rref
Vsource –
Vo
+
Example: Conductance Cell

This is a commonly used detector in devices such as HPLC and ion chromatography
and some titrations. In this instrument, note the presence of a standard resistor to
regularly calibrate the instrument. The variable resistor can change the gain to
cover a larger range of possible cell conductances.
Rvariable

Rcell –
rectifier
+

Rstandard
meter
Example: Thermocouple

Thermocouples are used in pairs; the voltage difference is related to the


temperature. A difference amplifier is perfect for this job.

Vo = [Rf/Rin] (Vt - Vs)  T(Vo) Rf

Vs Rin
copper –
Vo
constantan copper +
Vt Rin

Standard Test Rf
temperatur temperatur
e 0 ˚C e?

You might also like