I had a busy month in October working on the RF part of the Mesh Potato Wifi. This post documents the method I used to measure the Wifi transmit power using a Tek 492 spectrum analyser. The Tek 492 is an old analog spectrum analyser with basic digital storage to capture the swept signal. More modern spectrum analysers might do power measurements for you, but the principles below may still apply.
A spectrum analyser is basically a tuned receiver that sweeps across a certain frequency range. The receiver has a certain bandwidth, called the Resolution Bandwidth (RB). As it sweeps it measures the power at each frequency and plots it on the screen in dBm. It effectively sums all of the power in the RB to plot one point. This works well for signals that fit comfortably in the RB, like a narrow band signal or an un-modulated carrier. For narrow band signals, the RB will be wide enough to contain the total power of the signal. So a 10dBm carrier will be plotted as a 10dBm signal on the screen. Easy.
However for signals wider than the resolution bandwidth power measurement gets tricky. For example the maximum RB of my Tek 492 is 1 MHz, but the Wifi signal bandwidth is 12-18 MHz. The power is spread over many frequencies rather than fitting neatly into the RB.
In my sat-com modem days I had to do similar power measurements, so I worked it out eventually. Here is a photo of a 54 Mbit 802.11g signal on a V1.1 MP01:
P, the Wifi transmit power is given by:
P = Pm + Pref – 10log(RB) + 10log(BW)
where Pm is the measured power on the spec-an graticule (-31 in the photo above), Pref is the reference level (30dBm in top left hand corner, RB is the resolution bandwidth (1MHz, lower right hand corner), and BW is the bandwidth of the signal estimated from the graticule (about 16MHz). The -10log(RB) term is divides the power by the RB to get the power in 1 Hz of bandwidth, we then multiply by the total bandwidth (10log(BW) term) to get the total power in the signal.
So plugging in values above:
P = -31 + 30 – 10log(1E6) + 10log(16E6) = -31 + 30 +12 = 11 dBm
The -10log(1E6)+10log(16E6) term is constant (12) for 802.11g if you keep the RB constant. For 802.11b the constant is 10 as the bandwidth is narrower (about 12 MHz).
Now this technique is not particularly accurate – I have been told the best way to measure power is with a calibrated power meter (if you have the budget). It’s hard to get sub dB accuracy squinting at a graticule and estimating the 3dB bandwidth of funny looking spectra. Also I am not sure what the loss is from my cables and DC-block on the spec-an. However for relative measurements where absolute accuracy is not critical it is quite a useful technique.
The DIR-300 router measured around 17-18dBm at 1Mbit 802.11b (17dBm is the specified power output). At 54Mbit the measured power was around 10-12dBm (a little lower than the 14dBm specified). Similar levels were obtained from two DIR-300s and 3 MP01s tested.
Tek 494 Gotcha: It took me a week to get sensible results – I kept getting low values and couldn’t work out what was wrong with my math. Then I discovered the “peaking” control. My Tek 492 has the pre-selector option installed. You need to adjust the peaking control for maximum output, mine was 10dB down! After I peaked the signal I started getting measured powers for the DIR-300 that matched the specs and could then make sensible measurements on the MP01.
To connect everything together I purchased a kit of cables for a few hundred $ from Rojone that had N-type and SMA connectors plus a RP-SMA to SMA adaptor. Made it easy two swap between routers even hook them up back-back for link and packet error rate tests.
 RF Hacking post over on the Village Telco blog.