# build a sensor that can calculate distance between itself and sub sensors

Discussion in 'Sensors and Actuators' started by [email protected], Dec 19, 2012.

1. ### [email protected]

4
0
Dec 19, 2012
I dont exactly know where to ask the question so please excuse me.
I want to make a sensor or whateve i dont know what exactly to call it, it should be able to calculate the distance between itself and 5 sub-sensors or whatever you wish to call it.
Thank you

2. ### donkey

1,301
57
Feb 26, 2011
simply put all you do is calculate the speed at which the transmission goes, then divide that by the time(this is nanoseconds) this gives you your distance.

3. ### [email protected]

4
0
Dec 19, 2012
Thank you with your quick response but the sensor and sub-sensors are not wirelessly connected but are connected through a cable.
I am a newbie and have not able to understand your answer.
But thanks again

4. ### donkey

1,301
57
Feb 26, 2011
ok think of it like this.
the sensor prime sends out a little packet of data. the subsensor simply recieves it and sends it back.
when the sensor prime recieves it back it simply does the following equation
speed of transmission / time it took to get there and back / 2 (as it travelled to and from that is twice the distance.)
no matterhow you transmit this will always give you the right answer as long as you calculate the right speed of transmission (I am hoping someone can give the exact speed cos I am lazy tonight lol) and you compute thetime it took.
do not process the signal in the subsensor or anything this will add latency which will affect the time.

5. ### [email protected]

4
0
Dec 19, 2012
THanks for explaining it but my concern here is that no matter what the length og the wire is same and hence will it now return same answer everytime?
Thanks for replying by the way it is a pretty good idea to work upon

6. ### donkey

1,301
57
Feb 26, 2011
well if you are using the same length of wire put it on a reel. get one of the countless ways to count how many times you wind it out.
if you use this approach you MUST factor in the fact that the outer layer will be much wider that the inside layer.
edit you could also use a "pulley" and count how many times it spins

7. ### [email protected]

4
0
Dec 19, 2012
Thanks for the great idea ! i will try to send u the product i am making.
FYI:It may revolutionise the world