You are on page 1of 49

Lecture 3

Circuits and Electronics


Chapter 3 and Notes

 Intro to basic circuits principles


 Passive, active circuits; circuit laws
 Filters
 Op amps (ideal, nonideal amplifiers)
 Active circuits with op amps
 Applications and problems
Electronic Components
There are two classes of components: Passive and Active
• PASSIVE: Resistors, capacitors, transformer/inductor etc. are known as
passive devices. Their properties do not depend actively on currents/voltages
applied. Their properties are usually linear.
• ACTIVE: Diodes, Transistors (various types; analog/digital such as bipolar,
field effect used in analog circuit and MOS/CMOS used in digital circuits), LED/
photodetector, op amp, digital integrated circuits. Their properties are usually
nonlinear

Another way to classify: Analog vs. Digital


• ANALOG: The component response is continuously and proportionally
dependent on the input (may be linear or nonlinear). Good example: amplifier
• DIGITAL: The component response is essentially 1 or 0 (ON or OFF). These
are usually used in digital circuits, computer memory and processors. Good
example: Microprocessor
RESISTORS
I

V  IR

Resistor color code: BBRWYGBVGW (Black, Brown, Red, White,


Yellow, Green, Blue, Violet, Gray, White: 0, 1, 2…, 9)

Resistors have tolerance: +5 or 10% (1% for extra cost)


2 2
Power level: ¼ W to many W (W: watts): P = V * I = I R = V R
Applications? Light bulb, electric iron, …
CAPACITORS – DC
I
dVC
I C
dt
1
VC   idt
C

The capacitor charges


linearly till the voltage across
it reaches the applied
voltage after which the
driving force is lost and the
capacitor ‘blocks’ DC.
RC CIRCUIT – DC

VC (t )  V (1  e  t / RC )
- VC +

This is similar but the


capacitor charges non-linearly
till the voltage across it
reaches the applied voltage
after which the driving force is
lost. Time constant τ=1/RC is
τ the time in which the
capacitor is charged to 63%
RC CIRCUIT – DC

After a capacitor has charged to


- VC(t) +
I V0, it discharges if there is a
resistance in the external circuit
(otherwise it retains the charge :
use in DRAMs). The discharge is
 t / RC
non-linear V C (t )  V0 e

• We will return to Capacitors in the section ‘Impedance’ to consider


their frequency response.
DIODES
I

If V > VON of diode, V  VON


I
R
Forward bias, conducting

I 0

Reverse bias, non conducting


BIPOLAR JUNCTION
TRANSISTORS
IC Base, Emitter, Collector
IB
I E  I B  IC
IE  IC 
VBE  0.060 log 13  at 27°C
 10 
BJT AS A SWITCH
If Vin is high, T is ON,
switch is closed and
Vout is low.
If Vin is low, T is OFF,
switch is open and
Vout is high.
CIRCUIT ANALYSIS : KIRCHOFF’S
CURRENT LAW
Irrespective of the
components attached, the
sum of all currents entering a
node is zero.
1. Current into node : +ve
2. Current leaving node : -ve

Therefore at A,  I  0  i1    i2    i3   i4  i2  i3  i1  i4
Therefore at B,  I  0  i4  i5  i6  i4  i5  i6  0
CIRCUIT ANALYSIS : KIRCHOFF’S
LOOP LAW
+ - Thus in the loop,

- +  V1 due to (2)
 i1 R1 due to (1)
In a closed loop, the sum  V2 due to (2)
of all voltage drops is zero.
 i1 R2 due to (1)
1. Current travels from
0
higher potential to lower.
2. Positive current flows  V1  V2 
 i1   
from + to – inside a voltage
 R1  R2 
source.
Thevenin equivalent
Any circuit of resistors
and sources can be
reduced to a single
source and resistor –
the Thevenin’s
equivalent.
VThev is the voltage seen between A and B
= VR3/(R1+R2+R3)
Rthev is the resistance seen between A and B with
the source shorted
= R3 || (R1+R2) = R3(R1+R2)/(R3+R1+R2)
VOLTAGE DIVIDER
 V1 
I   
 R1  R2 
I
V2  IR2
 R2 
V2  V1  
 R1  R2 
COMBINING RESISTORS
Series: from Kirchoff’s IInd law,
- v1 +
+

V-V1-V2=0
i => V =V1+V2
v

- v2 +

=iR1+iR2=i(R1+R2)
also V=iR=i(R1+R2).
-

i1 Thus R=R1+R2. [ergo]


Parallel:from Kirchoff’s Ist law,
+

i2 i3
i1=i2+i3
v

=(V/R3)+(V/R4)
-

=V(R3R4/(R3+R4))
also i1=V/R
Thus R=R3R4/(R3+R4). [ergo]
COMBINING CAPACITORS

Series

Parallel
IMPEDANCE
•Different from RESISTANCE as it includes a frequency
component – dependent on the frequency f (in Hz) of
the input.

1
ZR Z
j 2fC

Frequency Inversely dependent


independent on frequency
Return to Capacitance : frequency
1
We saw Z  in frequency or fourier domain
j 2fC

1
Z in Laplace domain
sC
Thus for analyzing circuits with capacitors, we
assume them to have the above resistance. So
the result we get is frequency dependant. This
is called the frequency response of circuits. We
will encounter this in filters.
FILTERS : FREQUENCY
SENSITIVE CIRCUITS
Recall voltage divider,
 1 
 
VOUT  VIN 
j 2fC   V  1 

IN 
 1   1  j 2fRC 
 R  
 j 2fC 

As f increases from 0 onwards, VOUT/VIN (the TRANSFER


FUNTION) goes from 1 to 0. Thus high frequencies are
attenuated. Thus this is a LOW PASS FILTER.
FILTERS : FREQUENCY
SENSITIVE CIRCUITS
Recall voltage divider,
 
 
VOUT  VIN 
R   V  j 2fRC 
IN  
 1   1  j 2fRC 
 R  j 2fC 
 

As f increases from 0 onwards, VOUT/VIN (the TRANSFER


FUNTION) goes from 0 to 1. Thus low frequencies are
attenuated. Thus this is a HIGH PASS FILTER.
FILTERS: TRANSFER FUNCTION
The VOUT/VIN of circuits is called their Transfer Function.
It is a function of the frequency of operation. It is
denoted by H(f). Thus,
For LPF  1 

H( f )   
 1  j 2fRC 

And for HPF  j 2fRC 


H ( f )   
 1  j 2fRC 
FILTERS: FREQUENCY
RESPONSE
The transfer function exists in the complex number domain. A
plot of H(f) is a powerful way to analyse it. There are 2 parts
to such a plot (called Bode plot). A magnitude part and a
phase part. Shown is a magnitude Bode plot of a LPF.

Blocked x axis: log(frequency)


y axis: absolute value of
~70.7% H(f) = |H(f)|
fC is the frequency on one
side of which H(f)~0 or
fC the circuit blocks those
frequencies. It is the
cutoff frequency.
OPTOELECTRONICS

LED : light emitting diode


Phototransistor : light
sensitive device
Recall BJT as a switch, if
Possible barrier light falls on the BJT it is a
closed switch else open.
Can use to detect barriers
– burglar alarms etc.
OPAMPS
Basic and most common circuit
building device. Ideally,
1. No current can enter terminals
V+ or V-. Called infinite input
impedance.
2. Vout=A(V+ - V-) with A →∞
3. In a circuit V+ is forced equal to
V-. This is the virtual ground
property
4. An opamp needs two voltages to
power it Vcc and -Vee. These are
called the rails.
OPAMP: COMPARATOR
Vout=A(Vin – Vref)
If Vin>Vref, Vout = +∞ but practically
hits +ve rail = Vcc
If Vin<Vref, Vout = -∞ but practically
hits –ve rail = -Vee
Application: detection of QRS complex in ECG

VREF Vcc

-Vee
VIN
OPAMP: ANALYSIS
The key to op amp analysis is simple
1. No current can enter op amp input terminals.
=> Because of infinite input impedance
2. The +ve and –ve (non-inverting and inverting)
inputs are forced to be at the same potential.
=> Because of infinite open loop gain
3. These property is called “virtual ground”
4. Use the ideal op amp property in all your
analyses
OPAMP: VOLTAGE FOLLOWER
V+ = VIN.
By virtual ground, V- = V+
Thus Vout = V- = V+ = VIN !!!!
So what’s the point ? The point is, due to the
infinite input impedance of an opamp, no current
at all can be drawn from the circuit before VIN.
Thus this part is effectively isolated.
OPAMP: INVERTING AMPLIFIER
1. V- = V+
2. As V+ = 0, V- = 0
3. As no current can enter
V- and from Kirchoff’s
Ist law, I1=I2.
4. I1 = (VIN - V-)/R1 = VIN/R1
5. I2 = (0 - VOUT)/R2 = -VOUT/R2 => VOUT = -I2R2
6. From 3 and 6, VOUT = -I2R2 = -I1R2 = -VINR2/R1
7. Therefore VOUT = (-R2/R1)VIN
OPAMP: NON – INVERTING
AMPLIFIER
1. V- = V+
2. As V+ = VIN, V- = VIN
3. As no current can enter
V- and from Kirchoff’s
Ist law, I1=I2.
4. I1 = VIN/R1
5. I2 = (VOUT - VIN)/R2 => VOUT = VIN + I2R2
6. VOUT = I1R1 + I2R2 = (R1+R2)I1 = (R1+R2)VIN/R1
7. Therefore VOUT = (1 + R2/R1)VIN
DIFFERENTIAL AMPLIFERS
VOUT = (V1 – V2)R2/R1
Amplifies a difference.
Common noise sources
add symmetrically to an
opamp. Thus there is a
differential (V1 – V2) and a
common mode (V1 + V2)
Thus ,
component to the input.
VOUT = AC(V1 + V2) + AD(V1 – V2)
AD:differential (signal) gain, AC:common mode (noise)
gain.
The ratio AC/AD (Common Mode Rejection Ratio – CMRR) is
SUMMING AMPLIFIER
Recall inverting
If
amplifier and
If = I 1 + I 2 + … + I n

VOUT = -Rf (V1/R1 + V2/R2 + … + Vn/Rn)


DRIVING OPAMPS
•For certain applications (e.g. driving a motor or a
speaker), the amplifier needs to supply high
current. Opamps can’t handle this so we modify
them thus
Irrespective of the opamp
circuit, the small current it
sources can switch ON
the BJT giving orders of
magnitude higher current
in the load.
RECTIFIERS

Original input

Half wave rectified output

Full wave rectified output


RECTIFIERS
Recall Diodes, inverting amplifier, comparator, voltage
divider.
If VIN>0, VOUT = VIN,
Half wave If VIN<0, VOUT = 0

If VIN>0, A = -Vee, diode


is off, VOUT =
VIN(3R/(2R+R+3R)) =
VIN/2 (divider)
Full wave
If VIN<0, A = Vcc, diode
is on, VOUT =
-VIN(R/2R) = -VIN/2
NONLINEAR AMPLIFIER
Recall BJT. VOUT = -VBE
VBE=0.06log(IC/10-13)
Due to opamp, IC = VIN/R
Thus VOUT = -0.06log(VIN/10-13R)
ACTIVE FILTERS
Recall impedance,
inverting amplifier.
The feedback
resistance is R in
parallel with 1/j2fC
= R/(1+j2fRC)

VOUT/VIN = R2/R1 = R/(1+j2fRC)R = 1/(1+j2fRC)


= 1 at f = 0 and = 0 as f →∞ therefore LPF
Cutoff frequency f = 1/ 2 sqrt(RC) (where |H(f)|=0.707)
ACTIVE FILTERS
Resistance R is in
parallel with the
capacitor,
impedance is R in
series with 1/j2fC
= R+1/ j2fC

VOUT/VIN = R2/R1 = j2fRC/(1+j2fRC)


= 0 at f = 0 and = 1 as f →∞ therefore HPF
Cutoff frequency f = 1/ 2 sqrt(RC) (where |H(f)|=0.707)
FILTERS AS INTEGRATORS
AND DIFFERENTIATORS
1
LPF, VOUT = 0 -
C  idt
i Thus it is like an integrator

+ VC -
HPF, VOUT = 0 – iR = -RC dVC/dt

i
Thus it is like a differentiator
Electric Circuits – overview

• What are the different electrical circuit components?


R, C, diode, transistor, transformer, inductor…
 
• What are the circuit analysis laws?
What is Ohm’s law
Kirchoff’s current law (current at a node sums to zero): think of
water pipes distributing water through finer pipes at a node
Kirchoff’s voltage law (voltage around a loop sums to zero): think
of going up and down the hill and gaining/loosing potential energy

•Develop simple circuits (buy parts at an electronic store such as Radio


Shack and build hobby prototypes)
Battery voltage applied to a beeper (match voltages)
Battery voltage applied to an electric motor (“) via a switch
Battery connected via a resistor to an LED
Develop time-varying circuits using capacitors
Capacitor charging/discharging through a resistor
Calculate the time constant
Calculate the time varying charge and discharge equation
Electronic circuits - Overview

Semiconductors such as Si and Ge

Diode: current in one direction


Come up with one or two applications of diodes

Transistor: amplifies current (current in the collector-emitter path is


amplified version of the current in the base)
Use of a transistor to amplify audio sound: interface a
microphone and a loud speaker

Operational amplifier
Ideal op amp, Real op amp
Use an op amp to compare a signal with a threshold voltage
Use an op amp to amplify low level microphone signal
Case Studies

  Applications of dc circuits
Voltage across a cell membrane
   Ion channel currents
   Voltage clamp
   Patch clamp

Applications of time varying circuits


       Charging and discharging a capacitor
Charging and discharging a defibrillator
Amplifier Properties:
Ideal vs. Nonideal
  Gain Bandwidth Input Output Noise Common
(open (frequency impedance impedance (uV/sqrt mode
loop) response (interfacing (interfacing (Hz) or rejection
Hz) to sensors) to load) uA/sqrt (diff
(Hz) gain/comm
on mode
gain)

Ideal     0 

Nonideal 10 e 6 1 M Hz 100 Mohms 100 ohms 1 uV, 1 100,000


nA

 
Example ? ? ? ? EEG ?
Calculate the current in the following circuit. What is the equivalent
resistance of the two resistors in parallel?

110 V ac 11k ohms 11k ohms

Calculate the voltage across each resistor. What is the equivalent


resistance value of the two resistors in series?

3k ohms

6k ohms
Use Kirchoff’s current law and voltage law to calculate the current through
and voltage across each of the resistors.

3k ohms 4k ohms

6k ohms 2k ohms
9 V dc

3 V dc

In the following circuit, put a switch so that the LED would light up when
turned on. Will this LED light up (hint: find the current direction)?

3k ohms 4k ohms

6k ohms 2k ohms
9 V dc

3 V dc
Calculate the rate of charging (time
constant) for the following circuit. What
R = 3k should be the value of the capacitor to
3 V dc
ohms
C
achieve 10 second time constant? How
long will it take for the capacitor to “fully”
charge? What will be the current in the
circuit when the capacitor is fully charged?

• Design a defibrillator circuit as follows. We want to deliver a 1000 Volt pulse


for 10 ms when the physician commands it. This would be done in two steps.
The first step is the “charge” command, and the second step is the discharge
or shock command.
• Draw the shape of the defibrillator pulse that was produced by a charging a
capacitor of 100 F through a resistor of 100 ohms and then discharged
through a resistance of 1 k ohm.
• In the class, we gave the formula for power as P = VI and the energy as E =
VI T. Derive the formula for energy in terms of voltage and resistance R.
That is, the current I is flowing through resistance R when voltage V is applied.
• Calculate the energy consumed by a pacemaker which has to produce a 1
ms pulse of 5 Volt amplitude for 10 years. The pacemaker delivers the pulse
in a heart with 50 ohm resistance.
We would like to measure small displacements or strains using strain gauges.
These are variable resistances that respond to small changes in strain/stretch-
contraction of the surface the sensor is mounted on. (i) suggest a suitable
application. (ii) A useful design is to put the strain gauge in a bridge circuit
design. Calculate the output of the following circuit for a very small dR
changes with respect to the R values of the bridge elements. Hint: The output
should be a relationship between V, R, dR, Rf and Vo.

Vs

Rf

R
R

Vo
R+dR
R
This is a circuit of a comparator (note the positive
feedback). What would be the output of this
circuit for the following input voltages: -5 V, -1 V,
+1 V, and +5 V? The op amp is powered by + 10
2k
ohms V (that would also be the maximum swing of the
10 k ohms output).

You visit a hospital and see a state of


the art ECG monitoring instrument.
You open up the technical manual
and the following circuit is presented
to you. Ostensibly, this circuit is at the
output of the ECG amplifier (i.e. the
amplified ECG goes to this circuit) ?
and the output (marked ?) goes to a 1 sec
comparator. C= 1 uF and
C R
R=330Kohm. Draw the signal you
expect to see at the point marked by
a question mark.
For the following circuit, what is the input impedance and the output
impedance. Now, calculate the closed loop gain. Use basic circuit analysis
ideas using op amps to work through the analysis (Hint: identify the virtual
ground, obtain currents in the input and the feedback paths, obtain input-
output relationship).

R1 R2
R3
R0

Vin
Draw the circuit of a differentiator –OR– integrator.
-         Now, through circuit analysis show why that circuit works like a
differentiator/integrator (i.e. derive the relationship between output and input of
the amplifier to show using your equation that the input signal is
differentiated/integrated.
-         Next, obtain the frequency response of this circuit. E.g. you can derive a
transfer function (output over input) in the Laplace form, substitute s=j and
then show the frequency response.
-         Point out one major advantage and one major disadvantage of an analog
differentiator/integrator over a digital/software version.
-         Describe (very briefly) a biomedical instrumentation application of an
integrator or differentiator.
For the following circuit, calculate the input resistance. (i) First, calculate
input resistance for an ideal amplifier. (ii) Next, calculate the input
resistance of a non-ideal amplifier. Note that the input resistance of the op
amp is Rin (not shown, but your can assume such a resistance going to
ground from each of the – and + inputs).

R1
Rf
Vin

Vout

R2

You might also like