My Sonar Systems

Sonar 1 System

My first ultrasonic project was a motion detector built in 1968, when I was quite young, using a couple ultrasonic transducers from a television remote control. It could easily detect a moving object at twenty feet away. I tried to convince First Alert that my motion detector could be used as a security sensor, but at that time they were only interested in fire detectors.

My next project didn’t begin until around 1985 when I was building a robot. Initially I built a sonar system using a transmitter transducer and a receiver transducer. The goal was to locate an open door from about ten feet away, so the robot could go from one room to another. The transmitter and receiver were mounted on the head of the robot which could rotate in 1° increments. I rotated the head and collected range data from every degree, then used the data to build an image of the room on a PC. I soon discovered the beam width of the transducers was so wide, about +/-20°, that the room looked round instead of square and the open door was gone. I tried attaching a number of different cones to the transmitter and receiver transducers, but none of the cones I tried had much effect on the beam width, instead most reduced the range.

I decided to try using two receiver transducers to narrow the beam width. I mounted one receiver on each side of the transmitter and separated the two receivers by about ten inches. Using logic gates, I combined the two receivers’ detector signals before sending the digital signal to the processor. This was a big improvement; it appeared to reduce the beam width to about +/- 10°. The room looked kind of square, but it was still difficult to locate an open door at distances of more than five feet. One weekend I spent many hours scanning the room and by the end of that weekend my hearing had changed. After some time, seeing an otolaryngologist and even having an MRI, it was concluded that the sonar had damaged my hearing. I had never thought a 2mS pulse at 40KHz would hurt my hearing, but it did. When I calculated the output amplitude of the ultrasonic transducer, I discovered it was between 115dba and 120dba. After that I packed it all away and did not work with sonar again for more than twenty years.

Sonar 2 System

In 2010 I built a new smaller robot and became interested in sonar again. I built a similar binocular sonar system and made sure the transmitter’s output was below 90dba (I addition, I use hearing protection when sitting next to the sonar output). The processor I was using, an Atmel AT91SAM7X, was much faster than the 80C255 I used in 1985 and had much more on-board RAM. With the additional speed and memory, I brought both detected receiver signals into the processor as digital signals and used firmware to combine the two signals. Again the goal was to narrow the beam width to locate an open door ten feet away. I was able to read both receivers every 10uS and save the time and width for each echo. While I was working with this system and looking over the data, I realized there was a completely different way to approach the problem. Instead of attempting to narrow the beam, I could correlate the echo data to calculate the coordinates of objects in front of the sonar. Both receivers received an echo from all the objects in front of the sonar, but the echoes’ time from each object was slightly different based on the location of each object. Using trigonometry to combine the two echoes, I calculated the X and Y coordinates for each object in front of the robot. This was much better than narrowing the beams, because now without rotating the sonar I could calculate the X/Y coordinates of all objects in a +/-20° window in front of the robot.

The receiver circuits, which were bandpass filters, and the detectors on the output of the receiver circuits were relatively slow and added about 500uS to the width of each echo. When I was trying to narrow the transducers bandwidth this was not a problem. But when looking at echoes from two objects that are about the same distance away this becomes a big problem. The two object look like one large object. This became an even bigger problem when I was trying to locate and open door at ten feet away.

In the sonar system in Figure 1 below there is 12” between the two receivers. The sonar system is pointing at an open door 96” away and is centered on the open door. The echo distance off the left door jamb to the left receiver is 187.6”. The echo distance off the right door jamb to the left receiver is 189.7”. A difference of 2.1” or 155uS in echo time. If the echo pulse width is greater than 155uS these two echoes will appear to be one echo and the open door will not be seen at ten feet.

Multiple things effect the echo pulse width, some are in our control and others are out of our control. If the echo is returned from a wide object, such as a wall, the pulse width will be extended because there will be echoes from the length of the wall. This extension usually is not more than 100uS and drops in amplitude. This cannot be controlled. On the other hand if the receiver circuit and detector circuit are not designed properly these circuits can easily extend the pulse width of an echo by two or three hundred microseconds. A will designed receiver and detector will not extend the pulse width by more than ten or twenty microseconds. The number of cycles in the transmitter pulse also effects the echo pulse width. If the transmitter is pulsed for eight cycles of the 40KHz the transmitter pulse width will be 1.6mS wide and the returned echo will also be 1.6mS wide. But if the transmitter is pulsed for just one cycle the transmitter pulse width will be only 20uS wide and the pulse width of the returned echoes will be much narrower. To locate an open door at ten feet the receiver and detector must not add more than about 20uS to the pulse width and the transmitter pulse can only be one cycle.

Using transmitter cycles returns a much louder echo than a single transmitter cycle. The returned echo with from a single transmitter cycle is 80% lower in amplitude than an eight cycle transmitter pulse. To detect long range echoes from a single cycle transmitter pulse requires much more gain in the receiver and very good noise rejection.

Sonar 3 System

This year, 2017, I updated my sonar design and built a new circuit board. I made a number of improvements in this design solving problems in my Sonar 2 board and adding improvements. The new board uses a low noise DC to DC converters in the supply to reduce the noise on the output of the receivers. Changes were made to the receiver circuits to increase the gain, narrowed the bandwidth and increased the 60Hz rejection. The circuit board layout was changed to improve the input shielding to reduce self-oscillation. The detector circuit was changed from a half wave to a full wave rectifier to increase its speed and reduce the delay in the fall time of the echo pulse. A high speed dual channel analog to digital converter (ADS8363) was added to digitize the signal and feed the digitized signal into a faster processor. Both receiver channels are sampled at a rate of 100,000 samples a second. The microprocessor was changed to an ST Micro ST32F407 processor, which is much faster and has more on board memory than the Atmel I used in Sonar 2.

Equipment I am using
The development system I use is an IAR Embedded Workbench, I program in C.
The schematic capture I use is Orcad.
I do not layout my own board, a special thanks goes to Ron Fracchia for all the boards he has laid out for me.