Fork me on GitHub

Project Notes

#807 LM393 Square-wave Oscillator

Demonstrating a free-running square wave oscillator circuit using an LM393 comparator.

Build

Notes

The LM393 is a dual voltage comparator IC containing two independent, high-gain comparators designed for single-supply operation. Each comparator compares two input voltages and drives an open-collector output that pulls low when the inverting input exceeds the non-inverting input, allowing easy interfacing with a wide range of logic levels via a pull-up resistor. The LM393 operates from a broad supply range (typically 2V to 36V), has low power consumption, and features an input common-mode range that includes ground, making it well suited for low-voltage and single-supply designs.

Because of its open-collector outputs and stable performance, the LM393 is widely used in threshold detectors, window comparators, zero-crossing detectors, oscillators, and sensor interfaces. It is essentially the dual version of the LM339, offering similar electrical characteristics in a smaller package, and is a common choice in mixed-signal, industrial, and embedded applications where reliable voltage comparison is required.

lm393-package

I have some LM393 chips in a SOP-8 package, so I put one on a DIP adapter for breadboard testing.

dip

Circuit Design

The National Semiconductor datasheet for the LM393 provides a reference design for a square wave oscillator.

ref-schematic

Let’s translate that to a practical experiment:

  • I’ve increased the capacitor value to 100nF to slow down the oscillator.

Designed with Fritzing: see SquareWaveOscillator.fzz.

bb

schematic

Putting the basic circuit on a breadboard:

bb_build

Test Results

An it is oscillating nicely:

scope

Credits and References

About LEAP#807 LM393ComparatorOscillators

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

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - 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.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader