Difference Between Power Saving Sleep Modes

I am working on a battery + solar project using a Photon. The Photon will wake up once every 30 minutes to 1 hour, read some sensors, make an HTTP call, and then sleep until the next reading.

I was originally using SLEEP_MODE_DEEP to put the Photon into a low power state between readings. However, I noticed my battery draining much faster than the mentioned 80uA for deep sleep mode. While asleep, my multimeter was still reading ~60-80mA draw.

I noticed the other sleep functions to put the device into “stop mode” which would put “the voltage regulator into low-power mode.” Using System.sleep(D5, RISING, 1800) and hooking D5 to ground results in a much lower draw than deep sleep mode. This seems like a good thing and I don’t mind losing a pin for this.

I don’t understand enough about the differences between these two modes or which mode I should be using for the lowest possible sleep power usage. I don’t care if variables are persisted across sleeps since I am just taking a reading and hitting a hardcoded URL. I can reinitialize everything if needed each time through the loop. I would actually prefer for my sketch to start fresh each time out of sleep. I guess I could call System.reset() at the end of my loop to ensure this.

Thoughts on if I should be using deep sleep or stop states to conserve power between readings? Is there another way that I can disable the voltage regulator while I am in deep sleep mode?

One thing to watch out for which I have experiences with the Photon + a solar harvesting shield for low energy harvesting is this.

If the battery voltage falls to far below 3v it can lock up the Photon to the point it will not work any more. All you will have is a faint blue LED on by Pin 7. Other people have reported this problem.

To get by this issues I think we are going to need a way to prevent the Photon from being powered by a voltage source below 3v. It’s the low voltage that triggers something to fail.

I did bring it out of this stage once but no luck today when I saw this had happened again.

Thanks for the tip. I did see this happen this morning. Last night the last reading I got was around 4am. I woke up and noticed the faint blue LED when the solar panel was getting direct sunlight. By this point, the battery was charged enough that it was outputting greater than 3V. Hitting the reset button kicked things back into working order. This is fine for now but will be problematic if I have to do this every day or every few days.

I wrote up a little tutorial that goes into a little more depth about the sleep modes; hopefully that will help.

I'm not sure why you're getting so much current draw in deep sleep mode. My USB power meter reads 0, but that really only means somewhat less than 10 mA, but I'm definitely not seeing > 60 mA.

Thanks, rickkas7! Just to be clear, you were powering the Photon via USB for these tests?

The one thing that I should mention is that I am powering the Photon via Vin with a 3.7V LiPo. Wonder if this could be causing the differences in current while in sleep mode. (Or perhaps it is time for me to try a new multimeter…)

Maybe it's time to replace the 9V battery in the meter?

Yep, multimeter battery seems fine.

After switching away from SLEEP_MODE_DEEP, my Photon has been running without an issue for the past 2 days. Previously, with deep sleep mode, it would always use up the battery by 3-4am.

I’m unsure why I am seeing this difference but I am getting another Photon in the mail today and will see if I can replicate the result. I have also wanted to try using a different power supply and seeing if I get the same results.

@tmrudick, I’ve been working on a product which uses a 3.7v LiPo connected to Vin on a Photon. I also put it in deep sleep and see the current on the battery drop to below 1ma. One thing to consider is any other devices you may be powering off Vin or 3V3. In one design, I have a microSD socket and with a 4GB device, it required 8ma in low power mode! I ended up using a N-mosfet to disable its power in deep sleep.

One way to get the most from the battery (which I am looking at doing for a future design) is to use an LDO boost regulator. However, it is never good to overdrain a LiPo. Modern LiPo batteries usually have overcharge protection but not overdrain protection. :wink:

I got my second Photon and finally had a chance to hook it up. Much to my surprise, deep sleep mode on the new Photon is showing 80uA draw.

However, running the same exact sketch, the older Photon is still showing a 60mA draw. Same sketch, same power source, same breadboard. I’m not sure what could be causing this difference. Perhaps something is wrong with the first Photon?

Any thoughts?

1 Like