Snooze deepSleep drawing almost 40ma

Status
Not open for further replies.

Mabez

New member
Hi,

I am in the final stages of my project and working on powering down to very low current draw, I tested the snooze library in an empty sketch and it worked fantastically the current draw in sleep was under 1 mA. I then implemented this in my project sketch and functionally it does go to sleep but using a multi meter the current drawn in sleep is nearly 40mA compared to the usual 24mA running this a screen and bluetooth module connected. The only difference in the set up is that I am using nearly all of the flash storage (63k/64k) could this be a problem? I tried using hibernate and that does drop the current very low but I can't get it to wake up with a TSI source. I am using teensyduino 1.28 and arduino 1.6.5-r5. Any help would be greatly appreciated!

Here's the code: http://pastebin.com/X1FXBvgn
 
Hi,

I am in the final stages of my project and working on powering down to very low current draw, I tested the snooze library in an empty sketch and it worked fantastically the current draw in sleep was under 1 mA. I then implemented this in my project sketch and functionally it does go to sleep but using a multi meter the current drawn in sleep is nearly 40mA compared to the usual 24mA running this a screen and bluetooth module connected. The only difference in the set up is that I am using nearly all of the flash storage (63k/64k) could this be a problem? I tried using hibernate and that does drop the current very low but I can't get it to wake up with a TSI source. I am using teensyduino 1.28 and arduino 1.6.5-r5. Any help would be greatly appreciated!

Here's the code: http://pastebin.com/X1FXBvgn

What pin are you using to wake up the processor with TSI?
 
Okay so after three days trying to fix this strange bug, I have finally done it. I moved the config.pinMode(...) to the function I call the sleep, now it works perfectly. Any idea why this would cause such a big issue?
 
Okay so after three days trying to fix this strange bug, I have finally done it. I moved the config.pinMode(...) to the function I call the sleep, now it works perfectly. Any idea why this would cause such a big issue?
What happens if you configure the timer wake also with the tsi wake from the setup function? Does it wake from the timer?

Could it be a tsi issue, in that threshold value you get when configuring it in the setup function is different from the tsi value when configuring right before sleeping for the non-touch threshold?
 
I have almost the same question. If I write a simple program that goes straight into hibernate, it works great. But execute lots of other code and then I can't get the MCU back to a state where it will hibernate at the same low power draw.

I've turned off all peripheral chips (using a mosfet) and I've set all pins to inputs.

One somewhat inelegant solution might be set a flag in eeprom that will tell the MCU to immediately hibernate and then reboot. Ie:

setup()
{
if eeprom hibernate flag set {
clear flag
hibernate
}
...
 
I'll have to try some things. Can probably find it by enabling one thing, test, then enable another, ...
 
Status
Not open for further replies.
Back
Top