Tuesday, January 17, 2012

Propeller frequency stability

This evening, I have been experimenting a bit with my Propeller device.  I have a small script that turns on the RF synthesizer at 10_140_000 mHz for 30 seconds, off for 10 seconds etc.  I use it for calibration of the frequency of the board in use as different Propeller boards will have different amounts of error in frequency generation.  The script looks like this:

CON
  _CLKMODE = XTAL1 + PLL16X
  _XINFREQ = 5_000_000

 
  CLK_FREQ = ((_CLKMODE-XTAL1)>>6)*_XINFREQ
  MS_001 = CLK_FREQ / 1_000

 
  RFPin  = 27
 
  TxFreq      = 10_140_000
  ErrorOffset =       -467
  
  Frequency = TxFreq + ErrorOffset
 
VAR

OBJ
  Freq : "Synth"
 
PUB Main

  repeat
    sendTone(0)
    delay(30000)
    noTone   
    delay(10000)

PUB delay(ms) | t
  t := cnt - 1088               ' 1088 is published time for overhead
  repeat ms
    waitcnt(t += MS_001)


PUB sendTone(tone)
  Freq.Synth("A",RFPin, Frequency + tone)


PUB noTone
  Freq.Synth("A",RFPin, 0)


This simple little script I find to be very useful when I need to generate a signal at some frequency.  The on/off modulation of the signal allows me to find it more easily on uncalibrated receivers.

Viewing the output from a local receiver using Argo we find this waveform.  As you can see, my board has approximately -467 Hz of error which is corrected for in this script.  Nevertheless, as the board changes temperature, it does drift a bit.  As can be seen below I have drifted a hertz or two lower since calibration of the board was last done.


  I begin to wonder however why this ErrorOffset value seems to change when using the same board, just a different application.  For example my Hellscrieber code appears to transmit about 3 Hz lower with the same ErrorOffset value.  I added a 30 second carrier at the beginning of the code to see exactly what frequency it is on before launching into the transmission of FeldHell codes.  With the transmit frequency set to 10_139_980 and the same -467 ErrorOffset value, the following is observed:


I am clearly 5-6 Hz low.  The frequency is also different than in the previous example, so that may be related.  I think however that it may just be the drift of the device.  Going back to the Tune application, which should be a hertz or two low at 10_140_000, we see the following:


Hmmm...  So it appears that I am just chasing a temperature drift of the Propeller board over time.  Adding some thermal stabilization to it would probably help.  I will wrap it up in some foam and let it run for a while and see if the frequency stabilizes.

Here is a cold start image of my QRSS signal.  Out of the box, it seems that there is a significant drift:


And a few minutes later we can see it has drifted over 20 Hz:


 I will let it run and see where it stabilizes.

No comments:

Post a Comment