testing and calibration of ir proximity sensors

Transkript

testing and calibration of ir proximity sensors
Acta Mechanica Slovaca, 3/2008
1
TESTING AND CALIBRATION OF IR PROXIMITY SENSORS
Václav KRYS, Tomáš KOT, Ján BABJAK, Vladimír MOSTÝN
Testování a kalibrace IR snímačů vzdálenosti
Na katedře robototechniky fakulty strojní vysoké školy báňské se věnujeme návrhu a
realizaci několika servisních robotů. Jedním z hlavních požadavků na tyto robotické
systémy je schopnost orientace v neznámém pracovním prostředí. Aby bylo možno
tyto požadavky splnit, je potřeba robota vybavit množstvím senzorů. Jedním z
nejčastěji používaných principů, je senzor na bázi detekce odrazu infračerveného
záření od překážky. Pokud ale chceme nasadit tyto senzory v praxi je potřeba ověřit
jejich funkci, stanovit parametry překážek tak aby byla zajištěna požadovaná
přesnost a být schopen kalibrovat jejich výslednou hodnotu tak aby naměřený údaj
co nejvíce odpovídal skutečnosti. Článek popisuje proces měření a kalibrace senzorů
SHARP GP2D120 a GP2Y0A02, zakoupených naší katedrou. Testování probíhalo v
reálných podmínkách za použití mobilního robotu, kterým katedra disponuje.
Klíčová slova: IR, senzor, vzdálenost, kalibrace, mobilní robot
On the Department of robotics at VŠB we engage in design and realization of
several service robots. One of the main functions is the ability to navigate in
unknown environment. To meet these requirements, it is necessary to equip the robot
with sensors. One of the most common principles of obstacle distance measuring is
detection of IR radiation reflection. If we want to use such sensors in practice, we
must verify their function, determine the influence of obstacle material and calibrate
the sensor so that the measured value will correspond to the actual distance. The
article describes the process of testing and calibration of SHARP sensors,
purchased by our department. The testing was performed in real conditions using a
mobile robot.
Keywords: IR, sensor, distance, calibration, mobile robot
Ing. KRYS, Václav, Ing. KOT, Tomáš, Ing. BABJAK, Ján, prof. Dr. Ing. MOSTÝN, Vladimír,
VŠB Technická Univerzita Ostrava, Fakulta strojní, Katedra robototechniky, Ostrava
Recenzent:
2
Acta Mechanica Slovaca, 3/2008
1 INTRODUCTION
The ability to detect obstacles is one of the most important requirements an autonomous mobile
robot should meet. That’s why mobile robots usually are equipped with a variety of sensors. One
of the basic object detectors used in robotics are IR sensors. There are many types of them,
varying in their parameters and price. Important parameters are measuring distance range and
precision.
Also on the Department of robotics was developed a sensor working on the basis of detection of
IR light reflected on an obstacle [1]. The Sharp Company engages in production of much more
sophisticated IR sensors and offers a full range of sensors for a huge variety of applications. Our
department bought two types of these sensors (GP2D120 and GP2Y0A02, see Fig. 1) for testing
purposes – to prove their capability of being used on mobile robots developed by the department.
Fig. 1 Sharp IR sensors GP2D120 and GP2Y0A02
2 TESTING DEVICE
The measuring distance range is given by two values – the minimal and the maximal range. It is
not possible to use just one long range sensor, because it would be not able to scan the area near
the robot. Our testing device consists of two pieces of GP2D120 sensors with the range of 4 to 30
cm and one GP2Y0A02 sensor with the range of 20 to 150 cm. The sensors are mounted in a row
on a plastic bracket, the one with the higher range in the middle and the other two on the sides.
The bracket is intended to be placed on the front side of a mobile robot (see Fig. 2). Because of
application of three sensors, it is possible to detect obstacles in the whole range of distances and
also to detect how the obstacle is positioned in relation to the robot.
Acta Mechanica Slovaca, 3/2008
3
Fig. 2 Testing bracket with IR sensors mounted on a mobile robot
The sensors return the measured distance in a form of analog signal. For its further processing it is
necessary to use an AD converter and an interface, which would send the values to the PC for
utilization in the robot’s control system. All these functions are arranged by a microprocessor
Atmel ATMega8, which contains both the AD converter and RS232 interface for communication
with a PC.
Wireless data
transfer
GP2D120
GP2Y0A02
GP2D120
ATMEL ATMega8
Testing Device (mobile robot)
Radiomodem
433MHz
High level control system
Radiomodem
433MHz
Fig. 3 Scheme of the distance measuring subsystem
4
Acta Mechanica Slovaca, 3/2008
3 MEASURING PROCEDURE
The dependence between voltage output and corresponding distance for the used sensors is not
linear (Fig. 4). It is necessary to linearize it to be able to read distance values in the control system.
Fig. 4 Measuring characteristics of the GP2D120 sensor
MS Excel can be used to find out the equation of trend line for the graph. In the case of GP2D120
sensor, the power interpolation function is:
U 10,49 D
0,9283
,
(1)
where U is the output voltage in volts and D is the corresponding distance in centimeters.
To compute distance based on voltage, it is necessary to make inverse function, which has the
following form:
D
10,49
U
1, 077
(2)
This function can be easily applied in the control system, but it is not very accurate in the whole
range, because the trend line does not fit perfectly. Thus it was desirable to make a different
method of calculation. We found out that a good method is to simply make a table of points
describing the active portion of the graph (Fig. 4) and perform a simple linear interpolation
between those points.
Acta Mechanica Slovaca, 3/2008
Voltage
[V]
Distance
[cm]
3,00
2,80
1,60
1,10
0,85
0,70
0,60
0,50
0,40
0,35
0,30
3,5
4,0
8,0
12,0
16,0
20,0
24,0
28,0
32,0
36,0
40,0
5
Tab. 1 Control points for measuring characteristics of the GP2D120 sensor
Provided we have three sensors in the described configuration, we are able to detect also obstacles
that extend only to a part of the robot’s front side – and more importantly – the control system has
the information about presence of a short obstacle and can use it for navigation purposes. Also it is
able to compute the angle of approach to a wall.
Ob
s
Obstacle
tac
le
Obstacle
Mounting bracket
Mounting bracket
mounting bracket
Fig. 4 Basic types of obstacles detectable by the system
4 CALIBRATION
During the testing, we noticed that the sensors’ outputs are not in perfect accordance with the
measuring characteristics graphs. Even two pieces of the same type of sensor (in our case the two
sensors with lower range) return different values for the same actual obstacle distance. Thus it was
necessary to perform some calibration. A simple mechanism was built, allowing to position a
reference obstacle to specified distances from the sensor. This way it was possible to make
corrections to the control points table and to make separate tables for each individual sensor.
6
Acta Mechanica Slovaca, 3/2008
5 CONCLUSION
Outcome of this project is a universal obstacle detection device for mobile robots, which can be
used on any robots developed by our department. The device is capable of measuring distance of
obstacles in the overall range of 4 to 150 centimeters and to detect obstacles extending only to a
part of the robot’s front side. The control system can also calculate robot’s angle of approach to a
wall.
The device increases the abilities of a mobile robot to navigate in unknown environment and will
be used not only on operator controlled robots but in the future also on autonomous robots with a
neural net based control system.
Acknowledgements
This article was compiled as part of projects FT-TA3/014, supported by the Fund for University
Development from the Ministry of Industry and Trade.
REFERENCES
[1] NOVÁK, Petr, BABJAK, Ján, TVARŮŢKA, Adam. Intelligent unit of the IR proximity
sensors with I2C interface. Acta Mechanica Slovaca. 2006, vol. 10. ISSN 1335-2392..