00:00:00
Bluetooth is a fascinating technology.
00:00:03
For example, when you play music on your wireless
head-phones, your smartphone transmits around
00:00:09
a million 1s and 0s to your headphones every
second using Blue-tooth.
00:00:15
These 1s and 0s are assembled into 16-bit
numbers which are used to build the electrical
00:00:16
waveform that is sent to the speaker and converted
into sound waves.
00:00:17
But how are a million or so 1s and 0s wirelessly
transmitted every single second between your
00:00:24
smartphone and your wireless earbuds?
00:00:26
In order to answer this question, we’re
going to explore the engineering behind Bluetooth
00:00:32
and the principles of wireless commu-nication.
00:00:36
Before we get into the details and specifics
of Bluetooth, let’s start with an analogy.
00:00:42
When you see a traffic light change color,
you recognize what that color change means.
00:00:47
The traffic light uses a section of the electromagnetic
spectrum, or light, to convey information.
00:00:54
The green light has a wavelength of around
540 nanometers, yellow around 570 nanometers,
00:01:02
and red around 700 nanometers.
00:01:05
Your eyes can easily distin-guish between
these different wavelengths of light, and
00:01:10
your brain interprets these different wavelengths
and the information they convey.
00:01:15
Your smartphone and wireless earbuds communicate
using electromagnetic waves in a rather similar
00:01:22
fashion but utilizing a different section
of the spectrum.
00:01:26
Specifically, Bluetooth uses waves that are
around 123 millimeters in wavelength.
00:01:33
They are invisible to the human eye and can
generally pass-through obstruc-tions like
00:01:37
walls, rather like visible light passing through
glass.
00:01:41
When your smartphone sends a long string of
binary 1s and 0s to your earbuds, it communicates
00:01:48
these 1s and 0s by designating a wavelength
of 121 milli-meters as a 1, and a wavelength
00:01:56
of 124 millimeters as a 0, similar to the
540-nanometer green and 700 na-nometer red
00:02:04
colors of the traffic light.
00:02:06
Your smartphone’s antenna generates these
two wavelengths, and switches back and forth
00:02:11
between them at an incredible rate of about
a million times a second.
00:02:17
With this pro-cess of switching between the
two wavelengths, kind of like switching between
00:02:21
the red and green traffic lights, your smartphone
can communicate around a million 1’s and
00:02:28
0’s every single second to your earbuds.
00:02:31
And amazingly, engineers have designed the
antennae and circuitry in your earbuds and
00:02:35
smartphone to be attuned to sensing and transmitting
these wavelengths back and forth to one another.
00:02:43
Before we dive into further details on Bluetooth,
let’s briefly explore and clarify these
00:02:49
visualizations because they’re potentially
rather confusing.
00:02:54
First of all, electromagnetic waves do not
travel in a single direction in a sinusoidal
00:03:00
fashion like this.
00:03:02
In fact, the electromagnetic waves that are
transmitted from your smartphone travel out
00:03:08
in all directions like an expanding sphere.
00:03:11
When your smartphone switches between frequencies,
it’s as if it were a lightbulb that rapidly
00:03:17
changes between two different frequencies
of millimeter length electromagnetic waves,
00:03:23
which travel out as expanding spheres.
00:03:27
As a result, your smartphone and wireless
headphones can work in any di-rection.
00:03:32
Thus, this visualization of a directional
sinusoidal wave is lacking, yet there are
00:03:38
still merits to the vis-ualization.
00:03:41
In order to give you a sense of how Bluetooth
works, we’re going to use 4 different visualizations
00:03:47
that are all different perspectives of looking
at the same invisible thing.
00:03:52
Here we have the sinusoid waves which give
us a sense of the frequency and wavelength
00:03:58
of the electromagnetic wave.
00:04:00
What’s moving up and down is not the wave
itself, but rather it’s the strength of
00:04:06
the electric field.
00:04:07
This perspective just shows us a directional
sliver or ray of the expanding sphere with
00:04:14
the electric field going up and down as the
Bluetooth signal propa-gates outwards in all
00:04:20
directions.
00:04:21
If we were to measure the electric field at
a single point in space, we would find that
00:04:26
the strength of the electric field would increase
and decrease sinusoidally, and the number
00:04:32
of peaks per second would be the frequency.
00:04:35
Furthermore, we’re ignoring the magnetic
field component of the elec-tromagnetic wave,
00:04:41
as including it would be too confusing.
00:04:44
Let’s move onto the second visualization.
00:04:47
Here we have the travelling binary numbers
which give us a sense of the data being sent,
00:04:53
however it also doesn’t show the spherical
propagation of the electromagnetic waves or
00:04:59
the changing frequency of the wave.
00:05:02
Note that it’s possible to send multiple
bits at the same time which we’ll explore
00:05:07
later.
00:05:08
Third, we have the expanding spheres visualization,
which gives a sense of the true near-omnidirectional
00:05:16
emission of electromagnetic waves from your
smartphone and headphones, but it’s difficult
00:05:21
to show the frequency or the data that’s
being sent, and it's rather visually complex
00:05:28
to process.
00:05:29
And last, we have the simplified spheres,
which help us see that these two devices are
00:05:35
emitting and receiving electromagnetic waves
along the same frequencies, but it doesn’t
00:05:41
show us much else.
00:05:43
Different visualizations are useful in different
scenarios, and with that covered, let’s
00:05:48
get back to the focus of this video.
00:05:51
As mentioned, Bluetooth operates at around
123 millimeters of wavelength, but specifically,
00:05:58
it oper-ates between 120.7 millimeters and
124.9 millimeters of wavelength in the electromagnetic
00:06:07
spectrum.
00:06:09
Note that, these frequencies are more commonly
referred to as having a 2.4 to 2.4835 Gigahertz
00:06:18
frequency band-width or range.
00:06:21
Just as our eyes see within a range on the
electromagnetic spectrum, Bluetooth anten-nas
00:06:26
see or perceive within their own range of
frequencies . Now, at any given time, there
00:06:34
might be dozens of people using Bluetooth
devices at the same time in the same room.
00:06:40
To accommodate so many users, this section
of the electromagnetic spectrum is broken
00:06:46
up into 79 different sections or channels,
with each chan-nel having a specific wavelength
00:06:53
for a 1, and another for a 0 and at any given
moment your Smartphone and earbuds communicate
00:07:00
across just one of these channels.
00:07:02
For example, these are the frequencies for
a 1 and a 0 in channel 38, whereas these are
00:07:09
the frequencies for channel 54.
00:07:12
Now this begs the question: if dozens of devices
are using the same wavelengths and possibly
00:07:19
the same channel, how do your earbuds receive
long strings of binary bits, or messages from
00:07:25
your phone exclusively.
00:07:27
Well first, the messages are assembled into
packets.
00:07:31
In each packet, the first 72 bits are the
access codes that synchronize your smartphone
00:07:37
and earbuds to make sure that it’s your
specific earbuds that receive the message.
00:07:42
These access codes are similar to the address
words on a postal letter or package.
00:07:46
Just a few lines of writing and a stamp can
send a letter, which is seemingly identical
00:07:47
to millions of other letters, to the exact
house or address anywhere in the world.
00:07:49
The next 54 bits are the header which provides
details as to the information being sent,
00:07:54
which in our analogy can be equated to the
size of the letter or the box.
00:07:59
And the last 500 bits are the actual information
or payload, kind of like the contents of our
00:08:06
postal letter or box, which in this case are
the digital 1s and 0s that make up the audio
00:08:12
that you are listening to.
00:08:13
If you’re wondering how audio can be represented
by 1’s and 0’s take a look at this episode
00:08:20
on audio codecs.
00:08:22
Ok, so now let’s add more complexity to
the mix.
00:08:26
As mentioned, Bluetooth operates in a set
of 79 dif-ferent channels.
00:08:32
However, when your smartphone and earbuds
communicate, they don’t stick to a single
00:08:38
channel, but rather they hop around from channel-to-channel
kinda like channel surfing on your TV.
00:08:44
In fact, this hopping between the 79 channels,
which is called frequency hopping spread spectrum,
00:08:52
happens 1600 times a second, and after each
hop one packet of information composed of
00:08:59
the address, header, and payload, is sent
between your smartphone and earbuds.
00:09:05
Your smartphone dictates the sequences of
channels it will hop to, and your earbuds
00:09:11
follow along.
00:09:12
Furthermore if one of the 79 channels is noisy
due to interference or is crowded with other
00:09:19
users, then your smartphone adapts and doesn’t
use that channel until the noise clears.
00:09:25
This channel hopping also prevents anyone
from eavesdropping on the information that
00:09:30
is being sent between the two devices, because
only your smartphone and earbuds know the
00:09:36
sequence of channels that they will communicate
across.
00:09:40
Interestingly, because the information is
divided and sent using packets, if your earbuds
00:09:47
don’t receive one of the thousands of packets,
it says it didn’t receive that particular
00:09:52
one , and your smartphone sends the packet
again.
00:09:57
It might seem crazy or mind blowing that the
circuitry in your phone can generate pulses
00:10:03
of electro-magnetic waves a million times
a second at very specific frequencies and
00:10:09
then have these pulses received and decoded
by your earbuds- but hey- it happens.
00:10:16
Just think about how your screen has millions
of pixels, also emitting specific frequencies
00:10:22
and strengths of the electromagnetic spectrum,
or light at around 30 to 60 or more times
00:10:28
a second.
00:10:29
Technology is fascinating.
00:10:32
One quick side note: We would greatly appreciate
it if you could take a second to like this
00:10:38
video, sub-scribe to the channel, comment
below, and share this video with others.
00:10:44
A few seconds of your time can help us to
create many more educational videos.
00:10:50
Thank you!
00:10:51
Okay, let’s move on.
00:10:53
One point of interest is that Bluetooth’s
frequency range of 2.4 Gigahertz to 2.4835
00:11:00
Gigahertz is shared by other industrial and
medical devices.
00:11:05
For example, your microwave is in this range
and has a frequency of 2.45 Gigahertz.
00:11:11
In fact, when your microwave is on, it can
cause your head-phones to lose track of the
00:11:17
1s and 0s being sent by your smartphone, or
in other words your headphones can lose signal.
00:11:24
However please don’t think your Bluetooth
headphones are dangerous because they emit
00:11:29
a wavelength that’s similar to your microwave’s.
00:11:32
That would be like comparing the light output
from stadium floodlights to the light from
00:11:36
your smartphone screen, and saying that, because
they both use the same colors of light, they
00:11:42
will both cause damage when stared at from
a foot away.
00:11:46
Also, remember we mentioned that the electromagnetic
waves from Bluetooth can easily travel through
00:11:52
obstacles such as the walls of your house?
00:11:55
However, the walls of the microwave are designed
to block waves of this frequency.
00:12:01
You can test this by putting your smartphone
in the microwave; the Bluetooth signal from
00:12:05
your smartphone to your headphones will be
blocked, and the connection lost.
00:12:10
However, make sure NOT to turn on your microwave
with any electronic devices inside of it,
00:12:17
I repeat, do NOT turn on your mi-crowave otherwise
it WILL damage whatever electronics you put
00:12:23
into it.
00:12:24
In addition to microwave ovens, 2.4 Gigahertz
Wi-Fi networks also operate within this range
00:12:32
of the electromagnetic spectrum.
00:12:34
Similar to Bluetooth, Wi-Fi networks divide
this range or bandwidth into 14 chan-nels
00:12:42
in order to accommodate multiple users communicating
via Wi-Fi at the same time.
00:12:48
You might be won-dering, if there are a bunch
of different devices all sharing similar frequencies,
00:12:54
one of them being a microwave that, if poorly
shielded, can emit stray electromagnetic waves,
00:13:01
how is it possible for your smartphone and
headphones to send megabits of data every
00:13:07
second, error free?
00:13:09
Well, as mentioned earlier, your smartphone
does this by frequency hopping, and utilizing
00:13:16
packets.
00:13:17
In addition to that, Bluetooth also utilizes
bits for de-tecting errors and the circuitry
00:13:23
in your smartphone filters out unwanted noise.
00:13:27
For a non-technical under-standing of this,
let’s go back to our traffic light analogy.
00:13:33
When you’re driving and you see a traffic
light, it’s not like that’s the only thing
00:13:37
you can see.
00:13:38
Your eyes perceive a rather complex scene
filled with tons of other objects.
00:13:44
Your brain interprets this information-filled
scene and picks out the information important
00:13:49
to you, while ignoring all the objects that
aren’t.
00:13:53
Similarly, your smartphone and wireless headphones
have rather complicated circuitry inside a
00:14:00
specialized Bluetooth microchip that’s designed
and tested by engineers, which filters out
00:14:06
unwanted signals, checks for errors, coordinates
the frequency hopping, and assembles the infor-mation
00:14:13
into packets thereby enabling reliable and
secure communication.
00:14:20
Before we move onto some higher level-engineering
concepts, we’d like to take a few seconds
00:14:25
to thank KIOXIA for sponsoring this video.
00:14:28
Many Bluetooth devices such as mobile phones
and tablets use KIOX-IA BiCS Flash Memory.
00:14:35
KIOXIA also manufactures a wide variety of
SSDs and they have sponsored a couple of our
00:14:41
videos that explore the inner workings behind
how SSDs work.
00:14:46
Here’s a consumer class SSD, versus this
enterprise class SSD.
00:14:52
They look similar from the outside but are
entirely different on the inside.
00:14:57
KIOXIA pro-vides these leading quality enterprise
class PCIe NVMe solid state drives, and they
00:15:05
can fit in the same space, but have capacities
up to a whopping 30 Terabytes, and use a proprietary
00:15:13
architecture built with their own controller,
firmware, and BiCS Flash 3D TLC memory in
00:15:21
order to deliver incredibly high sustained
read and write performance and reliability.
00:15:27
Check out KIOXIA’s SSDs using the link in
the description.
00:15:31
Let’s move on to even more complicated details
regarding Bluetooth.
00:15:37
The scheme of sending a digital signal, or
a binary set of 1’s and 0’s by transmitting
00:15:43
different frequencies of electromagnetic waves
is called frequency shift keying.
00:15:50
Frequency shifting means that we adjust the
frequency, and keying means that a 1 is assigned
00:15:55
to one frequency, and a 0 to another, just
like our traffic light colors.
00:16:01
Note that the comparison to a traffic light
which emits one color and then another is
00:16:06
a little inaccurate because your smartphone’s
circuitry generates one frequency, called
00:16:11
a carrier wave.
00:16:13
This circuitry shifts the carrier wave to
a higher frequency when it wants to send a
00:16:18
1 or to a lower frequency when it wants to
send a 0.
00:16:24
This shifting of frequencies in order to send
information is also called frequency modulation,
00:16:30
and it’s closely related to FM radio.
00:16:33
That being said, Bluetooth isn’t limited
to using just frequency shift keying; but
00:16:38
rather it can also use other properties of
electromagnetic waves to transmit information.
00:16:44
A different method that has higher data transfer
rates is called phase shift keying, which
00:16:50
is a significantly more complicated to explain
but we’ll try.
00:16:54
An electromagnetic wave’s phase is a property
that our eyes can’t perceive, and it shouldn’t
00:17:00
be confused with the amplitude or the frequency
or the wavelength.
00:17:05
Let’s use an analogy.
00:17:07
Imagine you’re at the beach and you see
the waves hitting the shore at a rate of one
00:17:11
wave a second.
00:17:13
Over a minute you would see 60 wave peaks
reach and break on the shoreline.
00:17:18
Changing the frequency would be changing how
many wave peaks reach the shoreline every
00:17:23
second and changing the amplitude would be
changing the height of the peaks and troughs
00:17:28
of the waves.
00:17:29
However, phase shifting would be seen as breaking
up the waves’ locations of the peaks and
00:17:35
the troughs within a set of wavelengths.
00:17:37
There are still 60 waves over an entire minute,
meaning the frequency doesn’t change, but
00:17:43
as the phase shifts, it’s as if the peaks
and troughs shift forward or backward within
00:17:49
a set of wavelengths.
00:17:51
Bluetooth antennas and circuitry in your smartphone
and wireless earbuds can be designed to emit
00:17:57
and detect shifts in the phase of an electromagnetic
wave, and binary values can be keyed, or assigned
00:18:05
to dif-ferent levels of shifts in the phase
of the wave.
00:18:11
There are a few things to note with our examples
and explanations.
00:18:15
We’ve talked a lot about your smartphone
sending information to your wireless earbuds;
00:18:20
however, your earbuds also send data to your
smartphone.
00:18:25
For example, when you’re on a phone call
using your earbuds, the audio from the microphone
00:18:31
in your wireless headphones is obviously sent
back to your smartphone.
00:18:36
In order for Bluetooth to accommo-date this
back-and-forth conversation, the smartphone
00:18:41
and the headphones alternate transmitting
and re-ceiving data, while maintaining the
00:18:47
frequency hopping schedule.
00:18:49
During one 625 microsecond timeslot, your
smartphone will send one packet of data to
00:18:55
your headphones along one channel, and then
during the next 625 microsecond time slot
00:19:02
your headphones will send one packet of data
to your smartphone along the next channel
00:19:07
in the frequency hopping schedule.
00:19:10
Also, as we mentioned earlier, a Bluetooth
packet is composed of 3 sections: access codes
00:19:18
of 72 bits, a header of 54 bits, and for example
a payload of 500 bits.
00:19:27
The number of bits in the access codes and
header are pretty close to those mentioned,
00:19:32
however the size of the payload which is specified
using the header can vary widely between 136
00:19:39
bits and 8168 bits depending on the requirements
of the data being sent.
00:19:46
For exam-ple, simple commands from your headphones
like pause or play the music would require
00:19:52
far fewer bits than sending or receiving high
quality audio.
00:19:58
An additional caveat is that the electromagnetic
waves sent and received from the antenna in
00:20:03
your smartphone and earbuds, and the light
from a traffic light, share the aspect that
00:20:09
they both function within the electromagnetic
spectrum.
00:20:12
However, the principles that govern how your
smartphone and headphones gen-erate and receive
00:20:18
those electromagnetic waves are quite different
from the principles around how traffic lights
00:20:23
and your eyes work.
00:20:25
It’s kind of like how fire and an electric
radiator both generate heat but using vast-ly
00:20:31
different methods.
00:20:33
The principles behind Bluetooth fall under
the category of antenna theory and will be
00:20:38
explored in a separate episode.
00:20:42
Thus far we’ve made a few episodes that
help to explain other parts of these wireless
00:20:47
headphones such as noise cancellation and
the audio codec, and we’ve made even more
00:20:53
episodes that dive into the dif-ferent parts
of your smartphone.
00:20:57
Check them out to learn about these other
fascinating technologies.
00:21:01
We believe the future will require a strong
emphasis on engineering education and we’re
00:21:07
thankful to all of our Patreon and YouTube
Membership Sponsors for supporting this dream.
00:21:13
If you want to support us on YouTube Memberships,
or Patreon, you can find the links in the
00:21:19
description.
00:21:20
You can also provide additional support by
subscribing, liking this video, commenting
00:21:25
below, and sharing this video with others.
00:21:28
This is Branch Education, thanks for watching!