I’ve a photon powered from a battery. Is is connected over wifi but not on Cloud, so it blinked green. Sketch ran for some days. But now after a battery discharge, I found photon blinking blue. I reset it and it did not changed anything, it blinks blue! How is it possible?
So I reconnect it using android application. I set its original credentials. I had no error during this process. Now I can control it over wifi but led is blinking quickly cyan with sometimes some red flashes (it should be green, it is not connected to cloud). I cannot connect it anymore to cloud but I can communicate with it over TCP.
@lah, there are other topics on losing eeprom/flash content when power to a Photon nears the SMPS drop-out voltage threshold. This has been flagged to the Particle Team but with all hands on the Electron release, things are a bit slow on the Photon side. As for the flashing cyan with quick red burst, do a search and you will find:
I’ve learned that running any processor via “un-managed” battery power can be a risk as it creates a “brown-out” condition where the Photon can get into a reset loop when power is near the SMPS cut-off voltage. This is something we will definitely need to investigate since it affects both the Photon and Electron.
I have no idea what happens. All I know is that if the battery goes bellow a certain level, it doesn’t matter if it is recharged, the Photon needs to be reseted at best (or re-flashed with a programmer at worst) to get it back online… I don’t know if the memory get’s erased by the low power condition, or if the photon simply enters an infinite boot loop and seize to respond to anything.
I think this is not software fixable and will require a more sophisticated battery shield that will prevent the Photon to be powered with a drained battery or low voltage, and will allow the battery to get a certain threshold of power to reboot the photon…
Just to clarify:
This is a behaviour that is definetly not intended and Particle is aware of this issue and investigating cause and solution for this
To keep track of this there is an open GitHub issue, so it won’t get lost, but there is no ETA for a solution
This means you’d have to take precautions against brownout yourself (which would be good practice to protect your battery and avoid possible damage caused by a gone bad battery anyway).
Understood, but there are a lot of floating threads related to this. If I don’t get an official answer on any of them, then I will keep seeking for an answer. I need to deploy my solution soon and don’t have a clue on how to fix this issue. Sorry and I will be more diligent on this issues. But then again, there are a lot of posts related to this issue… Not started by me.
We’ve seen the same problem, the EEPROM being written over with FFs at power down. A simple fix is to use something like an STM1061 Low Power Voltage Detector. Our sytem runs off many different power sources, many of which drop voltage slow enopugh for the Photon to go nuts and overwrite the EEPROM.
There are many choices of threshold voltages for the STM1061, so you can do whatever you want to setup the threshold point. The parts are very cheap (about 42 cents), small, and easy to get.
When the voltage drops, the 1061 senses it and pulls down on the reset line, preventing the Photon from doing its dirty deed.
The brown out setting didn’t seem to fix any issues according to the feedback on this forum and on GitHub. However I made a change to the EEPROM code to avoid erasing the EEPROM on every boot and that fixed the EEPROM reset issue during low power situations. The change will be in the next firmware release.