The big fear of every developer of a microcontroller or computer-driven control system is that the computer or controller could crash while it is in the middle of controlling something and that the output signal will remain on ‘full throttle’. In this scenario, motors could continue to spin faster and faster or a heating element could become red hot, without the system taking any corrective action. In reality, any control system needs some sort of emergency stop, which will turn everything off the moment something goes wrong.
Microcontrollers or computers will usually have a spare TTL output, which can be used for this purpose. By adding a few lines of code to the program, this additional output can be made to toggle high and low periodically. This can save a lot of trouble and damage. Should the computer or controller crash, then the toggle signal on this output will stop as well. The circuit then does little more than check whether this toggling (TTL-) signal is still present. The computer or controller will be turned off as soon as this control signal is missing. The heart of the circuit is formed by transistors T2 and T4, which follow the control signal. The accompanying capacitors C1 and C2 are charged via resistors R6 and R11. During a logic High signal, T4 will conduct and discharge ‘its’ capacitor (C2). Since T2 is preceded by an inverter circuit built around T1, T2 will discharge its capacitor when the control signal is ‘low’.
Provided that the control signal changes often enough between high and low, both capacitors will remain nearly completely discharged and nothing else happens. If the control signal now hangs at the high level, then the capacitor connected to T2 will no longer be discharged and the capacitor voltage will increase quickly. On the other hand, the voltage across the capacitor connected to T4 will increase quickly if the control signal is stuck at the ‘low’ level. Via the dual diode circuit, which acts as an OR gate, T3 will be activated as soon as the voltage across one of the two capacitors builds up sufficiently. The relay that is controlled by T3, has to have a normally closed contact. The moment that the control signal stops changing, the control system will be permanently turned off via the normally closed contact. To turn the system back on, pushbutton S1 needs to be pressed until the control signal reappears at the input of the circuit.
The circuit will operate over a wide range of power supply voltages, including 5, 9 and 12 Volts. The component values are not critical and the value of the capacitors depends on the frequency of the control signal. The time constant with a value of 10 µF amounts to 10 ms so that the capacitors will have to be discharged at least one hundred times per second to prevent the emergency stop from operating. With higher values of capacitance, the capacitors can be discharged at a proportionally slower rate. A 1N4007 can be used for the free-wheeling diode across the relay. The two diodes for the OR gate can be practically any type of signal diode. The circuit will also work with other types of transistors that have comparable specifications.