Unexpected behaviour when powering Photon with batteries on Vin

I have a battery powered Photon project that monitors water levels inside a water well. In order to preserve the batteries, the Photon turns on once a day to measure the water level and then goes into Deep Sleep for 24 hours before it wakes up again to take another water level measurement. I use 4 AA batteries, which supplies Vin with about 6.5V when the batteries are new. The Photon specs say that Vin can handle a maximum of 6.5V, so I use this maximum voltage to make the batteries last as long as possible. I’ve operated several Photons like this in water wells for more than 3 years with the same batteries.

I have noticed 2 types of strange behaviour which might be related. I’m wondering if anyone can explain these.

  1. Usually when I attach the battery pack to Vin, the Photon starts up immediately. But I’ve noticed that some brand new Photons won’t start unless I lower the voltage (by using old batteries) to less than 6V. Not all Photons do this, but I’ve seen this behaviour on about 15 new Photons lately. Is this because some Photons have overload protection that prevents the Photon from turning on if Vin exceeds 6V?

  2. I have a Photon that’s been running for 2.5 years from the same batteries and was behaving perfectly. But recently it no longer wakes up from Deep Sleep at the 24 hour interval that it’s programmed for. Its wake up time now ranges from about 24 to 37 hours, although sometimes it reverts back to its regular 24 hour interval for a few days before becoming erratic again. I checked the voltage on the battery pack when this started happening and it was about 6.1V. Can any one explain why this might happen?

Thank you!

I can’t help with your first question, I don’t know enough about the hardware on a photon and what is or isn’t installed for overvoltage protection.

For your second question:
How are you keeping track of the time on this photon?
If cloud connected, is it possible it loses connection for a period of time and loses those hours in the count?
If not cloud connected, could something be blocking your code, or possibly interfering with the wakeup trigger so that it gets off on its time until it can retrieve the proper time on wakeup?

My Photon is offline most of the time. It only connects to the cloud for about 30 seconds each day. The rest of the time it is in deep sleep mode, during which it just counts from 0 to 86400 seconds until it wakes up again and connects to the cloud. So it doesn’t keep track of real time, it just counts to 86400 seconds using the following line of code:

System.sleep(SLEEP_MODE_DEEP, 86400);

This code works as expected on my other Photons, but for the Photon that is acting weird, it stays in deep sleep mode for a random and much longer duration than 86400 seconds before it wakes up again.