I will explain existing hardware followed by my desired operation thereof.
I have a security door the controller of which has failed. The door has four electronic deadbolts. -- A) Two open when un-powered; close when powered AND door is closed (as determined by magnetic reed switch internal to these two deadbolts) -- B) Two open when unpowered and close when powered (with no internal sensors of door state)
There is a tactile switch with both NC and NO connectors inside to detect proper closure of the door which can be used.
My problem relates to the manual escape button found on the inside of the door. When pressed momentarily this should: -- Un-Power the A deadbolts for 5 seconds; then power them again. -- Power B deadbolts for 5 seconds and close ONLY IF tactile switches reveal that door is closed (otherwise the door would not be able to close against closed bolts)
I have this partially fixed by using one LM555 as a monostable timer unpowering A bolts for 5s and another LM555 as a bistable set to latch to powered state on button press. Both LM555's triggered simultaneously.
Problem is that after closing the door the B deadbolts do not re-latch without manual reset of the 2nd LM555.
My hope is that someone can advise as to how to develop an elegant solution to this problem which will allow: --> Opening door for 5s on single button press --> Automatic re-locking after 5s if door is again closed --> Keeping door unlocked if not closed after 5s --> Locking door again after door is closed (both before and after 5s has elapsed following button press).
I am sure this will be easy for someone experienced in the use of these timers.