How to build an oscillator using 8MHz crystal

Discussion in 'General Electronics Chat' started by NomadAU, Feb 28, 2013.

  1. NomadAU

    Thread Starter Member

    Jul 21, 2012

    I am building a circuit designed to measure fluid levels using capacitance. The capacitor is constructed using 2 parallel aluminium strips, separated by non-insulating pads, and inserted into a waterproof PVC tube. An oscillator generates a high frequency (in the MHz range) and the capacitor modifies this frequency according to the level of the fluid around the sensor tube. By measuring the frequency, I can determine the height of the fluid...and then its volume, i.e. tank Empty, Full etc.

    I've managed to get the circuit working using an oscillator based on a Schmitt trigger with resistor and capacitor, but this generates a frequency just over 1MHz. What I'd like to do is experiment with a higher frequency as I believe the capacitor will have a greater impact on a higher frequency.

    Whether or not this is the case, I am still interested in generating a somewhat higher frequency, and have in my box of bits an 8MHz crystal (HC-49US), so I thought it would be a simple matter to use this to generate a 8MHz signal. However, I can't seem to find a simple circuit that uses the crystal, and generates 8MHz using a 5V power supply.

    I've seen various circuits using a crystal, CMOS inverter caps and resistors but I haven't been able to work out the values I would need for my 8MHz crystal.

    Can someone point me to a relevant circuit please?

  2. JDT

    Well-Known Member

    Feb 12, 2009
    This is the classic CMOS circuit that normally works. Keep all wiring around the crystal and first inverter as short and compact as possible.

    Make sure you use an unbuffered inverter. The "UB" is important. Not shown on the circuit (because I forgot) is a 10nF capacitor across the supply pins on the IC.

    Alternatively, you can buy complete 8Mhz oscillators in small square cans. These contain the crystal and electronics and just need a supply.
    NomadAU likes this.
  3. t06afre

    AAC Fanatic!

    May 11, 2009
  4. NomadAU

    Thread Starter Member

    Jul 21, 2012
    Thanks for the circuit JDT. I've just breadboarded it and its giving me a very stable 4MHz wave. Cheers!!