SPIDER4LEGS MOBILE ROBOT DESIGN CONTROLLED BY THE ESP32 PLATFORM

The grazing robot is a dynamic system, consisting of a platform (the body of the robot) and a number of legs with structures similar to the kinematic chains of manipulator robots. Grazing robots can have a redundant number of legs, therefore they can ensure a static stability even if one or more legs are destroyed [10]. The objective of the work is to design a mobile robot controlled with the Arduino board controlled by an ESP 32 logic processor. The robot proposed in the paper is a spider-type robot with four legs, named SPIDER4LEGS. The components used to make the robot are the following: ESP32 development board, ESP ROOM-32, WiFi and Bluetooth BLE, Dual Core; PCA9685 module, I2C interface, 16 CH, servo motor; 12 Servo motors SG90 180 degrees. A possible field of application of these robots is the internal inspection of pipelines transporting petroleum products [7],[8],[9].


INTRODUCTION
Regardless of the field in which they are used, robots have greatly contributed to obtaining certain information that was extremely difficult to obtain and have contributed to some extent even to the evolution of our species. Currently, there is no field of activity that is not robotized, there is no person who has not heard the name of robot at least once and who cannot imagine one [1]. It must be recognized that literature and film were the domains that presented robots to the world in a unique way, for this reason their popularity has grown extremely much. Many books and films have changed people's perception of these mechanized creatures and weighed the advantages and disadvantages of expanding and developing this field.
If we take into account their important development year after year, we can affirm with confidence that in the near future robots will end up being extremely important in almost all fields of activity. Nowadays, more and more factories are mechanized, more and more robots have replaced human activity and thus work has been made more efficient. The mobile robot is an automatic, complex system that can perform different activities in a variety of real-world situations. It is a combination of devices equipped with servomotors and sensors under the control of a hierarchical computing system, operating in a real space, marked by a series of physical properties and planning movements so that they can perform a task according to the initial state of the system and depending on the existing a priori information, related to the work environment. Mobility allows the robot much greater flexibility in the execution of complex tasks. Unlike static robots, where the work area must be modified accordingly, mobile robots adapt themselves to the real world, without the need for any intervention [1].
The most well-known type of mobile robot is the automated guided vehicle (AGV -Automated Guided Vehicle). AGVs, widely used in industry for the transport of materials, can move by their own means, the route travelled by them being typically preprogrammed. Since such mobile vehicles operate in pre-programmed environments, they are inflexible and "fragile" in operation, any change in the route (for example, objects on the taxiway) can lead to a compromise of the entire mission [9].
The alternative to AGV robots is the construction of autonomous mobile robots in motion. Autonomy is translated by the ability of the mobile robot to move in the environment to perform different tasks (tasks), by the ability to adapt to changes in the environment, to learn from experience and to modify its behaviour accordingly (mode to act). Also, autonomy presupposes the ability to build internal representations of the surrounding world that can be used for decision-making processes (for example, for navigation).
The four fundamental components of a mobile robot are: the mechanical structure; sensory system; management system; the energy source. Mechanical structure it is designed in such a way as to ensure both the specific movement function and the achievement of the objectives established by the mobile robot's destination [2]. The sensory system can ensure both the location of the robot in the environment in which it evolves, as well as its security. These functions allow the structuring of the sensory system in the localization and security subsystems. The driving system establishes the commands necessary to carry out the movements and activate the related devices, in accordance with the proposed objective. The complexity of this module can be variable, in close correlation with the degree of autonomy and intelligence that characterizes the robot, ranging from a single programmable automaton to hierarchical multiprocessor structures [2].
Four types of mechanical structures can be highlighted, depending on the way in which the movement of the robot is obtained (motility), as follows: structure with wheels; crawler structure; grazing structure; winding structure. The motricity function of mobile robots can be provided with electric, thermal or hydraulic motors, electricity being the most commonly used [10].

MOBILE ROBOT DESIGN
The hardware of the spider robot is consisted of two major parts, the electrical parts and the robot body panels. The spider body contain the main body and the legs. The block diagram of the mobile robot is presented in Figure 1.
ESP 32 development board is a 2.4 GHz Wi-Fi and Bluetooth chip designed with TSMC's ultra-low-power 40 nm technology. This chip is designed to achieve the best RF power and performance, demonstrating robustness, versatility and reliability in a wide variety of applications (Figure 2). To connect the ESP 32 module to PC we use a micro USB cable. Power supply for the board as well as the communication interface between a computer and the ESP32 module.  Servo motor SG 90, with 180 degree opening. An actuator contains 3 output wires: positive, negative and control wire. The actuator is controlled by sending a pulse width modulated (PWM) signal through the control wire. A pulse is sent every 20 milliseconds. The width of the pulses determines the position of the shaft. For example, a 1ms pulse will move the shaft counterclockwise to -90 degrees, a 1.5ms pulse will move the shaft to the neutral position which is 0 degrees and a 2ms pulse will move the shaft clockwise at +90 degrees (Figure 4). It was observed that the total mass of the system approaches the maximum limit supported by the engines. In addition, the leg mechanism used favors high energy consumption due to the fact that the leg motors on the ground must permanently support part of the robot's gravity. Based on these considerations, an attempt was made to minimize the resistant torque on the support motors, resistant torque due to the robot's weight. Thus, the leg structure from Figure 5 was chosen. So, a leg structure with two driving kinematic couplings is used, i.e. two actuation motors for each leg, and one actuator for connection to the robot body. The mechanism used is in a closed loop, more precisely parallelogram. This mechanism has the advantage that elemental EF remains permanently perpendicular to the support plane ( Figure 5).
To create the actuation system, the angles of the servomotors were calculated according to the PWM signal applied to them in order to achieve the rotation movements desired by each individual motor. In a first phase, the PWM signal that we have to apply to the servomotors for 0 degrees and 180 degrees was checked, in order not to damage the servomotors. After measuring the PWM signal, the following values were found (Table 1): The conversion of the angle value from degrees to PWM signal was done as follows: considering that the PWM signal does not start from the digit 0, to find the signal assigned to the middle, respectively 90 degrees, proceed as follows: the PWM signal for 90 degrees will be denoted by X, so X = 125+(575-125)/2=125+450/2=125+225=350. According to this relationship, the rotation angles for servomotors were determined, calculated in PWM signal, according to table 2:

HARDWARE ROBOT IMPLEMENTATION
When creating the subassemblies of the robot's components, 2 mm thick plexiglass was used, the parts being dimensioned in the AutoCad application, in order to cut them to dimensions consistent with the size of the servomotors.
After finding the angles in the PWM signal, the leg movements can be configured from the command line, according to the set PWM (channel, on, off) function.
The PCA9685 module board was powered with a 3A USB power supply and the servomotors were connected to ports: 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14. The 12 servomotors were mounted 3 on each leg. One motor drives the front-back leg and the other 2 motors drive one arm segment each. The motors were pre-calibrated at 90 degrees, to have freedom of movement in both directions towards 0 and 180 degrees respectively.
Given that the motors will be powered at 5V voltage, according to the technical specifications they will operate at a current of 0.2A, which determined the use of a 3A charger. The electrical connection diagram is presented in Figure 6.

CONCLUSIONS
The robot presented in the paper is the exclusive creation of a team of students from the 4th year of the Automation and Applied Informatics specialization -Part-time Education section, within the project of the Robot Driving Systems discipline, under the coordination of a teaching staff.
During the realization of the project, difficulties were encountered regarding the movement of the robot structure due to the weight of the legs (the mechanical structure plus the servomotors related to the segments). The absorbed current being very high, the robot required an adequate source that was difficult to procure.
A way to improve the project is the use of engines with lower weight and superior performance than those used now, as well as ensuring an adequate power source. Also, a sensory system can be attached to interact with the environment in which it will carry out its activity.
A possible field of application of these robots is the internal inspection of pipelines transporting petroleum products. The advantage of the legs is the provision of an active suspension, which allows the robot's trajectory to be decoupled from the trajectories of the final extremities of the legs. Under these conditions, a video camera attached to the robot's body can be kept in a horizontal position, convenient for the user, even if the robot is traveling on an inclined area. Another application can be an inspection task on an offshore gas platform.