I have an Arduino Mega 2560 that reads temperature and humidity in my home and then turns on or off fans and air conditioning. All works well although occasionally a spurious character or voltage spike or dip seems to send the Arduino into no man's land (locks up). A hard reset always fixes this.
I need a simple timer with the output pin connected to the Arduino reset and an Arduino digital output pin to reset the timer. The idea is that the timer provides a high level to the reset pin for about 30 seconds then outputs a low pulse of 500ms to the reset pin, thus resetting the arduino. In the meantime the arduino software will generate a reset (via a digital output) to the timer every 15 to 20 seconds causing the timer to reset to have the full 30 seconds again.
In normal operation, this circuit should never time out as the timer is being continually reset by the Arduino software. However, if the Arduino ever gets "lost" for any reason, the external timer will time out at 30 seconds and hardware reset the Arduino and life will continue as it should.
I have been looking at 555 timer circuits providing a monostable pulse of 30 seconds but it appears that once started, the pulse can't be reset or extended. I also need to be sure that the output of the timer circuit starts high and does not dip if the software reset trigger resets to extend the timer to its original 30 seconds.
I would welcome any suggestions or ideas for a simple circuit for this external timer which will always restart on power up.
Regards
Jamie