6

This question is simply coming from an intrigued teenager, so if it has any flaws, I'm sorry for the inconvenience.

To my knowledge, when digital data is transmitted wirelessly, it is first encoded into analog, whether it is Bluetooth, Wifi, etc, it is built to represent that of 1's and 0's, but how? What specific changes are made to the analog wave (such as amplitude modulation or frequency modulation,) so that when it is decoded it (as in a computer receiving the data) distinctively knows where the ones and zeros are?

For example:

If I were to connect a Bluetooth keyboard to my computer, when I press the 'a' key, the ASCII binary code 01100001 will be sent to my computer via Bluetooth. But how does my computer decode that wave, and know where a 0 and 1 are?

JRE
  • 67,678
  • 8
  • 104
  • 179
Goatinator
  • 63
  • 3
  • 4
    AM and FM are common. So is phase modulation. Regarding how it is decoded, that is a lengthy subject and too long for this site (to do it justice) so get googling is my advice. – Andy aka Oct 10 '20 at 12:51
  • [Possible help on FM](https://electronics.stackexchange.com/questions/270662/send-text-data-using-fm-frequencies/270667#270667) – Andy aka Oct 10 '20 at 12:53
  • 5
    Hi Goatinator! It's *really* awesome that you're wondering about this, but it's really like a giant body of knowledge that you (unintentionally) are asking for :) Like, the shortest possible answer would still fill a book (in fact, multiple, if one would have to include the math that you usually don't know as high school student). Now, if I would need to condense the "communications technology" lecture that I enjoyed (both hearing and holding the exercises for), it'd be roughly these points that you'd need to look for: – Marcus Müller Oct 10 '20 at 13:11
  • 4
    1. There's this thing called *spectrum*, and it's only available once, but we can put any *bandwidth*-limited signal anywhere in there if we want, and shift things around in spectrum 2. We thus can mathematically represent any transmission in a bandwidth around a central frequency as complex number valued signal that is around 0 Hz. 3. There, we can basically do anything we like. Want to represent 1 and 0 as analog voltages -1 and +1 µV? sure. Want to represent 0, 1, 2, 3 as vertical silhouettes of a duck, a dog, a snake and an elephant? Works too, has up- and downsides. – Marcus Müller Oct 10 '20 at 13:14
  • 3
    4. there are at least as many different ways to prepare the signal for transmission as there are requirements arising from the application (you'd do something else for a garage door opener and a HD video link) and there are different problems arising from the physics of the wireless channel (reflections? Dampening? Doppler Shift? Interferers?) as well as the hardware that can be built at reasonable prices. This means there won't be a single answer to your question, but many, albeit most of them apply the same basic principles. – Marcus Müller Oct 10 '20 at 13:17
  • 1
    ...and this is the flip side, where we should close a question that is worthwhile in concept, but not able to be handled in the constraints of this site's format *before* it collects a lot of posts which demonstrate that the material cannot be well handled in this format... – Chris Stratton Oct 10 '20 at 15:37
  • Morse code is digital information transmitted over analog mediums. That’s pretty simple and easy to understand. But really, it’s all just an extension of that. – RBarryYoung Oct 11 '20 at 02:33

4 Answers4

2

If you want to know how 'A' from from keyboard via Bluetooth to your computer starting from 1s and 0s on an analogue wave, then it's far too complicated for any person to think about all at once.

So we divide it into layers. Each layer uses the services of the layer below, and provides services for the layer above. This allows us to concentrate on just a few simple problems at a time.

The lowest layer is called the physical layer. This handles the radio signal. Start with wikipedia, and look up, in this order, simplest to more complex, Amplitude-shift_keying, Frequency-shift_keying, Quadrature_amplitude_modulation. We rarely use ASK, it's too inefficient. There are more modulation types, more efficient and much more complicated than QAM, but those three will do to get your started.

The highest layers are the applications in the keyboard and computer. The keyboard app asks the layer below to 'send 'A' to a machine with this identity', which happens to be your computer. That layer then calls a lower layer, which resolves the identity to an address, formats the message, and eventually the data trickles down to the physical layer and becomes variations on an RF carrier.

There's a whole bunch of layers in between that handle the connection, know about identities, get messages resent if parts are missing or garbled, and a whole lot more. Have a look at OSI Model or the TCP/IP stack if you want an idea of all the stuff that can happen in between, but don't expect to understand it or the need for it at a first reading.

Neil_UK
  • 158,152
  • 3
  • 173
  • 387
2

There are quite a few basic ways to do it. Important ones include:

The earliest radio systems used pulse-width modulation on some carrier frequency (possibly just the natural resonant frequency of the antenna), broadcasting short and long pulses in the dot-dash code of Samuel Morse. This turns the carrier signal abruptly on and off, which causes problems in high-power applications, so the next two are continuous-power systems.

Frequency modulation is common; broadcasting the 1s on one frequency and the 0s on another. This was used by the original line modems, by the first Bluetooth standard and by GSM "2G" mobiles and several subsequent standards, for example.

Phase-shifting is also used, in which the timing of the pulses carries the data, with 0s and 1s having a different fractional delay or phase shift in the signal. This is available in later Bluetooth standards.

In all of the above, the pulses are overlaid on a carrier signal whose frequency, according to Shannon's law, must be at least twice the data rate and is often considerably higher.

In spread-spectrum systems there is no identifiable carrier frequency, i.e. no specific analogue wave as such. Instead a fast train of varying-width square-wave pulses is broadcast directly. Encoding systems can vary, but typically the pulse width represents a 0 or a 1, as with Morse code. This varying signal is inherently spread over a range or spectrum of (analogue) frequencies. This is used by CDMA 3G and 4G mobile systems, in which the data is overlaid on a pseudorandom pulse train and is allowed to mix with other signals on the airwaves. It then gets decoded at the other end to identify both the sender and the data.

Each of these has a myriad complications and variations.

Guy Inchbald
  • 1,435
  • 5
  • 10
1

You already know about amplitude and frequency modulation.

In addition there are a number of other methods including phase modulation. Here are a few ...

BFSK - Binary Frequency Shift Keying E-FSK - Enhanced-Frequency Shift Keying FSK/IM - Frequency Shift Keying/Intensity Modulation GFSK - Gaussian Frequency Shift Keying QASK - Quadrature Amplitude-Shift Keying Q2PSK - Quadrature-Quadrature Phase Shift Keying QCSK - Quadrature Chaos Shift Keying QPSK-OFDM - Quadrature Phase Shift Keying-Orthogonal Frequency-Division Multiplexing SFSK - Spaced Frequency Shift Keying AFSK - Audio Frequency Shift Keying AFSK - Automatic Frequency Shift Keying CFSK - Coherent Frequency Shift Keying DFSK - Differential Frequency Shift Keying DFSK - Double Frequency-Shift Keying FFSK - Fast Frequency Shift Keying QMSK - Quadrature Minimum Shift Keying OPSK - Quadrature Phase Shift Keying FSK - Frequency-Shift Keying FSK - Frequency Shift Keying QPSK - Quadrature Phase-Shift Keying

1

Excellent question, it's great you're curious about how things around you work!

Unfortunately, as others have noted this is a huge topic; and the specific protocols you mentioned like Bluetooth and Wifi are complicated and the product of over a century of development stretching back to the telegraph (and probably further to smoke signals come to think of it).

That being said, I will try to address two key issues in digital communications you have identified:

  1. How do we represent a 1 or a 0?
  2. How do we know where a 1 or a 0 are?

There are many possible answers to both of these questions. To consider 1:

To represent two possible states we need two different 'symbols'. Suppose you and I were trying to communicate standing on top of two nearby hills, with a loud wind blowing. We can see each other but not hear. One way we could communicate is using two different coloured flags; let's use red and blue. We agree beforehand that raising the red flag is a 'symbol' for a 1 and raising the blue flag is a 'symbol' for a 0.

Using electromagnetic waves we have various choices for our symbols. We could, for instance, turn a wave on and off, like flashing a light to communicate. Or we could use two waves of different frequencies.

If we want to send information faster, we could use more symbols to represent more bits at a time. So if we had four different coloured flags, one flag could represent 00, one 01, one 10, and one 11. The trade-off here is that our 'decoding-logic', our brains, is more complicated to remember what each flag stands for and the colours we use become less and less distinct as we can't use colours that are the opposite side of the colour wheel from all other colours, like red and blue are from eachother.

Now for the second question, how do we know where a 1 or a 0 are? This is another massive topic; the terms you would look for here are Bit and Frame Synchronization

A simple scheme would be to agree that each symbol gets transmitted for a certain period of time. This works fine at slower speeds but modern devices communicate extremely fast and keeping time synchronised is a challenge.

A clever technique is Manchester Encoding. Let's consider a case where we are switching a radio wave on and off to send a '1' and a '0' respectively. We have a few problems here; what if we send a bunch of '1's in a row? If the wave is just on all the time, how does the receiver know it's getting 1 '1' or a 100 '1's?. In Manchester Encoding, we modify things slightly so instead of a '1' being just a wave on, it will be a wave going FROM off TO on (rising). Similarly, a '0' will be a wave going FROM on TO off (falling). The cleverness here comes when we insist that a rising or falling transition will only occur in the middle of a bit period. That way the receiver always knows exactly when a bit is being sent. If it sees a transition in the signal, it knows that's where a bit was.

There are many other solutions to this problem as well. Hopefully this serves as a useful introduction. Telecommunications is a fascinating topic and underpins so much of the modern world, I hope you continue to be curious!

jramsay42
  • 1,182
  • 1
  • 6
  • 11