Basic Wireless Communication for Microcontrollers
Chapter 2 - Design Project 1: Crystal Radio Receiver
AC Circuit Theory
     It is very important to know the difference between how AC and DC interact with circuit elements. In every case here, by AC we mean sinusoidal or very nearly sinusoidal, which holds true for almost all signals in RF work. If we are dealing with a more complex waveform, Fourier analysis would be needed to split it up into sinusoidal components, see how each one behaves, and then add up the results to get the total result (see Appendix 1 for more information).Resistance
     Resistance behaves exactly the same way for AC as for DC. The current through a resistor is directly proportional to the voltage across it.Inductance
     Inductance is a property of any piece of conducting material. The origin of inductance is that the current flowing through a wire builds up a magnetic field around it. Energy is stored in this field and when the current changes, some energy must be transfered to or from the field. This happens by the field causing a voltage drop across the conductor while the current is changing. The voltage drop (or back EMF) will be proportional to the derivative of the current change over time, and the sign of the voltage will be such as to try to resist the change in current. In other words, inductance has the effect of resisting changes in current, just as a resistor resists even a steady current.Capacitance
     Capacitance is a property that any pair of conductors has. Once again, it is due to a field building up, but this time it is an E field building up between the two conductors. Capacitance is defined by Q=CV, in terms of the amount of charge which gets deposited on each of the two conductors for a given voltage. Placing a dielectric between the capacitor's conductors reduces the E field, but increases capacitance because of the way it is defined (less E field means less voltage for the same charge). Capacitors operate in a way analogous but opposite to the way inductors work.Phasor Notation
     The amplitude and phase of an sinusoidal voltage or current can be described by one complex number, called a phasor (yes, pronounced like the Star Trek weapon!) The magnitude of a phasor represents the amplitude and the angle, the phase. Because we are always concerned with the relative phase between two or more quantities and not absolute phase with respect to the phase at some starting time, it doesn't matter whether we take "sinusoidal" to mean a sine or a cosine function, since one is just the other shifted in time.Impedance
     Using phasor notation, we can combine resistance and reactance into one number called impedance. Impedance is the ratio of the voltage phasor to the current phasor, using standard complex number division (see Appendix 1). Impedance is symbolized by Z, and Z=R+j*X, where X is the total reactance, inductive minus capacitive. The minus sign is due to the fact that the voltage leads for inductance but the current leads for capacitance.Generalization of DC Formulas and Concepts to AC
     The reason why the concept of impedance and phasors is so valuable is that it allows us to analyze AC circuits using the same rules we use for DC circuits, provided we just substitute Z in for R, use phasors for V and I, and change a couple of constants. Ohm's law stays the same: V=I*Z. Kirchoff's laws (the sum of the currents flowing into and out of a node must be zero and the sum of voltage drops and gains around a loop is zero) stay exactly the same. The only major change is in the equation for power. Instead of being P=I*V as for DC, it changes to P=(1/2)*real(V*conj(I)) in general, and P=(1/2)*|V|*|I| for circuits where V and I are known to be in phase. The (1/2) comes because of the fact that the average value of the product of two sinusoids is (1/2) the product of their magnitudes. The instantaneous power at any moment in time is still P=I*V (where I and V are real numbers, not phasors), but what we are usually concerned with is the average power. The reason for the real() and the conjugation of I is that V and I do not have to be in phase and the power will vary with the cosine of the phase angle between them (at zero degrees, in phase, we get maximum power, and at 90 degrees we get zero, as for a perfect inductor or capacitor which cannot dissipate power). Note that in all these cases, V and I are phasors and their magnitudes represent peak values.
Figure 1 - A series resonant circuit
Series Resonant Circuits
     Consider the cirucit in figure 1. The total impedance of the three components is Z=R+j*(Xl-Xc). Because Xl and Xc vary with frequency, the impedance of the circuit varies with frequency. There is one point where Xl=Xc and Z becomes only resistive and equal to R. This condition is known as "series resonance" and the magnitude of Z is lowest at this point. At series resonance, the current flowing through the circuit produces voltage drops across all three components. The voltage drop across the inductor, however, exactly cancels that across the capacitor, so the only remaining voltage is that across the resistor. This can result in very high voltages being generated across L and C while the signal generator is providing a much smaller input voltage. The term resonance is used because during one half the cycle, the inductor is absorbing power and the capacitor is giving back power. The opposite happens during the other half. The exchange of power between the inductor and capacitor creates the voltage cancelation. If the capacitor were not there, for example, the inductor would still not dissipate power, it would alternate between abosorbing power and giving it back. However, when it absorbed or gave up stored power that would be transferred to or from the power source, rather than being exchanged with the capacitor, resulting in large voltage swings at the input terminals.
Figure 2 - A parallel resonant circuit
Parallel Resonant Circuits
     The circuit of figure 2 shows three components (a resistor, capacitor, and an inductor) in parallel. Using the standard formula for three impedances in parallel (which we can just "lift" from DC theory as long as we use impedances and phasors), the total circuit impedance from end to end is Z=1/( 1/R + 1/(j*Xl) + 1/(-j*Xc)). We can see from this that Z becomes purely resistive and equal to R when Xl=Xc, just as for the series resonant circuit. The difference, however, is that at this resonant point (called parallel resonance), the magnitude of Z is the largest it can be, rather than the smallest. At parallel resonance, L and C exchange energy just as in series resonance. This time, however, this circuit will continue to resonate for some time after you disconnect the signal source, since there is a complete circuit path even when nothing is attached to it. The oscillation will eventually die out due to the losses in the resistor, which continuously robs energy from L and C. Because of this "flywheel" action, this is often called a flywheel or tank circuit (tank because it stores up energy in the form of an oscillating voltage and current). The formula for the resonant frequency of series resonant circuits can also be used to find the resonant frequency of this circuit.Q (Quality Factor)
     If you made any graphs of the magnitude of Z versus frequency for the two types of resonant circuits (series and parallel) described above, you would see that the sharpness of the peak (for parallel) or dip (for series) in |Z| versus frequency depends on how much resistance there is in the circuit. Let's normalize |Z| so that the maximum (parallel) or minimum (series) value is 1. Now, we can mark off the points on either side of the resonant point where |Z| has changed by a factor of sqrt(2) (1.414, 1.414 times greater in the case of series resonance, 1.414 times less in the case of parallel resonance). The distance between these points, in frequency, is called the "-3dB resonant bandwidth". The reason for this will become clearer when we talk about basic filtering, but for now just know that it is the point where the filter power response drops off by 1/2 when these circuits are used as filtering devices.Real Resistors, Inductors, and Capacitors
     We have already hinted at the fact that real components are not perfect. They are imperfect not only in the sense that they are lossy, but also because they are not always what they say they are. Any component exhibits some resistance, capacitance, and inductance. So, a capacitor or an inductor, for example, is really a full RLC combination. If we are talking about an inductor, then R and C will of course be very smal and the inductive behavior will dominate over a wide frequency range, but for a complete model, or even a reasonably faithful model, they must not be neglected.Resistors
     Typical resistors look like a resistor with some inductance in series and a capacitor in parallel. This means that at very high frequencies the resistor will exhibit some kind of resonance where it may appear capacitive or inductive instead of a pure resistance. Probably a good general guideline would be that through-hole resistors are good up to around 100 or 200MHz, standard surface-mount resistors can be used to about 1 or 2 GHz, and special resistors would be required above that.Inductors
     Inductors exhibit parasitic capacitance between each turn as well as wire resistance. The wire resistance increases with frequency because of the skin effect. The increase is insignificant below a certain cutoff frequency and then increases with the square root of f. The net effect is that inductors act like a parallel resonant circuit with a small resistor in series with the perfect inductor inside the model. This means that they have a self-resonant frequency (SRF) above which they look like a capacitor and their reactance begins to decrease with frequency. For inductors, we can also define another type of Q factor, called the component Q factor. This Q=Xl/R, where Xl is the inductive reactance of the component at any frequency below its SRF and R is the real part of the component impedance at that frequency. This Q is a true quality factor because it tells you how lossy the inductor is, which limits its use in circuits which require a high circuit Q.Capacitors
     Capacitors also have effective inductance and resistance, and these are all in series. This means that capacitors look inductive above their SRF. Just like inductors, we can define a component Q, Q=Xc/R. This R is sometimes called the effective series resistance (ESR) and can be vitally important well below the SRF when capacitors are used for bypassing (acting as a AC low-impedance to ground). The inductance of through-hole capacitors is usually dominated by the inductance of their leads, so keeping them short is vital to keeping SRF high. This also means that for high frequency circuits, you should use as low a capacitor value as possible while still achieving the desired effect, since lowering the capacitance increases the SRF.BACK   Table of Contents    NEXT