**4. Locomotion**

The locomotion of this hexapod can be analyzed in terms a simplified model (Figure 7), a biped robot with absolute stability, by regarding the left and right legs of the biped version as the legs of the upper and lower deck of the hexapod, respectively. Following this, the locomotion of the robot can be characterized by the motion of its COG (Center of Gravity).

**Figure 7.** A simplified model of the robot: (**a**) Initial configuration and (**b**) motion of the center of gravity Projection (COG).

The cranks of the left and right legs will keep apart by 180◦ during rotation, and Figure 8 illustrates how the motion of the COG relates to the foot trajectory where (x,y), (x*<sup>g</sup>*, *yg*), *Ls*, *Hs*, and *Mg* stand for the foot trajectory, the motion of the COG, the step size, the step height, and the fluctuated amplitude, respectively.

**Figure 8.** (**a**) Foot trajectory. (**b**) Motion of COG.

The robot is initially at rest with one foot standing at point A, while another foot stands at point B. The coordinates of point A are denoted as (*xs*, *ys*), which is associated with the crank angle θ*<sup>s</sup>*, while the crank angle of point B is 180◦ apart from θ*<sup>s</sup>*, i.e., θ*s* + π. Hence, point A can be obtained by determining the crank angle θ*<sup>s</sup>*, where the height of point A is equal to the height of point B, using Equations (1)–(16). Following, the step size *Ls*, step height *Hs*, and fluctuated amplitude *Mg*, are calculated and listed in Table 2.


**Table 2.** Characteristics of foot trajectories related to four sets of design data.

As the foot engages on point A, it pushes the robot forward, as well as upward. Hence, by mirroring the part of foot trajectory ABC, with respect to the horizontal and vertical axes, the locus of the COG is derived, yielding the following equations:

$$\mathbf{x}\_{\%}(\theta) = n\mathbf{L}\_{\text{s}} + \mathbf{x}\_{\text{s}} - \mathbf{x}(\theta - n\pi) \tag{17}$$

$$y\_{\mathcal{S}}(\theta) = y\_{\mathcal{s}} - y(\theta - n\pi) \tag{18}$$

$$n = \left[\frac{\theta - \theta\_s}{\pi}\right] \tag{19}$$

where, the bracket [ ] yields the maximum integer, no greater than the value it contains.

The locomotion of the robot, i.e., rhythmically alternating one foot with another, can be well characterized by the locus of its COG, using Equations (17)–(19). The loci of the COG pertaining to four di fferent cases are as shown in Figures 9–12.

**Figure 12.** Locus of center of gravity for Case 4.

In Figure 9, the locus manifests that the robot will wobble significantly, while moving. This adverse effect arises from the fact that the foot trajectory, generated by the TJL in Case 1, exhibits large obliqueness. In an e ffort to improve this situation, the inclination of the orbit was reduced, causing a side e ffect on the actual step size, i.e., an increase by 1.5 times (Figures 9 and 10). The maximum step sizes in Cases 1 and 2 (Table 1) are almost the same and the respective orbits (Figure 6a) are similar. Evidently, the actual step size is not only determined by the orbit itself, but also by the points where the feet meet the ground, i.e., point A and point B (Figure 8).

Moreover, the robot can change its azimuth by a swivel mechanism, located between the upper and bottom deck. In order to avoid mechanical collision, the swivel motor is limited to rotate within ±15◦. However, the robot is still able to manage turns greater than ±15◦ through a sequence of detailed maneuvers of its swivel and legs. An example is illustrated in Figure 13. Considering that the body and output shaft of the swivel motor are connected to the bottom and upper deck, respectively, the swivel motor has to reverse its output shaft, depending on which set of legs is standing on the ground, as the robot changes its azimuth. In Figure 13b, the swivel motor turns clockwise, to swing the upper deck in the same direction, while the legs of the bottom deck stand statically on the ground. In Figure 13c, the swivel motor turns counterclockwise to swing the bottom deck in the opposite direction, i.e., clockwise, when the legs of the upper deck stand statically on the ground.

**Figure 13.** The robot changes its azimuth through a series of motions where the legs of the bottom deck and the upper deck are labeled as 1 and 2, respectively, while the red circles stand for the legs standing statically on the ground. (**a**) Initial posture. (**b**) The upper deck suspends its legs and makes a swing 15◦ clockwise, while the legs of the bottom deck stay on the ground. (**c**) The bottom deck suspends its legs and makes a swing 30◦ clockwise, while the legs of the upper deck stay on the ground. (**d**) The upper deck suspends its legs and makes a swing 15◦ clockwise, while the legs of the bottom deck stand on the ground.

#### **5. Mechatronics of the Control System**

Following the analysis and construction of the mechanism, the mechatronics of the control system (Figure 14), consisting of a microcontroller, drivers, sensors, and motors with gear trains, was built.

**Figure 14.** Block diagram of mechatronic system.

This part mainly controls the orientation of the swivel and the motions of the TJLs, with a phase of 180◦ between the two sets of cranks. The Arduino was chosen as the microcontroller for this project. Since the first Arduino [27] was introduced in 2005, it has become one of the most popular microcontrollers used by engineers and even large corporations. The appealing features of Arduino are mostly its openness and ease-of-use. It is worth mentioning that the programming of an embedded system is done according to cross-development principles, so that the code can run on a target boar, di fferent from the one where the code was built. The Arduino provides an integrated development environment (IDE) for users to edit, debug, and compile their application programs on a personal computer and then upload them to the Arduino board for execution.

In Figure 15, the crank of the TJL is attached through four metal blades, evenly partitioning the circumference into four quarters. The proximity sensor, CHIIB LJ18A3-10-Z/BY, is used to detect four phases of the crank, based on which the Arduino is able to keep the two sets of cranks apart, at 180◦, during operation. Regarding the control of the swivel (Figure 16), specific care needs to be taken to avoid mechanical collision. First, one system, consisting of a proximity sensor, CHIIB LJ12A3-4-Z/BY, and three metal blades, is installed to receive feedback on the azimuth of the swivel. Second, another system, using two limited switches as a safety guard to assure that the range of operation is maintained, is installed. When the swivel reaches its maximum range, it will push the leverage of the limited switch, so as to cut o ff the power of the swivel motor immediately. Without the safety guard system, the catastrophe of a mechanical collision is inevitable in developing the application programs. Regarding the DC motors, there are two motors with specifications of 12 V, 2 A, 35 W, 30 rpm, and 25.47 kg-cm, used for the TJLs and one motor with specifications of 12 V, 2 A, 35 W, 10 rpm, and 76.4 kg-cm, used for the swivel. The drivers are all in typical H-bridge with specifications of 12–36 V, 10 A, and 120 W.

**Figure 15.** Sensor system to detect the phases of the crank.

**Figure 16.** Sensor system to detect the azimuth of the swivel and the safety guard system.

In this project, Bluetooth (BT) was used to establish wireless communication between the computer and the Arduino. Bluetooth is a wireless technology standard, IEEE 802.15.1, for exchanging data between fixed and mobile devices over short distances, most often within 10 m, using short-wavelength UHF (Ultra High Frequency) radio waves, in the industrial, scientific and medical radio bands, from 2.400 to 2.485 GHz, and in personal networks.

AT (Attention), commands are instructions used to control a modem. Every command line starts with "AT" or "at," which is why modem commands are called AT commands. Some AT commands used to configure the BTs and a portion of Arduino program, related to the wireless communication, are provided in Table 3. The BTs need to be set up before communication. First, the KEY-pin is set to high, before powering up the BT. As the power is turned on, the BT enters a setting mode, where its LED blinks with a period of four seconds, i.e., light on for two seconds and light off for two seconds. Then, AT commands are used to configure the baud rate, parity, stop bit, password, master/slave, binding address, etc. Following this, the power is turned off and the KEY-pin is set to low. As the power is turned on again, the BTs enter a standby mode, where they blink every second, in an attempt to pair up. At successful pairing up, both BTs ge<sup>t</sup> into the communication mode, where they blink twice for two seconds and light off for two seconds. Upon completion of the mechatronic control system, programs were developed, where the Arduino side mainly awaits the commands from the computer and keeps two sets of cranks apart at 180◦ during operation, while the computer side sends wireless commands to the Arduino. Since the legged motion has been realized by the mechanism, there is no need to develop a sophisticated algorithm in Arduino.


In Figure 17, a sequence of snapshots of the hexapod robot, as tested on site, is illustrated. The appealing feature of this robot is that it is reliable and robust. Even if it runs out of battery or an electronics failure occurs, it can still stand because the tripod gaits are generated by the mechanism, instead of the computer.

**Figure 17.** Snapshots of the hexapod robot in motion.

#### **6. Comparison to Existing Hexapods**

For the sake of comparison, an overview of existing hexapod robots is conducted in this section. Since the first hexapod robot with electric drivers and a computer-controller [28] was built in 1972, a variety of hexapod robots have been constructed according to varying technologies and design principles. Several hexapod robots limited to 14 kg at maximum are listed in Table 4.


**Table 4.** A variety of hexapod robots.

1 NA: not available.

Biobot [29], inspired to the cockroach, was a hexapod with a grea<sup>t</sup> speed and agility. Hamlet [30] was built to study force and position control on uneven terrain. RHex [31], designed in mechanical simplicity and having only six actuators, can achieve fast and robust forward locomotion. Sprawlita [32] was based on functional principles derived from biomechanical studies of the cockroach to achieve a fast run. Genghis [33] presented an incremental method for building robot control systems analogous to evolution of the organism, i.e., each one being a strict augmentation of the previous one, which control a six legged walking machine. Bill-Ant-p [34], based on ants' behavior, was developed and consisted of 18 degrees of freedom for locomotion, i.e., each leg with three actuators and one force-sensing foot. Gregor I [35] is also a bio-inspired hexapod where the locomotion control is based on the CPG and the core of its control architecture is the Cellular-Nonlinear-Network CPG chip. RiSE [36] is a hexapod robot which is able to climb on a variety of vertical surfaces. It employs arrays of miniature spines to catch on surface asperities.

The hexapod robot of this article, named Hexapod-II, is an improved version of the Hexapod-I [37]. The di fference between Hexapod-I and Hexapod-II lies in their biomimetic legs. The former uses four-bar linkages, while the latter uses the TJLs. The four-bar linkage can only generate a circular orbit, which leads the hexapod robot to move in a way with a larger fluctuation (Figure 18) because its step height is always one half of its step size, as two tripod gaits are alternated with a phase lag of 180◦. In contrast, the TJL generates an ellipse-like trajectory which possesses a transversal axis longer than the lateral axis, so that it can achieve energy e fficient walking, as compared to the circular orbit generated by the four-bar linkage.

**Figure 18.** Loci of center of gravity: Hexapod-I versus Hexapod-II.

Note that the cost of a robot is generally proportional to the number of actuators. Therefore, the cost can be roughly estimated by counting the number of actuators. Taking a glimpse at Table 4, the numbers of actuators used by other hexapods are all much higher than the number of actuators used by our robots, i.e., Hexapod-I and Hexapod-II. This is due to the novelty of our approach, which uses

the mechanical mechanism rather than electronic circuits or computers to act as the CPG in achieving the locomotion.
