3
\$\begingroup\$

I want to use the direct time of flight method to measure the distance between a person carrying an arduino and a certain part of the room. I have come across many different boards which can easily be connected to the arduino to measure distance using the reflecting time of flight method, but because of the nature of my project, these boards won't work for me.

I have sourced these sensors: Pair Aluminum Housing 40KHz Ultrasonic Transducer Transmitter Receiver. I am considering buying them, but first, I need to be sure that they will work. I have spent hours searching for instructions on how I can connect them to my arduino, but have had no luck.

Can someone please give me some simple instructions on how to connect this thing to my arduino? I basically need one of them on one arduino, which will transmit the ultrasonic wave at certain intervals, and another one on a separate arduino, which will listen for the ultrasonic waves.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ You do realize that if you use separate arduinos for transmit and receive, that they will need to be precisely synchronized in order to measure time of flight? In other words, the receiver will need to know when the pulse left the transmitter. \$\endgroup\$
    – Tut
    Dec 12, 2013 at 11:12
  • \$\begingroup\$ And I would add that due to the oscillators drifts, you cannot sync them and forget. After a while they will by out of sync. As already mentioned, you have to find a way to resync periodically. \$\endgroup\$
    – Blup1980
    Dec 12, 2013 at 11:49
  • 1
    \$\begingroup\$ I will use an RF link to keep them in sync. It does need to be two separate arduinos because I'm measuring the distance between two specific objects. \$\endgroup\$ Dec 13, 2013 at 0:59

4 Answers 4

6
\$\begingroup\$

See Kerry Wong's article

You'll need to create something like the following circuits

enter image description here enter image description here

Personally I'd buy one of the pre-built modules that are much easier to use

enter image description here

As others have noted, using separate Arduinos for transmit and receive will make the project much more complex and less accurate.

I haven't tried any of the above and can't vouch for it.


Polarity is given in the datasheets. sometimes the +ve leg is longer.

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ That's not what I'm trying to do. This example will get the distance between the transceiver and any random object. I need to get the distance between the transceiver and another specific object (i.e. a person walking around the room). \$\endgroup\$ Dec 12, 2013 at 12:55
  • \$\begingroup\$ @Ben: The driver circuitry will be the same. \$\endgroup\$ Dec 12, 2013 at 14:21
  • \$\begingroup\$ Ok. This may sound like a stupid question but I'm really new to this stuff. I'm guessing that the big rectangles in the circuit diagrams are the ultrasonic transducers. Does it matter which way round they go? Does each pin need to go on a certain side or can I just put them in either way round? \$\endgroup\$ Dec 13, 2013 at 1:22
  • \$\begingroup\$ @Ben: The transducers are polarized, one pin is connected to the body of the transducer. From what I've read, that pin should be connected to the low side (-ve, gnd). \$\endgroup\$ Dec 13, 2013 at 10:14
  • \$\begingroup\$ Ok. Thanks. I'll give that a try once my components have arrived. \$\endgroup\$ Dec 16, 2013 at 2:43
3
\$\begingroup\$

One way to wire it would be to have the "random object" have a transducer that receives and transmits act as an active reflector. It could be done in analog or digital hardware. When a beep is received it would transmit back a beep.

The main unit would almost be a standard distance finder but modified to reduce the sensitivity of the receiver so only the signal from the active reflector triggers the end of the timing, not a passive reflection.

\$\endgroup\$
0
\$\begingroup\$

Why not have the speaker and the microphone trigger after a radio pulse. Radio travels at speed of light so pretty much instantaneous.

Then program the difference between the heard radio wave and the heard ultrasonic wave to be calculated by multiplying the time it takes for the second arduino to hear the sound wave by the speed of sound in air. Gives distance.

Will be a much much simpler circuit.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ This is actually what was proposed in the question, as clarified by the poster's comment. The complication is that the ultrasonic transducers are a little more complicated to work with than ordinary audio elements. \$\endgroup\$ Jun 3, 2016 at 1:58
  • \$\begingroup\$ Ah sorry. There was a lot to read by the time I chimed in. \$\endgroup\$ Jun 24, 2016 at 23:48
  • \$\begingroup\$ He doesn't suggest introducing a radio transmitter. I was suggesting a workaround to having to have them perfectly synched/them falling out of sync. \$\endgroup\$ Jun 24, 2016 at 23:50
  • \$\begingroup\$ Untrue. As I carefully said, the poster raises this in a comment on their own question which includes: "I will use an RF link to keep them in sync." \$\endgroup\$ Jun 25, 2016 at 0:55
0
\$\begingroup\$

Since you already proposed using a radio link for synchronization I suspect the easiest solution for the rest of the system would actually be to just get two of the common inexpensive transmitter/receiver modules that integrate the transmit and receive transducers with driver and receiver circuitry.

Make one transmit coincident with (or perhaps better a millisecond or so after) a radio reference pulse. You can simply ignore the receiver output of this one.

The other one effectively needs to receive without transmitting. It probably won't do that without modification, so it may be easiest to trigger it to transmit (and thus start receiving) on receipt of the radio pulse. To avoid accidentally registering a reflection of the unnecessary transmission from this one, you would want to disable it from actually transmitting - for example by removing circuitry around the RS232 level shifter used as a voltage boost, or perhaps simply by removing the transmit transducer or cutting one of the traces going to it. Even putting a lot of tape over the transmit transducer might do the job.

This should work, because these modules aren't sophisticated enough to tell their own transmissions apart from others occurring within the receive time window - they use a simple burst of several pulses at ultrasonic frequency, and the detector has only a gentle (and allegedly badly mistuned) frequency response, nothing more specific or correlated to the transmission. Really your only challenge in the ultrasonic part of the system itself would be starting a receive window without transmitting, which faking a transmission should accomplish.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.