Electric fence?

Most likely some kind of resistive voltage divider driving a optoisolator could probably be designed. The software side should be pretty simple, just use millis() to capture the time from the last pulse and if not updated from a new pulse, time-out and issue an alarm.

Lefty