Deep sleep drawing more current than expected

Hi. My batteries died a lot sooner than expected during a recent test, so hooked up a good regulated power supply and a multi-meter, and took to measuring the current draw. I’m getting around 145mA with WiFi connected, and around 35mA during DEEP SLEEP. The latter seems way too high for deep sleep, and I’m not sure what’s going on. I’m doing the measurements with nothing at all connected to the chip, except for 3.3V and ground. I’m using a multi-meter in series with the supply to measure the current draw.

I’ve seen another topic, where @Gentmat was getting around 2mA in deep sleep and found that a new chip produced the expected results. I’m getting 35mA, which is obviously a big issue when I was expecting uA.

The line of code being used to put the device to sleep is:

Spark.sleep(SLEEP_MODE_DEEP, 900-38);  // 15 minutes - wait delay

Ignore the subtraction, but I’ve included it in case there is some bug related to using an expression in the call.

Any experience with why deep sleep mode would consume so much current - or insight into what I may be doing wrong?

Thanks :smile:

-Dan

1 Like

Which device is this on, Photon or Core?

Sorry, it’s on core.

@mdma I’m guessing “core” was the wrong answer, because it’s been silent for 18 hours on this. Any insight here? I’m still waiting to receive my first photon and I’ll surely test with it as well, but shouldn’t the spark core also consume much less current during deep sleep? I can’t imagine what I might be doing incorrectly because at this point I’ve reduced the test bed to the simplest possible scenario.

Hi @dpicker

My experience has been in deep sleep the core draws something like 0.4 - 0.3 mA . Have you done the current consumption test with just the core not your circuit to make sure you are not draining power somewhere else?

2 Likes

Hi @dpicker

How old a core is this one? There was a problem in the original cores where the bootloader code always enabled the watchdog (which cannot be stopped then) and sleep mode was not effective since the watchdog kept going off. This has been fixed of course but if you have an old core, you might need to update the bootloader, for which there is a special binary firmware file that can flash that overwrites the old bootloader. If watch the RGB LED when sleeping you will notice this right away since it wakes from sleep after a few seconds.

Secondly, what is connected to the core? Is this just the core with no external logic? Lots of times current flows in unanticipated ways when in this type of testing so the best thing is to test the core in isolation until you are sure that is working OK.

1 Like

Hi @bko. Thanks for your reply.

The core is relatively new - I received it in April 2015. I also recently did a deep update in a seemingly successful effort to resolve some other issues I was seeing. Also, when it is in deep sleep it doesn’t wake up every few seconds. It’s LED-less until it’s time to wake up.

Finally, I have absolutely nothing connected to the chip at this point. I removed everything else from my circuit to troubleshoot this problem. The only thing in my setup other than the Spark Core is a power supply set to 3.3V and a digital multimeter in series with the power source.

Thanks :smile:

1 Like

Hi @dpicker

I am assuming this is what you have in your code

Spark.sleep(SLEEP_MODE_DEEP, sleep_delay);

Since your supply is at 3.3v I am wondering if you are powering it directly via the 3v3 pin or to the vin pin
If you are connected to the 3v3 pin I would try changing to the vin pin also try 4.5 volts in to see if you have a difference.
If you still get the same I would look for another meter to prove/disprove

Hi @HardWater

Yes, I had included the line of code in my original post. It is actually as you suggest. I’m powering it between the Vin and Ground pins using a good regulated power supply that I’ve verified with 3 different multi-meters (long story). In addition, I originally discovered this issue when a set of 4 AA batteries were drained long before I would have expected them to be. My calculations show that this current draw pretty well matches the drain on those batteries. Furthermore, the 4 AA batteries in series would have produced 6V. Nonetheless, I can easily try 4.5V in and will report on the results. It will be an hour or so before I can get to my setup.

Thanks.

Hi @dpicker

It sounds like you are doing everything I would do. If you still get the same results I then would suspect that something is wrong with the core you have.

1 Like

Ok, so I’m now more confused than ever. I went back to my setup, set Vin to 4.5V as suggested by @HardWater, and connected it up. Now it’s pulling around 0.175mA, which is what I would have expected. So I scratch my head, disconnect it, lower Vin back down to 3.3V and it’s still fine - drawing around 175uA.

The only thing I could think of was that I had perhaps actually applied power to the 3V3 pin instead of Vin yesterday, so I tried that again. The results were the same - 175uA in sleep mode.

I’m confounded. Assuming I somehow had a setup error yesterday (not that I can imagine how that could be the case, considering the simplicity of the setup), now I’m left with the fact that my batteries drained exactly according to the power profile I measured yesterday. By today’s measurements they should have lasted a lot longer.

Arggghhh.

Sorry for the potential false alarm. Hmmm.

2 Likes

@dpicker, that always happens to me when I seek help for something not working. When I 'm about to show the problem, it starts working!!!

2 Likes

Hey @dpicker if you every figure out what happened post it as it sounds like the kind problem I would fall right into. Haha - just joking.

1 Like

Will definitely do! :wink: