Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

best Trinket M0 low power library?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

best Trinket M0 low power library?

by kenf3 on Sun Nov 10, 2019 11:47 am

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?

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

Re: best Trinket M0 low power library?

by adafruit_support_mike on Mon Nov 11, 2019 4:04 am

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.

adafruit_support_mike
 
Posts: 63767
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

by kenf3 on Mon Nov 11, 2019 12:13 pm

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?

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

Re: best Trinket M0 low power library?

by kenf3 on Mon Nov 11, 2019 8:06 pm

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

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

Re: best Trinket M0 low power library?

by adafruit_support_mike on Tue Nov 12, 2019 1:58 am

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

adafruit_support_mike
 
Posts: 63767
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

by kenf3 on Tue Nov 12, 2019 10:02 am

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 373 times

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

Re: best Trinket M0 low power library?

by adafruit_support_mike on Thu Nov 14, 2019 12:18 am

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

adafruit_support_mike
 
Posts: 63767
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

by kenf3 on Thu Nov 14, 2019 1:56 am

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

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

Re: best Trinket M0 low power library?

by adafruit_support_mike on Thu Nov 14, 2019 2:58 am

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

adafruit_support_mike
 
Posts: 63767
Joined: Thu Feb 11, 2010 2:51 pm

Re: best Trinket M0 low power library?

by languer on Sat Nov 16, 2019 8:42 pm

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

languer
 
Posts: 46
Joined: Fri May 17, 2013 2:02 pm

Re: best Trinket M0 low power library?

by kenf3 on Sat Nov 16, 2019 10:57 pm

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?

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

Re: best Trinket M0 low power library?

by languer on Mon Nov 18, 2019 3:04 am

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).

languer
 
Posts: 46
Joined: Fri May 17, 2013 2:02 pm

Re: best Trinket M0 low power library?

by kenf3 on Tue Nov 19, 2019 2:47 am

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 265 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.

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

Re: best Trinket M0 low power library?

by kenf3 on Sun Jan 19, 2020 1:06 pm

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.

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

Re: best Trinket M0 low power library?

by languer on Sun Jan 19, 2020 2:35 pm

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.

languer
 
Posts: 46
Joined: Fri May 17, 2013 2:02 pm

Please be positive and constructive with your questions and comments.