RFM96 (LoRa) - read chip temperature?

Started by jalkestrup, June 02, 2017, 07:32:15 AM

jalkestrup

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

Russ Hedger

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!

Felix

Did you do a search around the forum? I thought someone posted something for LoRa although it might have been RFM69.

Rocketman4992

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.