Sonar 3 Improvements

Changed Processors

In Sonar 2 I used an Atmel ATM91SAM7X51 processor.  In Sonar 3 I switched to an ST Micro STM32F407 processor.  Both are 32 bit ARM processors, but the STM32F407 is much faster and is easier to use.  With the ATM91SAM processor I was able to sample two logic inputs from the output of the two receivers’ comparators every 10uS.  The STM32F407 is fast enough that the serial port can read two16 bit values from two analog to digital converters every12.5uS.  Also with the STM32F407 I don’t need an external 40KHz oscillator to generate the transmitter signal.  The STM32F is fast enough that it can generate the 40KHz internally with a few percent accuracy.

Increased Receivers’ Adjustable Gain Steps

Sonar 2 had four adjustable gain steps on the right and left receiver amplifiers.  On Sonar 3 I increased that to sixteen steps.  This increased the receiver’s dynamic range by a factor of three.  The firmware starts with the receivers’ gain set to low and increases the gain with time to amplify the weak echo signals from far objects.Changed Detector in Receivers from a half wave to a full wave

This reduced the loss in the detector stage and improved the precision of converting the 40KHz echo signal into low frequency pulses.

Added a High Speed ADC

I eliminated the comparators on the output of the receivers and added a dual high speed ADC to digitize the echo signals.  With a comparator the output was low or high which limited the information about the echo pulse.  With an ADC you not only know when the echo pulse occurred, you know the baseline, the rising time, the falling time and the peak amplitude.  All use all of this information to identify the true echo pulses and then to determine if two echoes are from a single object or from two different objects.Increased

Transmitter Beam Width

The Useable Beam Width is affected by several things.

  • The beam width of the two receivers.
  • The beam width of the transmitter.
  • The distance between the two receivers.
  • The distance to the object.

Receivers’ beam width

The usable area in which an object can be detected with both receivers is the area in which the two receivers’ beams overlap.  As you can see in Figure 1 & 2 there is a dead space in the area directly in front of the transmitter transducer.  With the transducers I am using and separated by 12” the minimum two echo distance of my sonar is about 8”.

Signal amplitude related to X distance.

A bigger problem is the drop in signal amplitude related to the X distance from the centerline.  In the data sheet for the transducers the beam angle, -6db down point (50% reduction in signal amplitude), is 72° or +/-36°.   At a Y distance of 30” and an angle of 36° the X distance at which the signal has dropped by 50% is 17.6”.  Since the far receiver is offset by 6” from the transmitter, the angle from the far receiver to that point (Y=30”, X = 17.6”) is 38°.  In addition the sonar signal is hitting that object at a 35° angle which further reduces the amplitude of the returned echo to the far receiver.  All in all the echo signal from objects more than +/- 5” from the centerline are very weak and it is almost impossible to pick up echoes from object more than +/-10” from the centerline.


Beam Width Improvement

To increase the beam width of the transmitter I added two additional transmitter transducers to my transmitter.  The two addition transducers are mounted on both sides of the original transducer and aimed outward at about a 20° angle.  This boosted the amplitude transmuted signal hitting off-center objects.  I can now reliably detect most objects off the centerline by +/-8” and in most cases detect objects at +/-12”.  In some cases I have detected objects as far off center as +/-15”.  A further improvement would be to add addition transducers to the two receiver.

Figure 1


Figure 2