I have found a test circuit for the ultrasonic transducer. How do I measure the output distance sensed by the ultrasonic transducer using my Arduino Uno R3? Please help.
I have attached the test circuit.
I have found a test circuit for the ultrasonic transducer. How do I measure the output distance sensed by the ultrasonic transducer using my Arduino Uno R3? Please help.
I have attached the test circuit.
There are three main aspects to working with ultrasonic measurements:
The circuit you have found there is overly simplistic and doesn't do everything you need. You have to generate the tone at the right frequency with the Arduino (just about possible with manual tweaking of the PWM module), and it can receive and amplify audio through the transducer. What it doesn't do is filter than input to isolate the tone from any background noise. It just receives and amplifies anything. Yes, the resonance of the transducer does provide a certain amount of filtering, but isn't very good by itself.
Also the amplifier show is just a placeholder. There's a lot more circuitry needed with it to make it work.
And then you have to measure the time.
All in all it's a lot of work. Too much work for a beginner. You would be much better off using an ultrasonic sensor module that has all the hard work done for you. I can't recommend a module since you don't say what kind of range you are looking to achieve.
Depending on WHY you're doing this, I might advise a much different approach, like Ultrasonic Sensor Breakout SRF05
You pulse a trigger pin. An output bit goes high, and then goes low again when the echo comes back. If you gate a counter with the output pin, the end count is proportional to the distance of the sensed object.
$4 USD very well spent.
If you don't want to rely on sensor modules, as proposed by Scott Seidman and Manjenko, but want an easy-to-build electronic circuit, I'd recommend to have a look at the TDC1000 by Texas Instruments1. The TDC1000 is an integrated Ultrasonic Sensor Frontend. It supports up to 2 ultrasonic transducers and does most of the work for you:
If you use the TDC1000, you only need the Arduino to set up the TDC1000 and to measure the time between a start pulse and a stop pulse. This is probably much easier and more precise than to build the entire amplifier circuit yourself. The datasheet is very detailed, which makes it easy to use. With about $5.00 the chip is not very expensive and is probably fine for home-use.
--
1 I know this answer might sound a bit like an advertisment, but at the moment (Aug. 2015) Texas Instruments is the only manufacturer who has such a chip, and it might help the OP very much, as it simplifies the ultrasonic sensor design. If there are similar chips from other manufacturers, please drop me a line, so I can include that in my answer and make it less manufacturer-dependent.