Ultrasonic sensors are very much usefull for distance measurements.The modules available in market like SRF04 or SRF05 are very costly! But you can make your own ultrasonic sensor.
A 555 timer can be used to generate 40khz square wave(astable multivibrator). The output of 555 is given to base of a switching transistor. The output of the transistor is given to the transducer. A 2N3904 can be used as switching transistor. Pin 4 of 555 can be used to ping the transmitter, note that only when pin 4 of 555 is high pin 3 will give 40khz.
These are the new modules designed by me.Its very compact. If you want more details on this module, mail me.
Will be completed soon...