I have implemented an HC-SR04 distance sensor using an Arduino. After power up, the sensor operates well when objects are within range of the sensor. However, if the distance to be measured exceeds the maximum (about 15 feet) distance, the sensor times out (which is what I expect). However, after a time-out and with the distance between the object and the sensor in range, the Echo pin fails to be set low after a trigger pulse is generated. The only way to fix this condition is to power down the sensor and power it back up again. (I have verified the state of the Echo pin by using an oscilloscope.)
After many hours of research, I discovered that the problem is related to the fact that there is (apparently) a well-known bug in the HC-SR04 which is a Chinese clone of a Devantech SRF04. I replaced the HC-SR04 with an SRF04 and the problem was solved. Now, the ECHO pin always goes low after a trigger and after a time-out (i.e. the object is beyond the maximum measurement distance).