altos/test: Adjust CRC error rate after FEC fix
[fw/altos] / doc / frequency-cal.inc
1 [appendix]
2 == Frequency Calibration
3
4 All products that have radio interfaces require calibration of the radio
5 frequency.  Normally, this calibration is done once during the production
6 process and the resulting cal value is saved into non-volatile memory.  The
7 procedure decribed here should only be used outside of the factory if you 
8 are really convinced the radio calibration is bad, and you have access to
9 the required tools to do the calibration.
10
11 Because this procedure is only rarely needed in the field, we have not 
12 written any fancy user interface for doing it .. some interaction with 
13 and careful typing in a command-like style interface are required!
14
15 === Background Information
16
17 The radio system on each board uses a quartz crystal to control
18 a frequency synthesizer that can be programmed to a range of operating
19 frequencies.  While these crystals are very stable, they have an accuracy
20 specification that means once the base frequency they set is multiplied up
21 to the typical operating range of our products, any variation also gets
22 multiplied.  The objective of the calibration process is, indirectly, to
23 measure the actual operating frequency of the crystal and adjust the way
24 the frequency synthesizer is programmed to account for this variation.
25
26 The frequency may shift a few tens of Hz over the full operating temperature
27 range, and it may also shift a bit over time as the crystal ages.  But once
28 properly calibrated, none of those changes are likely to ever cause any 
29 operational problem, as the shift in operating frequency due to these factors
30 is tiny compared to the bandwidth of our transmitted signal.
31
32 === Required Equipment
33
34 The calibration process requires the ability to precisely measure the actual
35 frequency of a steady CW carrier on or about the intended operating frequency
36 in the vicinity of 435 MHz.  
37
38 In production, we use an HP 5385A that is locked to a 10 MHz reference that 
39 is in turn locked to GPS, which provides a highly accurate calibration.  Any 
40 reasonably accurate frequency counter is likely to be sufficient.
41
42 You also need a computer with terminal program and USB cable to attach to
43 the board in question, along with a battery and power switch suitable for
44 powering the board up.
45
46 === RF Calibration Procedure
47
48 Using the terminal program, connect to the board over USB.  You will find 
49 that you are now interacting with a command interpreter on the board.  Using
50 '?' will show the available commands.  Of interest for this process are the
51 'C' command which turns on a steady transmitted carrier on the currently
52 selected operating frequency, and the 'c' subcommands that allow interaction
53 with the saved configuration.
54
55 Use the 'c s' command to discover and note the current radio calibration 
56 value, and the operating frequency the board is configured for in kHz.
57
58 Set up your frequency counter with a suitable antenna near the board's 
59 antenna and use the 'C' command to turn on a steady carrier.  Let the
60 frequency stabilize, and note what it is to as many digits as are steady
61 on your counter's display.
62
63 To calculate the new calibration value, the equation is:
64
65 .  (intended_frequency / measured_frequency) * current_cal_value
66
67 Set the new calibration value using 'c f <value>', then use 'c w' to save
68 that cal value into non-volatile memory.  You can use the 'C' command again
69 to confirm the operating frequency is now within a few 10's of Hz of the
70 intended operating frequency.
71