ISSN ONLINE(2278-8875) PRINT (2320-3765)

All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

Infrared Sensor Rig in Detecting Various Object Shapes

SitiAsmah Daud1, NasrulHumaimi Mahmood2, Pei Ling Leow3, FauzanKhairiChe Harun4
  1. PhD Student, Faculty of Bioscience and Medical Engineering, UniversitiTeknologi Malaysia, Johor, Malaysia
  2. Senior Lecturer, Department of Biotechnology and Medical Engineering, Faculty of Bioscience and Medical Engineering, UniversitiTeknologi Malaysia, Johor, Malaysia
  3. Senior Lecturer, Department of Engineering Control and Mechatronics, Faculty of Electrical Engineering, Universiti Teknologi Malaysia, Johor, Malaysia
  4. Senior Lecturer, Department of Biotechnology and Medical Engineering, Faculty of Bioscience and Medical Engineering, UniversitiTeknologi Malaysia, Johor, Malaysia
Related article at Pubmed, Scholar Google

Visit for more related articles at International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering

Abstract

This paper describes the application of infrared sensor installed in a sensor rigto measure the distance of the object located at the centre of the plate. Data received by the sensor rig that is fully controlled by Arduino as a microcontroller, is then saved in a text file using CoolTerm terminal application. Post processing of the data is fully run using the Matlab software to reconstruct the image from the data obtained by infrared sensor. Most of the objects used throughout this research are polygon shapes such as cylinder, rectangle, hemisphere, oval, trefoil, and curvilinear. The sensitivity of the infrared sensor used during the experiment should be considered in order to obtain accurate result and reduce the noise during the data captured process. The closest distance of infrared sensor from the measured object is set into 5 cm. Results show that this sensor is capable to detect any changes in distance measurement and image from the object can be reconstructed.



 

Keywords

Infrared sensor; Arduino; CoolTerm; Matlab; Image Reconstruction

INTRODUCTION

It is very challenging to measure accurately of a distance using sensor even though there are a lot of sensors nowadays can be applied. When an engineer deals with distance measurement, other possibilities such as resolution and duration for the sensor to give output data should also be considered. Nowadays there are lots of equipment have been installed to the robot in order to make a distance measurement such as in laser scanner, ultrasonic (US) range finder, camera, laser diode (LD), linear variable differential transducer (LVDT), and infrared (IR) range finder sensors [1]. These sensors require special calibration to obtain accurate distance measurement [2].
In order to reconstruct 3D geometry of an object, the application of 3D camera and laser scanner have been widely used [3][1]. An accurate data of a 2D image can be obtained from the laserscanner; unfortunately the cost is expensive [4]. Compared to the 3D scanners, it requirescomputational and power consuming solution, which cannot be handled by a robot in a real time. The application of LVDT in a robot can measure the distance precisely with a resolution within few micrometresorders [2]. The drawbacks of this sensor are it is expensive; require lots of signal conditioning circuits and complicated mechanism, which is not reasonable in some cases. Ultrasonic range finder can also be used for 3D image of an object reconstruction it is depended on the time-of-flight (ToF) from the transmitter to the receiver where it is capable in take data from an object in 50 cm away within 3 ms [5]. US sensor has a major disadvantage in detecting poor angular resolution.
The accuracy of object detection is very important, and every researcher wants an accurate result in their study. Sensor that can give accurate data is considering as a good sensor and can be used for other application. US sensor offered a long-range distance measurement with an error of 3 cm, [6][2] and it requires a proper calibration using this sensor. With an accuracy of 0.3 mm within an operating distance of 3 m, LD sensor can do that [7] and the resolution for this sensor is higher compared to position sensing detectors (PSD) in a long range. Meanwhile, PSD within a range of 35 cm to 63 cm will give an error of 1 % of a distance measurement [8]. It is different with an IR sensor that has the capability to measure a short distance with accuracy up to 0.5 cm [9], which is better compared to other sensors.
IR offers simple installation, small in size, portable, lightweight, and only requires a few components in order to operate. Other types of IR offer different range distance that can measure it is depended on the amplification, typically IR is used to measure distance between 1 cm to 30 cm range [1]. This sensor is typically used to detect the existence of an obstacle due to the sensitivity to the object reflectance properties. The used of IR sensor is well known among researches [10][11][12] for distance measurement. Even though IR sensors have the disadvantages such as limited sensing accuracy, range and computing abilities, but it can be overcome by applying Phong illumination [13] or sensor fusion [14].Other than that, IR sensors already proved its ability tocreate surface-traces of an object [8], localization purposes [15] [16], and also in the application of object detection [17]. It shows that IR sensor is capable in measuring a distance of an object and a 3D image of an object can be reconstructed by using sensor value receive from the IR during experiment.
In this paper, a set of five IR sensors GP2D120XJ00F (Sharp Corporation, Osaka, Japan) is installed in a sensor rig in pentagon shape to measure distance on an object located at the centre of the sensor rig. Arduino as a microcontroller is controlling the movement of the sensor rig to take a measurement on an object during experiment. 2D120 sensor is capable to measure an object in a range of 4 cm to 30 cm where the sensor will transmit and receive data from the same sensor. Results show that the sensor can detect small changes of an object, and the shape of an object can be reconstructing using Matlab software in 3D form.

METHODOLOGY

A. Hardware Implementation
The system is design by utilizing five infrared sensors GP2D120XJ00F (Sharp Corporation, Osaka, Japan) [15]. The installation of the transmitter and receiver at the sensor are side by side, which means that this sensor have both in one sensor. The capability of the sensor to measure displacement is between 4 cm to 30 cm, which is in analogue reading when it is connected to the microcontroller and the sensor data can be converted into centimetre (cm) value by applying mathematical formula given by Sharp Corporation.
GP2D120 sensor requires 38.3 ms ± 9.6 ms for the reflect time from the sensor to the object to detect displacement in distance, and the output range is between 0.25-0.55 V [18]. This sensor is easy to install this is because it only requires three connections from the sensor to the microcontroller which is the VCC, GND and also VIN. The size of the sensor is 1.35 cm x 3.7 cm make this sensor easy to install in the sensor rig, which is in pentagon shape. Fig. 1 shows the arrangement of sensor rig and the position of the IR sensor.
Control circuit is design to control the ON and OFF switch of the IR.This is because when all the sensors turn ON at the same time, the possibility of errors occur is high. Time for every sensor to turn ON is set to 0.5 secondsfor each time based on the datasheet provided.Table 1 shows the experimental results obtained when the distance between IR sensor and object is changed. This is to select possible minimum of the distance for IR sensor. The sensor is capable to detect distance as close as 3 cm, but during the experiment data received by IR sensor is not stable. The surrounding condition is maintained in a closed room to avoid any light source during the experiment. Sensor value for each distance is different; this is because as the distance increase, the sensor value will also change. From the experiment, the minimum distance of this sensor is 5 cm. All experiment setups are set to be as closed as 5 cm from the IR sensor to avoid any error during data collection. Test experiment has been conductedto decide whether all IR sensors are turn ON at the same time is better compared when only one sensorturn ON at one time. Results show that at the distance of 5 cm it is best if the sensors turn ON one by one for better data collection.
During the turn ON of the IR sensor, which means the sensor is connected to the power supply, thedata regarding on the distance are collected. Arduino Uno is used as a microcontroller to control the movement of the stepper motor [10], IR sensors, and it is also responsible in collecting the data received by the sensors. At the Arduino board, IR sensor is connected to the analogue input, GND and also VCC. Meanwhile relay is used to controlled the switching mode of the IR is connected to the board at a digital input.
When IR sensors take analoguedata output, the data is saved in text file using CoolTerm. CoolTerm is one of the software that is connected to the Arduino by using USB port from the board to the laptop. All the data received will be using in post-processing data using Matlab to reconstruct the 3D image.
One of the simple ways to make sure that data captured by sensor rig completing one cycle is by rotating the object 360 °.In order to make sure that the sensors rotate in 360°, a stepper motor is used to control the rotation of the sensors. This motor can be connected to the Arduino board by connecting the input and output pin of the motor to the board [19]. An algorithm is applied to rotate the motor with a steep angle of 2°, which means the motor will move 180 times to complete 360° rotation. Fig. 2 shows the overall experiment setup of this research.

B. Sensor Rig Working Principle

Eight shapes of an object have been chosen in the experiment. Thereare cylinder, rectangle, hemisphere, oval, curvilinear, water drop, egg shape and trefoil. The size of every object is different in terms of length and diameter, only the high of each object is the same which is 5 cm. The size of every object is depending on the surface area suitable to captured data using the sensor rig. During the experiment, the entire object is wrapped with black cardboard. Research by Benet et al. [9] shows that by using black colour as a surface of an object gives relative IR reflectivity 0.12 αi. Colour selection is very important in order to obtain reasonable accuracy by reducing the influence of noise during the data reading from the IR sensors. Simple experiment has been done to prove that black cardboard gives stable data compare to other colours.
Table 2 shows the results obtained when different colour of cardboard paper used during data collection using IR sensors. From the results, black cardboard paperproduced consistent output sensor values compared to other colours. Distance between IR sensor and cardboard paper is set to 5 cm based on the result obtained in Table 1. Even though yellow cardboard gives slightly stable sensor output, but the result is not the exact distance when it is converted into cm. For the whole experiment, black cardboard paper will be used to wrap the object shape during data collection.
Arduino board needs to be connected with 9 V power supply to make it function for this system. System will welcome user with a welcome note and introduce user to the system. After a few seconds, IR sensors will turn ON and OFF one by one to capture data from an object placed at the centre of the sensor rig. The close distance between IR sensor and object is set to 5 cm in order to avoid error data. Meanwhile, distance between the centre of a panel where the object is placed and sensor is set to 10 cm. This distance will be applied in the algorithm for image reconstruction using Matlab.
Every 2° of movement make by stepper motor Arduino will give an instruction to the IR sensor to take or measure the distance between sensor and the obstacle. Each sensor requires 50ms in order for the signal to transmit and receive by the IR receiver. When the motor completes the rotation, system will automatically turn OFF to avoid any duplicate data receive by the sensor. There are five IR sensors installed at the sensor rig. By applying more sensors it will help in reducing time to captured data of a distance object, but if there are too many sensors is used system will become bulky [5]. Total time requires for the sensor rig to complete 360 °scanning the object are one minute of the total of five IR sensors in the sensor rig, compared when only one IR sensor used, the times required to complete the full scan of an object is 5 minutes.By applying more sensors to the sensor rig it will help eliminates another 4 minutes for the whole process during experiment.

C. Software Implementation

Data received by the CoolTerm is the sensor value.To reconstruct the image using Matlab, all the data need to be converted into centimetre (cm) by using the conversionprovided in the datasheet. After the conversion of the data, an algorithm is used to reconstruct the image is the applied to the data. In order to reconstruct images, all the data that have space and also words need to be deleted before applying the algorithm. System gives an error results when there is any unwanted space between the data.Image of the object is reconstructed using circle equation, which will assign all data to be located at a circular position. Conversion equations need to be applied in the algorithm so that the output image is in cm unit and not in a sensor value. Since the stepper motor rotate every 2°, the plotted data in the Matlab will only have 180 points which will reconstruct a complete image of an object.

RESULTSAND DISCUSSIONS

The entire object used throughout the experiment is wrapped with a black cardboard paper to avoid the existence of noise and reflectance of the signal transmit is fully reflected to the receiver of IR sensor. During the experiment, few factors that need to remain the same to make sure less noise occur. The factors are, all the experiment is run in a dark room to avoid any light source, and the position of the object located at the centre of sensor rig is maintained. By neglecting this factor it will cause error data capture during experiment.
Fig.3shows the total eight shapes of an object that have been reconstructed using an IR sensor rig. From the results, it shows that IR sensors give best and useful data when it deals with a curve surface, when IR sensor captured data from the straight surface, the output image is not similar with the real object.IR sensor very sensitive to the light source from the surrounding, so in order to obtain better data taken the position of an object placed in front of the sensor must be more than 5 cm to avoid error reading during data reading and it is better if the data is taken in the dark room to avoid any light source. From the results shown, it can be seen that the surface, for example,the hemisphere and trefoil are not smooth. This is because the sensor rig only responsible in taking data and to smooth the surface it requires an additional algorithm at the pre-processing data.
Shape such as curvilinear, water drop, egg and trefoil are taken in order to prove that by changing the shape of an object sensor rig with IR sensor still capable to reconstruct the image. This shape is a control data where the accuracy and error for this shape are not considered compared to the object shape. IR sensor gives a data of each control object without depending the shape and size of an object. This control object is slightly small compared to cylinder, hemisphere, rectangle and oval shape.

CONCLUSION

The experiment has demonstrated that the IR sensor rig is capable to capture a data in terms of distance between the sensor and the object. Data received from the sensor is reconstructed using the Matlab and the images that have been reconstructedare similar to the original object. Extra attention needs to take during the experiment such as run the sensor rig in a close room and the position of an object at the centre of the sensor rig is the same to avoid any unwanted signal that can cause an error to the IR reading.

ACKNOWLEDGMENT

The authors are indebted to UniversitiTeknologi Malaysia (UTM) and the EScience Grant for supporting and funding this study (EScience Vote R.J130000.7923.4S027). Author would also like to express a gratitude to Biomedical Electronic Laboratory Group members for their ideas and comments to the study.

Tables at a glance

Table icon Table icon
Table 1 Table 2

Figures at a glance

Figure 1 Figure 2 Figure 3
Figure 1 Figure 2 Figure 3

References