Microcontrollers can crash.

This can happen for sketch mistakes, but also for failures in the microcontroller itself... so it can happen.

When this happens, the outputs remain frozen at the last value.

The watchdog circuit is used to detect this anomaly and protect the circuitry downstream of the microcontroller.

It works like this:

Microcontroller provides a digital output called "Heartbeat". It is a square wave with a period of 500 ms.

When this signal is present (software OK), the watchdog circuit closes the relay "K0"

When the Heartbit signal is blocked , at a high logic level or at a low logic level (software crash), after the delay time of 5 seconds (t = 1,1* R11*C5) the relay K0 opens.

This is an example test circuit diagram:

It is possible to connect 2 redundant watchdog circuits, to achieve a single fault tolerant safety level. Here is the scheme: