# distance measurement

Discussion in 'General Electronics Chat' started by bug13, May 31, 2014.

1. ### bug13 Thread Starter Senior Member

Feb 13, 2012
1,644
62
Hi guys

I need some help with this project. I will need to measure the distance from Object A to the distance sensor, however, if someone put something (eg. Object B) between the Object A and my sensor, I will get the distance from Object B to my sensor.

My question is: Is there a technique that I can detect that (Object B), or make it temper resistant.

PS1:

PS2:
My goal is to get the distance from Object A to my sensor.

2. ### vortmax Member

Oct 10, 2012
103
18
II think the best way is probably to constrain your problem based on prior knowledge. For instance, if you know that A will never be closer than a specific distance, if you detect an object closer, you can flag it as false. Similarly, if you keep track of position history, you can compute the velocity of the object. Suddenly placing b into the fov would cause a sudden decrease in distance (a velocity spike). If that jump is bigger than what you expect from object A, then you can assume object b has been inserted and flag the measurement.

bug13 likes this.
3. ### bug13 Thread Starter Senior Member

Feb 13, 2012
1,644
62
Thanks that's a good idea.

Now, what if someone place Object B (a thin plate) just in front Object A, and Object A more away (to left) from the sensor.

• Is there a way to detect the actual distance of Object A?
• or/and detect someone has placed Object B (a thin plate) just in front of Object A?

4. ### GopherT AAC Fanatic!

Nov 23, 2012
7,983
6,777
Could you tell us more about Object A and how it will be different than object B. For example, does A always move slower than B? Is A possibly stationary or always the same distance from your sensor? Is A larger than B (much larger). How often to A and B move. How quickly must you report (notice) movements of A and/or B? Can you, for example, use a filter to filter out leaves blowing through the gap between sensor and A?

Some ideas might come once A and B are better defined.

5. ### vortmax Member

Oct 10, 2012
103
18
Your sensor is a big low pass filter. It is taking a bunch of different distances within its FOV and averaging them together to get a single number. If all you have is that single number, then you cannot back out the 'pieces' that went into making it.

If this is an ultrasonic sensor and you have access to the raw waveform, you may be able to analyze the pulse train and determine that two individual objects are present (two separate return pulses). This would require object A to still be visible (not completely obscured by B) and for it to be far enough away from B that the pulse trains don't overlap.

bug13 likes this.
6. ### bug13 Thread Starter Senior Member

Feb 13, 2012
1,644
62
• Object A can be a large and thick concrete wall, or something like that
• Object B can be anything to temper the distance sensor data.
• Object A always move away from the sensor.
• Object B is always stationary, if object is present.
• Object B will always be the same distance from the sensor, if present
• There might be multiple Object B (eg B1, B2 etc) at random distance from sensor, but only one Object B can be present at a time.

7. ### sirch2 Senior Member

Jan 21, 2013
1,027
354
If object A is a "large and thick concrete wall" how is it going to move?

Just assuming A is a massive object then presumably it is not going to move very fast and it's rate of acceleration will be lower than that of object B. So I guess detecting rapid changes may indicate that B has been inserted between the sensor and A

8. ### bug13 Thread Starter Senior Member

Feb 13, 2012
1,644
62
Maybe I should put it this way:
Object A is stationary, Object B and sensor can move away from Object A at same speed and direction.