Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

EE230: Lab 3

OpAmp Circuits
Aakanksha Jain, 20D070001
January 30, 2022

1 Overview of the experiment


1.1 Aim of the experiment
To perform NGSpice simulations on the OpAmp circuits to build Half-wave
and Full-wave rectifier circuit

1.2 Methods
1.2.1 Half Wave Precision Rectifier
Analyzing the two Rectifier circuits (A & B) where one part (B) have both
diodes inverted, with a sinusoidal input of amplitude 5V and 1KHz frequency.

1.2.2 Full Wave Precision Rectifier


Analyzing the rectifier circuit (B) which is now clubed with an inverting
OpAmp and here we will be using circuit(B) as a subcircuit.

1
Figure 1: BJT circuit

2 Simulation results
2.1 Code snippet
2.1.1 Half-Wave Rectifier
Rectifier A

*Including the predefined op-amp subcircuit file


.include ua741.txt
.include Diode 1N914.txt
*Connections as mentioned in subcircuit file
x1 0 1 2 3 4 UA741
r1 5 1 10k
r2 6 1 10k
rl 6 0 1k
d1 1 4 1N914
d2 4 6 1N914
vcc 2 0 dc 15v
vee 3 0 dc -15v
vin 5 0 sin (0 5v 1k 0 0)

2
.tran 0.5ms 6ms
.control
run
plot v(6) v(4) v(5)
print v(6) v(4) v(5) output
.endc
.end

Rectif ierB

*Including the predefined op-amp subcircuit file


.include ua741.txt
.include Diode1N914.txt
*Connections as mentioned in subcircuit file
x1 0 1 2 3 4 UA741
r1 5 1 10k
r2 6 1 10k
rl 6 0 1k
d1 4 1 1N914
d2 6 4 1N914
vcc 2 0 dc 15v
vee 3 0 dc -15v
vin 5 0 sin (0 5v 1k 0 0)
.tran 0.5ms 6ms
.control
run
plot v(6) v(4) v(5)
print v(6) v(4) v(5) output
.endc
.end

2.1.2 Full-Wave Rectifier


Using Rectifier B and clubbing with an inverting OpAmp

*Including the predefined op-amp subcircuit file

3
.include ua741.txt
.include Diode1N914.txt

*Connections as mentioned in subcircuit file


.subckt half 0 5 6
r1 5 1 10k
r2 6 1 10k
rl 6 0 1k
x1 0 1 2 3 4 UA741
d1 4 1 1N914
d2 6 4 1N914
vcc 2 0 dc 15v
vee 3 0 dc -15v
.ends
x1 0 1 2 3 4 UA741
x2 0 5 6 half
r1 5 1 10k
r2 6 1 5k
r3 4 1 10k
rl 4 0 1k
vcc 2 0 dc 15v
vee 3 0 dc -15v
vin 5 0 sin (0 5v 1k 0 0)
.tran 0.5ms 6ms
.control
run
plot v(4) v(5)
print v(4) v(5) output
.endc
.end

4
2.2 Simulation results
2.3 Half-Wave Rectifier
2.3.1 Rectifier A

Figure 2: Voltage

5
2.3.2 Rectifier B

Figure 3: Voltage

6
2.4 Full-Wave Rectifier

Figure 4: Voltage

You might also like