Usage of rcCalibration() should it be called regulary?

Started by rgregor, January 28, 2014, 05:04:43 AM

rgregor

Hello,
I have received your Moteinos last week. They working great, I want to use one moteino to measure the temperature outside of my house. I connected the temsensor and it's working great. However, otside is now -10 degrees celsius and inside 22, so I understood, that if there could be temperature differences like that, I have to run rcCalibration() method regulary to have a good transmission conditions? Something like this?

void loop() {
   if (((unsigned long)(millis() - keepRadioMillis)) >= 600000) { // each 10 minutes perform calibration ot the radio module
       radio.rcCalibration();
       keepRadioMillis = millis();
   }
}

Felix

I've never really had a need to do that, and BTW I believe the radio does it automatically upon startup according to the datasheet. It's been -10F here too regularly for the past 2 months and my mailbox notifier (with RFM69W not HW) which is about 150ft away across the street still has strong signal down in my basement through snow, dirt, concrete.

rgregor

OK, so then super answer, thanks a lot! It means, that I dont need to do anything...

Felix

Yeah I would say just try it and if it works satisfactorily then don't worry much ;)

john k2ox

The rc cal is only used to wake up the radio.  When the radio (not Moteino) is put to sleep the RC oscillator is the only thing left running.  When the RC timer times out, the radio turns on and listens for a defined period.  During this period if it is not called it goes back to sleep.

Lets say the node is programmed to sleep for 2 seconds and wake up to listen for a few mSecs. This requires the gateway to continuously keep calling for at least 2 seconds because the node may have just gone to sleep and won't wake up to listen for another 2 seconds.

In order for this all to work the wake up timer can't drift into time longer than the 2 seconds.  If it does it won't hear the gateway call when it wakes up, because the gateway will have already stopped trying.

RC timers are the least stable of all oscillators. They drift with voltage, temperature and age.  That's what the RC calibration is used to compensate for. 

For ultimate battery power savings this rfm69 option could turn off the RX, TX, Synthesizer, crystal oscillator, and Moteino.  When the RFM wakes up it can generate an interrupt and wake up Moteino.

Since the RFM69 lib doesn't support this mode there is no reason to do a 'rcCalibration' at this time.

RFM69 lib does support sleep by giving 'sleep' control to the Atmel processor instead.  I have not used Felix's Moteino sleep yet.  I don't think it powers the radio down though. (?)

Hope this helps.
john