Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. RFM69 sleep mode

RFM69 sleep mode

Scheduled Pinned Locked Moved General Discussion
25 Posts 9 Posters 13.8k Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • FrancoisF Offline
    FrancoisF Offline
    Francois
    wrote on last edited by
    #9

    @hek sorry how will I disconnect the radio?

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #10

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

      1 Reply Last reply
      0
      • FrancoisF Offline
        FrancoisF Offline
        Francois
        wrote on last edited by
        #11

        @hek yes the radio is solder on

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by hek
          #12

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

          1 Reply Last reply
          0
          • FrancoisF Offline
            FrancoisF Offline
            Francois
            wrote on last edited by
            #13

            @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);
            }
            
            
            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #14

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

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

              1 Reply Last reply
              0
              • FrancoisF Offline
                FrancoisF Offline
                Francois
                wrote on last edited by
                #15

                @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.

                NeverDieN 1 Reply Last reply
                0
                • FrancoisF Francois

                  @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.

                  NeverDieN Offline
                  NeverDieN Offline
                  NeverDie
                  Hero Member
                  wrote on last edited by
                  #16

                  @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?

                  P 1 Reply Last reply
                  0
                  • NeverDieN NeverDie

                    @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?

                    P Offline
                    P Offline
                    peres
                    wrote on last edited by
                    #17

                    @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.

                    M 1 Reply Last reply
                    0
                    • P peres

                      @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.

                      M Offline
                      M Offline
                      manutremo
                      wrote on last edited by manutremo
                      #18

                      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 :)

                      1 Reply Last reply
                      1
                      • N Offline
                        N Offline
                        napo7
                        Hardware Contributor
                        wrote on last edited by
                        #19

                        Hi,

                        I have the same question, but a little bit different ;)

                        I use a RFM69 with the Mysensors 2.2.0 beta.
                        I don't sleep my node with the provided function, since I don't want to sleep for some time, but until a Pin Change Interrupt is triggered (via pin A0 or A1). So, I can't use the sleep() function.
                        I do put my node to sleep with avr core functions (setting registers, calling power_all_disable() and sleep_cpu()...) but I suppose the radio is never put on sleep !

                        Is there a function I can call to sleep the radio, and if yes, is there another function I should call before sending, to awake the radio ?

                        Thanks !

                        1 Reply Last reply
                        0
                        • scalzS Offline
                          scalzS Offline
                          scalz
                          Hardware Contributor
                          wrote on last edited by scalz
                          #20

                          @napo7
                          Here the list of the core functions (radio independant):
                          https://ci.mysensors.org/job/Verifiers/job/MySensors/branch/development/Doxygen_HTML/group__MyTransportgrp.html#gab39d3b81f005e00117269d79c7b2ee4c

                          should be transportDisable/transportReInitialise

                          Else the radio specific functions (a layer above driver) are in the MyTransportRFM69.cpp

                          1 Reply Last reply
                          0
                          • N Offline
                            N Offline
                            napo7
                            Hardware Contributor
                            wrote on last edited by
                            #21

                            Thanks !

                            1 Reply Last reply
                            0
                            • F Offline
                              F Offline
                              Fabien
                              wrote on last edited by
                              #22

                              @napo7 : you can use sleep with interrupts :
                              https://www.mysensors.org/download/sensor_api_20#sleeping

                              mfalkviddM 1 Reply Last reply
                              0
                              • F Fabien

                                @napo7 : you can use sleep with interrupts :
                                https://www.mysensors.org/download/sensor_api_20#sleeping

                                mfalkviddM Offline
                                mfalkviddM Offline
                                mfalkvidd
                                Mod
                                wrote on last edited by
                                #23

                                @Fabien MySensors sleep only supports hardware interrupts. napo7 is using pin change on analog pins which needs to be done in software.

                                1 Reply Last reply
                                1
                                • N Offline
                                  N Offline
                                  napo7
                                  Hardware Contributor
                                  wrote on last edited by
                                  #24

                                  That's not a software interrupt. In facts, the atmega supports interrupt on all pins, and also waking-up the device from any pin change, but the sleep function only support "external interrupts" which can only be triggered on pin 2 and 3.

                                  mfalkviddM 1 Reply Last reply
                                  1
                                  • N napo7

                                    That's not a software interrupt. In facts, the atmega supports interrupt on all pins, and also waking-up the device from any pin change, but the sleep function only support "external interrupts" which can only be triggered on pin 2 and 3.

                                    mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by
                                    #25

                                    @napo7 thanks for the clarification

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    10

                                    Online

                                    11.7k

                                    Users

                                    11.2k

                                    Topics

                                    113.0k

                                    Posts


                                    Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • MySensors
                                    • OpenHardware.io
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular