arduino-LoRa icon indicating copy to clipboard operation
arduino-LoRa copied to clipboard

Add simple function for measuring temperature

Open ladislavkrivy opened this issue 5 years ago • 6 comments

ladislavkrivy avatar Aug 12 '20 20:08 ladislavkrivy

@ladislavkrivy How good is the builtin temperature? I thought the temperature measure can only be done in FSK mode?

IoTThinks avatar Aug 13 '20 10:08 IoTThinks

It's quite terrible but good enough for compensating crystal's temperature drift (on small crystals tends to be linear-ish). In my case just with linear compensation by LoRa.setFrequency(F_UPLINK + 150 * LoRa.temperature()); before sending a packet I can easily get away with 20.8k bandwidth. Screenshot_20200813_180257

Yes, to measure the temperature it switches to FSK mode momentarily and restores the mode afterwards. It could be improved if there's a way to check wether the module is currently receiving a packet (trough I'd rather leave user to to this check in the sketch)

ladislavkrivy avatar Aug 13 '20 16:08 ladislavkrivy

Thanks a lot for your code. Let me try next week.

It should be good for LoRa node in outdoor environment?

IoTThinks avatar Aug 16 '20 02:08 IoTThinks

Cool, It'll be interesting to know whether the temperature characteristic is somewhat similar for those 32M crystals (was for mine but they are probably same batch) or actually it has wilder variance.

Keep in mind the reading is not calibrated so you'll probably need to use frequencyError for initial calibration. I have 3 outdoor nodes at different places and with temperature compensation the system works even when sun hits one of the nodes.

ladislavkrivy avatar Aug 16 '20 22:08 ladislavkrivy

Any chance we can merge this one in?

ned-kelly avatar Sep 29 '20 22:09 ned-kelly

Should be a good feature to merge in the main.

IoTThinks avatar Oct 02 '20 04:10 IoTThinks