Fork me on GitHub

Project Notes

#151 ML741/Comparator

Test a comparator circuit with the ML741 discrete component opamp


This is a demonstration of a comparator circuit using the ML741 discrete component opamp. The general operation of a comparator is to swing output from 0 to 1 based on the comparison of the inverting and non-inverting input.


Vout When
0 V1(+) < V2(-)
1 V1(+) > V2(-)

How it works

Fundamentally, an op-amp strives to keep its inverting an non-inverting inputs equal by modulating the output.

In the comparator configuration, when the non-inverting input rises above the inverting input, the output will rise to offset the differential. But since there is no feedback loop, that fails miserably and the output fast ends up hard on its upper rail.

Conversely, when the non-inverting input falls below the inverting input, the output swings low as the op-amp attempts to balance the input.


I first built the ML741 circuit on a breadboard, and the basic comparator test works fine. Subsequently I’ve put the circuit on a protoboard/veroboard, and that’s what I’m using for later tests. With the lower and upper rails at 0V and 8.92V respectively and no output load:

  • output swings to 1.21V (low) when non-inverting input (IN+) is below inverting input (IN-)
  • output swings to 8.52V (high) when non-inverting input (IN+) is above inverting input (IN-)

For this circuit:

  • single rail power supply is used for simplicity i.e. VCC- is connected to ground
  • the non-inverting input is set to VCC/2 with a 10kΩ/10kΩ voltage divider.
  • the inverting input is from the wiper of a 10kΩ pot wired across the power rails

See below for some more test results comparing the ML741 with a standard 741 chip.


The Schematic

Breadboard Build

The Build

Protoboard Build

The Build

ML741 v “real” 741 Test

Here are some results comparing the behaviour of a standard UA741CN chip with the ML741 (protoboard version).


  • power is 5V single rail, i.e. V- = GND
  • non-inverting input fixed at VCC/2 with a 10kΩ/10kΩ voltage divider
  • inverting input is fed a ramp wave 2Vpp with 2V DC offset (with a 1kΩ resistor in series for redundant protection)
  • the function generator ramp wave input replaces the manual 10kΩ pot in the schematic above

Scope connections

  • CH1: inverting input
  • CH2: output
  • CH2: non-inverting input

At 5kHz

  • ML741 output voltage swings are closer to the rails than the UA741CN
  • ML741 seems to have slightly better response time
  • UA741CN distorting the duty cycle





At 20kHz

  • both struggling to keep up
  • ML741 still delivering positive output swings, although distorted
  • UA741CN distorting the duty cycle to the point that time low is negligible





Measurements in action…

probe city

Credits and References

Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.