Measuring the distance between two specific devices in an indoor environment

Hey all,

I've seen similar questions asked around distance between two objects, but nothing that mirrors what I'm trying to achieve.

I'm working on a puzzle for an escape room which involves two "amulets", one on each ankle.

I want to be able to detect when the ankles are a specified width apart (less than 1m for comfort reasons but able to vary it depending on which stage of the puzzle they are at), but I don't want the players to be able to cheat by just standing that distance apart from a wall.

At the moment, my thoughts on the various options are as follows:

  • Ultrasound (SR04 style sensors) - Unable to distinguish between the opposite amulet and a random block of wood on the floor, but reasonably accurate at these low distances
  • IR Beam with TX on one amulet and RX on the other - Will only work with the opposite amulet, so can't cheat by standing near an object, but (as far as I can tell anyway!) you can't measure distance with these so it would be "the amulets are in line / the amulets are not in line" rather than "in line and 'x' cm apart"
  • Pressure/conductive pads on the floor that the player stands on - turns the amulets into far simpler "decorations" rather than functional devices, but removes a significant amount of flexibility around where in the space the player can stand in the various poses and the distance between the ankles during each part of the puzzle
  • Computer Image Analysis such as OpenCV running on something other than an arduino - a lot of processing overhead to do this in real time, and relies on the camera(s) having a completely unobstructed view of the player, which may not always be the case.

Have I missed something else? Is there another way to achieve what I'm after using hobbyist equipment, or am I just living in a fantasy world?!

Thanks in advance!

They don't have to be the same sensors for "identity" and distance do they? Use ultrasound for ranging and IR for identity in some way?

No, you're quite right, and I'm clearly making this too complicated for myself!

Something like

// Only measure the distance if the IR Beams can see each other.
if (IR_beam_connected == 1) and (sr04_distance == required distance) {
   // do stuff
}

That could work nicely... thanks

Remove the transmitter from one and the receiver from the other. Trigger both at the same time with a cheap OOK transmitter/receiver.

5-pack for $8.49:

The echo pulse on the receiver side will tell you the distance between the two.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.