Development of a 3D Pipe Robot for Smart Sensing and Inspection Using 3D Printing Technology

Abstract This 3D pipe inspection robot is capable of conducting fully autonomous pipe inspection, transmitting measured data to the monitoring end by wireless communication, drawing a 3D pipe routing map in real time, and detecting pipe anomalies. The robot is both lightweight and inexpensive because it is constructed by 3D printing. The main functions of the robot include calculating the robot posture using the measurements from the accelerometer and gyroscope module, drawing a 3D pipe routing map in real time, deciding the degree of contraction from pressure sensor module readings to detect abnormal expansion or contraction, and locating potential hazards in the pipe. The robot described in this paper is different from others in many ways. The freely extendable and contractible body structure allows the robot to easily adapt to pipes of various diameters. The wireless IP camera onboard transmits real-time videos and assists operators in looking for signs of damage or anomalies. This robot is practical and can be used for the inspection of damaged pipes, redrawing 3D pipe routing maps, and assisting in the regular maintenance of pipes underground or located within buildings, and may also be of use in rescue work and disasters, etc.

robot initiates communication with the Bluetooth device. If the communication is established successfully, the current pipe diameter and robot posture will be readily available and displayed on the monitor interface. The scale can

Introduction
The gas explosion in Kaohsiung in 2014 caused great loss of human life and property. The main reason for the incident was a lack of regular service and maintenance of underground pipelines. It was later discovered that the routing maps of the pipelines had long been missing. This '3D pipe inspection robot' was developed to provide help for pipe maintenance and disaster prevention.
A great deal of research has been devoted to pipe inspection robots in the past [1][2][3]. Many robot designs, such as snake robots [4][5][6][7] and wheeled robots [8][9][10], have been proposed and realized. Various other possible designs have also been proposed [7]. However, these were all designed for use in specific situations rather than for general purpose [11][12][13]. All future designs should emphasize on high flexibility and adaptability [6]. A detailed description of such a 3D pipe inspection robot that can be adapted to pipes of different diameters is presented in this paper.
Improvements and modifications of wheel-driven designs demonstrating flexibility and adaptability of such pipe inspection robots have been extensively investigated [5,7,8,10,[14][15][16]. A design for an expandable and contractible robot that can adapt itself to various pipe diameters is proposed in this paper as illustrated in Figures  1-3. The robot is designed to perform autonomous in-pipe inspection, so the operator must be aware of its posture at all times [4,8] as shown in Figure 4. Wireless communication between a PC and a microcomputer has been achieved by the use of improved Bluetooth devices [17][18][19]. A 3D pipe routing map can be created in real time [6]. As shown in Figure 5, an easy-to-use program interface has been developed. A wireless IP camera is employed to stream live in-pipe video and facilitate the visualization of in-pipe detail. An Arduino Nano and a number of sensing components are assembled on an open circuit board as shown in Figure 6, which can be expanded at any time by adding extra sensing components depending on needs.

System Description
System architecture: In this system, an Arduino Nano is used to link and drive all modules, including a pressure sensor, Bluetooth, gyroscope, and accelerometer modules. The data detected by the sensors are transmitted back to the PC for analysis through a Bluetooth link. The geared DC motors onboard the robot are driven by the Arduino Nano. The system architecture is shown in Figure 7.
Operational flow: On the monitoring end, a PC is linked to the IP camera onboard with a wireless LAN system, before inspection starts, to ensure successful transmission of real-time in-pipe videos. Once placed in the pipe, the   then be entered and the moving-forward command can be issued by the operator to start the robot on its inspection mission. See Figure 8 for the detailed operational flow chart.

Description of Software Interface
The function and purpose of the interface in Figure 5 are explained below: (1) System messages and all calculated data are displayed in Block A to facilitate monitoring by the user. The data include Euler angles and the pressure sensor readings. (2) Block B contains the Scan button, which is used to launch the program. When the button is clicked, the system will search for available Bluetooth devices nearby and display the results in Block C.  select and connect a device by double clicking on the device icon. The system will start to establish communication immediately. (4) The buttons in Block D are used to control the forward and backward motion of the robot. However, the robot is capable of autonomous inspection in a normal situation and the buttons in this block are used only in case of emergency. (5) In Block E, the β angle is obtained from the accelerometer via Bluetooth. After the robot posture is determined, the image is displayed accordingly. This provides the operator with an intuitive way to monitor the robot posture. (6) A map of routes already inspected is displayed in Block F. The routing map displayed is only 1/9 of the total area inspected. This increases the resolution so that the user has a detailed local view of the routing map. (7) The robot locus along the Z-axis is displayed in Block G. The height (depth) of robot location is also displayed. (8) In Block H, the diameter of the pipe currently being inspected can be determined by looking up the 'pressure vs. pipe diameter' curve drawn from experimental data collected by the pressure sensors. The total pipe inspection time is also displayed in this block. etc. The gyroscope, accelerometer, and the pressure sensor modules, which are the most essential components, are introduced below.
To begin with, 3D robot positions and translational velocity can be determined based on motor velocity, and angular velocity measured from the onboard gyroscope sensor.
The 3D pipe routing map can thus be updated and displayed in the user interface. The accelerometer module provides information to determine the robot posture [20]. Specifically, the Z-X-Z Euler angle set can be partially calculated using the tri-axis gravitational acceleration measured by the accelerometer. In Figure 9, the red frame attached to the robot, referred to as the robot frame, is initially aligned with the blue frame which is the reference frame. The Z-X-Z Euler angle set relating the robot frame to the reference frame is (α, β, γ). The axis N is the intersecting line of the x -y and X -Y planes.
The rotation matrix for Z-X-Z Euler angles is as follows. Figure 10 shows the gravitational acceleration vector a x a y a z ′ in the robot frame which is 0 0 −1 � in the reference frame. According to (3.1), the coordinate transformation of the gravitational acceleration vector between the two frames can be seen as follows.
Therefore, Euler angles β and γ can be determined as follows. (3.1)

Orientation and Pressure Sensing
The 3D pipe inspection robot developed by this team can be equipped with various types of sensors for different purposes such as gas analysis and temperature sensing, Gravitational acceleration      By virtue of robot kinematics, the translational velocity in the robot frame and the reference frame are ||v| | 0 0 ′ and v, respectively. Hence, it can be seen from (3.1) that

Experimental Results
Experiments showed that all expected hardware and software functions of the robot were satisfactorily implemented. These included: the robot hardware structure (Figures 15 and 16), the actual in-pipe moving stability ( Figures 17 and 18), Bluetooth communication between the robot and the monitoring end ( Figure 19), display of the available Bluetooth devices (Figure 20), display of the robot in-pipe posture ( Figure 5), display of the top and side views of the pipe routing map in real time ( Figures  21-24), creation of a 3D pipe routing map at the end of inspection (Figures 25 and 26), and display of total inspection time and pipe diameter currently inspected ( Figure 27).

Conclusion
The design of the 3D pipe inspection robot developed by this team allows it to be adapted to pipes in a range of different diameters. The robot position can be monitored at all times during autonomous in-pipe inspection and Therefore, the remaining Euler angle α can be determined as: Experimental results reveal the nonlinearity between calculated and actual angular positions. Corrections can thus be made by applying the least square method to experimental results for the three axes of the robot frame. Figure 11 gives the results for the z-axis. Equation (3.7) gives the corrected angular positions based on the calculated angular positions for the z-axis. After being corrected with Equation (3.7), the errors in Euler angle γ were reduced to ±2°. Other Euler angles can be similarly corrected.
The pressure sensor is of vital importance for measuring the current pipe diameter. The amount of pressure applied to the spring is a known value transmitted back by the pressure sensor. The direction of pressure received by the spring and detailed diagram are shown in Figures 12  and 13. The pipe diameter can be determined using the curve relating the pressure to the pipe diameter, which is shown in Figure 14.    Pipe diameter (cm) Total inspection time a 3D pipe routing map can be drawn in real time. It will help us better understand the in-pipe situation in case of an emergency. In addition, it will also provide assistance in routine pipe maintenance.

Disclosure Statement
No potential conflict of interest was reported by the authors.