Toilet Ventilation Controller
A pulse on input Tr starts the session and output Qa will be turned on immediately. The fan will automatically switch on after a set delay (Td parameter).
Another pulse on input Tr will turn off output Qa, but the fan will be kept on for the duration of the last session. The maximum duration can be set with parameter Tfm.
Alternatively, the rising edge on the Mv input will start a session, with the falling edge ending the session.
A pulse on input R will cancel the session and so the fan will be turned off straight away.