Yet another Freq/temp measurement

Started by joelucid, January 07, 2017, 01:26:06 PM

joelucid

Here's yet another freq/temp update. I've long been intrigued by https://lowpowerlab.com/forum/moteino/freq-vs-temperature-update/, since temp correction of the XTAL frequency would limit the need to do AFC with narrow-band communication which would allow better sensitivity and frequency alignment without managing a rssi threshold.

What wasn't clear to me from the other posts was whether the correction equation would use the same coefficients for all modules or whether each XTAL individually had different errors beyond a different offset. I ran a test from -4 to 50 celsius on 4 x RFM69CW and below are the results. Clearly the correction is different for each crystal.

What's nice is that from these data points it seems you could do 2 point calibration at 10 C and 30 C and get pretty good result from 10 C to 50 C using linear inter/extrapolation. Not perfect, but good enough to start communicating and build up a better freq offset table through selective AFC.



Joe

emjay

@joelucid,

Interesting results, thanks for sharing. The measured T was ambient or some sensing arrangement closer to the crystal? Any clue to why the yellow sample is so different from the others (module purchase date, batch number on the chip etc).

ChemE

The timing of this thread is good for me; I was just starting to look into adding AFC to my code.  Do we have any idea how much correcting this error would increase range/RSSI?  Am I chasing an extra few feet of range or is a frequency mismatch of 14,000Hz significant?  I suppose that is easily tested by detuning a node and observing the change in RSSI...

joelucid

QuoteThe measured T was ambient or some sensing arrangement closer to the crystal?

I used my small TH mote boards for this test: circular board with rfm69w on one side and 328p + si7021 on the other. Temperature is as measured by the si7021 belonging to each board.

QuoteAny clue to why the yellow sample is so different from the others (module purchase date, batch number on the chip etc).

Interestingly these came from 2 batches of rfm69cw I had purchased last year. These Motes used 1 from the older batch and 3 from the newer, I don't know which. Of course I jumped to the conclusion that that's the cause of the difference. But on closer inspection one of the crystals actually has different markings than the other. But that's NOT the one behaving differently.

The one that's behaving differently sits on a smaller board without loop antenna - but I can't see how that would influence the results.

joelucid

QuoteDo we have any idea how much correcting this error would increase range/RSSI?  Am I chasing an extra few feet of range or is a frequency mismatch of 14,000Hz significant?

As soon as you frequency offset is more than - say 20% of fdev your sensitivity goes down pretty rapidly. More than 80% of fdev and motes sitting right next to each other sending at full power won't be able to talk to each other in some of my tests.

The crystals are thought to have a tolerance of 10ppm. If you get extreme examples at the opposite side of the spectrum you'd have an 18khz mismatch at 915 mhz. On top crystals can shift 5ppm per year due to aging.

So even without any temperature drift at the stock 55khz settings you could have fairly drastic sensitivity impact if you get unlucky. But where it gets really important is at narrow-band settings. My 2400 baud settings have 5000hz fdev - so it's easily possible that two Moteinos could not talk to each other at all without AFC just due to manufacturing tolerance.

Joe

perky

BTW there was another post somewhere that also found a discrepency in one of their crystals for temperature drift, but hat had been reworked and the crystal removed and soldered back on. Re-working is another potential source of systemic error, it's probably a good idea if a crystal is removed to put a brand new one on in its place and be careful about heating it when soldering.
Mark.

captcha

Excellent results Joe, and very useful information.

I haven't familiarized myself with the aspects of frequency drift due to temperature variations that much, but if all motes would be subject to the same ambient temperature, would there ever be a need to apply frequency compensation?

joelucid

Check this out: http://www.ti.com/lit/an/swra065/swra065.pdf

An app note confirming the need to compensate each XTAL individually

perky

Quote from: joelucid on January 09, 2017, 01:46:07 AM
Check this out: http://www.ti.com/lit/an/swra065/swra065.pdf

An app note confirming the need to compensate each XTAL individually

This is ambiguous. When it says it varies from 'crystal to crystal' it may well be talking about crystal types, because it also says the compensation coefficients can be obtained from the manufacturer and these are more than likely not going to be done on each individual crystal, but are more likely available for each type. Jury is still out with me.

Mark.

joelucid

QuoteThis is ambiguous. When it says it varies from 'crystal to crystal' it may well be talking about crystal types, because it also says the compensation coefficients can be obtained from the manufacturer and these are more than likely not going to be done on each individual crystal, but are more likely available for each type. Jury is still out with me.

Look at Figure 1. which refers to reference [5] which notes that they used the HKC, 5 x 3.2 mm SMD crystal for all 14 "different crystals". These are the same crystals they later note that "Each crystal needs a separate look-up table as the crystal temperature coefficients varies from crystal to crystal (see Figure 1)."

The HKC site is too slow to work with today but I can't imagine that they make 14 different types of 5 x 3.2 mm SMD crystals.

Also note that "The crystal error can be characterized by a 3rd-order polynomial equation, and there are manufacturers (e.g. Nihon Dempa Kogyo (NDK), HongKongCrystal) that provide the temperature coefficients as a bar code on top of the crystal housing."

Which implies for me that they are by instance, not by type. Why else not specify the coefficients in the datasheets. I haven't found one datasheet that does that.

It seems even if you know the specific crystal type you need to measure each one or buy ones that come pre-measured and coded. If you buy RFM69 modules you really have no other choice: even my two batches of RFM69CW used crystals with different markings - though each batch had the same markings. I'm talking general markings, not bar-codes here.

Joe

joelucid

More good news on the temp correction front: I just ran some tests, comparing T as measured by a si7021 with the internal temp sensor of the rfm69, which I one point calibrate at room temperature and the use -1 C per lsb as specified in the datasheet.

Waking up once every 8 seconds and sending a radio packet doesn't cause any heating as one would expect. Both measurements sits at room temperature.

But interestingly keeping the radio in RX between measurements doesn't change things much. Radio sensor temp goes up 3 C and si7021 temp follows behind. There's hardly ever a discrepancy between both values of more than 1C. This is great news since it allows the use of the radio temp sensor for frequency calibration on both on gw and sensors.

TomWS

Quote from: joelucid on January 09, 2017, 09:27:52 AM
More good news on the temp correction front: I just ran some tests, comparing T as measured by a si7021 with the internal temp sensor of the rfm69, which I one point calibrate at room temperature and the use -1 C per lsb as specified in the datasheet.

Waking up once every 8 seconds and sending a radio packet doesn't cause any heating as one would expect. Both measurements sits at room temperature.

But interestingly keeping the radio in RX between measurements doesn't change things much. Radio sensor temp goes up 3 C and si7021 temp follows behind. There's hardly ever a discrepancy between both values of more than 1C. This is great news since it allows the use of the radio temp sensor for frequency calibration on both on gw and sensors.
Did you run a similar test on the ESP Gateway?  I've had the microwaves from a WiFi radio (not ESP8266) shift both temp and humidity reading on a TH sensor in the past.   Now I take the measurements before waking up the WiFi.   It might be that the Bosch sensor is less prone to this effect than the Si7021 because of its metal cover.

Tom

joelucid

QuoteDid you run a similar test on the ESP Gateway?

I hope I don't have to. Since there was no significant temp differential between the rfm and the si7021 even in rx I'm just going to measure with the rfm alone for the gw. Interesting observation though.

perky

#13
Quote from: joelucid on January 09, 2017, 07:43:07 AM
Look at Figure 1. which refers to reference [5] which notes that they used the HKC, 5 x 3.2 mm SMD crystal for all 14 "different crystals". These are the same crystals they later note that "Each crystal needs a separate look-up table as the crystal temperature coefficients varies from crystal to crystal (see Figure 1)."

OK, you've convinced me! I'm surprised they can get all that coefficient information onto a bar code less the 5mm x 3.2mm though ;)

Mark.

ChemE

Quote from: perky on January 09, 2017, 04:50:08 PM
OK, you've convinced me! I'm surprised they canget all that coefficient information onto a bar code less the 5mm x 3.2mm though ;)

Mark.

This is how they do it: https://www.thenakedscientists.com/articles/science-news/writing-world%e2%80%99s-smallest-letters