Lab 1: Miniature Spectrum Analyzer

Sample program: svn://mvnl.csie.ntu.edu.tw/wn11fall/lab/lab1

Description

In this lab project, you will program a radio transceiver to become a miniature spectrum analyzer. A spectrum analyzer, in short, is an equipment which measures the power density across a frequency band. Utilizing this miniature spectrum analyzer, you can observe how different wireless technologies occupy the wireless spectrum.

Zigduino + ATmega1281RFA1

Zigduino uses ATmega128RFA1 as its MCU (Micro-Controller Unit) and the ATmega128RFA1 chip has an integrated IEEE 802.15.4-compliant radio transceiver. The radio transceiver supports the operation of measuring the amount of radio energy in the wireless channel within its operation frequency range, which is often used by a wireless MAC (Media Access Control) protocol to determine whether there is another node transmitting within its range at the time. The amount of energy detected by the transceiver is often referred as RSSI (Received Signal Strength Indicator).

IEEE 802.15.4 + RSSI

IEEE 802.15.4 uses 16 operating channels with the following carrier frequencies:

Channel Carrier Frequency Channel Carrier Frequency
11 2405 MHz 21 2455 MHz
12 2410 MHz 22 2460 MHz
13 2415 MHz 23 2465 MHz
14 2420 MHz 24 2470 MHz
15 2425 MHz 25 2475 MHz
16 2430 MHz 26 2480 MHz
17 2435 MHz
18 2440 MHz
19 2445 MHz
20 2450 MHz

Each channel occupies roughly 3 MHz. For example, if the radio operates at channel 11, then it will occupies roughly 2403.5 - 2406.5 MHz. The RSSI reported by the radio will be the total amount of energy detected within this range.

To understand how to translate the RSSI value reported by the ATmega128RFA1 chip and the actual received power (in dBm), please refer to page 68 and 109 of its datasheet [pdf].

Openlog

We will give each team an Openlog module and a microSD flash memory card. The openlog module can record everything sent to it via the serial port (what you print out using printf in the program) in a file on the SD card. Each time openlog will open a new file on the SD card for logging. Note that you have to set the baud rates of both the ATMega128RFA1 and openlog. In the sample program we set the baud rate of ATMega128RFA1 to be 115200 (find the line nrk_setup_uart (UART_BAUDRATE_115K2); in main()). You can configure the baud rate of openlog following the instructions here.

The openlog module has 4 pins: Vcc, GND, RXI, TXO. To connect the module to Zigduino, use the patch cable to connect these pins to the respective pins on Zigduino as the following:

Zigduino pins Openlog pins
5V Vcc
GND GND
RXI TXO
TXO RXI

Sample program

The sample program will print the RSSI values from all 16 channels in a line after each scanning round, separated by comma and finished by a '\r' and a '\n'. You can modify the program to output in a format you like. The original format is like the following:

5,0,0,0,0,3,0,0,0,0,0,0,0,0,1,0\r\n

What you need to do

  1. Choose a wireless device that operates in the frequency range that the Zigduino can “measure”. Roughly, that is 2400 MHz - 2480 MHz. The device can be a bluetooth device, a 802.11 a/b/g/n device, or even a microwave oven! Pick the one that you are interested in. Look for a document to describe the range of frequency that the device operates at.
  2. Modify the sample program to scan spectrum in the range that your device operates at. Of course, if you're lazy then you can scan the whole 16 channels, but the sampling rate will be smaller since it also takes time to scan some channels that your devices doesn't operate at.
  3. Analyze your data using Matlab, Octave, similar software.

What you need to submit

  1. Capture the spectrum usage of 2 different wireless technologies. Use the analytical software of your choice to plot a 3D plot - the 3 axes should be time, channel (frequency), and RSSI (in dBm).
  2. Describe how the wireless technologies use the spectrum and provide citations for them (such as the standard document). Is the spectrum you captured what you expected to see?
  3. The source code should be committed to your teams' svn repository.
    (svn://mvnl.csie.ntu.edu.tw/wn11fall/team/team[#]/lab1/src/)
    file: main.c, nrk_cfg.h, makefile …
  4. The report should be committed to your teams' svn repository.
    (svn://mvnl.csie.ntu.edu.tw/wn11fall/team/team[#]/lab1/report/)
    file: team[#]_lab[#]_report.pdf …
  5. ps. The team[#] = team01, team02, …… , team11, team12, … team16
You could leave a comment if you were logged in.
 
wn_11fall_lab1.txt · Last modified: 2012/03/03 17:12 by hikaru4 · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki