While running raspberry Pi 2 for long, there often happen to be some power fluctuations that cause only red light to be turned on and the system not working until I turn off and on the power supply to Pi in order to make it work. I was planning to deploy my Pi at a remote location but if such a behavior continues, I would loose connection to Pi as there is some power trip. Is there some solution to either restart the system in such case or something better?
I'll go for a meta answer here, as previous questions already addressed the issue.
Prevent brown out due to power outages
If that remote location shows power fluctuations one approach would be to back up the power supply aka uninterruptible power supply - UPS. Luckily the Pi draws only little power and if only a short time span is to be brigded quite a small UPS with limited battery capacity should do the trick.
- How do I build a UPS-like - battery backup - system?
- EE.SE for more ideas about the hardware part of an UPS (mind that it does not have to be Pi specific)
Keep alive measures
The remote connection and access to the Pi make it desirable to make sure an locked up or browned out Pi is rebooted. That's called watchdog. The idea is that the Pi is set up to regularly signal the watchdog that it is still alive. If the signal stops, the watchdog reboots the Pi. There is an integrated watchdog but external solutions are also possible.
There are of course situations (e.g. corrupted filesystem) that could prevent the Pi boot up properly no matter what kind of watchdog circuitry is implemented (barring a fail-safe file system of some kind but that's not something the out-of-the-box Pi comes with).
- How do I hard reset a Raspberry Pi?
- Can I send a heart beat to hardware watch dog from my own program?
- EE.SE for a dedicated hardware solution (again not necessarily Pi specific)