LoPy 4 - Current consumption and Deep Sleep



  • Hi,

    I got a LoPy 4 and I am now trying the deepsleep feature with the following sequence :

    • On boot, the LoPy proceed to the OTAA.join, save the state with "nvram_save()" and then goes to deepsleep with the "machine.deepsleep()" function.
    • When a button is pressed, the LoPy wakes up, restore the state with "nvram_restore()", send a LoRa message and save the state with "nvram_save()" before going back to deepsleep again.

    This sketch runs well but my question relate to the current consumption. I know there was some troubles with the first version but I read that problem was solved with the new LoPy 4.

    However, I measured something around 120 mA during the Join process and the "wake up" phase and around 10mA while the LoPy is in deepsleep mode.

    Am I missing something ? Because that's far from the 25uA for ULP consumption and 1uA for LoRa in standby.

    Thank you for your help.



  • @cduplouy I am also getting around 15mA during deepsleep. I tried with 3.3v and 3.7v using resistor but then it is not sufficient power for the pycom to run.



  • @jmarcelino

    I tried with my power supply through the Vin Pin at 3.7V. I get 40 to 50 uA in Deepsleep
    Then I tried with my power suply at 3.3V and indeed i had like 24 uA !

    Thank you again for your help



  • @cduplouy
    That's expected, are you using machine.pin_deepsleep_wakeup()? I found that increases consumption a bit more compared to timer deepsleep.

    There's also around 16 μA loss due to going through the voltage regulator. For even lower power consumption we recommend the OEM module which can be powered directly at 3.3V. (don't power the LoPy4 without going through the regulator on Vin, unless you physically remove it)

    If you get our OEM reference board and the OEM module you can also remove a resistor to disconnect the voltage regulator.



  • @jmarcelino

    Seems like I was really unlucky ...
    There's only one LoPy 4 that doesn't work in Deep Sleep mode !

    I am around 40 to 50 uA with all of the other LoPy 4.
    Do you know if that is the lowest we can get ?



  • @jmarcelino
    Thanks for the update.

    I confirm I use the same files to make my tests.

    I got 3 other LoPy 4. I'm going to run some tests on them as well and I'll keep you updated.



  • Hi @gomez,

    The FiPy issue is completely unrelated, that's due to in some cases the LTE modem not being properly put into deepsleep (airplane mode). We're working on it. Please see this post: https://forum.pycom.io/post/15268



  • Hi,
    same for me with FiPy and expansion board. Tested with a battery pack made of 2 x 18650, during deepsleep power consumption is around 18-30 ma. Also tried to remove the RTS,CTS and LED jumper as suggested in other post ( RTS e CTS to avoid the TTL to USB converter maybe stay in high power "consumption mode" ) ans 180 ma during main.py processing and Sigfox transmission.
    Regards, Andrea



  • Just an update, we do have both devices internally (I'm still checking why there are two stickers). We've tested and both should give good deepsleep results.

    Can you confirm you are doing exactly the same deepsleep test on both devices? If so it's possible there is some physical problem with the higher current one.

    However the problem is not related to which sticker your device has.



  • Hi @cduplouy

    Can you post photos of the back of the device please. Since it may have serial numbers please email it to me at jmarcelino@pycom.io

    Also please let me know where you purchased them.

    Thank you.



  • @livius

    Here's a picture of the two different devices

    0_1518769185177_LoPy4.jpeg



  • @cduplouy

    yes, show pictures - i am also interested it there is some difference between devices



  • Well ...
    I got a second LoPy 4 to run the exact same tests and codes ... And it worked ! With a consumption of 25uA in Deepsleep.
    I was indeed powering the LoPy through the Vin Pin with a pico ammeter in serial between the power supply and Vin Pin.

    It seems there are different batches of LoPy 4... And one of them includes non working devices with Deepsleep. I noticed a slight difference on the label. I can post pictures of the two devices tomorrow.
    But we should definitely notice pycom about that.

    Anyway, thank you all for helping me :) !



  • @cduplouy
    I tried your code and you setup and even with an UART adapter connected I get 50 μA when the board enters machine.deepsleep()

    Can you give some more details please , how are you measuring the current consumption? Are you powering through the Vin pin (top right)?



  • @cduplouy
    The expansion board adds a few hundred μA due to the battery voltage divider but nowhere near 10mA.

    I’ll going to test your code today, will let you know.



  • @river
    I tried with and without the Expansion Board.
    I'm going to try without serial converter as you suggested.

    @jcaron
    Yes, from a LiPo battery at first and a stabilized power supply as well.



  • Just to be sure, you are powering the LoPy from a battery, not USB, right?



  • @cduplouy
    Do you have lopy4 connected to an expasion board or something? Test it with the module alone (no serial converter, no leds) and measure the consumption.

    I don't know if you must deactivate something more, I didn't programmed any pycom module yet (I'm doing tests with lopy4 but only small snippets of code) so excuse me in advance if I'm in error.



  • @river

    Thanks ! I was actually not disabling the wifi at boot ..
    I added that in the boot.py file :

    pycom.wifi_on_boot(False)
    

    It helped for the consumption at the Join process and during wake up , which is around 50mA now instead of 120 mA.
    I still get 14mA in deepsleep though.

    Since I use an external 10k pull down resistor I changed the pin configuration with that, but it didn't change much ...

    pinAlert =  Pin('P13',mode=Pin.IN, pull=None)
    machine.pin_deepsleep_wakeup(['P13'], machine.WAKEUP_ANY_HIGH, False)
    

    I also updated the firmware to 1.16



  • @cduplouy Do you disable wifi on boot? Maybe WiFi is activated and it's the reason of high power consumption.
    PyCom device API

    just my two cents...



Pycom on Twitter