The HC-SR04 is an Ultrasonic ranging module. It provides 2cm - 400cm non-contact measurement function, the ranging accuracy can reach to 3mm. The module includes the ultrasonic transmitter, receiver and control circuit.
The basic principle is:
(1) Using IO TRIG Pin, trigger for at least 10us high level signal ,
(2) The Module automatically sends eight 40 kHz and detect whether there is a return signal.
(3) If the ultrasonic signal returns, the time elapsed is used to compute distance, knowing the sound speed in air: Test distance = (high level time×velocity of sound (340M/S) / 2
Datasheet: available here.
Here are some variants created by my readers
Glide built a nice PCB for this sonar. Here are his pics and the eagle files (SCH+PCB)
glide sonar eagle
A few pics with the sonar used with a 5110 Nokia graphical LCD. Code for the LCD available here.