## 3 Results
### Electrical Circuit and Control  
In robotics, it is very difficult to reduce the wiring on a robot arm to provide it with more mobility. On the other hand, information processing requires reduced time to provide a quick response. By the specifications of the ESP microcontroller, information processing presents robust characteristics in terms of processing, reliability, and communication protocol; therefore, a main ESP32 is used, which establishes PC (User Interface--MatLab) UART communication via a USB to TTL converter. The main ESP32 also establishes wireless communication using the ESP NOW protocol between the six ESPs on each axis of the robotic arm. Figure 8 shows the connection scheme between ESP32 and PC. Figure 9 shows the electrical connection between the ESP32 of each axis, encoder, analogue-digital converter (ADS1115), operational amplifier and the stepper motor drive (TIC 500). The connections are established through the terminal designated as \"J1, J2 and J3\". The J1 terminal with six terminals receives the power supply for the PCB of the respective axis, the motor drive (TIC 500) and has the power supply for the next axis. The four-terminal J2 terminal establishes the electrical connection (5V for ESP32 and encoder) and UART communication between the ESP32 of the current axis and the motor drive circuit (TIC 500). Finally, terminal J3, also four-terminal, establishes the electrical connection (5V) and signals (A+ and B+) from the encoder and the ESP32. To interconnect the circuit components of  
Figure 8: Diagram and typology of communication between ESP32 and PC. Figure 9: Connection diagram between devices of each axis. Figure 9 and minimize the area, a printed circuit board (PCB) was developed and printed, as shown in Figure 10.  
For the control and positioning of a certain desired angle with the stepper motor, a control via a ramp with different speed levels (number of pulses) is applied to the motor. The number of pulses to be applied to the stepper motor depends on some parameters such as error in degrees and the desired speed. Figure 11 plots the number of pulses ramp applied as a function of the desired parameters. The control ramp is used because the action and reaction time is not immediate, i.e., the motor never stops at the desired position. Once in motion, the motor does not immediately stop due to the inertia caused by the angular velocity. The inertia tends to be greater, the higher the speed. This technique serves to minimize the error in positioning the motor by adjusting the parameters to do so. Figure 10: (**a**) PCB developed and printed: top view; (**b**) PCB designed and printed: bottom view; (**c**) PCB designed with soldered components: top view; (**d**) PCB designed with soldered components: bottom view. Its parameters are:  
A--Default minimum error [\({}^{\circ}\)];  
B--Minimum error for constant minimum speed [\({}^{\circ}\)];  
C--Maximum error before approach [\({}^{\circ}\)];  
D--Minimum approach speed pre-set [PPS];  
E--Maximum approach speed pre-set [PPS];  
F--Speed of movement away from approach [PPS];  
K--Maximum error [\({}^{\circ}\)]. Equations of the tangent line:  
\[\text{K}=2^{\text{T}},\text{ T is type of error }(1-\text{simple error},\text{ }2-\text{quadratic error}) \tag{25}\]  
\[\text{C}=(1+\text{ }\%\text{ normal velocity})^{\text{T}} \tag{26}\]  
\[\text{m}=\frac{\text{E}-\text{D}}{\text{K}-\text{B}} \tag{27}\]  
\[\text{E}-\text{D}\text{ }=\text{m}\cdot(\text{K}-\text{B}) \tag{28}\]  
\[\text{E}-\text{D}\text{ }=\frac{\text{E}-\text{D}}{\text{K}-\text{B}}\cdot(\text{K}- \text{B}) \tag{29}\]  
\[\text{Y}=\text{m}\cdot\text{x}+\text{b}=\frac{\text{E}-\text{D}}{\text{K}- \text{B}}\cdot\text{Erro}-\text{B}\frac{\text{E}-\text{D}}{\text{K}-\text{B }}+\text{D} \tag{30}\]  
Y is the number of pulses applied to the motor and is given in Equation (31) as:  
\[\text{Y}=\left\{