ultrasonic sensor interfacing

hi people i am having ultrasonic transmitter and receiver. I want to measure the distance using arduino. Is there any circuit needed for ultrasonic transmitter if i use pwm of 40 khz? and can you tell me how to connect the receiver with the arduino?

thanx in advance

If you're using bare ultrasonic transducers, you're going to need some amplification for the receiver.
An echo is only going to generate a few millivolts in the the receiver, and that isn't enough.

The savings of DIY with ultrasound are heavily offset by the pain and stress of trying to debug, and unless you have a scope and know how to use it, you may as well forget it.

Hi badri,
please read this project it have thing that you need
Ultrasonic ParKontroller

The receive circuit of that is rubbish it uses a digital circuit as an analogue amplifier. It says:-

Hence, 74HC04N Hex Inverter with 100kW/1kW resistor pair was used to achieve a gain of 100.

I know from experience that this will only work with certain manufacturers chips and is a very bad engineering practice. Also it is not very reliable and will normally cause the chip to oscillate at high frequencies. In fact it is a good way to make an oscillator.

This stage is best done using an operational amplifier.

Here's another link that may help those who want to have a go at building their own ultrasonic range finder from bare transducers.

http://letsmakerobots.com/node/7582

Unless you really need to use a DIY sensor, the Parallax Ping))) sensor may be your best bet. Not only are they commonly used and easy to program for(due the use of only one pin for input and output), but I have also written a hardware library for the Ping))) sensor to further simplify usage.