tinypico / tinypico-arduino

Arduino libraries and example code for TinyPICO
MIT License
45 stars 20 forks source link

Does deep sleep work on Arduino? #11

Closed brownedon closed 3 years ago

brownedon commented 3 years ago

Tried the DeepSleep example from the Arduino examples, stays at 20mA, with no decrease, sleep or not. I can do this on the ESP32 DOIT, without issue, sleep goes down to a couple mA.

brownedon commented 3 years ago

Ok, Deep Sleep doesn't work AT ALL on a Lipo. Works on USB. If I unplug the USB while it's in sleep, I see the current usage is below 1ma. When the timer wakes up current goes to 23, and stays there. Looks like the device doesn't reset again.

UnexpectedMaker commented 3 years ago

What version of the ESP32 core are you using? and how are you taking it into deep sleep? What else do you have connected to the TinyPICO? Deepsleep definitely works and works fine on battery.

brownedon commented 3 years ago

Looks like v3.2.3-14-gd3e562907.

I’m using Examples->Deep Sleep->Timer Wakeup. I see no reduction in current consumption versus a DOIT.

If I unplug it from USB when it’s in sleep, I can see the reduced current consumption, then it comes out of sleep, current maxes and then it doesn’t go back into sleep again. Basically it never restarts on battery.

From: Unexpected Maker [mailto:notifications@github.com] Sent: Friday, November 27, 2020 11:48 PM To: tinypico/tinypico-arduino Cc: Don Browne; Author Subject: Re: [tinypico/tinypico-arduino] Does deep sleep work on Arduino? (#11)

What version of the ESP32 core are you using? and how are you taking it into deep sleep? Deepsleep def works and works fine on battery.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tinypico/tinypico-arduino/issues/11#issuecomment-735039489 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPJJ7DHZ4PYZMWMWI26HFTSSB6HRANCNFSM4TLNKBQQ . https://github.com/notifications/beacon/ABPJJ7C3CF6K67OB25IKE4DSSB6HRA5CNFSM4TLNKBQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFPH5AAI.gif

UnexpectedMaker commented 3 years ago

That's not an ESP32 Arduino Core version. Latest is 1.0.4 installed from the Arduino IDE. There is also 1.0.5rc2 available from github https://github.com/espressif/arduino-esp32/tags

How are you installing the ESP32 Arduino Core? How the TinyPICO is powered will have no influence on how deepsleep operates or wakes.

brownedon commented 3 years ago

Right, I have 1.04. I also tried the other versions last night. I’m installing from the board manager.

From: Unexpected Maker [mailto:notifications@github.com] Sent: Saturday, November 28, 2020 3:55 PM To: tinypico/tinypico-arduino Cc: Don Browne; Author Subject: Re: [tinypico/tinypico-arduino] Does deep sleep work on Arduino? (#11)

That's not an ESP32 Arduino Core version. Latest is 1.0.4 installed from the Arduino IDE. There is also 1.0.5rc2 available from github https://github.com/espressif/arduino-esp32/tags

How are you installing the ESP32 Arduino Core? How the TinyPICO is powered will have no influence on how deepsleep operates or wakes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tinypico/tinypico-arduino/issues/11#issuecomment-735289413 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPJJ7EOQZA5NNLTVBHJMG3SSFPTVANCNFSM4TLNKBQQ . https://github.com/notifications/beacon/ABPJJ7EACTZD55MIIFZHGL3SSFPTVA5CNFSM4TLNKBQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFPJ2ARI.gif

UnexpectedMaker commented 3 years ago

Can we move this to my discord server? posting back and forwards on GitHub is slow and painful. https://discord.com/invite/xAHpApP

Jump into the #arduino help channel and we can discuss more easily. Cheers

brownedon commented 3 years ago

I've got it working now. Was measuring current on the wrong side, gotta do it across negative not positive.