As the robot "eyes", distance sensor is used widely in robot obstacle avoidance.Ultrasonic module can be used to achieve the distance between the objects and itself in sonar range.With ultrasonic module,the robot can perceive the surrounding environment through the sonar like bats, controlling the motor to realize the function of obstacle avoidance. How to select a pair of sharp applicable "eyes" for your robot?This paper will introduce three mainstream ultrasonic Sensors:URM37 V3.2, SRF08 and XL-MaxSonar-WRC1.
The principle of ultrasonic sensor
Ultrasonic sensor is composed of transmitter and receiver. Transmitter generates & launches continuous band of powerful ultrasonic wave to a certain direction. The sensor will start a timer after transmitting the ultrasonic wave. Ultrasonic wave spread in the air, returning immediately when meeting obstacles in the way. Ultrasonic receiver stops the timer as soon as receiving the reflected wave. (The spread velocity of ultrasound in the air is 340 m/s. According to the time t recorded by timer, the distance(s) between the obstacles and launch point can be calculated - s = 340t/2).
Figure1 URM37 V3.2 ultrasonic module
This is a ultrasonic distance sensor developed by DFRobot independently. URM37 V3.2 is designed for robots specially. It also can be widely used in automobile reverse alarm, the doorbell, warning alarm, subway safety prompting, etc. The main design concept is integrating most function and compact, thus liberating the main CPU. URM37 V3.2 Ultrasonic Sensor uses an industrial level AVR processor as the main processing unit. It comes with a temperature correction which is very unique in its class.Figure2 URM37 V3.2 module measuring angles
The sensor has unique three output mode (PWM, RS232 or TTL) which let it easy to adapt to most devices and applications. The sensor provides one channel servo control output which can be used for sweep function. Otherwise the enable function makes it possible to drive several URM37 sensors together for research the robotics algorithm.
2.SRF08 Ultrasonic Sensor?
Figure3 SRF08 ultrasonic module
SRF08 is a high-performance dual detectors ultrasonic sensor. The detection range is from 3 cm to 6 meters. The unique trigger instructions can make SRF08 work in continuous detection mode, i.e. it is able to carry out the result of distance detection automatically after completing first distance detecting, equivalently connecting with a microcontroller.
Figure 4: SRF08 wave beam
SRF08 also support the neural network model. It can make the several sensors work as the inputs of neuron network, and thus processing with more advanced algorithm.
MB7067 is a Ultrasonic Distance Sensor made by the MaxBotix company, its most significant characteristic is suitable for outdoor detection, which is rare in the market, it can also resist the interference of all kinds of weather factors, having function of automatic correction, real-time denoising, etc. Measurement range is from 3cm to 645cm with the accuracy of 1cm. The readings is just 20cm in range from 3cm to 20cm. Applicable work temperature range from -40° to 65° (up to 85 °). MB7067 power supply voltage range is from 3.3v to 5v. It has automatic successive readings function with high frequency sound wave output. And the working frequency channel of the sensor is 42 KHz.
Figure 6 XL-MaxSonar-WRC1 beam characteristics
It supports three kinds of output modes, RS232 signal mode (9600bps), analog output mode, (V/1024)/cm, and pulse output mode. If there is no obstacle in range, the pulse time length will be 58(us)*756(cm), i.e. 62ms. Each pulse time length 58us represents one centimeter.
Module properties test:
URM37 V3.2 module supplies RS232, TTL mode and PWM output. You just need to change the connection of jumper cap. RS232 interface can be connected directly to the computer serial port. So you can use serial port debug software to drive the module conveniently. If you need to control through UART of single chip microcomputer by using UART interface, just setting the serial port choice jumper as the picture show.
Figure7 URM37 V3.2 module RS232 modeigure8 URM37 V3.2 module TTL mode
To use Arduino UART to drive the URM37 directly, you must upload code to Arduino before connecting Arduino to URM37 V3.2. Because URM37 will occupy Arduino TX/RX pin.After the actual test by author, URM37 V3.2 minimum distance measurement is 4cm, the maximum is 5m. When distance result is over 4m, the reading will be floating a little. If the distance is less than 4 cm, the sensor reading will be 4cm. When the distance is from 4cm to 4m, sensor output is very stable, reaction is also sensitive, and the deviation will be about 1cm.We also tested the servo control interface on URM37 V3.2. The commands defined by URM37 V3.2 can be used to control a servo directly. Not only saving Arduino driver pins, but also convenient for users to control the ultrasonic sensor to rotate to the fixed direction for measuring. The resolution of the servo controlling angle is 6 degrees, And it’s enough for you to measuring the distance by using URM37.
URM3.7 V3.2 included a temperature sensor. The resolution is 0.1 degrees Celsius. You can get the real-time temperature data. And the temperature sensor is used to calibrate the distance value of the measurement.
SRF08 communicates with Arduino via I2C interface. We are using Arduino UNO as a testing platform. If the power supply for Arduino is using USB and the distance between sensor and obstacle is over 50cm, then floating of the sensor data is severe. The power supply voltage of the SRF08 is about 5V from Arduino tested by author. Guessing the reason is that USB power is insufficient. By using DC stabilized power supply, the problem is solved. You also could set ranging unit to us, cm or inches.
Figure 9 contrast of different power supply of SRF08
SRF08’s inspection angle is wide, about 30 degrees, easily affected, measuring directionality is not obvious. But URM37 has certain advantages in this respect. After the author’s actual measurement, SRF08’s minimum distance is about 2 cm. Maximum distance is about 6m. The sensor output is not stable when the obstacle is close to the critical distance. In 3 cm-6 m range, the reading is steady and responsive, the resolution is 1cm.
Figure 10: URM37 and SRF08 Contrast
When using MB7067, you should notice that if pin 4 of the MB7067 is internally pulled high, the sensor will continually measure range and output if the pin is left unconnected or held high. If held low the MB7067 & MB7077 will stop ranging. Bring high 20uS or more for range reading.
After each ranging, the sensor will consume about 20.5ms for data calculation and check. Then it sends the 42 KHz ultrasonic wave, and Pin-2 outputs a pulse width representation of range. To calculate distance, use the scale factor of 58uS per cm. The pulse output mode is the most stable and reliable mode for this two ultrasonic sensors. In the rest of the time, MB7067 and MB7062 will adjust Pin-3 outputs analog voltage with a scaling factor of (V/1024) per cm. For more mode of driving MB7067 you could check the documents at the end of the report.
Because the MB7067 pulse output mode is the most primitive. Compared with analog output and serial data output mode, pulse mode is the most stable and real output mode. This ultrasonic sensors produced by MaxBotix company also supplies a solution for multiple sensor application in single system applicatio
Figure 11 URM37 V3.2 response test
Figure 12 SRF08 response test
Figure 13 MB7067 response test
Through the three figures above, it can show that the three ultrasonic sensors’ responsibility of the changes when measuring. URM37 and MB7067 readings are more stable. SRF08’s data has a little noise when using lithium battery to supply power). The author suggests when using SRF08 you should pay attention to the selection of power supply to meet with its strict power requirements. The voltage should be stable(5 volts).
Contrast of the three ultrasonic sensor’s parameters:
Table 1 URM37 V3.2, SRF08 and MB7067 parameters contrast
After the introduction above, author believes you should have simple understanding of the these ultrasonic sensors. URM37 V3.2 has good interfaces, additional servo control interface and temperature sensor. However its detection range (3cm-5 m) is a little smaller than SRF08 (3 cm-6 m). The power supply demand of SRF08 is tough. USB power supply can make it work, but just in a short range. If you want to make it work perfectly, you need an external power supply. MB7067 is a rare ultrasonic sensor which can adapt to the outdoor environment. In the test, the three ultrasonic sensors all show good stability and sensitivity, author believes that they can meet with the different requirement of most applications and projects.