Crystal oscillator madness ? - Page 1
Forum section: electronics / projects

author: Vince
author_rank: Super Contributor
timestamp: May 17, 2017, 10:22:39 pm
content: Hi there,Playing around with a few crystal oscillators I came across. Never used these things, so figured at least I would wired 2 or 3 of them to see if I can get to do what they are supposed to.They are JCO 8-3-B jobbies, datasheet below.I understand the whole point of these integrated oscillators is to provide a turn-key experience : no external component need, outputs a readily usable clean square wave that can be fed straight to whatever digital chip that needs it.... right ?The data sheet implied the same too : just give it around 5V, and you get back a square wave with roughly 50% duty cycle and fast rise time, what one would expect from these things.So, I gave it/them, 5V... and what do IO get back ? not a square... but a sine wave ! Eh ?! See pictures. And it's not even the typically distorted sine you would get from a discrete oscillator. No, here I get a really clean sine wave. Singla is perfectly stable and frequency is spot on what it says on the tin, 50MHz. But it 's a sine not a square. Now even more troubling, look at the screen close-up of the scope.... it's powered with the required +5Vots, but somehow the amplitude of the sine is MORE than 5V... almost 8V peak to peak ?! Worse... it goes NEGATIVE ! Didn't know oscillators came bundled with a switch-mode inverter ! LOLNo... the trace on the scope is set properly to the middle of the screen... checked 200 times...This is the first time in my life that I play with these things, so maybe the experienced on here could shed some light, so I can learn something out of it ?At first I thought maybe I damaged the thing out of overheating, as I used my freshly unboxed hot air station to remove it (the particular one pictured here) from the board it was soldered to.. hot air station was set to 325°C and the oscillator datasheet says no more than 260 please...but, thinking of it, I doubt my desoldering is to blame, because another example of this oscillator, exact same model and frequency, exhibits exactly the same symptoms but... it was brand new, came out of of box part that were actually never used.I welcome any expertise !I am sure I will look like a fool once someone points out ti me what I did wrong... but until then, I am well puzzled !

author: Rerouter
author_rank: Super Contributor
timestamp: May 17, 2017, 10:27:40 pm
content: Because you arr seeing a higher amplitude, have you adjusted your scope probe for a flat response,Do you have a 20mhz filter turned on at your scope, this was a common feature, and what bandwidth is your scope, to see a square wave you need to see at least a few harmonics, so for your 50mhz signal you likely want around 250 mhz scope bandwidthEqually how are you grounding your probe, you want the spring type, not a 10cm flylead

author: Tom45
author_rank: Frequent Contributor
timestamp: May 17, 2017, 10:38:56 pm
content: Besides Rerouter's good suggestions, is your probe X1 or X10?A 50 MHz square wave won't look much like a square wave on a 100 MHz scope even with proper probing and settings. If your probe setting is wrong you may actually be seeing 0.8 volts p-p.

author: StillTrying
author_rank: Super Contributor
timestamp: May 17, 2017, 11:03:20 pm
content: Yep, 50MHz on a 100MHz scope won't look very square.At 50MHz all those long wires are inductors. You'll have to arrange some ceramic disc type decoupling on the breadboard as close as possible to the oscillator's power pins, and arrange to probe it with a very short spring clip on the probe.

author: basinstreetdesign
author_rank: Frequent Contributor
timestamp: May 17, 2017, 11:30:01 pm
content: Quote from: Rerouter on May 17, 2017, 10:27:40 pmThat's the first thing I'd check...

author: Vince
author_rank: Super Contributor
timestamp: May 18, 2017, 12:00:58 am
content: Wow, 3 replies in just a few minutes, thanks chaps ! I guess that's time zones for me... being in Frog land.It's 01h30 AM here so did a quick few more tests thanks to your suggestions above, quickly reporting here then straight to bed ! LOL- scope is a Tek 2232, 100MHz. OK not enough to get a nice square at 50MHz, but not quite as bad as to get a pure sine wave either....- tried on my Tek TDS 544A (4x500MHz, 1GS/s), same result, pure sine wave !- both scopes use their full BW, BW limitations were turned off.- probes are up to the job : brand new (old stock...) Tek 500MHz probes, the P6139A model, the very ones that Tek shipped with that particular scope back in the day- probe compensation : played with the full range, has some moderate effect on the signal amplitude but none on the signal shape as such, still a pure/clean sine.Anyway, seems the bottom of it was just crappy connections, I guess 50MHz despite being pretty much DC by modern high-speed electronics standards, is still quite high a frequency in the grand scheme of things none the less...- replaced the standard 10cm alligator clip ground lead, with the tiny/short pointy tip that was supplied with the probes accessories... first time I am using it. The ground connection is now as close as it can get to the oscillator, see pictures. Well that indeed improved things drastically ! Now the voltage levels are sane at last, consistent with the 0/5V power supply of the oscillator, and the shape of the signal is now definitely much closer to a square than a sine ! The remaining distortion, this time, I am fine putting on the scope's 100MHz BW. On the 500MHZ TDS 544A, it's even closer to a square. The remaining distortion now, I guess is due to using a breadboard, which of course is inherently really bad at high speed, plus the fact that even in breadboard land, I find that this particular board is a little on the crappy side... bought the cheapest I could find on Farnell. The contact springs are a little weak, and the banana jacks are of the crappiest quality one can imagine... just fitting them to the board after unpacking it, was a challenge : trying to tighten the nut on the back side to secure the jack in place, would only result in stripping the soft plastic thread on the jack... don't think I would have bought it, had I known Farnell dared selling such crap ! But well, trying to build my lab, so much to buy and so little money. I guess I will buy a better quality board at some point, providing I can get get advice on what brand actually make quality boards, if such a thing even exists.Anyway, to sum it up then I go to sleep, the "problem" was then just me thinking 50MHz was "not that high" a frequency, that I could get away with a breadboard and standard/long ground lead. The rise time of the oscillator looks roughly twice as good as what the data sheet states, so not bad !I assume if I were probing that oscillator when running on its proper/intended PCB, rather than a quick breadboard shame, the signal would be much cleaner....Also, I set my pulse generator so it can emulate a 50MHz square (its maximum frequency), and fed that into the TDS 544A, using a coaxial cable, a BNC connector at one end, and a banana connector at the other end... that two gave me a pure sine ! :-/ Said cable also had a fairly long ground lead, might be the same issue then. I guess I ought to buy some BNC-BNC coaxial cables, along with a small selection of 50 ohms "terminators", ' T ' BNC connectors, things like that.Anyway, thanks for your help, and I am glad my interest in electronics spans lots of things BUT modern high-speed stuff !I wonder how can engineers probe and troubleshoot modern boards with signals of literally several GHz... whatever distortion/problem in a signal they would see, they could never be sure whether it came from a fault in their circuit, or just from their test setup ! Nightmare.... I feel for themTalk to much, straight to bed !

author: Vince
author_rank: Super Contributor
timestamp: May 18, 2017, 12:08:14 am
content: ...

author: james_s
author_rank: Super Contributor
timestamp: May 18, 2017, 12:14:37 am
content: Proper probing technique is an entire subject in itself. 50MHz is not that high for a sine wave but when it comes to square waves it's all about rise and fall time, and to get a square looking signal at 50MHz requires some very fast rise and fall times. It's definitely in the range I would consider high frequency.

author: Vince
author_rank: Super Contributor
timestamp: May 18, 2017, 12:17:39 am
content: Quote from: basinstreetdesign on May 17, 2017, 11:30:01 pmYep I compensated them sure, but just ofr the sake of it I screwed with the compensation afterwards as I stated above, and it does not change the waveform, just the amplitude. At worst one would of course expect some over-shoot or dampening if not compensated properly, but not turn a square into a pure sine wave...Forgot to reply to someone above : yes it's of course a (fixed) x10 probe, as x1 probe only go up to a 5MHz or so, I gather. But it's Tek probe on Tek scope, the probe is detected properly and adjusts the vertical scale accordingly. So the readout on the screen is actually correct.Bed time...

author: BrianHG
author_rank: Super Contributor
timestamp: May 18, 2017, 01:21:52 am
content: Add a .1uf decoupling cap right across the VCC&GND of the oscillator, (not you breadboard power rails). In some cases, this will improve the square wave slightly more, but, what you are seeing is typical unless you go to further extremes. We are talking using a PCB instead if bread board & amplified low capacitance probes.

author: DaJMasta
author_rank: Super Contributor
timestamp: May 18, 2017, 05:22:45 am
content: Have you measured the capacitance of the breadboard? While I wouldn't expect it to really be enough, you may see double-digit pF capacitance on every breadboard row, especially if they're right next to a row that is grounded. Each electrically connected row is a folded-over sheet of metal, which is capacitively coupled to adjacent rows.Looking at a datasheet, maybe there's a little confusion going on? The one I see claims 5V input goes up to 49.99 MHz, but 50MHz options are only available in 3.3V variants. Also specifies that the max rise and fall times are 6ns, which at 50MHz, with a period of only 20ns, could get you a pretty non-square looking square wave and still be within spec.I'd test it off the breadboard, just using hooks or alligator clips or something, and see if the results are different.

author: Zero999
author_rank: Super Contributor
timestamp: May 18, 2017, 10:44:03 am
content: Quote from: Vince on May 17, 2017, 10:22:39 pmThat's no surprise. A simple AC coupling capacitor (have you set the 'scope's input to AC coupled?) will make the waveform go negative and resonance can cause the total peak-to-peak voltage to exceed the power supply rails: no switched mode converter required!Have you tried a low impedance probe?A 450R resistor in series the probe end and the 'scope's input set to 50R or, if the 'scope doesn't have a 50R setting, set it to 1M and put a 50R resistor connected as close the the input as possible. That will give an attenuation factor of 10, in input impedance of 500R up to around 500MHz, or much higher if it's made with small enough components.

author: MagicSmoker
author_rank: Super Contributor
timestamp: May 18, 2017, 11:41:25 am
content: As has already been mentioned, but which bears repeating with a bit more detail, your scope needs a much higher bandwidth than you might suspect to register a square wave as a square wave. In fact, the rule of thumb is the bandwidth needs to be at least 5x higher to properly display a square.The reason is because square waves are composed of a sine wave fundamental of amplitude 4/pi, plus all the odd harmonics with each contributing 1 over the harmonic number to the amplitude. So 1/3rd of the amplitude is from the 3rd harmonic, 1/5th is from the 5th harmonic, etc.Bottom line, you need a >250MHz scope to see squarish square waves at 50MHz.

author: w2aew
author_rank: Super Contributor
timestamp: May 18, 2017, 12:09:54 pm
content: ...and it bears repeating, those plug-in breadboards really aren't up to the task for anything greater than several MHz.Also, *always* include local power supply decoupling, especially when dealing with circuits that have high frequency content (such as a 50MHz square wave, which will have frequency content well past 250MHz).I did a video on the effect of probe ground lead length on signal quality, several years ago. Here's that video. At about 8 minutes in, I show the effects when measuring a 30MHz oscillator module:

author: Vince
author_rank: Super Contributor
timestamp: May 18, 2017, 09:37:16 pm
content: Thanks everyone for the many replies, much appreciated !Don't have too much time to play with this tonight, will do this week-end maybe.But the "mystery" is solved now, it was a measurement issue, not a defect in the DUT.Sur enough, I didn't expect a nice clean square wave when I hastily plugged that oscillator in the breadboard, and used the long/standard ground lead, I obviously expected significant ringing and noise superimposed, but I expected to at least see consistent voltage level, and something vaguely resembling a square... I was not ready at all for a pure sine wave with silly voltage levels, both going negative and over the supply voltage...Lesson learned.Sure enough, I expeted the higher harmonics to be attenuated and distort the original square, but but the front-end of a scope being a first order low pass filter, the rate of decay is "only" 3dB per decade, so the most important harmonics, 3rd and 5th, would at least partially go through... so I naively expected to get on my 100MHz scope, something like I got on my 500MHz.But well, the whole point of me shelling some cash on the TDS 544A was precisely to get a wide BW when needed.... glad I did not waste my money then, was indeed worth buying it !Would love to have one of the later incarnation of that TDS 500 series, or 700 serie, the 'D' series, with their 1 GHz BW and 4GS/s sampling, but let's face it... it's not in my budget. A 784D is rare to come by in Europe, and they sell anywhere for 1,500 up to 4,000, not even tested nor repaired, just sold "as is" ! and then I would need 1GHz probes to go with it.... not going to happen in my life time ! I was already lucky enough to find that 544A at a very reasonable price, fully tested and repaired, as well as a set of 4 new/old stock 500MHz Tek probes for only 100 Euros/USD the set of 4 ! Normal price I see for new generic Tek probes, is 500 Euros for ONE 500MHz probe, 2,000 the set of 4, paid only 100, can't complain !!! Clearly the seller wasn't too clued on what he was selling... my luck !So, I will just have to make do with my 500MHz 544A for a few years to come. That's alright... now that I know what to expect when measuring fast square waves, I am prepared...To answer a few questions from people above :- nope, I don't have a low impedance probe... not even sure where I would go about finding one. All I see for sale are the usual x1/x10, fixed x10, current probes, and active/differential probes, which cost an arm and a leg and a kidney and a liver, all wrapped in gold mixed with some platinum !- The 2232 scope is 1Mohm only, but the TDS 544A being much fancier, allows to switch the input to 50ohm, no problem.- datasheet :not sure which one you got (care to share ?), picked the first I found on Google, seems to match perfectly the markings I found on my parts, which means they are all 5V unless otherwise specified... but mine don't specify anything, so 5V it is. Will try lowering the voltage to 3.3V anyway, just out of curiosity... can't do much harm I assume, at worst it will start misbehaving, at first, then stop oscillating altogether when the voltage get really too low to its taste.- rise time : indeed, the specified rise time hardly makes for a sharp edge, given the 20ns period. The edges I get I get on the 500MHz TDS are therefore perfectly consistent with the specs... so can't complain !- AC coupling : nope, am using DC coupling so I get the full picture so to speak. I only switch to AC when the DC component gets in the way and and keeps me from looking at the part of the signal I am really interested in.- measuring breadboard parasitic capacitance : sadly I can't do that, would love to though. For now all I have is my multimeter, with a resolution of 10pF, not good enough. A nice RLC bench bridge is on my short list of test gear left to acquire, but can't y afford it right now. I found a great deal on an old bench RLC meter from Fluke/Phillips, a PM630X.... only 150 Euros, but I was not quick enough ! :-/ I see a few on Ebay but for 500 Euros, up to 1500 ! not the same story, and all from the USA, none local to me in France, or even Europe at large. Grrrr....;Funny thing is, I just noticed this week, that very same meter, in the workshop at work, in some weird place, unattended.... no idea what they use it for (I am don't work in an electronics/tech related company, not even remotely !) . Maybe I could try and ask around, if they are really still using it ?! Maybe I could get it.... worth a shot any how !Will look into modern handheld RLC meters too, in case some of them are any good compared to "proper" full blown meters like that Fluke above.Enough talking, thanks again for your comments, will try and play a bit more with the oscillator and scope, using your good advice, just to see if I can improve the waveform better than what's pictured above on the TDS 544A using the short ground "thick wire" thingy. Might try to DIY a "spring"/ultra short type connection, as per the video W2AEW (thanks for your well put together video !), as it indeed does quite a difference, though on ly on ringing, not on the overall shape, which is more the problem I am having it seems. That said, why bother... I seem to recall seeing ready made Tektronix items for sale on Ebay, bundled in packs of 10 or so, for a reasonable amount of money. Might go search for that...

author: james_s
author_rank: Super Contributor
timestamp: May 18, 2017, 10:25:15 pm
content: IIRC you can upgrade the TDS544, at least some revisions to some of the higher models by changing a few 0 ohm resistors, removing some capacitors that are there just to limit the bandwidth and I think you need to flash the right firmware. The downside is that you then need to have it calibrated but it's a cheap way to get more bandwidth and higher sample rate.

author: Vince
author_rank: Super Contributor
timestamp: May 18, 2017, 10:58:32 pm
content: Hmm, thanks for the tip, that sounds great, hacking my 25yo scope like the kids do today with their Rigol !I am not too fussed about calibration, scopes aren't meant to do precise measurements in the first place anyway.... I am not going to make a life or death decision based on the 2nd decimal of a voltage/vertical gain measurement...Anyway, if it's only a few discrete components to fiddle with in the front-ends, to get the analog BW, and a FW update to get the matching sampling rate, then it's reversible anyway, should I need/want to... so sounds like it's well worth a shot !Don't have yet a chip programmer to handle the FW part, but is on the cards. To start with, the TDS 544A I got, somehow is missing the 'FFT' feature (not that I expect it to be more than a toy, but I am not really asking for more out of it to be honest, so I would still would have liked to have it working...), even though the sales brochures from Tek back then, says that the 544A was the top of the 5XX range, and had, as standard, the memory extension (50K points instead of 2,500), I do have that, but also FFT as standard... which I do not have ! Hmmm.... weird.As for SMD components on the PCB's, I just received a few days ago, that cheap 858D hot air station that's been around for quite a few years I gather, that everyone gets... got it for only 40 Euros delivered, and to my great surprise it's not the piece of junk I was "expecting", it actually works, well built and designed, was quite amazed. I wasn't expecting anything to this standard, for such a ridiculously low price. Played with it on a few scrap boards, to get a first experience, and it can remove even large IC's or connectors with huge pads/thermal mass (that secure them mechanically to the PCB), in just a few seconds, without even turning either the temperature or air flow to the max. The best 40 Euros I spent in a long time, that's for sure. Now I just need a microscope to help me on the smallest of the packages, like tiny tiny tiny resistors...Then shortly after buying it... I came across Dave's EEVBLOG video about him buying one and reviewing it, a few years back. Seems that the manufacturer improved on their design over time, since the two "issues" Dave found on it, have been resolved on my unit : no more tons of hot glue to secure the switches on the front panel, and as for safety, they have now added earthing to both the case and the nozzle/hand piece. Well can't remember for sure if Dave said he had that issue with earthing, but I do remember several people here and there, complaining about that.So, looks like hacking my old Tek scope might be opportunity to actually do something useful with my new hot air station toy...So much gear to buy and so little money !Lab is only 6 months old, built the workbench and shelves last fall, then in the past months, been watching Ebay and a local/French ad site, for nice old test gear at decent prices. Not that common... people now think they can sell any old piece of rotten junk for a silly price, just by adding the magical words (?) "VINTAGE", "FOR COLLECTORS"..... oh dear...

author: james_s
author_rank: Super Contributor
timestamp: May 19, 2017, 12:07:27 am
content: You can enable the FFT option for sure, possibly also the 1M deep memory depending on the specific acquisition board it has. You need a GPIB adapter to do this, I have one I built from a $2.50 Arduino nano USB clone and half of a GPIB cable I got on ebay. I can find the directions for enabling the various options when I'm at home if you can't locate them. Most require additional hardware but FFT does not, it's just a matter of flipping the right bit in NVRAM.The firmware update I think is done via GPIB as well, I haven't tried since mine is already a TDS784C so the bandwidth and sample rate is already maxed out.

author: Vince
author_rank: Super Contributor
timestamp: May 20, 2017, 10:05:38 pm
content: Quote from: james_s on May 19, 2017, 12:07:27 am1M ?! Wow I don't even dream of it... being a 544A, the top of the 'A' series, I understand it already comes with the maximum amount of memory Tek offered, which is 50K. But.... if you say it may be the case that they none the less may have implemented more than 50K on some of the 544A... hell I wanna give it a try for sure !QuoteYes... i had planned on getting on of those. I like GPIB and try to get test gear that feature this port. The TDS does, even my little 2232 picture aboe does, as does my little Wavetek DDS Function Gen, one of the reasons I bought it. My pulse generator also has it, again one of the criteria that made me buy it. GPIB will again be a criteria when I have enough money to go hunting for some more gear I need/want : bench multimeter, frequency counter, RLC meter... mainly.The chap that sold the TDS 544A to me, gave me an old MS-DOS utility software from Tektronix, meant to be used by service technicians. It contains a whole bunch of calibration procedures, which operate the scope via GPIB. The software recognizes only 2 models of GPIB adapters when I ran its setup program : "PCII" and "PCIIA". don't know anything about GPIB adapters, so I Googled last night and it seems these two numbers refer to two boards from "National Instruments" (of LabView fame, makes sense then). Old ISA type cards... searched Ebay, pretty scarce ! None to be found in France. Found in one Germany, 30+ Euros, on its way to me as we speak, which is the PC2.http://www.ebay.fr/itm/182570213764Then in the UK I found a PC2A board, but for twice the price, and it's only the starting price... god knows what it will actually go for at auction end ! :-/http://www.ebay.fr/itm/NATIONAL-INSTRUMENTS-GPIB-PC2A-CARD-ISA-BUS-/232329238019Can believe such old ISA boards still cost some money, who would have known.Quotei'm impressed !... though not sure I understand how that would work exactly...QuoteHell yes, thanks for offering !I will gladly take any and all information you might have, can only help me !QuoteYep, that chap who sold it to me told me that to, I remember. Sadly he couldn't find the Tek software that does it, all he could find/send me, was that calibration utility, which I guess Tek service techs used to run on every machines to check/bring them back to specs, once they had done some board level repair.