Sonar Range Finder DataSheet Analysis

Full datasheet report and graphics here

Attach:maxbotix.jpg Δ MaxSonar-EZ1 High Performance Sonar Range Finder from Maxbotix

This is a brand new product released in January 2006 that Bob Gross designed when his daughter's robot lost a race because it misjudged distance to a wall. According to current discussions about it on various robotics forums, it's a comparitively good product.

The Sonic Ranger works by sending out ultrasonic beams and receiving the waves that it receives, like bats. In this way it can detect both the presence and distance of objects. This particular sensor operates at 42KHz. The signal from the transducer in the sensor is amplified and goes through an analog to digital converter integrated into a microcontroller within the sensor. The microcontroller is continuously processing the signal.

This sensor gives short to long range detection and ranging. It detects objects from 0 inches to 254 inches and ranges from 6 inches to 254 with a one-inch resolution.The ability to give meaningful output at such close range is rare, as is this sensors' small size and relatively low price.

Output

The sensor is gives output as pulse width, analog, and serial digital, and can give all 3 simultaneously. It can give readings every 50mS.

The serial output characteristics on the TX pin are a little atypical with RS232 format with 0-5 V. This caused some consternation on some of the robotics forums.

The RX pin is pulled high, and the sensor will measure data if it's kept there. To do triggered readings instead of continuous, bring this pin low until you want a reading and then bring high for 20uS.

The analog output is scaled. It outputs 0 to 2.55 volts and scales to 10mV per inch. To reduce the noise on the output, a 0.1uF capacitor can be placed between the analog pin on the microcontroller and then a 10K ohm resistor in series with the analog voltage output from the sensor to that capacitor. The analog output needs to be buffered by the opamp in the circut.

The FAQ on the product web site says that pulsewidth and serial output give the most accurate numbers.

Pulse width output gives range and the numbers can be used to calculate distance using the scale factor of 147uS per inch. Pulse width is set high internally after the sonar waves are sent, and if something is detected, the PW pin is pulled low.

The circuit

The data sheet shows that the circuit for the analog readings requires a LM324 Low Power Quad Operational Amplifier and a BAV99DA diode array. On Tom's site there's an example of an op amplier and diode array, used there with a piezo as sensor.

Operational amplifiers serve to amplify the voltage. If there are very small changes in the readings, you need to amplify them to get good data. There are various resisters in this circuit, and I believe that by adjusting them you can adjust the scale of the readings. The LM324 has 14 pins.

The switching diode array helps to ensure that voltage does not flow in the wrong direction and that the readings are always positive.