Fork me on GitHub

Project Notes

#297 CD4070 Oscillator

Examine a classic CD4070 oscillator design and variations.

Build

Notes

There’s a widely-shared circuit of a “square wave generator with CD4070”, for example a circuit that is intended to run at 2 MHz:

canonical-circuit

I had a few spare minutes so I thought I’d give it a go. Should be straight-forward, looks like a familiar oscillator circuit based on logic gates.

Well, not so fast. I found this configuration extremely temperamental on a breadboard, and the output is more sinusoid than square. It also made me wonder about the performance of this circuit with buffered and unbuffered versions of the chip.

Ultimately, I came up with three workable variants of this circuit. All interesting, but none worth much for practical purposes as the stability and output characteristics are very poor. But they do work, after a fashion!

Check - Are my Chips Bufferred or Unbufferred?

Newer versions of the CD4070 are almost guaranteed to be buffered designs and should have the “B” suffix indicates a buffered circuit.

I can’t find any current datasheets for unbuffered versions of the CD4070, but I understand that umpteen years ago they probably would have been unbuffered - which may be when the oscillator circuit dates from. This TI application note explains the difference very well, and how this can result in different behaviour.

As a diversion, I thought I’d verify my chips really are the buffered design (my source is not necessarily guarateed to give me chips that live up to their labeling).

The TI application note gives a good hint on a decent test: plot output to input voltage. Buffered design should deliver a sharp step-change, while the unbuffered design will exhibit a more gradual change.

So I plugged a signal generator into the chip and plotted the X-Y input versus output. This looks like definitive buffered behaviour:

scope-buffer-test-xy

Circuit Variations

So, somewhat disatisfied with my first build of the cribbed circuit on a breadboard, I started experimenting with variations.

First, I never saw clean square waves, so I buffer all the outputs via a CD4069 inverter to sharpen them up.

Ultimately, I came up with three variations that are quite interesting:

  • variant on the cribbed circuit (but with output tapped directly from the XOR output)
  • variant on the cribbed circuit without the capacitor to ground
  • RC circuit between inputs, with a variable capacitor to provide some measure of frequency trim

In all cases, the achieved frequency will vary with supply voltage.

To eliminate the noise and stray capacitance of a breadboard, I put the three circuits on a protoboard for evaluation.

protoboard_layout

Oscillator_build_solo

Variant A: R feedback, C to ground

The first quarter of the CD4070 runs a variant on the cribbed circuit (but with output tapped directly from the XOR output). This produces a free running 1.5MHz oscillation at 5V

  • CH2: CD4070 first XOR output
  • CH1: CD4069 rectified output

scope-variant-a

Variant B: R feedback

The second quarter of the CD4070 runs a variant on the cribbed circuit without the capacitor to ground. This produces a free running 6.4MHz oscillation at 5V

  • CH2: CD4070 second XOR output
  • CH1: CD4069 rectified output

scope-variant-b

Variant c: RC feedback

The third quarter of the CD4070 runs a variant with RC circuit between XOR inputs, with a variable capacitor (40-120pF) to provide some measure of frequency trim. This produces a free running oscillation that can be trimmed from around 7.02MHz to about 7.08MHz at 5V

  • CH2: CD4070 third XOR output
  • CH1: CD4069 rectified output

At minimum trim:

scope-variant-c-min

At maximum trim:

scope-variant-c-max

Construction

Breadboard

Oscillator_breadboard_build

Schematic

Oscillator_build_solo

Credits and References

About LEAP#297 CMOSOscillators

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