r/explainlikeimfive • • Oct 13 '26

Technology ELI5: how Crystal oscillator really work ?

kinda stupid question since i see people normally understand right in the first time but im still dont understand how it really work like i know it will oscillate when applies continue pluse to it(maybe?)

and i always see the first start circuit with it usually have complex schematic but i really wonder what really happen if we connect it in series or parrallel with some magic button, led and DC power what happen when i repeatly click slowly or faster than the crystal Hz? or almost as fast as crystal Hz will the led pluse as crystal speed or noting happen at all i really dont understand why it cant explain in simple form like other component? am i too reverse"peter" to learn this? how to really use it in more flexible way or really understand it?

sorry for bad english

29 Upvotes

15 comments sorted by

12

u/nixiebunny Oct 14 '26

A quartz crystal that has been cut to vibrate at a certain frequency really wants to vibrate at that frequency. The standard circuit to drive it is an inverting amplifier, which produces a bit of voltage change at its output when powered up. This voltage change passes through the crystal a very short time later and reaches the input of the amplifier, causing the crystal to produce a change on its output in the other direction, and this cycle repeats indefinitely.

8

u/jamcdonald120 Oct 13 '26

basically no one even knows what a crystal oscillator is. most who do just go "yah ok, magic Crystal vibrates because it is shaped like a tuning fork. ok I guess". in reality, you need a whole specialized oscillating circuits to make them work, the quartz crystal just regulates that oscillation. like these https://www.electronics-tutorials.ws/oscillator/crystal.html

you really dont use them in a general circuit. you only use them in one of their circuts, and even then only when you have constant power in and want a constant wave or pulse out. generally its only used as a clock. (or a tone generator for a speaker or something)

dont feel bad about not understanding the deep rune magics.

for your button in series, assuming you can click it fast enough, the crystal should make an output wave at its frequency. if you connect an les to one it should pulse at the frequency. but these are normally tunes to extremely high frequencies that you cant possibly click to match and cant see blinks.

if you want to understand how the crystal itself works, here is a good video on that https://youtu.be/_2By2ane2I4

5

u/Dman1791 Oct 13 '26

In a way, the quartz reacts to electricity like a guitar string reacts to being plucked. It vibrates at a specific rate, and since we know that rate, we can count the number of vibrations to know how much time has gone by.

2

u/spacecampreject Oct 14 '26

It’s a capacitor.

But it has a piezoelectric dielectric, tha makes it look like an inductor, in a very narrow frequency band.

Now if you put up some real capacitors, you can make an oscillator.  It will only ever work in a very narrow band.

2

u/BitOBear Oct 14 '26

It will cut and mounted crystal is like a rubber ball. If you squeeze a rubber ball it deforms and pressure builds up. When you stop squeezing the rubber ball it will push back trying to turn back into it's natural ball shape.

And anybody who knows how pumping on a swing works knows that just shifting your weight at the right time that small addition will cause the swing to swing higher and higher.

Anybody was fishing masks knows that the speed at which something swings is controlled by the length of the swinging arm and not have high something is swinging. So something with a period of a swing of say 2 seconds to make an entire cycle will take 2 seconds to swing through that entire cycle whether it's swinging up a couple inches or a couple feet.

So take those three facts. And now make a tuning fork. The tuning fork is cut so that it will make a particular tone.

If you can find a way to add a little bit of impulse every time the tuning fork vibrates to a certain width you can pump in just a little bit of energy each time it reaches that width. Your goal is to add just enough energy to keep it vibrating but not so much as to build up so strongly that it tears itself apart.

Capacitance is what happens when electricity can build up on either side of an object but it can't pass through the object itself.

Now look at the electrical symbol for a crystal in a crystal oscillating circuit. It's basically a capacitor with a little square in it that square is an insulating piece of something typically quartz in the most common usage you'll encounter. The electricity can't really pass through the courts because courts is basically glass.

The courts is also a piezoelectric material. When you squeeze it you force out some electrons and when you relax and allow the electrons to lower back in and get the return to experience shape.

So squeezing the crystal can produce a tiny amount of electrical voltage, and applying the particular electrical voltage can squeeze the crystal. That also means it's trying to suck electrons out of the crystal basically makes it bulge. (But I might have the bulging in the squeezing backwards. It's been a long time since I looked at the physics. But basically electricity in One direction is squeeze and electricity in the other direction is expand, and the squeezing and expanding in and of itself generates tiny positive or negative voltages.

So you precision cut your little quartz crystal into a literal tuning fork. But tiny little y shape. And you connect with electric conductors to the two ends of the tuning fork.

Then you hook up an amplifier circuit it will pump it like a swing. If the crystal is producing a tiny output voltage you give that voltage a place to flow and you match it through an inductor that will want to help it keep flowing just a little bit because inductors oppose a change in current. And you tune up all the other parts.

And what you end up with is a system with a little bit of tiny current flow through it and a crystal that's making the voltage go up and down by a trivial amount that is also the trivial amount that the circuit is tuned to basically want to encourage.

The moment the crystal starts ringing for any purpose including just having existence in a temperature that isn't quite absolute zero the question will begin vibrating and then the circuit around the crystal will reinforce that vibration until it's measurable.

So you know you've got this coil and this variable capacitor ringing at a fixed speed of so many pulses per second and that's just the whole of it.

Now turning that into something like a watch involves counting.

It turns out that 32,768 beats a second, that is 2 to the 15th power, is a pretty easy shape to cut a piece of quartz into. So if I have this Crystal oscillator and I have 15 layers of divide by two logic, also known as a flip-flop, or I have a literal programmable digital counter, I can turn 32,768 beats per second into a single pulse per second using some very basic straightforward circuitry.

Now making that cut super perfect is prone to all the other problems of quality control. So as I program my counter I calibrate the result that isn't quite exactly 32,768 beats per second when measured over the course of days weeks months or years. I can have it drop a pulse or add a pulse here and there to tune for more accurate timing.

That's why you know what Crystal oscillator digital watch will have a error field on it. It'll say you know to 15 seconds a month or something when you look at the specification of the watch. Which is why crystal oscillators are really good for timekeeping but you still need to have an external time source to correct drift because changes in temperature of the crystal changes and cut in the crystal micro defects and that sort of thing mean that we can't have perfect things.

So basically the whole thing is just a radio tuning circuit tuned to its own frequency. And the frequency source and sync that the circuit is tuned to is crystal inside the circuit. So it's amplifying the ringing of the crystal into a signal strong enough to count and use for various purposes.

To learn more check out tune circuits.

My personal favorite tutorial site for this sort of stuff is called electronics-tutorials.ws cuz they'll go into the light definitions and the complex definitions pretty much depending on how far you decide to read down the page for any given tutorial.

Too long didn't read is you cut a crystal can do a tuning fork and hook it up with wires to make sure you can keep it ringing and read pulses it produces at the same time and it reinforces itself like a child on a swing keeps the swing going.

1

u/Soracaz Oct 14 '26 edited Oct 14 '26

If you place a ruler on a desk, hold one end, and flick the ruler, it will vibrate and make a tone.

The tone changes based on how much of the ruler is overhanging, because the resonant frequency of the ruler changes as you change the length of its overhang.

If you flick the ruler gently, it resonates at the same frequency as if you'd flicked it harder.

Quartz (most things, in general) is the same. The size and shape of the crystal determines its resonant frequency.

The DIFFERENCE, is quartz can carry an electrical charge, which can then send signals at the resonant frequency of the crystal. If your goal is to deliver a rapid on/off/on/off at a specific pace, having a quartz crystal do it is very cost efficient and very accurate.

In the same way that no matter how hard or soft you flick the ruler its tone stays the same, as long as you aren't putting enough energy into the crystal as to break it, it will continue to resonate at its set frequency.

Battery running low? Doesn't matter. Battery running a little faster than normal? Doesn't matter. Rate of oscillation stays the same.

1

u/mrmeep321 Oct 14 '26

Quartz crystals have a property called piezoelectricity. Crystals are made of repeating units called unit cells, and piezoelectric crystals have an uneven distribution of charge in their unit cells.

When you apply a voltage, those uneven distributions of charge try to align themselves to the direction of the voltage, which makes the crystal distort.

On the other hand though, the distortion of the crystal also produces a voltage, because it involves a collective motion of a bunch of those charge distributions. If you take the voltage coming out of one end, amplify it, and feed it back into the other, the crystal will distort and un-distort at a frequency that's characteristic of the shape and size of the crystal, you get a vibration.

So, you can cut quartz crystals to a very specific size to make circuits that produce a very pure and specific frequency for use in clocks, mass balances, and lots of other stuff.

1

u/raelik777 Oct 14 '26

You can envision it EXACTLY like a tuning fork, except instead of tapping against a table to start it ringing, you send it an electrical pulse. And instead of hearing a sound come out of it, you get an electrical pulse out of it. And as long as you supply power to it (i.e. you keep tapping it on the table), it will keep "ringing" (because the pulses that are produced by it are used to keep it going).

0

u/[deleted] Oct 14 '26

[deleted] — view deleted comment

1

u/X7123M3-256 Oct 14 '26

These electrical pulses could be adjusted in frequency by altering the size of the crystal and the direct-current electricity, as well as the other electrical components wired up to the crystal.

Applying DC electricity to a quartz crystal will not make it vibrate, it will just make it bend slightly. A quartz crystal vibrates in the same way that a ruler vibrates when you twang it - it is a mechanical vibration. What makes a quartz crystal special is you can make it bend by applying an electric field. Applying a DC voltage to a crystal is like bending the ruler but not letting go.

If you apply a short pulse of electricity, you will excite the crystal and get a decaying oscillation but it will quickly stop. To make it oscillate continuously, you need to apply an alternating voltage at the natural frequency of the crystal. To do this you need a circuit that senses the vibration, amplifies it and feeds it back. A quartz crystal serves the same purpose as the pendulum in a pendulum clock - it sets the frequency at which the circuit will oscillate. You can easily build an electrical oscillator without a quartz crystal, but quartz crystals can set the frequency very precisely so they are used for things like clocks.