E73 nrf52 sleep current



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



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



  • 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



  • 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).



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



  • 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



  • @omemanti

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





  • @omemanti
    somehow missed that discussion...



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


  • Hardware Contributor

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



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


 

154
Online

8.6k
Users

9.4k
Topics

99.1k
Posts