Photon losts its credentials!



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.

Can you explain this behavior?



@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.

ping @BDub, @mdma, @mohit


This is related to this:

Maybe if we could make a small circuit that can cut-off power when the voltage is low and opens the valve again when the voltage reaches a threshold… It would fix this issue.

The problem is that with he current battery management solutions out there (Both sparkfun and particle’s) theres nothing keeping an underpower battery from supplying power to the Photon.

This will be very important specially for remote deployments.


@peekay123 @frlobo I will apply given solution post Photon setup flashing cyan with a “quick red burst” (now orange burst) [Solved] … it’s not convenient at all when photon has been cased in a difficult to access place…
If you have more explanations about brown out / flash-eeprom erase I’m very interested! I have not yet attached a debugger to photon, but during startup, does any erase/write operations are done on flash pages/eeprom containing credentials or keys?



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…

Again. i am a newbie and only guessing here.


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).

Photon setup flashing cyan with a "quick red burst" (now orange burst) [Solved]

Understood and thanks @ScruffR

Can you think of a solution that can prevent under voltage operation of the battery (Protect the battery and the photon on low voltage)… like a low voltage cutoff.

It needs to be efficient… And it needs to be auto revertible when the battery is sufficiently strong to operate again.

Any ideas would be appreciated!


OK, answered this question in the other thread

(This is the reason why double-posts are discouraged - links might work better in such cases)


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. :smile:


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.


Have you tried @jvanier proposed solution to update the brownout voltage setting of the photon?

Eeprom persistence issue post


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.


That’s excellent news. We will wait for the next release anxiously… Several fixes are way over due!