The Physics of WiFi
Let's start with wireless communication in general. In 1831, Michael Faraday discovered the foundation of radio, decades before the first message was ever sent. He discovered that when he put a wire in a magnetic field, a current was induced in the wire for a brief period of time. Essentially, a small amount of energy was being transmitted wirelessly from the magnetic field to the wire. Each time he connected and then disconnected the two terminals of a battery (using a long loop of wire, one end to +, other end to -), the voltage in the other, unconnected wire increased slightly and then fell to 0 again.
This effect was first used to transmit over a distance between two mountains in Virginia, by Mahlon Loomis in 1864. Mahlon flew two kites, each with a 600ft wire grounded to the earth. When he, using a simple switch, disconnected one kite's wire from it's ground, a change in current was detected in the other kite. The distance between them: 18 miles.
Today, we know that radio waves are responsible for interaction. Radio waves are electromagnetic radiation, just like the light that we see. Radio and light waves are distinguished by their wavelength. Picture a sine wave. The distance from the highest point to another of the highest point (or, as physicists say, from crest to crest) is the wavelength, usually denoted by the greek letter "lambda." Mathematicians and scientists are overly fond of Greek letters--but I use L. Wavelength is usually measured in meters
Another important piece of information about a radio wave is it's amplitude, or A. A simply means the height of the wave, the vertical distance from high point to low point, or from crest to trough. Amplitude is also measured in meters
Finally, waves have a frequency f. If you stood still and watched radio waves fly past you (considerably fast!), and you counted all the crests that passed in one second, that'd be the frequency. An interesting mathematical relationship for waves is (remember the speed of light?) c = L x f. The speed of light is the wavelength of a wave times its frequency. Later on, we will use this formula to compute the wavelength of 2.4Ghz WiFi.
This equation has an interesting consequence. Since the speed of light is constant (as most people think...there are some who question and I am one of them; assuming it's constant works for our purposes, no matter how these arguments turn out), then the wavelength can be computed from the frequency and visa versa. Frequency is measured in some form of Hertz (i.e. Megaherts, Gigahertz, Kilohertz, etc.)
Modern radios use a continuously varying current instead of an on/off system to transmit a signal. This way they can transmit information in a sine wave, which can hold more information more accurately. Sine waves are particularly suited to sound transmission.
To send, say, a voice signal, a "carrier" wave is generated, usually as a sine function. The information to be carried is then entwined with the carrier signal (how depends on whether it's AM, FM or even PM). AM, short for amplitude modulation, means that the amplitude A of the wave changes to signify the bits of the information. Far more common is FM, or frequency modulation, in which the wave's frequency (and hence wavelength, remember?) changes. FM is far more reliable than AM for transmitting information. Almost unheard of is PM, Pulse Modulation. PM waves simply mean that the circuit is turned on and off to transmit a signal, much like how the first radios worked. The only large-scale use of PM I can think of is for carrying time information to all the atomically synchronized clocks. While unreliable in terms of data (how many times a day do you really need to update your clock, anyway?) PM is a powerful transmission method, so much so that a single transmitter covers the entire United States.
The wattage of a transmitter determines in how powerful the signal is. WiFi calls for maximum 1 Watt transmission, an AM radio station might use 50,000 Watts.
Once radio waves are in the air on a particular frequency, a tuner in range must then pick them up and convert the sine wave back into usable information. Tuners work based on another physics principle known as resonance. A common example of resonance is when people break glass by singing alarmingly high notes. The sound waves, vibrating through the air at the natural frequency of glass (a frequency that causes glass to vibrate with giant amplitudes), induce vibrations in the glass, which cause it to break. In a radio, the tuner resonates at the particular frequency it's tuned to, so only those waves will be amplified. The net result is that waves of a set frequency are picked out of the air and amplified far above the strength of the other waves. Thus, tuners 'select' which radio waves we want to listen to.
After the signal is picked out from among all the radio noise in the air, another component called a demodulator subtracts the carrier signal from the radio wave to obtain the original signal.
WiFi works by radio transmission, usually in the unlicensed 2.4 Ghz ISM Band (ISM = Insustrial, Scientific, and Medical). WiFi transmission is essentially FM transmission, in that the frequency is changed to transmit data. For example, 2.4 Ghz WiFi uses something called Complementary Code Keying to vary the frequency and send data. That's for another tutorial, though (read: I'll explain it when I understand it).
Radio interference is a natural problem, and simply refers to the cluttered state of the airwaves?everybody is using radio waves! For many purposes this isn't a problem, but WiFi works in the unlicensed band. Therefore, anyone can use it. Thus, the 2.4 Ghz frequency is stuffed full of radio waves just waiting to interfere with transmissions.
But wait! There are 11 channels in WiFi. Each channel has a (slightly) different frequency, so by using a different channel we can avoid colliding networks, right?
Alas, this doesn't work very well, for two reasons: one related to FCC regulations and the other a physical principle. As for the first, each of these channels is 5 Mhz apart and 22 Mhz wide. Therefore, the channels overlap and cut into each other. The only mutually nonoverlapping channels are 1, 6, and 11. Unfortunately, microwave ovens are known to wreak havoc on channel 11. And if anyone's using channel 3, they'll interfere with both 1 and 6. Go figure.
The second reason channels don't work concerns the origins of radio waves of a certain frequency. By generating a carrier wave of frequency f and allowing it to control the current in a wire, we create a magnetic field. But this magnetic field is created by electrons moving in the antenna. The electrons, it turns out, vibrate at a certain frequency. But phyiscs tells us that whenever something vibrates, there are other, harmonic frequencies that vibrate alongside it. Therefore, we can't send radio waves at a certain frequency only, because if we try we get waves at the harmonic frequencies too. Thus, all transmissions interfere with each other to some extent.
A basic principle of electromagnetic waves is that when they overlap, they add. But if a crest is added with a trough, the result is no wave at all. Thus, two waves can cancel each other. To do this, they have to be "offset" by half their wavelength. Even when they don't perfectly cancel, some destructive interference still occurs.
