The adventurers walk to the end of a hallway to stand in front of a large, locked stone door. There is a sizeable copper handle to one side, but more importantly the door appears to feature strange square panels with some sort of pattern in relief on each. There is no visible keyhole to pick.
This particular dungeon feature works best with visual aids, either with real-life props or images placed so your players can move or interact with them.
At first glance, the way to open the door is simple. Players must move the tiles and reveal an image to unlock the mechanism. Tiles can be lifted from the door, rotated, etc in order to solve the puzzle. If a player attempts to open the door and the image is incorrect or incomplete in any way, the handle emits a surge of electricity, dealing 1d8 lightning damage per 6 seconds of contact.
What players are unaware of is that the puzzle itself is enchanted with an alarm spell. Touching the panels alerts the owner of the dungeon with a mental ping as long as they are on the same plane of existence. This allows them to reach a convenient point of the dungeon to greet the intruders with a nasty surprise or to escape to a safer location if they feel they cannot fight them. A detect magic spell will reveal the school of magic (abjuration) but not the spell itself, per the spell description. For those using mage hand to interact with the tiles, this will still set off the alarm as it is set to alert when any of the tiles is shifted in any way.
Players inspecting the door will find the handle is trapped to electrocute wrong answers with a DC 15 investigation check. On a roll of 25 or higher, however, the door's biggest secret is revealed. There is a hidden latch on the opposite side of the door from the copper handle that is flush with the stone. This allows the one who knows its location to safely open the door without having to solve the time-eating puzzle or disturb any of the puzzle tiles.
For players that want to just break the door down, the door has an AC of 20 and an HP of 50.