what hardware setup are you going to use?
i have built one of these before. ive attached a pic if you are interested.
the main problems i faced was to do with the detection of the reflection. i never managed to get the adc to detect a reflection, so i used amplification circuits and a comparator to detect the reflection and trigger an i/o pin.
the detection part of my circuit was from this site:
http://www.best-microcontroller-proj...pic-sonar.html
I found, however that the transmitter side of that one wasn't great. the best result i got was from using an inductor to build up much larger voltages across the transducer.
My results were good. I get +/- 1cm at most ranges. By changing the sensitivity of the detector I can shift the effective range. If i set it more sensitive, i get longer range but lose ability to detect short distances. If i set it less sensitive i can get shorter ranges but not long range.
6cm may be tricky tho. the shortest range ive managed is around 15cm.
I generate the pulse for 150uS. I found that for my purposes (not needing short range stuff at all - just ranges over 1m), i then wait about 1.5mS before looking for a reflection. Its best to experiment with different times to get the best result for you.
Hope some of this helps you.
Bookmarks