In the attachment you can see that an uncorrected Moteino drifts more than 14,000 Hz over -5C to 60C degrees. With compensation less than 488Hz, usually within +/-122Hz. Blue is uncorrected measurement data, Black is the error equation(curve fit), and Red is the corrected measurement results
void loop() {
float x = getTemp();//a call to the usual getTemp function
float adjFreq = ((123*x^3)+(123*x^2)+(123*x)+123); //our polynomial function
float newFreq = (433 - adjFreq);//Being 433 the expected frequency of 433 Mhz
RFM69::setFrequency(newFreq);
Serial.print(temp); Serial.print (" - "); Serial.println(adjFreq);
delay(100);
}
So I just use the same function for the 433Mhz radio?
And subtract the error from 433 to scale it to 433.
It is worth thinking about where the self heating comes from. In Rx, for the radio module die, it is mostly gate switching losses + some leakage from 'off' gates. The important internal clocks are derived from the crystal, so essentially constant frequency; the leakage is negligible at room temp and rises exponentially. You could get a good estimate of this by measuring the module current drain - with a constant Vdd, the "smoothed" mA from a DVM reading x Vdd is the mW almost all dissipated as heat when in idle or Rx state.
The crystal self-heating is somewhat different. It is basically the mechanical losses of the crystal slice as it changes shape at the fundamental oscillating frequency. The driving circuit aims for a loop gain of -1, just enough to sustain a constant level of vibration. This however would take forever to build up from zero, so the drivers tend to overdrive the crystal to reduce starting time. On some RF modules this overdrive level is adjustable, but AFIAK, there is no programmatic way to do that on the RFM69 family. Just to complicate the issue, the gain of the op amps in the driver circuit are also die temperature dependent. You can expect the amount of crystal self heating to vary over the temperature band, curve shape unknown.
If I understand your aim well (correct the temperature offset of the crystal by estimating the die temperature rather than the crystal temperature) the Achilles heel is the loose coupling between the two temperatures. There are boundary conditions where the error is small - e.g. with both crystal off and the radio module sleeping, the temperatures will drift down at different rates to ambient.
what leakage?
it’s easy to calculate dissipated power, but quite difficult to turn it to temperature for RFM69 module.
how startup time affects to crystal temperature
Let’s see what kind of results my approach yields