AutoDock-IPS: An Automated Docking for Mobile Robot Based on Indoor Positioning System

Mobile robots are proven to be reliable in supporting human tasks by using a computerized system that minimizes human errors. However, recharging the battery in these robots is still performed manually by the user. Therefore, to extend their lifetime, an indoor automatic docking system ‘AutoDock-IPS’ is created for mobile robot to charge its battery automatically. The automatic docking system determines the location of the docks (i.e., charging stations) so that, prototype can immediately navigate to them. Experiments were carried out to validate the docking procedure by utilizing a compass module as a direction sensor and a rotary encoder as a displacement indicator. These sensors are combined into a robust indoor positioning system. The results show that the prototype can find the fastest route to the docking station to perform battery charging procedure.


I. Introduction
In recent decades, robot technology has grown closer to human perception. In developed countries, robot technology is one of the technologies that continues to be researched. One of the countries that has developed robot technology, including Japan with one of its robot products, i.e., ASIMO (advanced step in innovative mobility) which was first introduced by Honda [1]. ASIMO is designed to be adaptable in the real world and able to walk on both feet. Meanwhile, SOINN (Self-Organizing Incremental Neural Network) is a robot developed by the Tokyo Institute of Technology, with an artificial intelligence system that continues to be updated as more tasks are completed [2]. SOINN is a smart robot that can think on its own. On the other hand, China has developed one of its robotic products, namely the Rover Yutu 'Jade Rabbit' to explore the state of the moon [3]. Robot rover is a mobile robot with multifunctional capabilities. Although not as flexible as humanoid robots, mobile robots require a certain autodocking system that is able to charge the battery to extend its operational time. Even for specific examples, such as housekeeping robots, they are expected to operate 24 hours a day. The docking system is the main challenge in the design of a mobile robot system.
Meanwhile, the use of mobile robots has penetrated various fields e.g., household, industrial, medical, and military. In its application, the docking system has many functions, one of which is to charge the battery. The battery charging system is automatically able to keep the mobile robot in a standby position without human intervention. The main weakness of the mobile electronic robot is that it requires an energy source that will run out if it continues to be used. The energy source stored in the battery needs to be charged when the battery voltage is reduced. However, if the recharging process is not carried out properly, such as the battery voltage is too low when charging, it causes the battery life cycle to decrease. If it continues, it can result in wasted energy and repeated battery changes. A lot of research has been done on charging technology on mobile robots or commonly called auto docking [4][5][6]. The mobile robot requires a charging station or so-called docking station.
A robust and effective system needs to be developed to produce a better charging process. Furthermore, the use of multiple charging stations can increase the charging efficiency of the mobile robot. With multiple charging stations, the mobile robot can choose the closest dock position from its position. The system is able to find the shortest path to the intended location using the Indoor Positioning System (IPS). Finally, the project entitled "AutoDock-IPS: An Automated Docking for Mobile Robot Based on Indoor Positioning System" needs to be researched to generate a proofof-concept system that can be applied in the real world. The prototype in this study is a mobile robot that is able to navigate indoors. In this application, the robot will search the location of the docking station by utilizing a compass module assisted by a rotary encoder sensor to produce a better environmental perception. If the robot's power is less than the limit value, the robot will perform an auto docking procedure.
The remainder of this paper is arranged as follows. The preliminary studies are described in Section II, followed by Section III which presents the methodology. Section IV provides a design of the docking system: AutoDock-IPS. Section V presents Experiments and Results. Finally, Section VI summarizes the results.

II. Preliminary Studies
A mobile robot has actuators e.g., wheels [7], blades [8,9], or mechanical legs [10,11] to move the entire robot chassis, to change its positions. To build a mobile robot, it is necessary to design data processing devices (e.g., microprocessors) and environmental sensing devices by using electronic sensors. The chassis of the robot car can be made using plywood, acrylic, or iron. Mobile robots can be made as line followers, wall followers, or object followers.
Furthermore, the researchers' developments lead to mobile robots with specific functions in the form of line follower, maze solving, or omnidirectional robots equipped with advanced sensing technology utilizing computer vision.
Meanwhile, an automatic docking system is a robotic system that functions to automatically charge the battery [12]. This system works when the robot battery voltage is below the minimum threshold. The robot is charging the battery at a docking station. The system uses a compass sensor that can determine the coordinates of the docking station location. Furthermore, these coordinates are compared with the robot's position to determine the robot's direction to the nearest docking station. The system proposed in this study is called AutoDock-IPS by relying on a compass sensor and a rotary encoder to control the movement of the robot, resulting in a system that is inexpensive but robust when implemented.

II.1 Ultrasonic Sensor
Ultrasonic sensors utilize sound waves that have a high frequency above the ability of the human sense of hearing. The sensor module used is an ultrasonic sensor with a transducer that functions as a wave sender, a receiver, and a data management unit shown in Figure 1. This sensor module is used to measure object distances from 2cm -4m with an accuracy of 3mm. This sensor module has 4 pins i.e., Vcc, Gnd, Trigger, and Echo. Vcc pin is for positive power and Gnd pin is for ground. The Trigger pin is used to trigger the module to work and the Echo pin is used to measure the reflected signal from objects.

III.2 Arduino
Arduino UNO board is a microcontroller board (Development Board) which uses ATmega328 microcontroller chip and uses an open-source concept. The software and hardware are relatively easy to use so they are widely used by researchers. The Arduino Uno board is programmed and supplied using power supply from a computer using a USB cable or with an external 7-12 V DC adaptor. Arduino Uno can be used to collect data from environment by using various sensors, such as distance, infrared, temperature, light, ultrasonic, pressure, humidity and others. Arduino UNO has 14 Digital pins that can be set as Input or Output and 6 Analog input pins. The specifications of the Arduino Uno can be seen in Table 1 below.

III.3 Voltage Sensor
The working principle of this voltage sensor module is to divide the input voltage into one-fifths so that a 5V microcontroller can be used to read a maximum battery voltage of 25 V. Basically the Arduino AVR chip has a 10-bit ADC counter that converts analog voltages into digital representations represented by numbers 0 to 1023. The battery voltage can be calculated using Equation (1).
Where Vb is battery voltage and bADC is ADC value reading by the microcontroller with a range of 0 to 1023.

III.4 Compass Sensor
Compass sensor is a tool that serves to detect symptoms that come from changes in magnetic field energy. There are several chips that provide the sensory capabilities of a digital compass, one of the most common being the HMC5883L shown in Figure 2, a 3-axis digital compass chip. This digital compass uses a magnetic sensor to measure the earth's magnetic field. The output from this sensor can then be accessed via a set of registers (using the I2C protocol) which allows the user to set measurement parameters such as sample rate and measurement type (one-shot or continuous).

III.5 Rotary Encoder
The FC-03 module is an optocoupler sensor integrated with the LM393 comparator in one module. This module can be used to count pulses and measure motor speed. The measurement of the rotational speed of the motor is done by placing the encoder shaft between the optocoupler so that the number of holes on the encoder shaft can be calculated using an infrared sensor.

IV.1 Hardware Prototyping
The design of the AutoDoc-IPS prototype consists of two parts, namely hardware and software. It can be seen in Figure 3 that the hardware design includes Arduino module, ultrasonic sensor, compass sensor, rotary encoder sensor, LDR (Light Dependent Resistor) and voltage sensor, while the software design uses Arduino IDE. The prototype is controlled by a microcontroller unit in the form of an Arduino as the center for processing data obtained from various sensor inputs. Arduino regulates the movement of the robot according to the desired movement pattern. In addition, the L298N motor driver is used to control the DC motor as an actuator. Meanwhile, the voltage sensor monitors the battery voltage data. If the battery power is below 8V (the voltage limit that can be used to drive the L298N motor driver) then the mobile robot will look for the nearest charging station (dock) with the help of a compass sensor as a robot direction and a rotary encoder as a speed and position recorder of the robot. With the help of these two sensors, the distance of the robot to the charging station can be determined. Ultrasonic sensors and LDR sensors are used to guide the robot when it goes to and stops at the dock. After finishing docking, the robot will return to the end point before docking.

1) Schematic of FC-03 Rotary Encoder
The rotary encoder sensor is used as a detector of wheel rotation. In the prototype, the rotary encoder performs counting of wheel rotation so that the distance traveled by the robot can be estimated using the number of times the angular distance of the wheel that has been traveled. The sensor pinout is connected to Arduino board, described in Figure  4.

2) Schematic of L298N Motor Driver
The L298N driver controls the speed of 2 DC motors according to the commands given by the microcontroller. Thus, the motor can be controlled according to a predetermined route. Figure 5 describes the schematic of the motor driver and pinout connected to the Arduino board.

3) Schematic of GY-271 Compass Sensor
Compass sensor is used as an indication of the docking location. Thus, the robot can determine the position of the docking station and find the nearest dock. The connection of the pinout is described in Figure 6.

4) Schematic of Voltage Sensor
The voltmeter sensor is used to measure battery voltage as shown in Figure 7. In the prototype, this sensor is used as a voltage indicator so that the robot can find the nearest docking station before it runs out of power.

5) Schematic of HC-SR04 Ultrasonic Sensor
Ultrasonic sensor is used for distance measuring and it is utilized to detect obstructions while searching for the docks. To measure the distance, the time difference is recorded between the process of transmitting waves, object reflection until the wave returns to the receiver module. In the ultrasonic sensor datasheet, it is stated that the speed of sound waves is about 340 m/s so that, the waves travel a distance of 1 cm (0.01 m) in 0.01/340 or 0.00000294 s (29.4 us). Because ultrasonic waves travel in round trip, the period that is required is 2 times. Then the time delay generated by the sensor module to measure the distance of 1 cm is 29.4 us x 2 = 58.8 us. The prototype uses 3 ultrasonic sensor modules (a, b, and c) with pinouts shown in Figure 8.

6) Schematic of LDR Sensor
LDR which is a light sensitive electronic component is often applied in electronic circuits as a trigger that is active when it detects light. In Figure 9, the voltage divider circuit is used to stabilize the voltage value which is then processed by the microcontroller. In the prototype, the LDR sensor is placed in the docking module on the robot and an LED light is embedded in the docking station to detect if the robot has entered the dock and the robot can stop safely.

IV.2 Software Prototyping
The software is compiled by using Arduino IDE then programmed to the development board using serial interface. The microcontroller performs measurement and calculation to make a decision whether the autodocking procedure should be executed or not. It can be seen in Figure 10 that if the battery voltage is very low (i.e., the battery charge is below the threshold value), the mobile robot will stop and record the last location before docking. The robot starts looking for the nearest docking station with the help of a rotary encoder sensor and a compass sensor. When the battery is full, the robot will return to the last point before the robot docked and continue to move according a predetermined pattern. The movement pattern of the robot is designed in Figure 11, where the test area is 3x3 m2, there are 2 docks (battery charging places) located on opposite sides and a starting point before the robot starts to move according to the command. The robot is designed to run around from the starting point continuously until the battery runs out or the battery voltage is below 8.1V. Next, with the energy left, the robot will move to the nearest docking station, namely dock 1 or dock 2.

V. Result and Discussion
In this study, several experiments were conducted to validate the AutoDock-IPS concept. This concept utilizes a combination of several types of sensors as an indoor positioning system.

V.1 Experiment of Distance Measurement
Ultrasonic sensor testing is done by comparing the distance value obtained by the ultrasonic sensor with the actual value. This test is carried out at a distance of 5 to 25 cm. From the ultrasonic sensor test, it gives readings with a difference of ±0.03 cm from the actual value as shown in Table 2.

V.2 Experiment of Light Detection Using LDR
The experiment was carried out by measuring the sensor output voltage compared to the distance between the LDR module and the docking station. The measurement results are presented in Table 3.

V.3 Experiment of Distance Measurement Using Rotary Encoder
Rotary sensor testing is done by comparing the value of the rotary sensor reading and the actual distance traveled by the robot as shown in Table 4. This test is carried out to determine the position of the robot when the robot moves according to a predetermined pattern before stopping and heading to the nearest dock station.

V.4 Experiment of Positioning Using Compass Sensor
In the compass sensor test, the degree of rotational movement is measured to see how accurate the sensor reading is to the original angular deviation. For the initial reading, the 0° angle of the compass sensor is set equal to the 0° angle of the arc according to Figure 12. From Table 6 it can be seen that the compass sensor test has been mapped from 0 degrees to 360 degrees with a deviation of every 20 degrees. The results show that the difference in arc measurements with sensor measurements is maximum only ±2 so that, it can be said that the sensor can be used optimally.   1  360  360  0  2  340  341  1  3  320  321  1  4  300  300  0  5  280  281  1  6  260  261  1  7  240  241  1  8  220  221  1  9  200  200  0  10  180  181  1  11  160  162  2  12  140  141  1  13  120  121  1  14  100  101  1  15  80  82  2  16  60  62  2  17  40  41  1  18 20 21 0

V.5 Experiment of Autodocking Success Rate
Testing the movement pattern of the robot is done to find out how the robot can stop in the docking station properly. In Table 6, eight tests were carried out with different battery voltage targets. From the experiments, it is known that if the robot's voltage is less than 7.42, the robot stops before reaching the dock due to lack of battery power. On the other hand, with a battery voltage above 7.42, the robot can perform the auto docking process smoothly.

VI. Conclusion
Based on experiments, the Autodock-IPS can overcome the problem of running out of batteries when the robot is used continuously by returning to the docking station via the fastest route. The robot can move to the docking station if the battery has reached the minimum limit of 8.1V. The autodocking procedures are performed by processing data from compass sensor based on 8 robot position references so that, the robot can move to dock 1 at 0 degrees or dock 2 at 180 degrees depending on the closest position between the robot and the docking station. In addition, the microcontroller system controls the robot's movement by processing data from rotary encoder sensors. To calculate the distance, a full rotation of rotary encoder (i.e., 10 dot encoder equals 19 cm) is counted by the microcontroller. Finally, ultrasonic sensors are used to detect the docking station wall thereby increasing the safety of the autodocking process.