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. Hardware
  3. E73 nrf52 sleep current

E73 nrf52 sleep current

Scheduled Pinned Locked Moved Hardware
12 Posts 4 Posters 1.5k Views 4 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.
  • W Offline
    W Offline
    waspie
    wrote on last edited by
    #3

    i've only played with the nrf51 but i know well enough getting either of these to fully sleep can be a bit of a process software-wise. i doubt you need any hardware, it's going to be software related

    1 Reply Last reply
    0
    • kisse66K Offline
      kisse66K Offline
      kisse66
      wrote on last edited by
      #4

      yes, you're right!
      Started experimenting and noticed I was stupid assuming the sensors have nothing to do with this because if I disconnect them while sleeping nothing changes. Well they do. The issue is I2C/TWI. If I comment out all sensorcode sleep current goes down to a few uA. It looks like I can do Wire.init() without this problem, but as soon as the first transaction is done it won't sleep properly. Wire.end() before sleeping does not help (disables TWI). So something changes after a transaction.
      To get it to minimum I commented all sensor code and only added (in setup())

      Wire.begin();
       Wire.beginTransmission(0x40);
      Wire.write(0xFE);
      Wire.endTransmission();
      

      if the last line is commented sleep works fine (this is reset command to HTU21, one byte transaction).
      I've tried undoing everything the wire-driver does before sleep, but can't figure out what helps.
      Any ideas?

      I think the 250uA difference is related to whether HFCLK is running or not - if the device uses 250uA while sleeping my STlinkV2 works fine (re-program). If it goes down to a few uamps STlink does not work ,"can't connect target" (no reset pin used).

      O 1 Reply Last reply
      0
      • kisse66K kisse66

        yes, you're right!
        Started experimenting and noticed I was stupid assuming the sensors have nothing to do with this because if I disconnect them while sleeping nothing changes. Well they do. The issue is I2C/TWI. If I comment out all sensorcode sleep current goes down to a few uA. It looks like I can do Wire.init() without this problem, but as soon as the first transaction is done it won't sleep properly. Wire.end() before sleeping does not help (disables TWI). So something changes after a transaction.
        To get it to minimum I commented all sensor code and only added (in setup())

        Wire.begin();
         Wire.beginTransmission(0x40);
        Wire.write(0xFE);
        Wire.endTransmission();
        

        if the last line is commented sleep works fine (this is reset command to HTU21, one byte transaction).
        I've tried undoing everything the wire-driver does before sleep, but can't figure out what helps.
        Any ideas?

        I think the 250uA difference is related to whether HFCLK is running or not - if the device uses 250uA while sleeping my STlinkV2 works fine (re-program). If it goes down to a few uamps STlink does not work ,"can't connect target" (no reset pin used).

        O Offline
        O Offline
        Omemanti
        wrote on last edited by
        #5

        @kisse66 have you reset it (on/off) after uploading it uses to much power, but after a reset, it drops. my modules drop to 30uA or something. So it should be possible to hit a low powerconsumption.

        kisse66K 1 Reply Last reply
        0
        • kisse66K Offline
          kisse66K Offline
          kisse66
          wrote on last edited by
          #6

          Hmm, should read the manual?

          ERRATA [89] TWI: Static 400 µA current while using GPIOTE

          after adding the workaround before sleep

          *(volatile uint32_t *)0x40004FFC = 0;
          *(volatile uint32_t *)0x40004FFC;
          *(volatile uint32_t *)0x40004FFC = 1;
          

          sleep current goes down to 29uA. It's a bit high still but usable with AA batteries!

          NRF_FICR->INFO.VARIANT tells my chip is version AAB0

          Nca78N 1 Reply Last reply
          1
          • O Omemanti

            @kisse66 have you reset it (on/off) after uploading it uses to much power, but after a reset, it drops. my modules drop to 30uA or something. So it should be possible to hit a low powerconsumption.

            kisse66K Offline
            kisse66K Offline
            kisse66
            wrote on last edited by
            #7

            @omemanti

            yes, I noticed it uses 3mA after re-program. Seems to keep debug circuits on. After power on/off goes down

            O 1 Reply Last reply
            1
            • kisse66K kisse66

              @omemanti

              yes, I noticed it uses 3mA after re-program. Seems to keep debug circuits on. After power on/off goes down

              O Offline
              O Offline
              Omemanti
              wrote on last edited by Omemanti
              #8

              @kisse66

              https://forum.mysensors.org/topic/6961/nrf5-action/1658

              was my second guess ;)

              kisse66K 1 Reply Last reply
              0
              • O Omemanti

                @kisse66

                https://forum.mysensors.org/topic/6961/nrf5-action/1658

                was my second guess ;)

                kisse66K Offline
                kisse66K Offline
                kisse66
                wrote on last edited by
                #9

                @omemanti
                somehow missed that discussion...

                1 Reply Last reply
                1
                • W Offline
                  W Offline
                  waspie
                  wrote on last edited by
                  #10

                  oh yeah, forgot to mention unplugging it after programming. that has bit me in the butt at least 20 times. finally i remember to unplug it now /facepalm.

                  1 Reply Last reply
                  0
                  • kisse66K kisse66

                    Hmm, should read the manual?

                    ERRATA [89] TWI: Static 400 µA current while using GPIOTE

                    after adding the workaround before sleep

                    *(volatile uint32_t *)0x40004FFC = 0;
                    *(volatile uint32_t *)0x40004FFC;
                    *(volatile uint32_t *)0x40004FFC = 1;
                    

                    sleep current goes down to 29uA. It's a bit high still but usable with AA batteries!

                    NRF_FICR->INFO.VARIANT tells my chip is version AAB0

                    Nca78N Offline
                    Nca78N Offline
                    Nca78
                    Hardware Contributor
                    wrote on last edited by
                    #11

                    @kisse66 said in E73 nrf52 sleep current:

                    @omemanti
                    somehow missed that discussion...

                    And so what is your sleep consumption now ? Do you still have the 20+µA, and if yes is it explainable by sensors consumption ?

                    kisse66K 1 Reply Last reply
                    0
                    • Nca78N Nca78

                      @kisse66 said in E73 nrf52 sleep current:

                      @omemanti
                      somehow missed that discussion...

                      And so what is your sleep consumption now ? Do you still have the 20+µA, and if yes is it explainable by sensors consumption ?

                      kisse66K Offline
                      kisse66K Offline
                      kisse66
                      wrote on last edited by kisse66
                      #12

                      @nca78

                      about 27uA (Rigol DM3085) @3.2V. It only drops 1-2uA if I disconnect the sensors (all wires towards HTU21,BMP085,VEML6075, BH1750) which is about what the datasheet for those say under shutdown. So most is taken by NRF52. There can be other peripherals that could be turned off still before sleep maybe. Now I only handle the I2C errata and then shut it off before sleep (wire.end), the rest is in mysensors code for sleep.
                      Sleep current does not change if I don't enable the DCDC. Perhaps the active current does a bit but can't measure it accurately (too fast).

                      Just estimated that using AA-batteries it should last over 2 years. It only wakes up every 20min and runs about 400ms to send 7 values. But still I'd like to get better.

                      This is my rain gauge / multisensor under upgrade. It was earlier powered by mega328+NRF24. Worked fine about a year, but then something happened and it started taking 2mA while sleeping. Didn't see any visible reason why.

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


                      29

                      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