Escape room and electronics. How to detect a particular object is put somewhere? - Page 1
Forum section: electronics / beginners

author: tigrou
author_rank: Regular Contributor
timestamp: September 19, 2022, 06:20:22 pm
content: I did an Escape Room activity with some friends this weekend (it was fun).One of the puzzles was to place 4 small statues in the right order on a piece of furniture (for example: green, blue, grey, white statue, in that order).I wonder how the position of each object can be detected/identified automatically in order to trigger something.I understand that simple puzzles that involve placing a single object in a given location are probably implemented by placing a magnet underneath the object and a magnetic sensor at the location where that object is supposed to be detected.But how do you detect that a particular object has been placed in a particular place? (e.g. statues can't be interchanged).

author: Manul
author_rank: Super Contributor
timestamp: September 19, 2022, 06:25:43 pm
content: Nowdays the easiest and most robust way is probably RFID tags. I don't know, just guessing.

author: tigrou
author_rank: Regular Contributor
timestamp: September 19, 2022, 06:27:34 pm
content: You are probably right, especially those are cheap to produce.

author: ledtester
author_rank: Super Contributor
timestamp: September 19, 2022, 06:35:14 pm
content: I imagine most escape rooms are monitored (at least the one I did was) at least for safety if nothing else. Anyway, it's quite possible that there was no fancy electronics involved -- just a person checking that you had the right sequence and pressing a button.

author: rstofer
author_rank: Super Contributor
timestamp: September 19, 2022, 07:37:53 pm
content: Somehow, I see OpenCV getting involved. I could use a camera and look at the colors in the image. I could also tell if the object is in the proper location, not just the proper sequence.

author: golden_labels
author_rank: Super Contributor
timestamp: September 19, 2022, 08:15:25 pm
content: Please consider what ledtester said. There should always be someone to monitor the room and provide an instant escape route. Otherwise you risk death or even injuries. Unless the lack of an obvious exit is just an agreement between participants, but I suppose that hurts immersion.Despite being a softdev, I do not support automation for the sake of automation. The only reason I can see for eliminating the human here, if a human is already available, is providing lower error rate. If that would be your goal, I see a some other options other than RFID:Computer vision.The advantage is reusability and flexibility, in particular if the puzzle is going to be torn down after one or a few uses. Designing a separate circuit just for one occassion seems wasteful both in terms of effort and supplies. Making it in software requires a webcam and a computer, both of which are easily reusable. The disadvantage is that CV is a temperamental beast with a huge variance in outcomes. It may work marvelous or it may be a disaster, depending on factors like lighting, camera placement and occlusion. Testing outside of the actual environment is not easy and may give misleading positive results.QR codes.Those are reliable and may work in IR (if the camera has no IR filters), requiring no additional visible light. The downside: you must place QR codes somewhere and the camera, located at close proximity, must see them all. That puts a lot of constraints on your layout and may affect aesthetics/immersion.RGB LEDs with a light sensor,placed under the pieces. If the pieces are of considerably different colors, you may read a color easily this way. An additional IR LED may be used to detect when a piece is put over the sensor to avoid shining light into air, when there is nothing to scan. Unfortunately unsuitable for bright locations. The problems you may encounter is interference from other light sources and writing the right conditions to detect the right change in the analog signal. The latter seems trivial, as everybody imagines it’s always just a binary value, but in practice spurious triggering or missed signals may happen.In either case, I would couple that with a human operator. The human makes a decision and the machine verifies it. Note the order: the machine should never suggest anything to the operator before they make a decision, other than perhaps making an alarm if they don’t react for too long. This way gain much by having two elements in series.