Finding Position in a Room with Ultrasonics

Thread Starter

Jerry-Hat-Trick

Joined Aug 31, 2022
552
I'm looking at designing and building a system to detect the position of an object in a room. Two dimensions is fine. I'm thinking the object could send a short ultrasonic pulse (a few cycles at 40kHz) to be picked up by a minimum of three listening devices (for triangulation) and the listening devices would talk to each other (maybe 868 MHz) to determine the position and pass it back to the object.

I feel sure this has been done before - any advice on choice of hardware, processor etc most welcome.
 

MrSalts

Joined Apr 2, 2020
2,767
I'm looking at designing and building a system to detect the position of an object in a room. Two dimensions is fine. I'm thinking the object could send a short ultrasonic pulse (a few cycles at 40kHz) to be picked up by a minimum of three listening devices (for triangulation) and the listening devices would talk to each other (maybe 868 MHz) to determine the position and pass it back to the object.

I feel sure this has been done before - any advice on choice of hardware, processor etc most welcome.
It can be done easily but maybe easier if the receiver is on the same object as the transmitter. Otherwise, you'll have a challenge determine time zero (unless you are able to wire all of the other receivers together to have a synchronized clocks.
Another option would be to use a camera and QR codes placed around the room. Then an encoder on the camera pivot to kno the exact angle between QR codes. This is used in indoor robotic navigation systems. I think this was the first proposal to do this as a technical paper. You can use an old smart phone.
https://www.fig.net/resources/proceedings/2014/2014_ingeo/TS4-04_Ilkovicova.pdf.pdf
 

Thread Starter

Jerry-Hat-Trick

Joined Aug 31, 2022
552
It can be done easily but maybe easier if the receiver is on the same object as the transmitter. Otherwise, you'll have a challenge determine time zero (unless you are able to wire all of the other receivers together to have a synchronized clocks.
Many thanks. I prefer to keep it to an ultrasonics TOF approach and whilst I haven't done the maths I'm hoping that one of the wall mounted listening devices can communicate with the other two (or more) with RF to ask "did you hear a pulse and how long ago" which may take a finite time but this would probably be consistent. Not sure if I understand the process with "the receiver is on the same object as the transmitter"?

The object probably won't be moving quickly so a pulse every tenth of a second or even longer should suffice. Interesting link too.
 

MrSalts

Joined Apr 2, 2020
2,767
Many thanks. I prefer to keep it to an ultrasonics TOF approach and whilst I haven't done the maths I'm hoping that one of the wall mounted listening devices can communicate with the other two (or more) with RF to ask "did you hear a pulse and how long ago" which may take a finite time but this would probably be consistent. Not sure if I understand the process with "the receiver is on the same object as the transmitter"?

The object probably won't be moving quickly so a pulse every tenth of a second or even longer should suffice. Interesting link too.
Typically, the vehicle (like the backup sensor on your car) uses a ultrasonic transmitter, reflects the sound off of a surface, and catches the echo to measure its own distance from a wall/car/person. It is unusual to get millisecond resolution to other objects with a direct signal because of time lag or inconsistently synchronized clocks by wireless technology. Possible but not as easy or consistent as you'd think. Also, ultrasonics are quite directional so it is difficult to fill a room with the signal for triangulation. You may be better off with an audible beep. Even then, reflections (echos) will be a challenge to deal with.
 

KeithWalker

Joined Jul 10, 2017
3,096
This should be a quite easy to do using the the ultrasonic sensor shown below. The sensors have an effective sensing angle of 15 degrees, so a number of them would be needed to cover the whole room. Budget-wise that should not be a problem because they are very inexpensive and are available from AliExpress, Amazon and most other on-line suppliers.
The most effective way of using them would be to sample each in turn and then correlate the results - a very simple task for an Arduino.

Ultrasonic.jpg
 

Alec_t

Joined Sep 17, 2013
14,317
Unwanted reflections of the ultrasound from the walls of the room or other large structures may cause problems ?
 

djsfantasi

Joined Apr 11, 2010
9,163
There is a technique whereby using two of the sensors posted by @KeithWalker , you can determine the location of an object.

The technique blocks one of the sending transducers and operates both modules in parallel. The difference in times between the two results locate an objects position.

I’ll try to find the article.

Another method (which I use for general location/object sending), is to mount the sensor on a platform rotated by a stepper or RC servo and scan the room. In my case, I don’t need accurate location.
 

KeithWalker

Joined Jul 10, 2017
3,096
Unwanted reflections of the ultrasound from the walls of the room or other large structures may cause problems ?
The devices that I show give the distance to the nearest object, so as long as only one is sampled at a time, there should be no problems. When the distance is read from a sensor, the result will be valid if the distance measured is less than when the room is empty. Here are some Arduino project examples:

https://create.arduino.cc/projecthub/projects/tags/distance
 
Top