*4.1. Construction of a Bipedal Robot*

The construction of the robot consists of three main parts.

**The robot frame** is made up of eleven parts and is divided into two floors. The first floor is intended for energy sources and is closed from above and below. The second floor is for the robot's control interface and is open at the top. For this reason, simple handling of the interface is possible without the need to disassemble the frame. Each floor consists of two parts that are connected by a detachable joint. After connecting the two floors, two components were attached to the front and back of the upper floor to hold the two MEMS systems. In the space on the first floor, there is a part that allows the robot to sit without support.

**The robot's legs** are made up of twelve parts, five of which are unique. The two parts are used to secure the servos together to create three degrees of freedom for the 3R and 4L arms. The connection of these three motors simultaneously creates arms 1L, 1R, 2L and 2R. The rest of the arms are structurally very similar. Each of them is composed of two parts connected by a detachable joint.

**The effectors** of the robot are made of one part, the same for the left and right effector. The decision, to model the effector as a single part instead of several detachable pieces, was justified by the fact that the entire effector fits within the scope of the printer and thus eliminates the possibility of the effector falling apart under pressure at the point of a potential joint (Figure 13).

**Figure 13.** Final shape of the effector.

#### *4.2. Control Hardware*

An Arduino Mega 2560 Rev3 device [23] was chosen to control the operation of the bipedal robot. This device has 14 PWM channels and thus can control all joints of the robot. The advantage of the Mega 2560 Rev3 model compared to other models is mainly a significantly larger number of I/O pins and PWM channels. In general, Arduino products are considered suitable for prototyping systems due to the low price, the large number of hardware accessories, and especially the open and freely distributable hardware architecture. To ensure simple remote control, the control interface was supplemented with Raspberry Pi Zero W [24]. The advantage of this device is the relatively large computing capacity and thus the extensive possibilities of expanding control from the current state to a robust system. Very small dimensions and low weight are also a big advantage of the device.

The communication linkage between the Raspberry Pi Zero W and the Arduino Mega 2560 Rev3 is possible using the I2C link, as both components contain the necessary bus. There are two positions in communication: master and slave, while I2C also supports multi-master mode. In this case, the Arduino microcontroller was chosen as the master.

The simulation model contains a measuring device for the orientation of a material object in space (Internal Measurement Unit—IMU), which in our case detects the translational movement of the robot in three axes. This sensory device is standard in stability control for biped and other mobile robots and forms the basis of the system's feedback. In this case, it is used as a sensor to detect the fall of the robot, when the robot terminates the ongoing process prematurely. In the physical model, this block is represented by the MEMS system Bosch BNO055, which contains the three mentioned sensors and its own microcontroller. The device has the ability to send output data to the master device in the form of quaternions which are normally used in robotics when calculating direct and indirect kinematic tasks. The BNO55 was calibrated in the automatic NDoF FMC mode [14,25].

Due to the fact that the mobile robot carries the power source directly on its structure, a solution was proposed that is ensured by a source with the smallest possible weight for the longest possible operating time. Since the energy sources are structurally located on the first floor of the robot frame, it was necessary that they be rechargeable, and recharging was possible without the need to disassemble the frame. Because the selected servomotors

have a different working voltage than the Arduino and Raspberry devices, the decision to divide the robot power supply into two parts was made. A possible solution is to connect a voltage stabilizer to 6 V, but in this case the servomotors overheat. Therefore, the first power source will power all the servo motors and the second power source will power the rest of the control hardware.

Based on the analysis of the available options, the BH Power 2S 6000 mAh Li-po battery was chosen to power the servomotors. In order to power the rest of the control interface, it was necessary to ensure the power supply of the Arduino Mega device, through which the remaining devices will also be powered. The use of an external battery for smartphones appeared to be the simplest solution from the point of view of recharging, dimensions, and weight, and for this reason the AVACOM PWRB-8001K external battery was chosen.

#### **5. Solution Testing and Discussion**

Testing of the proposed solution was divided into two parts. In the first stage, all parameters of the robot affecting walking were measured and their deviation from the simulation model was calculated. Each property was measured five times and then the average value was calculated. The results of the first part of the testing process are listed in Table 6.


**Table 6.** Results of testing the dimensions of the biped robot structure.

From the measurement results of the first part, certain differences between the physical and simulation models can be observed. The weight difference is attributed to neglecting the weights of the cabling, different fillings of the plastic parts, material inhomogeneity of the printed parts and also inaccurate weight data of the used electronic parts.

The differences between the measured and the original values of the L1, L2 and L5 lengths were expected and are attributed to the replacement of the servo motor carriers. The original method designed in a three-dimensional model consisted of a detachable joint between a printed servo motor carrier and the wall which with the servo motor was supposed to rotate. In practice, the great flexibility of the carrier, which stood away from the given wall, was manifested, which was caused by the weight of the entire robot. This caused the bending of the shoulders, which led to deviations in the positions of the controlled joints. The chosen modification consisted of replacing the printed carrier with a standardized one, which was attached to the wall with self-tapping steel screws. These percentage deviations are large, but the reduction of the distances between the centers of the coordinate axes in these joints is desired. The deviations between the lengths of L4 and L5 are negligible and are attributed to either measurement error or plastic extensibility.

The reduction of the step width in the starting position can be attributed to the resulting deviations in the parameters L1, L2 and L5. The reason is the different starting point of the measurement of this distance, which was not possible to implement in the physical model. Therefore, a new frame height was derived from the simulation model and compared with the measured value. The resulting deviation is largely attributed to the resulting deviations between the lengths of L6, L3, L4 and L1.

All the differences identified in this phase of testing can be involved in the next phases of the spiral model of the engineering design of mechatronic systems in order to achieve an ideal overlap between the design, simulation and final implementation of the solution.

The second part of the testing was focused on monitoring of stability of the robot at different step lengths. The measurement in which the robot passed all eight steps from the generated trajectory was considered successful. Five measurements were taken at each step length. The robot walked on a horizontal concrete pad in a closed room. The robot walked independently without physical contact with another object. A successful step is considered the one after which the walking cycle is completed without falling. The beginning of the measurement of all cycles was in phase BAC 3. The results of the second part of the test experiments are shown in Table 7.


**Table 7.** Functionality testing results of a bipedal robot.

From the test results it is clearly evident that the first three steps are critical, after which the gait is stabilized. The test experiments show that the robot is able to walk stably with steps up to 12.5 cm long. The number of all measurements during the second phase of testing was 90. The measurements took place without interference and external influences. It is necessary to emphasize that this testing stage served for verification of control system design proposal. The correctness of the intended idea in defined form was confirmed, but at the same time, it is necessary to declare that the designed solution is not ready for independent continuous infinite walking yet, except for some stable steps. The constructed and tested prototype of the two-legged robot is shown in Figure 14.

**Figure 14.** A tested prototype of bipedal robot MaRoŠ (**a**) construction parts; (**b**) partial construction; (**c**) final version.

#### **6. Conclusions**

The topic of the development of humanoid robots is very extensive. Several possible approaches to the way of controlling bipedal robots in order to ensure movement as similar as possible to human walking have been published. This article is focused on one of the possible methods using the analysis of real human walking. The principle of model-based design is used, while the bio-inspired design is based on the analysis of the movements of individual parts of the human body while walking. The control system is designed based on a combination of passive and dynamic walking with a controlled, linear inverted pendulum model. Validation of the designed model using the Matlab simulation tool confirmed the feasibility of the design. The result of this article is the finding that the proposed concept can be developed further, after fine-tuning the details, as one of the real options for the design of walking humanoid robots. This statement is based on the course and results of the final experiments with the physically constructed prototype of the bipedal robot MaRoŠ. The development of the prototyping solution is constantly ongoing, inspired by the spiral model of software product development, and the goal is to completely reconcile the simulation and physical model of the robot, together with the optimization of energy use in the mechatronic subsystems of the robot.

**Author Contributions:** Conceptualization, D.P. and M.J.; methodology, D.P., M.J. and B.J.; software, D.P., M.J. and B.J.; validation, D.P., M.J. and Z.C.; formal analysis, D.P. and Z. ˇ C.; resources, M.J., B.J., ˇ D.P. and Z.C.; data curation, D.P.; writing—original draft preparation, D.P. and M.J.; writing—review ˇ and editing, M.J., D.P. and B.J.; visualization, D.P. and M.J.; supervision, M.J.; funding acquisition, M.J., B.J. and Z.C. All authors have read and agreed to the published version of the manuscript. ˇ

**Funding:** This research was funded by VEGA agency, grant number 1/0176/22 "Proactive control of hybrid production systems using simulation-based digital twin".

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.
