RFM69 sleep mode



  • Hi how do I put the RFM69 in sleep mode? I currently getting 4mA current draw for BinarySwitchSleepSensor. On the NRF24 for the same sketch, I get 3uA.


  • Admin

    If you use the MySensors sleep function it calls
    https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/utility/RFM69.cpp#L152

    I hope the RF69 library sleep function works...

    What is the expected consumption?



  • @hek as per this Web site I should get about 16uA http://forum.anarduino.com/posts/list/39.page


  • Admin

    Cant help you much right now as I don't have my RF69 setup up and running.

    Maybe Felix over at lowpowerlab can give you some hints (we use his code for the driver).



  • @hek to get down to 3uA I have to use the following line.

    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
    

    How do I do this in the current library. If I use the LowPower library I get an error when compile


  • Admin

    Tried gw.sleep(8000); ?



  • @hek with sleep(8000) I still get 3.75mA.


  • Admin

    Strange that you get different values depending on radio. That points to problem with radio sleep and not the Arduino itself.

    So if create a RF69 sketch that just sleeps in loop. What happens if you disconnect radio (after init)? Do you you get ~3.75uA?



  • @hek sorry how will I disconnect the radio?


  • Admin

    Ahh.. good question if (you're running Moteino with them soldered on).



  • @hek yes the radio is solder on


  • Admin

    I can't find myself doing anything different from the LowPower library in in MyAtMega328.cpp - sleep(). Need someone else's eyes on it.



  • @hek I see that you have powerDown in the MyHwATMega328.cpp how do I use that function?

    void powerDown(period_t period) {
    
    	ADCSRA &= ~(1 << ADEN);
    
    	if (period != SLEEP_FOREVER)
    	{
    		wdt_enable(period);
    		WDTCSR |= (1 << WDIE);
    	}
    	#if defined __AVR_ATmega328P__
    		do {
    			set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    			cli();
    			sleep_enable();
    			sleep_bod_disable();
    			sei();
    			sleep_cpu();
    			sleep_disable();
    			sei();
    		} while (0);
    	#else
    		do {
    			set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    			cli();
    			sleep_enable();
    			sei();
    			sleep_cpu();
    			sleep_disable();
    			sei();
    		} while (0);
    	#endif
    
    	ADCSRA |= (1 << ADEN);
    }
    
    

  • Admin

    You use it by calling gw.sleep() which initiates powerDown.

    https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/MySensor.cpp#L820



  • @hek Hi I got a new shipment of Arduino mini pro and after I did the low power hack on this Arduino I now are getting 30uA current usage. Thank again for all you support and for this great MySensor community that you started :). Now I can go full steam ahead in building more sensor for my house.


  • Hero Member

    @Francois said:

    @hek Hi I got a new shipment of Arduino mini pro and after I did the low power hack on this Arduino I now are getting 30uA current usage. Thank again for all you support and for this great MySensor community that you started :). Now I can go full steam ahead in building more sensor for my house.

    So, just to be clear, is this an accurate summary: the full package (Arduino mni pro plus radio) sleeps at 30uA if using the RFW69 but sleeps at 3uA if using the NRF24L01+?

    Also, does it make any difference whether it's RFM69W, RFM69CW, or RFM69HW? Do they all draw the same amount of current while sleeping?



  • @NeverDie
    Hi, I know this is an old thread, but it is stil a valid subject to me.
    I have had success with arduino pro mini v2 and RFM69W in sleep, but not the high power version RFM69HW.
    Arduino+RFM69W sleeps at 5.2micro Amp.
    Arduino+RFM69HW sleeps at 420micro Amp.
    I have written about it in arduino forum.
    I would be glad if someone has a solution for this.



  • Hi @peres,

    My RFM69HW current during sleep is less than 1 uA aprox, which is consistent with what is shown in the datasheet. Interestingly, this is the result when powering the device with a battery; when powering the device from the PC USB serial, it's around 6 uA - still close enough as it's measured with a "normal" multimeter.

    I'Which version of mysensors are you using? I've moved to 2.2.0-beta (due to me needing other functionalities not availabel in 2.1.1, namely ATC which btw works fabulously) and found that support for nrf69 is - although not yet 100% completed - significantly improved. Maybe worth a try to see if that fixes your sleep consumption?

    Remember adding

    #define MY_RFM69_NEW_DRIVER
    

    to enable the new driver.

    Let us know how it goes :)


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.