(ruler vibrating)
- This video is sponsored by NordVPN.
In the world of watch enthusiasts
there can be a bit of snobbery that says
mechanical watches are far superior
to battery powered watches.
And I can understand why
like you've got these objects that are really intricate,
really precise, really small, and yet entirely mechanical.
That's amazing.
That's a really desirable object
but when you find out how the mechanism
inside a battery powered quartz watch works
it becomes equally desirable, or at least it did for me.
And it's probably the next watch
that I'll get once my Pebble kicks the bucket.
But anyway, this video is about the amazing
mechanism that powers a quartz watch.
If you want to make any kind of timekeeping device,
then the first thing you need is
some kind of thing that oscillates where you know
how long each oscillation takes.
So a good example is a grandfather clock.
So you have a pendulum where
(clock ticking)
it is known that a single pendulum swing takes one second.
You know the period of oscillation
and you can use it to drive the mechanism of the clock.
But if you tried to wear a pendulum clock on your wrist
it wouldn't work because the movement of your hand
would cause the pendulum to go all over the place.
You have the same problem if you put a grandfather clock
on a ship.
Actually it was the need to be able to tell the time
at sea that drove the development
of non-pendulum based clocks
that ultimately led to mechanical wristwatches.
In a mechanical clock,
the pendulum is replaced with an oscillating mass
on a spring, a bit like this,
except that this arrangement
isn't much better than the pendulum.
It still relies on gravity
and it's gonna swing around on a ship
so instead you use a coiled spring and a rotating mass
the rotating mass repeatedly winds up
and unwinds the coiled spring like this
that balance wheel mechanism is the basis
of most mechanical watches.
And it can be incredibly accurate
a high-end mechanical watch
might only lose as many as five seconds per day.
And yet a battery powered watch
can easily be way more accurate than that.
And they can achieve that feat with a tiny tuning fork.
So grandfather clock uses a pendulum with a known period
of oscillation, a mechanical watch uses a mass
on a spring with a known period of oscillation,
and a battery powered watch
uses a tuning fork with a known period of oscillation.
This particular tuning fork oscillates 440 times per second
which is an audible frequency
otherwise known as A above middle C.
(tuning fork vibrating)
There it is.
You may already have spotted a problem
with using a tuning fork to keep time,
which is that, well
you whack it to get it to vibrate
(tuning fork vibration)
but the vibration slowly dies down
until it's not vibrating anymore.
So how do you keep it vibrating?
And also, how do you turn that vibration
into the ticking of a clock?
Actually, both of those problems can be solved
with an electromagnet.
Consider this simplified tuning fork.
I don't know if you can call it a tuning fork.
I mean, it's a metal ruler (indistinct)
but anyway like a tuning fork, if you whack it
it will vibrate at its natural resonating frequency.
Unlike a tuning fork, you can't hear it
because the frequency is too low, but like a tuning fork
if you leave it for long enough
eventually the vibrations will die down to nothing.
Eventually.
(indistinct)
But now look at this set up.
I've got an electromagnet here,
these are the wires going into the electromagnet.
This one's connected to a nine volt power supply
but this one's just not connected to anything.
So the circuit is broken
the electromagnet has no power.
But the other end of the power supply goes into the ruler.
So if I were to touch this wire against the ruler
the circuit would be complete
and the electromagnet would turn on.
I've also attached a permanent magnet to the ruler
that is repelled by the electromagnet when it's turned on.
So what you can do is you can place the wire
just next to the ruler so that when the ruler gets too close
to the electromagnet, it completes the circuit
and is repelled from the electromagnet.
It's a bit like pushing someone on a swing,
every time they get too close to you, you push them away.
You're not changing the resonating frequency
of the person on the swing
you're just keeping it going.
We should be able to do that here.
Let's have a look.
(ruler vibrating)
As a bonus, the current in this circuit
that keeps turning on and off at regular intervals
can also be used to regulate the ticking of the clock.
A more sophisticated and miniaturized version
of this setup can actually be found
in watches manufactured between about 1940 and 1960.
The Accutron had a tuning fork inside
that would vibrate 360 times per second.
So if you put the watch against your ear
you would hear this sound,
(steady music)
which is nice.
The real revolution came with the discovery
of piezoelectricity.
I explained the piezoelectric effect in my last video
and why it arises in certain crystals.
But a quick summary here, if you take a crystal of quarts
and you cut it in just the right way
and then deform the crystal by like hitting it for example,
then you'll measure of voltage across the crystal.
And conversely, if you apply a voltage
across the crystal then the crystal will deform.
So if you look inside a digital watch or an analog watch
that's battery powered or the back
of a battery powered wall clock
you will find this component.
And if you take off the protective outer case
there it is a crystal of quartz,
of course in the shape of a tuning fork.
If I flick this crystal, it will sing like a tuning fork
except that you won't be able to hear it
because the frequency is too high for our ears
but because it's piezoelectric
it doesn't just produce this inaudible sound,
it also produces a detectable oscillating voltage.
This is a USB oscilloscope.
So what you're seeing here is the voltage detected
across the probes and I've connected
the quartz tuning fork to the probes.
So at the moment, there's nothing going on,
but look if I flick it
you see that wave pattern?
So that's the voltage across that probes going up and down
because the piezoelectric crystal is flexing back and forth
so the voltage it produces is going up and down.
We can take a screenshot
and then try and work out what the frequency is.
Or we can switch to frequency view
where the scope is actually gonna show us the frequencies.
So now if I flick it, see that spike that appears?
And just put a little dash line at 32.7 kilohertz.
And look, when I flick it,
that's exactly where the spike appears.
Just like a tuning fork,
the vibration is short-lived
and you need to find a way to keep it going
like we did with the electromagnet
but with a piezoelectric tuning fork,
you can do something really clever.
You take the voltage coming off the tuning fork
that oscillating voltage, you run it through an amplifier
and then you feed it back into the tuning fork.
And that's how you keep the tuning fork vibrating
at its own natural resonating frequency.
Here's the quartz crystal back in situ
in that feedback amplification circuit,
and look here's that permanent spike now at 32.7 kilohertz.
That measurement of 32.7 kilohertz
is only accurate to one decimal place.
And I happen to know that the actual real value
is 32.768 kilohertz
or in other words 32,768 hertz.
The quartz crystals are calibrated in the factory
to be that exact frequency.
So they add gold to the tips of the tuning fork
and then just slowly shave little bits
off until the frequency is exactly right.
Well, if you know your powers of two
then you might have spotted
that it's two to the power of 15
but why is it that exact number?
There's actually a clever reason for it
well there's two really cover reasons.
The first is it needs to be above 20,000 hertz
because that's about the limit of what people can hear.
And you don't want an audible wine coming from your watch.
So make it above 20,000 hertz and two to the power 15
is the first power of two that's above 20,000
but why does it need to be a power of two?
This is where it gets really clever
because you can take an oscillating signal like that
and you can pass it through a chain
of flip-flops and it will turn that 32,768 hertz signal
into a one hertz signal, one blip per second.
And you can use that one blip per second
to tick the second hand of your clock.
And when I say chain of flip-flops, what I mean?
Well, a flip-flop is just a little bit of logic circuitry.
I'm not gonna go into how a flip-flop can be built
out of N gates and O gates and things like that
but just know that a flip-flop can hold a state.
So you give it a signal and it turns on
and it will stay on until you send it another signal
and then it will turn off and it will stay off
until you send it another signal.
So let's see what happens when we chain
15 of these flip-flops together.
Let's just look at the first flip-flop
in the chain to begin with.
So remember, you've got this signal coming in
from the quartz tuning fork and that's a sine wave
but this is a digital device.
It's a smart flip-flop if you like.
So this is expecting just on and off
there'll be some processing that takes that sine wave
from the quartz crystal and turns it into
a square wave like that.
So you've either got on or off coming into this flip-flop
and the logic inside the flip-flop is arranged
so that any signal that's coming in, in the on position
the flip-flop will flip as soon as the on signal turns off.
Right?
So it's in the drop of the on signal, right?
So here's the signal coming in.
And as it drops, that's when it flips like that, okay?
And then the next signal comes in
and just as that signal cuts off, it flips again.
Right?
And then the third signal comes in and it flips
the fourth signal comes in and it flips, right?
So that's the off position, that's the on position
of the flip-flop.
And you'll notice that the flip-flop flips
into the on position every second a signal coming in.
So like all the odd signals coming in
it flips to the on position.
So if you look at the frequency
at which this flip-flop turns on,
it's half the frequency of the incoming signal
and here's the clever bit,
you take the signal out of this flip-flop
and you feed it into the next flip-flop in the chain, right?
So this flip-flop flips on
and remember we've arranged the logic inside this flip-flop
so it will flip or flop when the signal coming into it
turns off, at the moment that it turns off.
So the moment that this turns off
this one turns on like that, right?
Then this one turns on again
and then at the moment that it turns off,
this one turns off, all right?
And just considering these two on their own
you'll notice that this one flips half as often
as this one, and this one turns on and off
half as often as the signal coming in, right?
And then you change this one into this one.
So you've got on, off, on, off
but then this one turns on when this one turns off, right?
And so the whole thing happens again
on, off, on, off (laughs)
and then this one turns off at the same time
with the off signal from this one.
The important thing is the frequency of flips
and flops goes down by a half each time
you progress it on to the next flip-flop.
And so think about that.
You've got a signal coming in
which is 32,768 hertz coming in.
This is on and off half as often as that
half of that is 16,386 or 84 sorry,
there's no reason I'm looking over there by the way
this one is half as often again
which is 8,192 ons per second if you like,
this is half of that which is 4,096.
And so on down the chain, these are powers of two.
So you've got a signal coming in
with a frequency of two to the power 15.
Then this has a frequency of two to the power 14.
This has a frequency of two to the power 13,
two to the power 12, two to the power 11, 10, nine
eight, seven, six, five, four, three, two, one.
This is two to the power one.
That's the frequency of that,
two the the power of one is two
so this has a frequency of two flip-flops per second.
So this is two to the power zero or one.
So this flips every second.
I've actually got a redundant flip-flop here.
You don't need 15, you need 14.
That was my mistake.
That's called an off by one error
happens a lot in programming. (laughs)
So you use the signal from this flip-flop
to power what's called a stepper motor
which is a motor that can turn by an exact amount
every time it receives a voltage.
So you can use that with a series of gears
to move the second hand of your clock
and then some other gears to move the minute hand
and the hour hand as well.
And of course, because you're dealing
with an electronic signal to begin with,
you can avoid the mechanical world completely
and just use that signal to drive an LCD display.
And that's how quartz watch works.
Any halfway decent quartz watch is only gonna lose
about a second a day at the most,
which is way more accurate
than even a really high-end mechanical watch.
But of course a quartz watch isn't the most accurate
way to keep time.
The most way we have now is with an atomic clock
but did you know this, an atomic clock
still uses the vibration of a quartz crystal to keep time?
It's just that it also uses atoms of cesium
to tweak the vibrations of the quartz crystal
if it seems to be drifting off.
So yeah, even an atomic clock uses a quartz crystal.
I'm not gonna explain how an atomic clock works now
because there are plenty of videos out there
explaining that.
The best video explanation that I have found is
on The Everything Channel.
So I recommend you hop over there
and watch that I'll put a link
in the end screen and in the description.
But I also recommend you subscribe to that channel
because lately he's been making these like
cinematic, epic videos where you also learn
about science, really amazing.
So head over there, watch the video about atomic clocks
but also subscribe.
This whole video came about
because I was looking at how computers
know what time it is and how they synchronize
around the globe using network time protocol
because I was doing a security audit
and it turns out having an accurate time on your devices
is important for security.
Who knew?
I was also looking at VPNs as well.
So I decided to reach out
to NordVPN to see if they'd sponsor this video
'cause that's the VPN I use now.
And so yeah, they're sponsoring this video.
You know, this VPN stands for Virtual Private Network
but what it really means is
that all your online activity is secure.
It's anonymous, your IP address is hidden.
Everything's encrypted.
You know, look, you've got nothing to hide, right?
But all that data that's spreading out
of your device is valuable.
And it can be used in ways which is not necessarily good
for the user.
As a bonus by the way,
if you ever get this message on YouTube that says
this video can't be viewed in your country,
with a VPN you can make your computer
appear to be in a different country.
And it's really easy to do through NordVPN.
It's one of the things I like.
You can get it on your computer, but it's also for Android
and iOS devices.
If you go to nordvpn.com/steve now you'll get 75% off,
which is just $2.99 a month.
And if you use the promo code, Steve when you check out
you'll get the first 30 days absolutely free.
So check out NordVPN today.
I hope you enjoyed this video.
If you did, don't forget to hit Subscribe
and I'll see next time.
(cheerful music)