element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog ADI ADALM2000 - Exploring the mysteries of a Crystal Oscillator
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: saadtiwana_int
  • Date Created: 7 Jun 2023 4:31 PM Date Created
  • Views 2996 views
  • Likes 17 likes
  • Comments 14 comments
Related
Recommended
  • RoadTest
  • Test Instrument
  • network analyzer
  • adalm2000
  • analog devices
  • crystal oscillator

ADI ADALM2000 - Exploring the mysteries of a Crystal Oscillator

saadtiwana_int
saadtiwana_int
7 Jun 2023
ADI ADALM2000 - Exploring the mysteries of a Crystal Oscillator

I recently received an ADALM2000 unit, designed and built by Analog Devices, as part of the roadtest program. I have been using this opportunity to explore all that the device offers.

image

The good thing about the ADALM2000 is that it is a small instrument, yet has several instruments built inside (oscilloscope, function generator, spectrum analyzer, Network Analyzer, power supply, voltmeter, etc). This makes it ideal for exploring the world around me, electrically speaking. Being a low(er) cost instrument, it has its limitations, but generally speaking as long as you stay within a few tens of Megahertz range it works fine. For some, few tens of Megahertz is all they need 90% of the time.

One of the instruments inside the ADALM2000 is the Network Analyzer, which I find very interesting because it lets me measure the frequency response of any Device Under Test (DUT). The way it does that is, it generates a "sweep" of frequencies going from a Low Frequency to a Higher Frequency (set by user), and measures both the signal going into the DUT as well as what is coming out of the DUT. Then, the software compares the Amplitude and Phase of what goes in versus what comes out to determine the Amplitude and Phase response of the DUT across the range of frequencies requested by user. 

This information can give a lot of useful insight into the behaviour of the DUT. For example:

  • We can see how a Low/High/Band pass filter behaves both in terms of amplitude and phase response over a range of frequencies.
  • We can see how passing a signal through a long cable attenuates the various frequencies to varying degrees.

...and so on.

In this blog post I want to share some of my experimentation with crystal oscillators. Why crystal oscillators? Because their behaviour is frequency dependent. As per my humble understanding, the way they work is that the quartz crystal inside will respond to a very specific "natural frequency" based on how it was built. So you get resonance at that very particular frequency while the response to other frequencies is less enthusiastic. As a result, you get oscillation at a very precise frequency, corresponding to the natural frequency of the crystal, which is exactly what we need as clock for various digital circuits as well as for analog/RF circuits.

Let's say we have a crystal oscillator at hand, and we don't know what frequency it will oscillate at (let's say the marking can't be read or you can't find the datasheet). Can we use our ADALM2000 to find out the oscillation frequency? Further, what other information can we gather about the behaviour of the crystal. 

Test Setup

For this particular experiment I took a crystal off a scrap microcontroller board for my tests. I can read the markings, but I will pretend I can't. For now.

image

I used a hot air gun to desodler it. Since it is a SMD part, to make my testing easier, I soldered two short wires to the two pads at the bottom. This way I could use my IC test clips to hold on to the wires. (Btw, these clips don't come included with the ADALM2000 kit).

image

To find the natural frequency of oscillation, my idea was to stimulate the oscillator with a sweep of frequencies and see at what frequency it resonates (i.e, gives the largest output). This sounds like something a Network Analyzer would be perfect for. Luckily, the ADALM2000 has all the instruments needed to build one, and the software already implements the functionaity. So let's build a simple circuit as below using the ADALM2000, some IC clips for quick connections, and a resistor. 

image

image

We are using the Function generator Channel 1 inside the ADALM2000 to provide the stimulus, and using the two oscilloscope channels inside the unit to measure the reference signal and the output signal. The Scopy software will help us set the stimulus settings, as well as process the result and display those in nice Amplitude and Phase graphs.

image

Note that the Function generators inside the ADALM2000 are single ended, while the oscilloscope channels are differential. To bring everything to the same reference levels, I have connected the negative sides of the oscilloscope channels to the device ground (which is also the ground for the function generator channels).

I started with a wide sweep starting at 1Mhz and ending at 25Mhz (maximum value allowed by ADALM2000 Network Analyzer). Knowing that the crystals have a very narrow resonance band, I increased the number of frequency sample points to 5000 to get better chances of hitting the resonance frequency. I used a stimulus voltage of 500mV peak to peak so as not to destroy the oscillator in case it operates on lower voltages. The sweep took a several minutes to complete due to the increased number of sample points.

image

If we look at the Amplitude graph, we can immediately notice a sharp peak:

image

Let's zoom in further to get a clearer picture:

image

Putting the mouse over the peak, we can see the peak in amplitude is happening around 12Mhz. Close to that point (but not at exactly the same frequency), we can also see the phase going to 180 degrees corresponding to the point where Amplitude experiences a negative peak. We also see some smaller peaks around 12.57Mhz and 12.71Mhz. 

To observe the behaviour more closely, we can now perform another sweep from 11.5Mhz to 13Mhz. This gives us a better frequency resolution of 300Hz within our frequency span of interest. Note that we can control the frequency resolution to give us even more sample points, but it will increase the sweep time further. This particular sweep took around 5 minutes to complete.

image

The resultant graph gives us a clearer picture. We can see the three resonance points clearly, with the first one being the strongest. Note that the amlitude in the amplitude graph is decibels.By putting the mouse over the peak points, I can see that the first peak has amplitude of ~13dB, while the second peak has an amplitude of -1.94dB. The amplitude difference between the peaks is ~15dB, which, using an online calculator, tells me the first peak is ~5.6 times bigger in volts compared to the second peak. I *think* that might explain why the crystal prefers to oscillate at the first frequency and not at the frequencies corresponding to 2nd (or 3rd) peak. 

At this point I wanted to understand better the behaviour of the crystal around the primary fundamental oscillation frequency (highest peak). For this, I performed another sweep from 11.95Mhz to 12.05Mhz, a much smaller frequency range centered around the main peak. This is what I obtained:

image

I find this graph more interesting than my expectations. My expectation before I started this experiment, was to see a very narrow band pass filter response centered around the crysta's fundamental frequency. However, the shapes of the amplitude and phase responses graphs are not so simple!

I put marker on the peak spot, and we can see that it happens at a frequency of 11.9990 Mhz. You can guess by now that the marking on the crystal says 12.000Mhz. I have read that presence of some capacitance or inductance in parallel/series with the crystal can shift the peak frequency. It could be either that happening here, or it could be that we're at the accuracy limit of the ADALM2000. Without a calibrated second instrument, which I don't have available at home, I can't say which one it is. But I think for most intents and purposes this much accuracy is good enough.

Another very interesting thing I notice here is that the point of Peak Amplitude (resonance) corresponds to a 90 deg phase shift between output and input. Somehow I thought that there would be a 0 degree phase between the stimulus and response at point of highest resonance. Perhaps one of the more knowledgeable readers can help explain this behaviour further!

After the peak point the phase difference drops to 180 degrees, i.e., stimulus and response are opposite in phase. I think this 180 degrees phase shift is something that helps keep the oscillation from not drifting away from the peak frequency, at least on the right side of the peak frequency. The image of a steep uphill climb comes to mind, if the oscillation tries to move past 12Mhz due to the response phase starting to work against the stimulus.

If you understand crystal oscillators better, please help explain the graphs in the comments section!

Buffer previewer functionality

I want to take briefly explain how the "buffer previewer" works in the Scopy Network Analyzer. I found it a to be a very useful tool that enables seeing the actual input/reponse signals to understand what was going on at that particular point  during measurement.

image

Using it is quite simple. Referring to the screenshot above, you turn it on first, then you can move the blue slider horizontally to select the point at which you want to view the signals, and the viewer on top updates in real time to show the actual signals. The orange trace is Channel 1 (reference/stimulus measurement signal), while blue is the reponse signal. Now, we can look back at the raw signals at different points in our sweep around the peak crystal frequency. In all cases, look at the blue slider to see what location on the Amplitude/Phase graph we're viewing.

image
Here you can see the signal before hitting the peak frequency. The response(blue) is smaller than stimulus(orange) signal. The two signals are in phase with each other.

image

Here you can see the signal at the peak frequency. The response(blue) signal is larger than stimulus(orange) signal. This is due to resonance. The two signals have 90 degrees phase difference with each other.


image

Here, we are observing a point between the maximum and minimum peaks. The response(blue) signal is smaller than stimulus(orange) signal. The two signals are 180 degrees out of phase with each other.

image

Finally here we are observing a point after the minimum amplitude peak. The response(blue) signal is smaller than stimulus(orange) signal. The two signals are back to being in-phase (no phase difference) with each other. 

Being able to view the raw signals at the various points not only helps to debug any unexpected results, but also helps build intuition of what's going on to the raw signals.

Why the Series Resistor?

An observant reader might have noticed the resistor in my diagram, and wondered why I needed to use the resistor? Well, I learnt this by experience during this experimentation. Initially I connected things up without a resistor (directly to the two legs of crystal) and saw that the amplitude graph was showing a flat response across the sweep frequencies. This felt odd, so I used the "buffer previewer" function inside the Scopy Network Analyzer to try to make sense of what was going on. I noticed that both the reference as well as the response signals were getting bigger when resonance happened. In other words, the response was also affecting the reference signal measurement itself since there was no isolation/separation between the crystal and Signal generator. A Network Analyzer's amplitude graph shows the ration of Reponse vs Input signals, so both scaling equally doesn't help. I figured I needed to put some separation between the reference signal being generated by the Function generator and the Oscillator response signal. I fixed this by putting a resistor between the two and I immediately started getting the desired results.

Other things I tried 

  • Another idea I had in mind was to excite the Crystal with like "white noise" (a signal containing somewhat equal amounts of a lot of frequencies).My idea was that if I excite the crystal with a whole lot of frequencies, I should see a peak at the natural frequency of the crystal due to resonance, while the other frequencies should get attenuated. To try this, I used the Function generator to generate several types of noise (I tried different settings). I then used the Spectrum analyzer inside the Scopy to look at the response. However, I couldn't manage to get the expected result, and rather saw a lot of different peaks on the spectrum analyzer, without any clear winners. I suspect a major issue was that my "white noise" wasn't white enough, meaning it didn't contain a uniform distribution of frequencies as I had hoped. I think because of the resonance band being so narrow, the chances of hitting the band consistently enough to observe it were very low.

image

The above shows the stimulus uniform noise being generated using the Function generator (Ch1) inside the ADALM2000

image

The screenshot above shows the ouput of the Spectrum Analyzer. The orange trace is the stimulus "uniform noise" spectrum going to the oscillator, while the blue trace is the response spectrum. observed on the other side of the oscillator. No noticeable peak is observed at 12Mhz.

  • I had also planned to repeat this experiment with another crystal I had bought for a TVP5150AM1 AV decoder circuit. However, I realized that the frequency on the crystal (27Mhz) was out of the range of the ADALM2000 (which can go up to 25Mhz in Network Analyzer mode). This was a reminder that the lower cost of instrument comes with limiits on specs.

Observations/Takeaways:

- The "buffer previewer" feature in the Scopy software is very useful to see the raw reference& response signals in time domain and understand what's going on at the very basic level if/when things are not working as you'd expect. 

- Having several instruments at your disposal lets you try different ideas. In my case, I had several different ideas on how to study the oscillator response. Some worked, others didn't. But the amazing thing is that an instrument like this ADALM2000 let me try all those different ideas without having to arrange several different separate instruments, and all conveniently in a little table space the size of a shoebox!

- The lower price of the ADALM2000 comes with its limits on performance - something to be kept in mind when planning experiments.

  • Sign in to reply
  • saadtiwana_int
    saadtiwana_int over 2 years ago in reply to jc2048

    Hi jc2048 . Apologies for the late response...got busy with some work related stuff. 

    "If you want to see the phase response as you learnt it in class, changing the load resistor to 50R, where it will dominate over the capacitor reactances up to a few tens of MHz, would do it." This is very interesting. I plan to redo the experiement with a 50 Ohm resistor to see if that fixes the response. 

    I didn't know ADALM1000 isn't supported on the Scopy app. Possibly it's due to the much older hardware. The ADALM2000 is using a Zynq7z010 FPGA which has a hard core Arm9 processor and is running Linux, so I think it might be hard to keep compatibility between the two. 

    I tried using ALICE too. It seems like a nice piece of software, and has some features not yet avaiable inside Scopy. However, I could never get it to work with my ADALM2000. Apparently there is a version 2.1 that uses the libm2k instead of libiio, but it's only there in source code form, and not in the form of released binaries so I don't think i'll be getting ALICE to work with my device.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 2 years ago in reply to saadtiwana_int

    I see what you mean about the software. ADALM1000 doesn't use Scopey. This is something called PixelPulse2, which takes a scope-like approach but doesn't have the frequency sweep and Bode plotting that you're using. Here I've got it to characterise a 1N4148 diode to ground using the A channel, driving out a current and measuring the voltage. It wasn't very intuitive working out how to use it and it feels very limited in what it can do.

    image

    The other applications offered are a bundle called Alice which are written in Python 2.7. They look like they might be more useful, but I'm still struggling to install them.

    I'll be very interested in the conclusions you and the other roadtesters come to with the ADALM2000 and its software.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 2 years ago in reply to saadtiwana_int

    The ADALM1000 arrived last week and I haven't done anything with it yet. I also took the opportunity to buy a Lattice iCEstick evaluation board at the same time, so I'm very tempted to do something with that first.

    I don't pretend to have any real knowledge of crystals: during my working life they were just components that appeared next to microcontrollers. I knew that they could be damaged by being overdriven, and that sometimes the biased inverter used as the amplifier might not get the oscillation started (happened to me once with a product running from a Li-Ion battery where there evidently wasn't enough noise at the right frequency floating around at the start), but other than that I just followed the recommendations in the datasheets and took care with the layout.

    The wikipedia page looks like a reasonable start for the electrical theory (but it doesn't really explain what is happening mechanically within the quartz, other than to give a vague idea of it flexing in response to the electrical field across it). That page gives this as an equivalent electrical model of the behaviour of the crystal. That model goes back a long way - I've seen it several times in old books.

    image
    I think C1, L1, and R1 are the motional parts and C0 is the actual capacitance between the two electrodes.

    Here I've taken that model and added some typical example values that I got from An Analog Electronics Companion by Scott Hamilton.

    image

    When simulated, that gives this for the Bode plot:

    image
    At the measurement input I've got a capacitor that's stepped from 10pF to 30pF.

    That matches in shape what you're seeing fairly well, so it's a reasonably good model as far as it goes. It does, however, only model the two base resonances: there are no overtones or other 'spurious' responses.

    Increasing the load capacitance appears to have two effects. One is that it shifts the series resonant frequency down by a small amount, though doesn't appear to touch the parallel resonance. The other effect is away from the resonances where it is forming part of an impedance divider and so affects the attenuation of the signal as it goes through without changing the phase.

    From an engineering perspective, it looks like you could pull the series resonance by a few tens of kilohertz with the kind of range of voltage-controlled capacitance that you might get from a varacter diode (70pF-80pF).

    This is the same thing with a simple LC series resonant circuit, where you can see a similar effect from having the load capacitance.

    image

    image
    If you want to see the phase response as you learnt it in class, changing the load resistor to 50R, where it will dominate over the capacitor reactances up to a few tens of MHz, would do it.

    image

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • saadtiwana_int
    saadtiwana_int over 2 years ago in reply to jc2048

    Hi jc2048 Thank you for reading the blog post, and for your detailed comment. Infact, I have been hoping for comment(s) like yours to help explain some of the things I couldn't explain myself, so thank you for that. Frankly I had to read your comment a few times to try to understand everything you mentioned - thanks to on my lack of undestanding in the domain :D 

    Based on your last sentence regarding seeing something similar with an LC network, I will definitely try it out. I am glad I was selected as a roadtester for ADALM2000 as it has given me the opportunity to try out all these things and increase my understanding of such phenomenon on a very fundamental level.

    Btw, since you mention you bought an ADALM1000, might I ask how your experience has been with the Scopy software so far? Personally I have found it to be usable, but I think it leaves a lot of room for improvement.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 2 years ago

    Interesting blog. You've already sold me on the idea of owning an ADALM2000, though it will have to wait until I've finished playing with the ADALM1000 that I've just bought.

    Your traces nicely show the pair of resonances at the fundamental, the lower frequency series resonance and the slightly higher frequency parallel one. For the higher parallel one (the high impedance one), it looks from the trace like you might be scrabbling around right at the bottom of the ADC's resolution.

    "Another very interesting thing I notice here is that the point of Peak Amplitude (resonance) corresponds to a 90 deg phase shift between output and input. Somehow I thought that there would be a 0 degree phase between the stimulus and response at point of highest resonance."

    I think that will be down to the measuring instrument having capacitance at the input. Away from the frequencies where the crystal resonances are having an effect, you have a capacitive divider composed of the intra-electrode capacitance of the crystal and the input capacitance of the 'oscilloscope'. (Think of it as being like the way the frequency compensation for the potential divider of a x10 scope probe works.) So below the series resonance, the overall network response (including the measurement input) looks resistive rather than capacitive. You'd see much the same kind of thing with an LC network if you measured it in the same way.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube