OP-AMPS AS
COMPARITORS
Electronics Project
Juan-Wian Coetzer
TABLE OF
CONTENTS
Introduction ............................................................... 1
Parts List ............................................................................... 1
The circuit ................................................................. 1
Concept ................................................................................ 1
Voltage divider ..................................................................... 2
LM741 Op-Amp ..................................................................... 3
The building process ............................................................. 5
The circuit in operation ......................................................... 7
Conclusion ............................................................................ 8
Bibliography ......................................................................... 8
Introduction
This project is to build a circuit that uses two op-amps as comparitors.
This can convert analogue signal to digital signal using LM741 op-
amps. The idea is to switch on various outputs as voltage increases. I
will use a voltage divider to split the voltages to vary the outputs.
Parts List
1. 2x 330W Resistors 10. Wire cutters
2. 3x 33KW Resistors 11. Wire strippers
3. 2x LED’s 12. Computer and Circuit wizard
software
4. 2x LM741 Op-Amps
13. Power supply
5. Breadboard
14. Pen and paper
6. Prototyping board
7. Soldering Iron and solder
8. Wire
9. Potentiometer
The circuit
Concept
The method of how the circuit works is to convert analogue signal to
digital signal so that a potentiometer can be used to vary the voltages.
A potentiometer will be used to adjust the voltage om the non-
inverting input.
When the reference voltage is between 0-3v there will not be any LED
lit. Between 3-6v the first output will be active turning the 1st LED on,
between 6-9v the second output will be active as well turning the 2nd
LED on.
0-3V 3-6v 6-9v
Voltage Divider
A voltage divider is a series of resistors that can be tapped at any
point to give a fraction of the original input voltage.
In order to get the three voltage ranges required, I need to include a
voltage divider into my circuit. I will use resistors in order to reduce
the voltage from the original input of 9 volts.
I need to calculate what value of resistors I will need to split the
voltage. For that I will use Ohms law. Ohms law states that electrical
current is proportional to voltage and inversely proportional to
resistance.
Here is the formula I used. V=Voltage I=Current R=Resistance
2
According to my calculations I will need three 33KW resistors to divide
the voltage equally into 3.
6.6v=1mAh x 33k
3.3v=1mAh x 66k
The input voltage to the
reference voltage pin is 6
Volts
The input voltage to the
reference voltage pin is 3
Volts
LM741 Op-Amp
An Operational Amplifier, or op-amp is a voltage amplifying device
designed to be used with external feedback components such as
resistors and capacitors between its output and input terminals. It is a
high-gain electronic voltage amplifier with a differential input and
usually a single-ended output.
(Electronics For You, 2018)
3
The LM741 has an inverting and non inverting input.
• Non-inverting input: The • Inverting input: The operational
operational amplifier non- amplifier inverting input is marked
inverting input is marked by a by a "-" sign on the circuit diagram.
"+" sign on the circuit diagram. A positive voltage applied to the
It is found that a positive voltage inverting input will produce a
applied to the non-inverting negative swing at the output.
(Electronics-notes.com, 2018)
input will produce a positive
swing at the output.
Inverting input: The operational
"# &"#
GAIN = 1+( ) GAIN =
"$ "$
Example : if R2 is Example : if R2 is 10
10 kilo-ohm and R1 kilo-ohm and R1 is 1
is 1 kilo-ohm the kilo-ohm the gain
gain would be : would be :
$% &$%
1+ ( ) = 1 + 10 = -10 (Gain AV)
$ $
OR If the input voltage is
GAIN (AV) = 11 0.5v the output
If the input voltage voltage would be :
is 0.5v the output 0.5v X -10 = -5v
voltage would be :
0.5 X 11 = 5.5v
In the case of my project, the op-amp is used as a comparator. When
used in this state the op-amp compares the two voltages and decides
what the output will be. If Voltage in > Reference voltage the output
will be V+ and if Voltage in < Reference
voltage the output will be V-
With this concept V+ will be supplied out the
LED when the potentiometer is turned to
have a voltage equal to or greater than the
reference voltage of the comparator.
4
The Building Process
The first step in the process was to build and test the circuit on circuit
wizard. The tests worked on circuit wizard and I collected the required
components after consulting a catalogue for specifications. I built the
circuit on a breadboard and tested it.
This is a screenshot showing the working circuit in circuit wizard.
When testing the first circuit I built both LED’s came on without
adjusting the potentiometer. I looked for the fault and realized I read
the schematic wrong and swapped leg 2 and 3. After correcting my
mistake I tested the board again and it worked.
5
After the successful test of my prototype
on the breadboard, I Built the circuit on a
prototyping board. In order to prevent
the legs of the LM741 to short out I
needed to cut the strips on the bottom of
the prototype board.
I completed the circuit on the prototype board, but when I tested
it the 3V led would not turn on. I inspected the back of the board
and realized there was a small piece of solder bridging the legs of
the LED. After removing the solder I tested the board and it
worked successfully.
6
The Circuit in Operation
When the voltage
controlled by the
potentiometer connected
to leg 3 is between 0-3v
none of the LED’s are
illuminated.
When the voltage
controlled by the
potentiometer connected
to leg 3 is between 3-6v
one of the LED’s are
illuminated.
When the voltage
controlled by the
potentiometer connected
to leg 3 is between 6-9v
both of the LED’s are
illuminated.
7
Conclusion
Op-Amps were not originally designed to be used as a comparator, but
with smart engineering there are a huge amount of applications for
this. It is crucial to make sure that the op-amp chosen would be able
to perform well at the task without being a risk. My circuit shows how
an op-amp can successfully be used paired with a voltage divider and
a potentiometer as a comparator.
Bibliography
Anon, (2018). [online] Available at: https://www.electronics-
tutorials.ws/opamp/op-amp-comparator.html [Accessed 4 Mar.
2018].
Electronics For You. (2018). Op-amp Basics: What is an Operational
Amplifier | Tutorial. [online] Available at:
https://electronicsforu.com/resources/learn-electronics/op-amp-
basics-operational-amplifier [Accessed 4 Mar. 2018].
Electronics-notes.com. (2018). Op Amp Basics | What is an
Operational Amplifier | Electronics Notes. [online] Available at:
https://www.electronics-
notes.com/articles/analogue_circuits/operational-amplifier-op-
amp/op-amp-basics.php [Accessed 4 Mar. 2018].
Ti.com. (2018). Cite a Website - Cite This For Me. [online] Available
at: http://www.ti.com/lit/ds/symlink/lm741.pdf [Accessed 4 Mar.
2018].