Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Decrease battery consumption without deepsleep

    Scheduled Pinned Locked Moved MicroPython
    deepsleeppowerconsumptionenergyefficiency
    3 Posts 2 Posters 1.2k Views 2 Watching
    Loading More Posts
    • 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.
    • J Offline
      JFS
      last edited by

      Dear all,

      I am building a battery-enabled relay application where I need to set the 'P9' and 'P8' pins of the LoPy high/low on demand (no fixed time frames) through Wifi or Bluetooth. Everything is working fine, but the power consumption is pretty high since the LoPy is constantly turned on with full capability. I tried to figure out if machine.deepsleep() would be an option, but as far as I understand it's only possible to wake the LoPy from deepsleep with an external trigger or after a fixed time period.

      So my question is if there is any way to set the LoPy into a very energy efficient state until I trigger it through Wifi/Bluetooth on demand and tell it to set the Pins high and low and then go back to sleep (similar to a garage door opener)? I am also open for hardware solutions.

      Thanks in advance!

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @JFS
        last edited by

        @jfs A few questions that might help get better answers:

        • How fast would you need the pins to change state (i.e. max delay between the trigger and the actual change)?
        • what kind of battery you will have
        • what kind of battery life you are looking for
        J 1 Reply Last reply Reply Quote 0
        • J Offline
          JFS @jcaron
          last edited by JFS

          @jcaron
          Thanks for your reply.
          1.) I would say everything below 5 seconds is acceptable.
          2. / 3.) This question is hard to answer, since I will try the device with different types of applications so the capacity of the batteries will strongly vary. The battery life should be as long as possible.

          I also found the machine.idle and machine.sleep in http://docs.micropython.org/en/latest/wipy/library/machine.html. Given the description machine.sleep should work if I trigger the LoPy through Wifi. Is that correct?

          Thanks in advance.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom