Electronic – 2 doors – one room – access control

plc

I've been tasked in designing logic for dorm rooms. The design of the dorm is that that two rooms share the one bathroom (roomL-door-bathroom-door-roomR). I'm having trouble designing logic for it. Here are the requirements:

  • If a person from roomL enters, person from roomR is forbidden to enter.
  • A person can't move between rooms through the bathroom.
  • (Desired but optional) If a bathroom is occupied by person from roomL no one from roomL can enter.

Each door will have electromagnetic lock (normally open in case of emergency) so I can lock the door through software. I was thinking this:

  1. Doors are normally unlocked. If a person opens the door from roomL, door from roomR will lock.
  2. He would have, lets say, 30 seconds to press the occupied push button (timer is there to prevent people from leaving the door open).
  3. After it's pressed both doors will be locked.
  4. When the button is pressed again it will unlock the door from which the person came (PLC will remember the last door open).
  5. When a person exits the room and closes the door it will unlock other room's door (again, 30 sec after pushing the button the doors will be unlocked).

Is this a good design?

UPDATE

So I've revamped the design and the logic that can be seen from the diagram bellow. I don't see any holes in this new design but a fresh pair of eyes couldn't hurt!

Bathroom Diagram

Best Answer

I think this procedure works better.

Both doors should stay closed so you need a door closer and alarm if it is stuck open. You should also have a motion sensor inside the bathroom. Handles on both sides of doors should actually be momentary switches.

  1. both doors should be normally locked.
  2. turning either entry handle should check toidy is not reserved by other room and if not unlock the door and reserve the room. An occupied courtesy light on the outside of both sides would be a nice feature.
  3. On door closing door should lock.
  4. Motion sensor now checked. If nobody is about, release reserved flag and light and return to state 1.
  5. exit though entry door now enabled.
  6. On try open exit door, unlock door and return to state 3.

Issues:

  1. What happens when the power goes out?
  2. Is through bathroom path part of the fire plan?
  3. Have fun explaining to the girls that is a motion sensor and not a camera.
  4. Some sort of Over-ride is needed to allow someone to enter in case occupant has a medical emergency. (which kind of defeats the whole purpose..)
  5. Detecting occupied can be tricky, especially if there is a stall or area that is obscured (shower). Also motion alone can be a problem.. sit still on the can for a while. Been in a few washrooms that had motion activated lights go out while I was doing my business.. and waving arms did not help.
Related Topic