| 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 1 | Table 2 |  | 
        
            | Figures at a glance | 
        
            | 
                
                    
                        |  |  |  |  
                        | Figure 1 | Figure 2 | Figure 3 |  | 
        
            | References | 
        
            | 
                Tar, A., Koller,  M., and Cserey, G., “3D geometry reconstruction using large infrared proximity  array for robotic applications”, in Proc. 2009IEEE International Conference on  Mechatronics, Apr. 2009.
 Tsai, C., Wu, Y.,  Li, Y., and Chen, J., “Implementation and analysis of range-finding based on  infrared techniques”, in Proceedings of 2011 8thAsian  Control Conference(ASCC), pp.956-959, 2011.
 Murray, D., and  Little, J., “Using real-time stereo vision for mobile robot navigation”,  Autonomous Robots, Vol.8, No.2, pp.161-171, 2000.
 Guivant, J.,  Nebot, E., Baiker, S., “Localization and map building using laser range sensors  in outdoor applications”, Journal of RoboticsSystems, Vol.17, No.10,  pp.565-583, 2000.
 Tar, A., and  Cresey, G., “Object outline and surface-trace detection using infrared  proximity array”, IEEE Sensors Journal, Vol.11, No.10,pp.2486-2493, Oct. 2011.
 Majchrzak, J.,  Michalski, M., and Wiczyn`ski, G., “Distance estimation with a long-range  ultrasonic sensor system”, IEEE Sensor Journal,Vol.9, No.7, pp.767-773, July  2009.
 Norgia, M.,  Giuliani, G., and Donati, S., “Absolute distance measurement with improved  accuracy using laser diode self-mixing interferometry in  a closed loop”, IEEE Transations on Instrumentation and Measurement, Vol.56,  No.5, pp.1894-1900, Oct. 2007.
 Omura, Y., Goto,  A., and Shidara, N., “Surface-trace feasibility for IR-based position-sensing  devices”, Journals of IEEE Sensors, Vol.9,No.10, pp.1262-1269, Oct. 2009.
 Benet, G., Blanes, F., Simo, J. E., and Perez, P.,  “Using infrared sensors for distance measurement in mobile robots”, Robotics  andAutonomous Systems 1006, pp.1-12, March, 2002.
 Kumpakeaw, S., “Twin low-cost infrared range finders  for detecting obstcles using in mobile platforms”, in Proc. IEEE  InternationalConference on Robotics and Biomimetics 2012, pp.1996-1999, Dec.  2012.
 Khraisat, Y.S.H.,“Design infrared radar system”,  Contemporary Engineering Sciences, Vol.5, No.3, pp.111-117, 2012.
 Gifford, C. M., Webb, R., Bley, J., Leung, D.,  Calnon, M., Makarewicz, J., Banz, B., and Agah, A., “Low-cost multi-robots  exploration andmapping”, in International Conference of Technologies for  Practical Robot Applications, pp.74-79, 2008.
 Novonty, P., and Ferrier, N., “Using infrared  sensors and the Phong illumination model to measure distances”, in Proceeding  of InternationalConference on Robotics and Automation, pp.1644-1649, 1999.
 Sabatini, A., Genovese, V., Guglielmelli, E.,  Mantuano, A., Ratti, G., and Dario, P., “A low-cost, composite sensor array  combiningultrasonicsand infrared proximity sensors”, in Proceeding of  International Conference on Intelligent Robots and Systems IEEE/RSJ,  Vol.3,pp.120-126, 1995.
 Park, H., Baek, S., and Lee, S., “IR sensor array  for a mobile robot”, in Proceeding of IEEE/ASME International Conference AdvanceTechnology  Mechatronics, pp.928-933, 2005.
 Lee, S., and Chung, W., “Rotating IR sensor system  for 2.5 D sensing”, in Proceeding of IEEE/RSJ International Conference  Intelligent RobotSystems, pp.814-819, 2006.
 Park, H., Lee, S., and Chung, W., “Obstacle detection  and feature extraction using 2.5 D range sensor system”, in Proceeding of  InternationalJoint Conference SICE-ICASE’06, pp.2000-2004, 2006.
 “GP2D120 Optoelectronic Device,” SHARP Corporation,  Osaka, Japan. DATASHEET
 “SD02B 2A Stepper Motor Driver.” Cytron  Technologies, Johor, Malaysia. DATASHEET
 |