Deep Sleep Pysense



  • Hi there I'm trying to get a LOPY 4 with Pysense to consume the supposedly 10uA current while in deep sleep. I'm using the sleep function in the Pysense library but I can't get the device to consume less than 2.3mA.

    Is there something I need to turn off via code, besides just making it go into deepsleep?

    I'm trying to develop a project which send some sensor data over LORA every 1 hour, and need it to run for more than a month through the battery. As of right now I have the Pysense board conected to a 3.7V LiPo Battery with a multimeter conected between the battery + and the Pysense +.



  • @SiMoS-IoT I'm measuring the instantaneous current draw.



  • @SerodD are you measuring the instantaneous current draw or are you averaging it over a cycle.



  • @SiMoS-IoT Do I have to wait a bit more time until it reaches the minimum power? How much would I need?



  • @SerodD your deep sleep time in the code example is quite short...30 seconds. Have you checked the awake time of the unit compared to it's sleep time.



  • @jcaron said in Deep Sleep Pysense:

    @SerodD did you ever have any issues with that board, like overvoltage or reversed polarity for instance? The fact that it won’t charge a battery is not a good sign...

    Nope never had any issue, the first time I connected the battery it charged fine, stopped working after that.



  • @SerodD did you ever have any issues with that board, like overvoltage or reversed polarity for instance? The fact that it won’t charge a battery is not a good sign...



  • @SerodD said in Deep Sleep Pysense:

    Agilent 34410A

    Try to flash new firmware or flash the same firmware again. I had also once problem with a pytrack. Flashing firmware again, solved the problem.



  • @jcaron Yes the LED was off while I was taking the measurements and nothing was connected to the USB port.

    I think 0.0.8 is the latest version, at least it's the latest available on the website.

    I used an Agilent 34410A to take the measurements, is it possible that the multimeter input impedance might be too high? It's 200 ohm to measure in the uA range.

    Maybe I have a faulty Pysense? I'm also having some problems with recharging any Li-Po battery with it, it simply doesn't charge.

    I can check the voltage, I'll report back when I get a change to do it.



  • @SerodD I don't see anything in that code that would explain such a high current consumption in deep sleep.

    We do agree that the LED does not actually light blue, right?

    Can you check if you have a voltage on the LoPy 4 5V5 input during deep sleep?

    I don't think just importing the various sensor libraries without actually instantiating them should change anything, but can you try commenting them to see if that makes a difference?

    Isn't there a 0.0.9 version of the Pysense firmware? Too lazy to check, sorry :-)

    Stupid question: is your meter sensitive enough to measure down to micro-amps?

    Do you have anything else connected to the Pysense? Anything connected via USB?



  • @jcaron said in Deep Sleep Pysense:

    @SerodD As @tvetter1976 asked, can you show us the relevant parts of your code? If you remove some of your actual code, make sure that the code you post still exhibits the problem, of course.

    Also, please share the firmware version of the LoPy 4 and of the Pysense.

    You can most definitely get in the 10-20 µA range, so there must be something wrong going on.

    The code I made is relatively simple all I was trying to do for now was to get the current draw for all the sensors I need, using the RGB LED as a marker so I can know what is on and off.

    I think I have the latest firmware on both, Pysense is on 0.0.8 and LOPY 4 is updated to the latest stable version available on the PYCOM firmware updater (1.15.1). Maybe I should updated it to the developer version?



  • @tvetter1976

    import machine
    import _thread
    import pycom
    from time import sleep
    from pysense import Pysense
    from LIS2HH12 import LIS2HH12
    from SI7006A20 import SI7006A20
    from LTR329ALS01 import LTR329ALS01
    from MPL3115A2 import MPL3115A2,ALTITUDE,PRESSURE
    
    
    def _thread():
        py = Pysense()
        if pycom.wifi_on_boot() == True:
            pycom.wifi_on_boot(False)
    
         sleep(30)
         pycom.heartbeat(False)
         pycom.rgbled(0xFF0000)  # Red
         pycom.rgbled(0)
         sleep(10)
         py.setup_sleep(30)
         py.go_to_sleep()
         pycom.rgbled(0x0000FF)  # Blue
         sleep(20)
         pycom.rgbled(0)
    
    _thread.start_new_thread(_thread, ())


  • @SerodD As @tvetter1976 asked, can you show us the relevant parts of your code? If you remove some of your actual code, make sure that the code you post still exhibits the problem, of course.

    Also, please share the firmware version of the LoPy 4 and of the Pysense.

    You can most definitely get in the 10-20 µA range, so there must be something wrong going on.



  • @jcaron said in Deep Sleep Pysense:

    @SerodD are you using any of the sensors on the Pysense?

    None



  • @SerodD are you using any of the sensors on the Pysense?



  • @SerodD can you show your code?


Log in to reply
 

Pycom on Twitter