3

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.

PeterJ
  • 17,131
  • 37
  • 56
  • 91
Ben Ramcharan
  • 85
  • 1
  • 2
  • 6
  • 2
    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. – Tut Dec 12 '13 at 11:12
  • 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. – Blup1980 Dec 12 '13 at 11:49
  • 1
    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. – Ben Ramcharan Dec 13 '13 at 00:59

4 Answers4

6

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

RedGrittyBrick
  • 14,602
  • 5
  • 37
  • 77
  • 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). – Ben Ramcharan Dec 12 '13 at 12:55
  • @Ben: The driver circuitry will be the same. – RedGrittyBrick Dec 12 '13 at 14:21
  • 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? – Ben Ramcharan Dec 13 '13 at 01:22
  • @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). – RedGrittyBrick Dec 13 '13 at 10:14
  • Ok. Thanks. I'll give that a try once my components have arrived. – Ben Ramcharan Dec 16 '13 at 02:43
3

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.

George White
  • 473
  • 3
  • 8
0

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.

  • 1
    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. – Chris Stratton Jun 03 '16 at 01:58
  • Ah sorry. There was a lot to read by the time I chimed in. – Garion Bracken Jun 24 '16 at 23:48
  • 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. – Garion Bracken Jun 24 '16 at 23:50
  • 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." – Chris Stratton Jun 25 '16 at 00:55
0

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.

Chris Stratton
  • 33,282
  • 3
  • 43
  • 89