best Trinket M0 low power library?

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

best Trinket M0 low power library?

Post by kenf3 »

I'm putting the Trinket M0 to sleep for an hour using LowPower.deepSleep(3600000) from the ArduinoLowPower library but it's still drawing 1mA of current. I've removed the power on LED and shut off the StarDot LED.

Am I using the best low power library? Is there something else I need to do to get the Trinket M0 under 1mA?

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

Post by adafruit_support_mike »

Make sure you've also set all the GPIO pins to INPUT with no pullup resistor. The pullups are another source of leakage current.

You might also want to try using a low-power timer like the TPL5110:

https://www.adafruit.com/product/3435

It uses less than 100nA when sleeping, which is at least a couple orders of magnitude less than anything you can get with a low-power mode.

User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

adafruit_support_mike wrote:Make sure you've also set all the GPIO pins to INPUT with no pullup resistor.
I'm driving a LED with pins 0, 1, and 2 tied together (the other side of the LED is connected to the 3.3V pin). The LED is turned off by switching pins 0, 1, and 2 high - do I need to put these pins into INPUT mode before the deepSleep(3600000) statement?

User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

UPDATE - tried the 3 LED pins as inputs - no difference, still 1mA during deepSleep.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

Post by adafruit_support_mike »

Post a photo showing your hardware and connections please. 800x600 images usually work best.

User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

Very simple - a battery pack and a LED between the 3.3V pin and pins 0, 1, and 2 (all tied together). Nothing else. The LED flashes 5 times over 10 seconds then sleeps for 1 hour, then the cycle repeats.
Trinket M0.jpg
Trinket M0.jpg (52.11 KiB) Viewed 444 times

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

Post by adafruit_support_mike »

Hmm.. what happens if you disconnect one side of the LED?

User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

I currently don't have access to this project but disconnecting the LED would not be a practical solution.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

Post by adafruit_support_mike »

That's not a long-term solution, just a diagnostic measure. It will tell us if the excess current is related to those pins.

User avatar
languer
 
Posts: 98
Joined: Fri May 17, 2013 2:02 pm

Re: best Trinket M0 low power library?

Post by languer »

kenf3 wrote:I'm putting the Trinket M0 to sleep for an hour using LowPower.deepSleep(3600000) from the ArduinoLowPower library but it's still drawing 1mA of current. I've removed the power on LED and shut off the StarDot LED.

Am I using the best low power library? Is there something else I need to do to get the Trinket M0 under 1mA?
1mA sounds reasonable. You won't get much lower unless you remove the DotStar. Reference the following posts for similar information:
viewtopic.php?f=52&t=141833
viewtopic.php?f=52&t=135218

User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

languer wrote:1mA sounds reasonable. You won't get much lower unless you remove the DotStar.
Thanks for the suggestions - I've seen those 2 posts but didn't have any luck implementing their solutions.

With the DotStar LEDs all set to OFF, is there still some current draw in it? Is that why you're suggesting I should physically remove it? Do the serial DotStar pins consume some idle current due to pull-ups, etc?

User avatar
languer
 
Posts: 98
Joined: Fri May 17, 2013 2:02 pm

Re: best Trinket M0 low power library?

Post by languer »

kenf3 wrote:
languer wrote:1mA sounds reasonable. You won't get much lower unless you remove the DotStar.
Thanks for the suggestions - I've seen those 2 posts but didn't have any luck implementing their solutions.

With the DotStar LEDs all set to OFF, is there still some current draw in it? Is that why you're suggesting I should physically remove it? Do the serial DotStar pins consume some idle current due to pull-ups, etc?
I should have stated as such. The OFF command just commands them to have no R, G, or B. But the controller is still on. And since there is not resistor to remove, the only way to remove the residual current draw is to remove the LED (which isn't easy at all). First post I saw to suggested as much: viewtopic.php?f=47&t=77854 . Then it was just a matter of measure and verify (which I guess you can say there multiple independent verifications).

User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

Thanks for the DotSar forum link that confirmed the DotStar does draw ~1mA even when it's 3 LEDs are off.

I think I've found a relatively easy way to remove it ...

- use an x-acto knife to cut the 3 DotStar leads on the right side (may need strong reading glasses)
- then use the same cutting edge of the x-acto knife along all 3 leads to pry up the right side of the DotStar
- eventually the entire DotStar will pop off
Trinket M0 DotSar.jpg
Trinket M0 DotSar.jpg (57.71 KiB) Viewed 336 times
Unfortunately I was unable to test the deepSleep current because I previously tried to cut the 3.3V power traces going to the DotStar which needed to remain intact for other functionality.

User avatar
kenf3
 
Posts: 11
Joined: Sun Jan 08, 2017 3:53 pm

Re: best Trinket M0 low power library?

Post by kenf3 »

Success! I was finally able to remove the DotStar from my original Trinket M0 project and the sleep current is now in the microamp range instead of ~1mA.

User avatar
languer
 
Posts: 98
Joined: Fri May 17, 2013 2:02 pm

Re: best Trinket M0 low power library?

Post by languer »

kenf3 wrote:Success! I was finally able to remove the DotStar from my original Trinket M0 project and the sleep current is now in the microamp range instead of ~1mA.
Excellent. Glad you got it to work. BTW, your method of removing the DotStar is much easier and cleaner than what I had done previously.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”