Can the photon/P1 lose Wifi credentials during a power outage?

Is it possible for a photon to lose wifi credentials and go back to listening mode during a power outage?

I started to notice something strange on some of our P1 boards. If the battery gets depleted and the chip loses power, after I plug it in, it starts blinking dark blue and I can see the hotspot it creates. This seems to be unrelated to user code (I tested this with our main application as well as with applications we used to test some features of the P1).

If this is not supposed to happen, is is possible for the P1 to reset because of faulty wiring? The board is custom made after all and if it’s possible for the P1 to be reset by setting any pins to high, this may be the reason.

I apologize if there already is any information on this anywhere, but I searched and didn’t find it.

I also just had this problem. If the voltage sags below a certain point, the photon will permanently reset until I use the particle app to re-claim it.

@Arthur_dent_42_121, @itd24, are you using the latest 0.4.9 firmware? It is always important to monitor battery voltage and not let it drop below the specified operating range. I believe there was a topic with suggested code that used the STM32’s built-in brown-out reset feature but I can’t seem to find just now.

I am using firmware version 0.4.9

So the voltage always has to be above a certain point? Was anyone able to handle that problem gracefully (emergency battery or something simmilar) ? We will use the P1 in an enviroment where we won’t be able to make sure the battery won’t be depleted and we need the code to run from the beginning after it gets power again.

The code to enable brown-out-reset level is here:

3 Likes

Thank you, I’ll try it out as soon as possible.

I do understand that the EEPROM contents can be corrupted if the voltage is too low. But can it actually cause the chip to go back to listening mode? In my case the P1 starts to blink dark blue after I connect it to a battery that’s almost empty

@itd24, the P1 specs say:

The voltage should be regulated between 3.0VDC and 3.6VDC.

So anything lower than 3.0Vdc creates an unstable operating environment for the P1. Furthermore, an "almost empty" battery will not provide enough voltage if the P1 tries to draw current from it. So how the P1 operates under those conditions is neither reliable or entirely predictable.

This is why battery operated system have battery monitoring in them. Beside, UNDER-discharging a LiPo is bad practice to start with.

The BOR code linked above protects the P1 by putting it in RESET, preventing it from running under unpredictable conditions. However, BOR should be the last line of defence and measuring the battery conditions and pro-actively shutting down the P1 (deep sleep or HALT) is the best course of action.

3 Likes

@peekay123, thanks for the information. I think we’ll have to redesign the board to be able to put the P1 into deep sleep and wake it up physically after the battery is charged enough to support the P1.

You guys helped me out a lot, thank you :smile:

@itd24, you may want to consider a watchdog chip like the Maxim MAX6748 which is both a software and voltage watchdog. I am planning on using it or something similar in an upcoming battery operated design.