Sonar 2 Conclusion
Detecting an Open Door
There are a couple problems associated with detecting an open door.
The first is related to the width of the echo. If the sonar is close to the door the amplitude of the echo will be large. If the receiver gain is high the second stage will saturate which will increase the width of the echo. . If the sonar is 30†from the open door both the left and right will receive a 31†echo and both the left and right will receive an echo of about 32â€. If the gain is too high the two 31†echoes will probably extend over the 32†echoes and the four echoes will appear to be one large echo from a single object 30†away. Reducing the gain reduces the pulse width and makes it easier to resolve echoes that are close together, but limits the range of the sonar system. To solve this problem the gain should be changed with time. Starting with a very low gain and ending with a very high gain after about 10mS.
The other problem occurs when the sonar is exactly perpendicular to the door opening and centered on the opening. When the sonar is centered on the opening it is almost impossible to determine which left echo is associated with which right echo and vise versa. If the sonar is 30†from the open door both the left and right will receive a 30†echo and both the left and right will receive an echo of about 32. This appears to be two separate objects at 30†and 32†directly in front of the sonar instead of two door jambs to the left and right of the sonar.
In my Robot 3 / Sonar 3 I have mounted the two receiver transducers and the transmitter transducer on servos. With the transducers mounted on servos they can be aimed at specific areas to narrow the beam and determine if the echoes are from two objects are in front of the sonar or two objects on each side of the sonar. I ran a few tests with my Sonar 3 system aiming the transducers at specific locations and it does help to solve this problem.
Using a high speed ADC to digitize the amplitude of the echoes may also help solve this problem by using the amplitude of the echoes to help associate two echoes from the same object. I built a prototype of my Sonar 3 system using a high speed ADC to digitize the echoes and it does appear the amplitude information may improve this problem.
Problems and future solutions
Power Supply Noise
The LT1617, U1 that generates the -5V in my Sonar 2 system has an oscillator frequency of about 65 KHz. This is very close to the ultrasonic transducer’s 40 KHz frequency which makes it very difficult to stop the noise from this -5V supply from being picked up by the high gain receivers. In my Sonar 3 system I replaced the LT1617 with an LTC3261 which generates a lot less noise and at a much higher frequency.
Add more ranges
In my Sonar 3 system the zero gain clamp is moved to the input of the first stage and there are three separate gains between receiver Stage 1 and Stage 2.
Adjust comparator limit on the Fly
It would be nice to use a faster D to A converter to make it possible to adjust the comparator’s limits on the fly, but I feel the high speed ADC eliminated the necessity of a continuously adjustable gain.