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