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.
  • kisse66K Offline
    kisse66K Offline
    kisse66
    wrote on last edited by
    #1

    I started experimenting with NRF52 /Ebyte E73 module and mysensors. Code works fine, but the issue is sleep current. It seems to take ~0.5mA under sleep(). Anyone else using batteries with this module?
    I'm on latest dev mysensors and arduino 1.8.8, sandeep nrf5 0.6.0.

    About a year ago I tried mysensors on small NRF51 board. It has the interrupt wakeup errata, so my code sleeps 750ms, wakes up and checks button press (it's a simple remote). If not pressed sleep again This has now lasted over half a year on CR2032, so I'm surpriced by the E73 sleep current.

    I do not have the inductor for DCDC, but as I read from Nordic articles it mainly saves on higher currents plus I don't know how to enable it on myseonsrs environment...

    The module seems to use ~16mA while working and then .5 after sleep() powered from 2x1.5V battery. It does have multiple I2C sensors, but if I disconnect the sensor cable while it's sleeping the .5mA does not change.

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

      hmm, I experimented with DCDC. Don't have correct inductors, but added 2x 4u7 axials in series and NRF_POWER->DCDCEN=1 in setup(). Active current did not change, but sleep went down to .25mA. Still way too high.

      Ordered SMD inductors, will see if it changes anything.

      1 Reply Last reply
      0
      • 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


                          19

                          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