🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5paper battery or deep sleep issue

    Scheduled Pinned Locked Moved Units
    4 Posts 2 Posters 4.3k Views
    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
      Jack Drake
      last edited by

      I've created a piece of code receiving some sensors states with mqtt and publish m5paper temperature and battery voltage via mqtt to home assistant. To keep the m5 awake I run a simple loop:

      hile True:
      wait(30)
      m5mqtt.publish(str('temp_nebeneingang'),str((sht30.temperature)))
      m5mqtt.publish(str('battery_m5paper'),str((bat.voltage())))

      So far so good, but in case I run this on battery after about 2h the m5 stops working showing the last display. During this timeframe battery voltage reported went down from 4900 to 3200 within 2,5 hours.
      What I'm unsure about: Is the m5 going to deepsleep and not responding anymore or is the battery really empty after this short timeframe?
      Even pressing the reset button doesn't evoke anything, only connecting usb power again.

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @Jack-Drake

        M5Paper, or any other device using an ESP32 for that matter, is not automatically going to deep sleep. Your program needs to tell the ESP32 to go into deep sleep. Use a command like this:

        machine.deepsleep(20000)
        

        this puts the ESP32 into deep sleep for 20 seconds.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jack Drake
          last edited by

          Hi, thanks for you fast reply. Sounds like I need to play a little bit around with deep sleep to avoid fast battery drain.

          1 Reply Last reply Reply Quote 0
          • felmueF Offline
            felmue
            last edited by felmue

            Hello @Jack-Drake

            a while ago I made some measurements for the M5Paper regarding light and deep sleep. You can find them here.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 1

            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
            • First post
              Last post