Don’t know about you but my experience to keep an Arduino running non-stop for long periods of time has been very frustrating. Things get worst when you add any kind of internet connection (Yun or WiFi shield) and a real nightmare when a GSM shield enters the picture.
After unsuccessfully trying various (HW and/or SW) solutions (found on the Internet) I designed my own which may not be very elegant but it seems to definitely solve my issue.
My approach was to remove power, from time to time, and then restart everything.
In order to do so I built a simple 555 astable timer circuit (schematic attached) that drives a p-channel MOSFET acting as a switch.
Most of the time, while the 555 Output is in the LOW state, the MOSFET is ON and provides energy to a 5 Volt regulator used to supply power to the Arduino.
For short periods of time, when the 555 Output is in the HIGH state, the MOSFET is OFF and the Arduino will be turned OFF (hard reset) until a new cycle begins.
- With the 2.2 M Resistor and 100uF Capacitor the Arduino will receive power for more that 2 minutes. You can achieve longer periods increasing the Resistor and or the Capacitor values.
- The circuit uses a diode in parallel with the 2,2 M Resistor in order to shorten the OFF state, enough to reset the Arduino.
- The regulator’s output is connected to a Jumper to be able to use the same board with an Arduino UNO (connect to the 5V input) and with a Yun (connect to the Vin input).
- A small heath-sink is required for the 7805 regulator.
Hope it helps
NoHangs.pdf (36.6 KB)