What I want to do it is measure the distance between two points/ devices which are constantly moving apart or together. The value for distance isn't really required I'd just be looking to have an alarm sound when the devices/objects are about 25cm apart and there are no obstructions between them. I did see that it could be possible to use an RFID tag on one of the parts with a reader of some sorts on the other, this would measure the signal strength and when it was so far away an alarm would sound.
Am I on the right track with this? If so, any further reading on detailing this sysyem would be great.
Best Answer
Using RF signal strength to estimate a distance such as "about 25cm apart" will not work for a few reasons:
Now for some solutions...
For the distances mentioned, ultrasonic distance sensing is commonly used.
If the two objects are at a known orientation to each other, or at least one of them can be oriented towards the other, many of the popular hobbyist ultrasonic TX-RX pairs or sensor modules (such as Parallax Ping)))) can be used.
If orientation is not fixed, then an omnidirectional ultrasonic emission is used rather than the common directional TX units, and multiple RX units arranged to cover a circle, provide return pulse sensing for distance computation.
Alternatively, if precision of distance is not so crucial, and if the albedo (reflection coefficient) of the sensed object is essentially fixed, then an alternative is to use an infrared proximity sensing module, such as the Vishay TSSP4Pxx series. This answer has further insight into this approach.