Technology already exists that can "read" a person's responses while driving and make audible sounds or vibrate the steering wheel if it thinks the driver is falling asleep. Perhaps the rail equivalent would be relatively low cost, compared to a catastrophic event. It could read the facial movements and position of the engineers head and shoulders, their arm movements, and pressure applied to the throttle/break, pass the data through an algorithm, and determine if it is consistent with someone falling asleep. It could then emit loud beeps that sound different from anything current systems produce, and/or vibrate the seat in a way that is not pleasant. If the engineer fails to acknowledge the beeps or vibrations, emergency brakes applied.