I have a thermal printer module that i want to connect to a microcontroller.
The module have an active-low "burn" input, which heats up the printing elements.
This input must not be active for more than several milliseconds, or else the module would burn up itself.
Now, i don't trust my ability to never ever make an error in software that would result in this line getting stuck low for long or permanently, so i wanted to add a hardware safeguard.
The circuit should immediately give out high when input is low, and low when the input is high (i.e. the pulse can be terminated before the time out).
If the input stay high for more than a given time, it should revert the output back to high (safety timeout).
If the input were to be left floating, the output should stay high (fail-safe).
Here is what i came up with.
The resistor dividers are set up in such a way as to always keep the non-inverting input above the inverting one, with a delay capacitor on the former to slow it down. The time it takes to charge the capacitor is our valid pulse window.
Questions are:
-Is that a good solution? That is, would it work as described?
-How is this problem solved normally, i.e. in cash registers? That is, can it be made simpler?