Pierce Oscillator - Page 1
Forum section: electronics / beginners

author: Bienieboo
author_rank: Contributor
timestamp: January 11, 2014, 04:50:23 am
content: I'm trying to build a basic pierce oscillator on my breadboard. I just googled the schematic and decided to throw it together but it's not working.I posted a picture of the setup with shots of the scope . I clamped the probe at the output of the inverter and clamp the ground down. I took shots of the scope with ground(flat line) and without ground connection (sinusoidal waveform).I used the following:2 - 47 pF capacitors1 - 1Mohm resistor1 - 7404 inverter1- 20Mhz crystalPower -5 VDCI'm not getting what I expected and ended up with a 57 peak to peak voltage and 60Hz with ground removed on the probe. And flat line with the ground lead connected from the probe.I'm a newb at this and just starting learn basics so thanks in advance for the help.

author: tszaboo
author_rank: Super Contributor
timestamp: January 11, 2014, 05:20:15 am
content: You obviously have too much stray inductance and capacitance to make this work.Breadboarding is for low frequency, low current, 1980 circuits.Every wire you are using should be less than 1 cm. That includes power supply, and ground wires, from the closest bypassing capacitor, which you have to add.Also, you need to pull up/down those floating inputs.You did not include datasheet/type for the crystal. Is it for 47 pF? Please read the friendly datasheet for it.Also, learn how to set the scope properly. You will not have 57V on that circuit in any case. And how to make screenshots to a flash drive.

author: c4757p
author_rank: Super Contributor
timestamp: January 11, 2014, 05:29:33 am
content: Quote from: NANDBlog on January 11, 2014, 05:20:15 amHe does indeed have 57Vp-p (20V RMS). At 60 Hz.Bienieboo, when you disconnect the ground lead, your circuit becomes effectively an antenna, picking up interference from nearby power lines. That's what you're seeing. It caneasilybe 57V P-P. The flat line occurs when the probe is connected properly, which is what you should be seeing because that circuit isn't working.

author: Bienieboo
author_rank: Contributor
timestamp: January 11, 2014, 05:45:58 am
content: Thanks for the response.I lost you at bypassing capacitor, pull up/down floating inputs. I couldn't track down a data sheet for the 20Mhz but now that I'm looking at an example what am I looking for particularly? I can see that for my other spare 16Mhz MP-1 M-Tron crystal it has a Shunt Capacitance of 7pF and a Load Capacitance of 18 pF and ESR of 25ohms for the 16Mhz range.I can make screenshots to flash drive???thanks awesome.

author: edavid
author_rank: Super Contributor
timestamp: January 11, 2014, 06:20:50 am
content: The biggest problem is that your feedback resistor is too large for TTL. However, it is true that your layout sucks, and it's hard to get a 20MHz circuit working on a breadboard even with good layout.Read this page and see where it gets you:http://www.z80.info/uexosc.htm

author: tszaboo
author_rank: Super Contributor
timestamp: January 11, 2014, 06:38:03 am
content: Quote from: c4757p on January 11, 2014, 05:29:33 amHe also has divide by 10 set up on the scope. 5,7V is more believable.

author: c4757p
author_rank: Super Contributor
timestamp: January 11, 2014, 02:36:37 pm
content: That looks like a 10X probe though, so it's sensible. And I've never seen mains pickup as quiet as 5.7V

author: Bienieboo
author_rank: Contributor
timestamp: January 11, 2014, 05:06:12 pm
content: @edavidokay so i rewired it so the paths are as short as possible and followed one of the links you showed me and it seems to work.(60 Mhz, 4 volts peak to peak) at least i get some sort of wave not the frequency of the cyrstal but it works which is good enough for me. All that noise when in auto mode or waves in different phases what do you call that?I used the series resonant circuit diagram. I noticed if I play around with the capacitor value or remove it completely that it changes the frequency. Cool.. Thanks!.Anyways thanks for the feed back.parts used.1 - 10000 pF1 - 100 pF2 - 220ohm resistor1- 16Mhz crystal m-tron1- 7404 hex inverter

author: edavid
author_rank: Super Contributor
timestamp: January 11, 2014, 05:50:52 pm
content: Quote from: Bienieboo on January 11, 2014, 05:06:12 pmIt sounds like your crystal isn't doing anything - try unplugging it and see if anything changes. Maybe it's broken.QuoteIf it's really there in the signal, it's called jitter, but it's more likely that the scope's trigger settings are not right for the signal, so it is triggering erratically.

author: BalticLab
author_rank: Regular Contributor
timestamp: January 11, 2014, 06:29:00 pm
content: The Breadboard probably screw you up a bit there. I've seen people put a single sided copper clad board under the breadboard and connecting the board's ground to the copper clad. 20 MHz is a lot for a breadboard. Got crystal of some frequency below 10 MHz around to try? Also, if your crystal is an issue, you can test this with a 'crystal' tester I designed a while back. It's nothing else but a simple pierce oscillator also. You can find the drawing here:https://baltic-lab.com/2012/08/simple-oscillator-as-crystal-tester/I know that that pierce circuit work very well. So you may want to try the values I use in the drawing and vary the elements to compare your circuit with mine.The circuit uses a BC547. You can use a 2N2222, 2N3904 or similar multi-purpose transistors with no problem. As a matter of fact, the latter are probably a better fit than the BC547.EDIT: Just now noted that I never made an English labelled circuit drawing. The left side is where the crystal gets connected and the right side is the signal output.

author: edavid
author_rank: Super Contributor
timestamp: January 11, 2014, 06:37:57 pm
content: Quote from: KF5OBS on January 11, 2014, 06:29:00 pmHis oscillator is running fine at 60MHz, so the breadboard is not the problem...

author: BalticLab
author_rank: Regular Contributor
timestamp: January 11, 2014, 06:51:18 pm
content: Quote from: edavid on January 11, 2014, 06:37:57 pmYeah right. What? The breadboard is always a problem above maybe 10 - 15 MHz. Something is obviously not working if the crystal frequency is 20 MHz and that darn thing oscillates at 60, right? The crystal is probably working very well, but is being operated in its third overtone.

author: edavid
author_rank: Super Contributor
timestamp: January 11, 2014, 07:48:58 pm
content: Quote from: KF5OBS on January 11, 2014, 06:51:18 pmHow can an oscillator run in overtone mode with no LC tank?His crystal is probably bad or not connected, the oscillator is free running...

author: BalticLab
author_rank: Regular Contributor
timestamp: January 11, 2014, 08:05:33 pm
content: Quote from: edavid on January 11, 2014, 07:48:58 pmSure, it just by coincidence oscillates on three times the crystal frequency without much more to it. Or the parasitic capacitance / inductance of the board form a LC tank that's not in favor of his fundamental. Especially on the pierce oscillator just a bit inductance in your collector path turns that beast into an overtone oscillator. He probably also has a LC tank made up of the junction capacitance of the transistor coupled with the stray inductance of the Breadboard. Not only does it make perfect sense, I've seen that happening more than just a couple times. Of course what applies for a transistor based pierce also applies for the logic gate base pierce.

author: edavid
author_rank: Super Contributor
timestamp: January 11, 2014, 09:23:44 pm
content: Quote from: KF5OBS on January 11, 2014, 08:05:33 pmThe crystal frequency is 16MHz, and it is oscillating at 60MHz. I haven't heard of a 3 3/4 overtone oscillator before.

author: Zero999
author_rank: Super Contributor
timestamp: January 11, 2014, 09:52:05 pm
content: Quote from: edavid on January 11, 2014, 09:23:44 pmYes I suspect it's just free running with the frequency set by the RC time constant and propagation delay of the gates.

author: Bienieboo
author_rank: Contributor
timestamp: January 11, 2014, 10:02:43 pm
content: Yes it appears that it's doing absolutely nothing.1st photo - crystal removed2nd photo - 16Mhz Installed3rd photo - 20 Mhz InstalledWhen I installed the 20 Mhz seems to reduce the jitter.

author: Icarus
author_rank: Regular Contributor
timestamp: January 11, 2014, 10:10:04 pm
content: @Bienieboo: Are you using X1 probes ?

author: Bienieboo
author_rank: Contributor
timestamp: January 11, 2014, 10:14:33 pm
content: I'm using 300Mhz 10:1 passive probes agilent model: N2863b.

author: BalticLab
author_rank: Regular Contributor
timestamp: January 12, 2014, 12:54:39 am
content: Quote from: edavid on January 11, 2014, 09:23:44 pmWell, now you have! Okay, I guess I should have read the whole thread and not just his first post wit the 20 MHz.@Bienieboo: Have you tried the circuit with the component values as I posted them above?

author: Bienieboo
author_rank: Contributor
timestamp: January 12, 2014, 02:38:16 pm
content: Quote from: KF5OBS on January 12, 2014, 12:54:39 am@KF5OBSI tried the circuit you mentioned and I get a flat line. When I first probe it, it gave me 56 V pk-pk and 60 Hz. But now it gives me nothing.Maybe it's wired incorrectly?...I don't see it though.5 VDC- R2 100k- R1 1k16Mhz Crystal- C1 47pF- C2 47000pF- BC547

author: c4757p
author_rank: Super Contributor
timestamp: January 12, 2014, 02:44:17 pm
content: 1) BC547 has its pinout reversed from the 2N series - you need to flip it around. C - B - E looking at the flat side.2) Shorten up the white wire and move it closer to the top of the 1k resistor.3) Put a big capacitor (any size above 100uF or so)anda small capacitor (around 100nF or so) both across the power supply rails right next to the 1k resistor and the white wire. This will serve as a local power tank, isolating the circuit from the inductance of the wires to your power supply.

author: BalticLab
author_rank: Regular Contributor
timestamp: January 12, 2014, 05:27:16 pm
content: @Bienieboo You have emitter and collector reversed. Just flip the transistor around 180 degrees so that the flat side points where now the rounded side points. If it then still doesn't work, try to make your leads shorter. You have quite some long traces there. But first try flipping the transistor around. And juts to make sure, if it doesn't start oscillating, try a different transistor. That's just to make sure you haven't fried this one while building it up.Out of curiosity, what's your purpose for the oscillator? Do you have a project you need it for or did you develop an interest in RF and like to experiment some more in that area?

author: Bienieboo
author_rank: Contributor
timestamp: January 12, 2014, 08:10:20 pm
content: Quote from: KF5OBS on January 12, 2014, 05:27:16 pm@KF50BSYea tried to flip it around and nothing happened same result made the circuit a bit more tighter and replaced it with a new transistor too.Still no result. I even put a big 22uF cap between the main power and ground rail still nothing.I actually have no purpose for the oscillator, I was playing around with 555 timer oscillators and that was a lot easier to make, and then I tinkered around with shift registers and the whole idea around SPI's and thought it was cool how the clock signal is the main thing that drove how fast data get's sychronized.This is really just a learning experience for me, I have no background in circuits at all so whatever peaks my interest. So at the moment it's clock signals how to control it. I think I prefer 555 timer oscillators it's much easier to control and wire. The high speed stuff seems very impratical to prototype on a board so far.If there's any kind of goal I'd like to be able to program my own chips and understand how to communicate to other components. The accelerometers and gyroscopes are interesting too but I'm a long way from there.

author: BalticLab
author_rank: Regular Contributor
timestamp: January 12, 2014, 10:48:49 pm
content: On your picture it almost looks like you have your crystal connected between the emitter and the collector of the transistor. It's supposed to be between the collector and the base of the transistor. So in parallel with the 100k resistor. Is that the problem? If not, try a different crystal (ideally with a lower frequency) and break out a multimeter to check if any connections are acting stupid.