reference design for low power sleep (please!)



  • Re: lopy4 RTC

    @Martinnn asked for this a year ago, here is another try :

    I have the impression that many people here are struggling with low power deep sleep designs. It would be great if pycom could provide some reference designs for a device that wakes up every xx minutes/hours, sends some data (like from an analog input) via Lora/Sigfox/LTE NB and runs off a battery (like a LiTCL D size https://ch.rs-online.com/web/p/d-batterien/6684550/ ) for a year or two.

    Did you end up with a design you're happy with @Martinnn ?



  • FYI: I made this https://github.com/somervda/lopybase repository for testing out deepsleep/lorawan etc on lopy4 - it seems to work for me . I also have a video that walks though some of the code here https://youtu.be/5pBcGdR8pR4 . It may be useful :)





  • That depends highly on the variant of expansion board and development board you are using, whether you disable the LEDs etc. The final power should be in the order of 10s of micro-amperes.

    You can go even more low power by using the py.go_to_sleep() method on the Pytrack or Pysense, this will cut the power to the module alltogether leaving only the PIC on the board running in a low power state, keeping track of the time to wake up. Im not sure about the sleep current here, but it should be even lower.

    Best,
    Gijs



  • @Gijs how much current data a being used in deep sleep using this code ?



  • @hdemeillon said in reference design for low power sleep (please!):

    have the impression that many people here are struggling with low power deep sleep designs. It would be great if pycom could provide some reference designs for a device that wakes up every xx minutes/hours, sends some data (like from an analog input) via Lora/Sigfox/LTE NB and runs

    Hi,
    I am currently working on providing an example for machine.deepsleep():

    import machine
    import time
    (wake_reason, gpio_list) = machine.wake_reason()
    print("Device running for: " + str(time.ticks_ms()))
    print("Remaining sleep time: " + str(machine.remaining_sleep_time()) + "ms" )
    if wake_reason == machine.PWRON_WAKE:
        print("Woke up by reset button")
        #stop the sleep loop here
        while True:
            machine.idle()
    
    elif wake_reason == machine.PIN_WAKE:
        print("Woke up by external pin (external interrupt)")
        print(*gpio_list, sep=", ")
    elif wake_reason == machine.RTC_WAKE:
        print("Woke up by RTC (timer ran out)")
    elif wake_reason == machine.ULP_WAKE:
        print("Woke up by ULP (capacitive touch)")
    
    machine.pin_sleep_wakeup(('P3', 'P4'), mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
    #use a network to send some things
    
    machine.deepsleep(1000*60) #sleep for 1 minute
    print("This will never be printed")
    

    Is this something you were looking for?


Log in to reply
 

Pycom on Twitter