The Path Direction Control System for Lanange Jagad Dance Robot Using the MPU6050 Gyroscope Sensor

Technological developments are increasingly developing, especially in the field of control systems. One of these developments is the field of robotics. Various types of robots have been created and developed to meet human needs. Starting from robots that can help with homework, industrial robots, robots for entertainment and humanoid robots [1][2]. Humanoid robots are robots that have body parts like humans because they have the construction of legs, head, body, hands and are able to move like humans [3]. ARTICLE INFO ABSTRACT


Introduction
Technological developments are increasingly developing, especially in the field of control systems. One of these developments is the field of robotics. Various types of robots have been created and developed to meet human needs. Starting from robots that can help with homework, industrial robots, robots for entertainment and humanoid robots [1] [2]. Humanoid robots are robots that have body parts like humans because they have the construction of legs, head, body, hands and are able to move like humans [3].
The ability to walk straight on a dance robot is very important considering that in competitions, dance robots are required to be able to walk through several zones starting from the starting zone and ending with the closed zone. Therefore, a control system is needed in the Lanange Jagad dance robot so that the robot can control the direction of its walking motion and reduce errors in dance motion while walking on the dance robot. This control system uses a reading value based on the orientation of the rotating motion on the yaw angle axis on the MPU6050 gyroscope sensor which will later be used as a corrector for dance robots when performing various dance movements while walking in the competition arena. From the results of the overall test of the Lanange Jagad dance robot after adding the road direction control system, the percentage of the success rate in the battery power supply condition is 12 volts to 12.6 volts by 100% with the greater the battery power supply, the error in the robot's final angle average to The starting angle of the robot is getting smaller and the percentage of the success rate at the slope of the 0o to 4o race arena is 93.3%. With the tilted race arena, the error in the mean error of the robot's final angle to the starting angle of the robot is also greater, so it can be concluded that the robot can be controlled direction of walking and can walk straight to the finish in the closed zone.
The Indonesian Robotics Competition (KRI) is a competition organized by the Ministry of Research, Technology and Higher Education of the Republic of Indonesia (Kemenristek Dikti). In KRI there are several categories, one of which is the Indonesian Dance Robot Competition (KRSTI) which uses humanoid robots. The competition in this category is designing, building and programming robots that are combined with elements of Indonesian art and culture, especially dance, which is well known in Indonesia [4] [5].
In the Indonesian Dance Robot Contest, the Ahmad Dahlan University robot team participated in the competition in the KRSTI category and Lanange Jagad was the name of the KRSTI robot from Ahmad Dahlan University (Fig. 1). The ability to walk on dance robots is very important considering that in competitions, dance robots are required to be able to walk through several zones starting from the starting zone and ending with the closed zone. Therefore, a control system is needed in the Lanange Jagad dance robot so that the robot can be controlled in the direction of its walking motion and reduce errors in dance motion while walking on the dance robot. This control system uses a reading value based on the orientation of the rotating motion on the yawn angle axis on the MPU6050 sensor which will later be used as a controller for the dance robot when performing various dance movements while walking in the race arena. The MPU 6050 sensor is a module that can integrate an accelerometer and a gyroscope (Gyroscope) [6]. The sensor is a tool that measures and maintains direction based on the principle of angular momentum [7][8] [9]. In this study, the gyroscope sensor will be used as feedback for the robot controller so that it can run straight.

Control System Block Diagram
A gyro sensor is a device that measures or maintains direction. The gyroscope can read movement based on gravity, or it can detect the user's movement, is used to measure direction based on the principle of angular momentum, and has sensitive outputs on the angular velocity of the x, y and z axes or angular phi (roll), theta (pitch) and angle psi (yaw) [10]. In this control system uses a reading value based on the orientation of the rotating motion on the yaw angle axis on the MPU6050 gyroscope sensor which will later be used as a reference as a controller for dance robots when performing various dance movements while walking.
When the system is running, the system will initialize the program and activate the gyroscope sensor to send data to the microcontroller for processing. The system takes the value of the gyroscope sensor reading which is useful for knowing changes in position (angle). Value in the form of analog is converted to digital via the ADC (Analog to Digital Converter) pin via the microcontroller [11]. After obtaining the yaw angle value from the gyroscope sensor reading, the next process is to provide a declaration of commands for motion calls or movements based on the gyroscope sensor readings for the robot controller. The robot control system block diagram is shown in Fig. 2. The set point value is the zerodegree angle, that is, the robot must move in a straight line. The sensor will provide a feedback value to calculate the error value as controller input. The controller will calculate the control value to be sent to the servo motor and correct the robot's movement so that it moves straight. The angular velocity measurement system consists of a sensor as an element for measuring angular velocity and an Arduino as a data acquisition. The output data from the sensor is received by Arduino and processed according to the coding inputted in the Arduino software. The physical value of the angle will appear on the Arduino software interface screen.
The output from the gyroscope is data in the form of angular velocity. The vector quantity representing the angular frequency of the object and its axis of rotation can be called the angular velocity. The SI unit for angular velocity is radians / second, although it can also be measured in degrees per second, revolutions per second, degrees per hour and more [12].
where θ is the angle (°), θ0 is the initial angle (°), ω is the angular velocity (°/s) and t is the time (s).

System Design
In this study using a humanoid robot design, because humanoid robots are robots whose designs are like the human body and can be controlled so that the robot's movements can resemble humans [13]. Robot Design is shown in Fig. 3. is that the initial position of the angle contained in the sensor matches the position of the robot standing so that the data issued by the MPU6050 sensor is appropriate and accurate. The MPU6050 gyroscope sensor will be placed at the bottom of servo number 25 or in the middle waist servo so that it can detect the movement of the robot while walking. The x, y and z axes of the gyroscope sensor are shown in Fig. 4  MPU6050 gyro sensor placement is based on two-coordinate adjustment. The first coordinates are the coordinates on earth, because the coordinates of the earth are Cartesian coordinates relative to the earth's surface. The MPU6050 gyro sensor coordinate system is a coordinate sensor placed on the Lanange Jagad robot frame. By determining the two coordinates so that the Euler angle can be applied, the conversion of z-y-x rotation, or it can be said that the yaw angle (ѱ), pitch (θ) and roll (ϕ) are the euler angles used in the positioning of the sensor.

Wiring Diagram
In this section, the humanoid robot electronic system will be designed using components consisting of the MPU6050 gyroscope sensor, Arduino Mega 2560 Pro, OpenCM9.04, OpenCM 485 EXP, Li-Po 3800 mAh battery and Dynamixel servo. Lanange Jagad dance art robot, using Arduino Mega 2560 Pro as the main robot controller combined with OpenCM9.04. This controller acts as the main control for the behavior of the robot which has been programmed in it. The communication used on the two controllers is SPI communication, while the MPU6050 module with the Arduino Mega 2560 Pro uses I2C communication. The system wiring diagram is shown in Fig. 5. The MPU6050 gyroscope sensor will be connected to the Arduino MEGA 2560 PRO so that the reading data from the sensor can be processed. The results of sensor reading data processing carried out by the microcontroller will provide an output value in the form of a psi (yaw) angle which will later be used as a reference for motion calls that have been made on the robot according to what has been declared in the program. For the voltage source of the Lanange Jagad dance robot system, it uses a power supply from a 12V lipo battery.

Algorithm
Based on Fig. 6, the system flowchart shows that when the robot is turned on in the starting position and when the start button, the robot will initialize the program, namely the ready movement, read the gyro sensor and perform a calibration to adjust the gyroscope sensor reading value in the direction facing the robot. After the initialization process is complete the robot will read the value from Bluetooth, if the Bluetooth value is equal to 1 then the robot will move according to what has been declared in the program to read the yaw angle on the gyroscope sensor and the robot will respond by moving forward, walking right, and walking left until the program is finished.

Gyroscope Configuration
Before using the gyroscope sensor, it is necessary to carry out a calibration process on the sensor to obtain a calibration factor, then the gyroscope must be compensated by ZRO to produce 0 o /s stationary (not rotating) sensor output data. When the gyroscope rotates clockwise along one axis (that is, the z (yaw) axis), the voltage output decreases. At the same time, if it rotates counterclockwise, the output voltage becomes high. This value changes according to the rotation speed of the gyroscope.
The first step in sensor calibration is finding the offset value. Get this offset value when the device is in a horizontal position. The offset value function is used to obtain the offset angle. The MPU6050 module is used in this study. The use of this module is easier. After entering the offset value into the program, adjust the original data value within the range set by the sensor. Table 2 Represents the full-scale range of the output of the gyroscope. The gyroscope range consists of 250ᵒ/s, 500ᵒ/s, 1000ᵒ/s, 20000ᵒ/s. Selection of the range is adjusted based on the needs in the program. In this study using a range of 250ᵒ/s.

Result and Discussion
This research was conducted based on data samples from the KRSTI Lanange Jagad robot while performing dances and walking continuously and varied. The research robot is shown in Fig. 7.

Sensor Testing
Testing on the MPU6050 sensor (Fig. 8) is carried out by rotating the z-axis angle to become the psi (yaw) angle. The protractor is rotated with an angle of 10ᵒ starting from an angle of -90ᵒ to an angle of 90ᵒ. Each corner was tested 5 times with a test time span of 1 minute. This is done to determine the reading from the gyroscope sensor to the yaw angle so that accurate data and sensor output responses are obtained as needed. The measurement results are shown in Table  3.   Sensor Readout Degree Range The degree ranges of the sensor reading to the robot is to implement the direction towards the robot based on the reading value on the gyroscope sensor. The readings are shown in Table  4. In Table 4, the range of degrees towards the robot is obtained from the results of testing the gyroscope sensor based on the orientation of the rotating motion on the z-axis axis and adjusted based on the direction of the sensor facing the robot's direction so that the movement response of the robot can be determined which will be used as a controller for the robot's movement when walking on the robot. arena of the race.

Robot Control Testing
The race arena is a rectangle with a length of 300 cm and a width of 200 cm, and a height of 100 cm on the ground. The race arena is shown in Fig. 9. Each race arena will be divided into five parts, namely the starting zone, zone A, zone B, zone C and the closed zone. In the KRSTI robot competition there are several conditions that can interfere with the performance of the dance robot in performing dance movements while walking, namely the condition of the competition arena with an uneven or tilted surface and also the unstable state of the battery power supply in the robot so that it can lead to walking errors in dance robots. in the arena of the race.

Conventional Controller
This test is carried out using a battery power supply condition to see the success rate of the robot before using the control system. The robot will be recorded and the video recording will be used as material in the object marking process using the python application and the results of the plotting of the robot's movement will be obtained in the race arena. The test results are shown in Fig. 10. In this test, it can be seen that the movement of the robot is slightly tilted by several degrees and is not straight. This test is carried out using the slope of the competition arena to see the level of success of the robot before using the control system. The test results are shown in Fig. 11. Based on this test, it can be seen that the movement of the robot is tilted several degrees from the red straight line reference. Proposed Controller This test is carried out using a battery power supply condition to see the success rate of the robot after using the control system. The robot will be recorded and the video recording will be used as material in the object marking process using the python application and the results of the plotting of the robot's movement will be obtained in the race arena. The test results are shown in Fig. 12. Based on this test the proposed controller has been able to reduce the tilt level of the robot to move straight following a straight line reference. In this test, it is carried out by providing a slope condition in the race arena to see the success rate of the comparison of robots after using the control system. The test results are shown in Fig. 13. Based on this test the proposed controller has been able to reduce the tilt level of the robot to move straight following a straight line reference. Battery Power Supply Test In this test, it is carried out using a 12.6volt battery power supply to see the success rate of the robot after using the control system. The test results are shown in Table 5. In this test, it was carried out using a 12.3volt battery power supply to see the success rate of the robot after using the control system. The test results are shown in Table 6. In this test, it is carried out using a 12volt battery power supply to see the success rate of the robot after using the control system. The test results are shown in Table 7. The percentage of successful testing is shown in Table 8. The average percentage of success of the Lanange Jagad dance robot with a robot control system capable of finishing using a battery power supply of 12 volts to 12.6 volts is 100%.

Battery Power Supply (volt) Percentage of Success (%)
12.6 100 11.9 100 12 100 Average 100 Testing with the Slope of the Race Arena In this test, it is done by giving a slope to the 0ᵒ race arena to see the success rate of the robot after using the control system. The test results are shown in Table 9. Based on the examination, the test has one hundred successes for 5 examinations. the percentage of the success rate at the slope of the 0o to 4o race arena is 93.3%. With the tilted race arena, the average error of the robot's final angle to the starting angle of the robot is also getting bigger, so it can be concluded that the robot can be controlled. direction of motion and can be stable finish in the closed zone.