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. Wake up arduino only (without radio)?

Wake up arduino only (without radio)?

Scheduled Pinned Locked Moved General Discussion
12 Posts 5 Posters 3.7k Views 2 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.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #3

    @rvendrame
    Are you talking about when using mysensors library or in a more general term?

    1 Reply Last reply
    0
    • rvendrameR Offline
      rvendrameR Offline
      rvendrame
      Hero Member
      wrote on last edited by
      #4

      @hek, mySensors-specific, I don't know anything else ;-)

      It is just a thought anyway --- Maybe the radio consumption is very low if not transmitting so any extra measure is worthless?

      Home Assistant / Vera Plus UI7
      ESP8266 GW + mySensors 2.3.2
      Alexa / Google Home

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

        @rvendrame: I am working to get ultra low power with mysensors. still in testing as I am debugging my board. I will post my results soon.

        First watchog is consuming a little power (10-15uA I think). But you need it to wake up at interval. Other way is to wake up on pin interrupt, less consuming. But you need something to trigger. I am using a voltage supervisor with capa discharging for that. So when in powerdown I am sub-uA (I have done my sleep routines). I know it doesn't need to be sub uA as there is battery discharge rate. but could be useful sometimes and it is a good exercise!
        .
        I think you will use watchdog as Mysensors lib use it. So you could power off radio with mosfet, then go to sleep. Wake up and increment counter each time you wake up. When you reach your totalcounter (for 1h hour) power on radio. But you will need to reinit it. So I added an initRadio method in Mysensors class for my purpose as you cannot access it (Am I right @Hek? Do you think it could be possible to have this in future version, could be useful sometimes. I have not checked it, or maybe there is better way?). Public, like this :

        // InitRadio
        void initRadio(rf24_pa_dbm_e paLevel=RF24_PA_LEVEL, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE);

        But when you power off radios, i2c... there are tricks to do as some pins miso,mosi...sda..can break low power. and you need to set pins output=0 or input sometimes it depends what is connected. I had a lot of pains with i2c power off. now it is ok. I will post soon I hope.

        hekH 1 Reply Last reply
        0
        • rvendrameR Offline
          rvendrameR Offline
          rvendrame
          Hero Member
          wrote on last edited by
          #6

          @scalz, thanks a lot. Yes, I was afraid to cut radio power, I thought it would have to be reinit. Please let me know once you have your code done.

          I guess simply by calling gw.begin() would not be enough right? Or it will consume too much, as it will handshake/presenting the node,etc again?

          Home Assistant / Vera Plus UI7
          ESP8266 GW + mySensors 2.3.2
          Alexa / Google Home

          1 Reply Last reply
          0
          • scalzS scalz

            @rvendrame: I am working to get ultra low power with mysensors. still in testing as I am debugging my board. I will post my results soon.

            First watchog is consuming a little power (10-15uA I think). But you need it to wake up at interval. Other way is to wake up on pin interrupt, less consuming. But you need something to trigger. I am using a voltage supervisor with capa discharging for that. So when in powerdown I am sub-uA (I have done my sleep routines). I know it doesn't need to be sub uA as there is battery discharge rate. but could be useful sometimes and it is a good exercise!
            .
            I think you will use watchdog as Mysensors lib use it. So you could power off radio with mosfet, then go to sleep. Wake up and increment counter each time you wake up. When you reach your totalcounter (for 1h hour) power on radio. But you will need to reinit it. So I added an initRadio method in Mysensors class for my purpose as you cannot access it (Am I right @Hek? Do you think it could be possible to have this in future version, could be useful sometimes. I have not checked it, or maybe there is better way?). Public, like this :

            // InitRadio
            void initRadio(rf24_pa_dbm_e paLevel=RF24_PA_LEVEL, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE);

            But when you power off radios, i2c... there are tricks to do as some pins miso,mosi...sda..can break low power. and you need to set pins output=0 or input sometimes it depends what is connected. I had a lot of pains with i2c power off. now it is ok. I will post soon I hope.

            hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #7

            @scalz

            As MySensors is a subclass of RF24, so you can re-do any initialisation directly on the "gw"-object. I think you have to re-init the following parts:

            https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.cpp#L95-L112
            and
            https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.cpp#L137-L138

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

              @rvendrame: I was saying this in general as I am trying this actually. I know for rfm there are tricks. but for nrf I had no problems. I don't call gw.begin again as it would do consuming comm. This is why I added a method in Mysensors class to reinit nrf.

              what you could do if you want to make tests:

              1. init a wakeupcounter
              2. if wakeupcounter = 0 or = countCycle (a define for exemple)
                then do stuff (power on mosfet, reinit radio, get sensors value)
              3. power off mosfet
              4. gw.sleep(xx ms)
              5. on wake up increment wakeup counter

              Maybe I missing something as I am not in front of my work. but it is something like this. I have no problem with radio, no fails. and GW see all comms.

              @hek: I saw that it was subclass but was thinking setupradio was protected so I did this in mysensors class. But I will try what you're saying. thank you.

              	// InitRadio in .h
              	void initRadio(rf24_pa_dbm_e paLevel=RF24_PA_LEVEL, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE);
              
              // in .cpp
              void MySensor::initRadio(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataRate) {
              	setupRadio(paLevel, channel, dataRate);
              }
              1 Reply Last reply
              0
              • rvendrameR Offline
                rvendrameR Offline
                rvendrame
                Hero Member
                wrote on last edited by
                #9

                @scalz, @hek , thanks a lot! Final question, do we really need a mosfet? Wouldn't 20mA from any digital pin enough?

                Home Assistant / Vera Plus UI7
                ESP8266 GW + mySensors 2.3.2
                Alexa / Google Home

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

                  @rvendrame: I have never tried to power radio directly from arduino pin. I think it could be possible for nrf but it is 20mA max for arduino pin. for a rfm I think, you can forget it!
                  if you want lots of useful infos for power savings : http://www.gammon.com.au/forum/?id=11497 , but maybe you already know it.

                  1 Reply Last reply
                  0
                  • rvendrameR Offline
                    rvendrameR Offline
                    rvendrame
                    Hero Member
                    wrote on last edited by
                    #11

                    @scalz, thanks for the links!

                    Home Assistant / Vera Plus UI7
                    ESP8266 GW + mySensors 2.3.2
                    Alexa / Google Home

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      stevenwatson011
                      wrote on last edited by
                      #12

                      Using watchdog as Mysensors is good idea, but is there any other better way to archive same?

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


                      12

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 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