LowPowerLab Forum

Hardware support => General topics => Topic started by: jalkestrup on June 02, 2017, 07:32:15 AM

Title: RFM96 (LoRa) - read chip temperature?
Post by: jalkestrup on June 02, 2017, 07:32:15 AM
Hi folks

I'm aware that Felix has been so kind to write a function for reading the on-board temperature sensor for the RFM69HW, but I was wondering if anyone had done something similar for the RFM96? Perhaps not an entire library, but simply the C code to access the correct registers noted in the datasheet (http://www.hoperf.com/upload/rf/RFM95_96_97_98W.pdf). As I'm very un-skilled with registrers I figured I'd better ask the community before spending hours to try and make it work :-)

Kind regards
Jesper
Title: Re: RFM96 (LoRa) - read chip temperature?
Post by: Russ Hedger on July 02, 2017, 06:18:49 PM
There is some sample code towards the end of the datasheet (p.118). Without calibration, the measurement has an error of up to 10°C!
Title: Re: RFM96 (LoRa) - read chip temperature?
Post by: Felix on July 03, 2017, 09:27:49 AM
Did you do a search around the forum? I thought someone posted something for LoRa although it might have been RFM69.
Title: Re: RFM96 (LoRa) - read chip temperature?
Post by: Rocketman4992 on February 10, 2018, 05:31:29 PM
Unfortunately you can't do it with software alone. Looking through the hope rf data sheet you'll notice that the rfm95/96 needs to be in FSK/OOK mode, which I haven't seen any library support. The only temperature reading you can read in LORA mode is the chip boot up temperature read. And this is the unfortunate part, the moteino doesn't have a connection to the rfm95 chip reset pin. So you'll need to solder your own. You can access the boot up temperature by reading the rssi calibration data which happens at power on, reset, and manual reset. Get temperature using this temp = rf95.readTemp(); It has been working for me for a few months now. I don't know why but you get the value already converted to C. You'll still need to correct with an off set. For me it is -11C.