Difference between revisions of "Sensor Board Programming"

From University of Washington - Ubicomp Research Page
Jump to: navigation, search
m
 
m
Line 1: Line 1:
 
== Tuning the Bluetooth Radio ==
 
== Tuning the Bluetooth Radio ==
Each BlueCore3 baseband is self calbirated according to the ambient/chip temperature and the input clock. Since the chip takes care of tuning the temperature we just need to set the appropriate tweaking for the crystal, this is set by:
+
Each BlueCore3 baseband is self calibrated according to the ambient/chip temperature and the input clock. Since the chip takes care of tuning the temperature we just need to set the appropriate tweaking for the crystal, this is set by:
 
* the BlueCore radio broadcast an RF signal at what it believes 2.441GHz
 
* the BlueCore radio broadcast an RF signal at what it believes 2.441GHz
 
* a spectrum analyzer set to 2.441GHz scanning the RF spectrum for this signal
 
* a spectrum analyzer set to 2.441GHz scanning the RF spectrum for this signal
 
* a crystal trim value that adjusts the BlueCore's signal until it outputs a true 2.441Ghz signal
 
* a crystal trim value that adjusts the BlueCore's signal until it outputs a true 2.441Ghz signal
 +
 +
The basic process is:
 +
# Program the firmware and persistent store keys on the Bluetooth radio
 +
# Determine the crystal trim value (in hexadecimal) using a spectrum analyzer
 +
# Convert the hexadecimal number to decimal
 +
# Program the converted value into the persistent store keys
  
 
=== Setting up the Spectrum Analyzer ===
 
=== Setting up the Spectrum Analyzer ===
Line 57: Line 63:
 
| 0x1F || 31 || 0x2F || 47 || 0x3F || 63
 
| 0x1F || 31 || 0x2F || 47 || 0x3F || 63
 
|}
 
|}
 
 
</ul>
 
</ul>

Revision as of 03:44, 8 March 2007

Tuning the Bluetooth Radio

Each BlueCore3 baseband is self calibrated according to the ambient/chip temperature and the input clock. Since the chip takes care of tuning the temperature we just need to set the appropriate tweaking for the crystal, this is set by:

  • the BlueCore radio broadcast an RF signal at what it believes 2.441GHz
  • a spectrum analyzer set to 2.441GHz scanning the RF spectrum for this signal
  • a crystal trim value that adjusts the BlueCore's signal until it outputs a true 2.441Ghz signal

The basic process is:

  1. Program the firmware and persistent store keys on the Bluetooth radio
  2. Determine the crystal trim value (in hexadecimal) using a spectrum analyzer
  3. Convert the hexadecimal number to decimal
  4. Program the converted value into the persistent store keys

Setting up the Spectrum Analyzer

    SpectrumAnalyzerSetup.png

    Any 2.4GHz spectrum analyzer will work the only requirement is it being somewhat calibrated and having an appropriate 2.4GHz antenna. The instructions below are for using a Tekntronix RSA3408A 8GHz digital spectrum analyzer. Here are the steps to setup the spectrum analyzer so you can tune the radio:

    1. With the spectrum analyzer off, plug in the 2.4GHz antenna.
      • This should require no force and doesn’t have to be very tight, be careful to not bend or break any of the delicate leads
    2. Turn on the spectrum analyzer it will boot into Window sXP and after a few moments will start the spectrum analyzer software.
      • It is generally a good idea to leave the system running for about 15minutes before you use it so the device has a chance to warm up and calibrate itself.
    3. First we set the center frequency, by hitting button 3
    4. Enter "2.441" on the keypad
    5. Hit the "GHz" button to indicate that its 2.441GHz
    6. Next we set the span (how wide the visible spectrum is) by hitting button 6
    7. Then we enter "400" on the keyboard
    8. And hit the "kHz" button to indicate a span of 400kHz, in general all the Bluetooth radios should transmit within this span but you can set it lower or higher if needed
    9. Once the radio is transmitting there should be a single peak like the one shown in the figure. By default the purple cursor (seen as a small box on the right side of the peak in the picture) will point to our desired center frequency of 2.441GHz. If you want you can hit the "peak" button to have the cursor highlight what frequency the highest peak is at. In general its better to leave the cursor at 2.441GHz so you don't end up using the wrong center frequency by mistake. You can reset the cursor by entering 2.441GHz in the keypad.

    The CFG XTAL FTRIM value is set in hexadecimal, however, the "Crystal Frequency Trim" value is set in decimal. Here's a quick look up table for mapping from hexadecimal to decimal:

    Hexadecimal Decimal Hexadecimal Decimal Hexadecimal Decimal
    0x10 16 0x20 32 0x30 48
    0x11 17 0x21 33 0x31 49
    0x12 18 0x22 34 0x32 50
    0x13 19 0x23 35 0x33 51
    0x14 20 0x24 36 0x34 52
    0x15 21 0x25 37 0x35 53
    0x16 22 0x26 38 0x36 54
    0x17 23 0x27 39 0x37 55
    0x18 24 0x28 40 0x38 56
    0x19 25 0x29 41 0x39 57
    0x1A 26 0x2A 42 0x3A 58
    0x1B 27 0x2B 43 0x3B 59
    0x1C 28 0x2C 44 0x3C 60
    0x1D 29 0x2D 45 0x3D 61
    0x1E 30 0x2E 46 0x3E 62
    0x1F 31 0x2F 47 0x3F 63