Author Topic: Basic 166 KHz square wave oscillator  (Read 4508 times)

0 Members and 1 Guest are viewing this topic.

Offline MauroAntiveroTopic starter

  • Newbie
  • Posts: 4
Basic 166 KHz square wave oscillator
« on: October 06, 2015, 11:39:57 pm »
Hello to all again. This time I'm facing the following problem:

I'm trying to make a simple square wave oscillator, preferably using CMOS gates. I need a 166 KHz stable (but not "super duper mega stable") square wave signal, preferably from 0 to 15V, but 0 to 5V would be fine.

I tested with a basic CD4011 (nand gate based oscillator) and with a basic SN74HC14 (inverter Schmitt trigger based oscillator) but the results are far from acceptable, I have a lot of jitter in the frequency in both cases. I attach four files:

SN74HC14 Oscillator                          - Basic Schmitt trigger based oscillator (the circuit from the video capture below)
CD4011 Oscillator                              - Basic NAND gate based oscillator
SN74HC14 Oscillator Video Cap 1/6  - Captures from a video of my oscilloscope screen where you can see the jitter

I suspect that the breadboard is not the problem because I'm working only at 166 KHz, but I really don't have idea what is happening. Searching in Internet found a lot of circuits but all of these are the same basic circuit and in any of these sites mention something about "jitter" or "frequency instability".

I am a bit disappointed with myself for not being able to function properly such a simple circuit, but always in electronics, things are more complicated than they seem at first glance. So, I really appreciate your help to solve this issue. Thanks a lot and best regards!

Mauro.
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28327
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Basic 166 KHz square wave oscillator
« Reply #1 on: October 06, 2015, 11:46:00 pm »
I suspect that the breadboard is not the problem because I'm working only at 166 KHz, but I really don't have idea what is happening. Searching in Internet found a lot of circuits but all of these are the same basic circuit and in any of these sites mention something about "jitter" or "frequency instability".
Dead bug the circuit for proof.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline rfeecs

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
Re: Basic 166 KHz square wave oscillator
« Reply #2 on: October 07, 2015, 12:51:01 am »
How clean is your power supply?  Any ripple or noise?
Is there any improvement if you just power it with a battery (which should be free of ripple and noise)?

An alternative would be using a high Q resonator like a crystal.
 

Offline singapol

  • Frequent Contributor
  • **
  • Posts: 420
  • Country: sg
Re: Basic 166 KHz square wave oscillator
« Reply #3 on: October 07, 2015, 01:34:45 am »
The answer is not all of the inputs of 4011 (3/4) and 74HC14 (1/6) are used so unused inputs must be terminated properly due to their high input impedance and therefore should not be left floating or unconnected causing unexpected outputs. Whether to connect to ground or power supply or even to other inputs depend on the type of cmos logic. A proper explanation can be found in this pdf:
Designing with logic. See page 6.

http://www.ti.com/lit/an/sdya009c/sdya009c.pdf
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: Basic 166 KHz square wave oscillator
« Reply #4 on: October 07, 2015, 02:19:35 am »
Most common problems:
- lack of power supply decoupling caps
- not tying unused inputs somewhere
- excessive lead lengths and poor supply filtering on breadboard

Note that 74HCxx outputs are pretty fast - a few ns or less - so that puts a lot of high frequency energy in your signals, supplies, etc. which can cause all sorts of problems like this unless you proper decouple/filter the supplies, keep leads short, etc.
« Last Edit: October 07, 2015, 02:22:03 am by w2aew »
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Basic 166 KHz square wave oscillator
« Reply #5 on: October 07, 2015, 02:26:04 am »
All of the above.
1. Ditch the breadboard and assemble the circuit with short leads and soldered connections ("dead bug").
2. Tie unused inputs of the chip's gates to Ground or Positive rail as appropriate.
3. Use a stable, voltage regulated power supply.
and also don't forget
4. Install decoupling capacitor between the Vcc and ground pins of the chip, as close to the chip as possible.

You could also try using the VCO that is built into the CD4046 PLL chip, with the appropriate timing R and C, instead of the 4011 or 7414. But hardwire and decouple as before.
The easiest person to fool is yourself. -- Richard Feynman
 

Offline dan3460

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: Basic 166 KHz square wave oscillator
« Reply #6 on: October 07, 2015, 05:00:04 pm »
I had similar problem (see NOT gate functionality), I was not able to get the appropriate signal. It seems to me that you are getting the correct signal. Listen to this guys, the jitter is probably picked up but lengthy cables and breadboard setup.
 

Offline mij59

  • Frequent Contributor
  • **
  • Posts: 693
  • Country: nl
Re: Basic 166 KHz square wave oscillator
« Reply #7 on: October 07, 2015, 05:35:50 pm »
What are the values of the resistors and capacitor in the CD4011 oscillator ?
The 10k resistor to the input of the 74HC11 oscillator is not needed.
 

Offline MauroAntiveroTopic starter

  • Newbie
  • Posts: 4
Re: Basic 166 KHz square wave oscillator
« Reply #8 on: October 08, 2015, 05:09:45 am »
First of all thanks a lot to all of you!

1_ Yes, I was about to do, but first wanted to achieve the best possible stability in the breadboard (really it worked very badly and could not be solely due to the breadboard, it had to be something else... And then...)

2_ And that was my key problem!!! When I do that (all unused inputs to GND) the oscillation becomes pretty stable, even in the breadboard with relatively long cables! Thanks to all again for this suggestion.

3 & 4_ Yes, I'm always do that, but off course thank for this suggestion :)

4046: Yes yes, I'm very interested in that option. I need to look the 4046 datasheet to realize how to do it, but if you have a simple schematic I really appreciate it.

All of the above.
1. Ditch the breadboard and assemble the circuit with short leads and soldered connections ("dead bug").

2. Tie unused inputs of the chip's gates to Ground or Positive rail as appropriate.

3. Use a stable, voltage regulated power supply.
and also don't forget
4. Install decoupling capacitor between the Vcc and ground pins of the chip, as close to the chip as possible.

You could also try using the VCO that is built into the CD4046 PLL chip, with the appropriate timing R and C, instead of the 4011 or 7414. But hardwire and decouple as before.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf