A Comprehensive Study on a Hexapod Bionic Robot Controlled by Arduino and Voice Technology

The evolution of automation, computer science, artificial intelligence, and sensor technologies has opened new frontiers in robotics. Guided by principles from bionics, researchers are increasingly focusing on studying organisms from nature that exhibit exceptional coordination, control, and locomotion capabilities. Among these, multi-legged insects serve as a profound inspiration. The bionic robot inspired by these creatures, particularly hexapod robots, stands as a quintessential example of this research. Compared to their wheeled or tracked counterparts, legged robots possess unique advantages. They demonstrate superior stability, lower energy consumption on irregular and rugged terrains, and a remarkable ability to adapt to complex, unstructured environments. Concurrently, the field of human-machine interaction is steadily progressing towards more natural and intuitive modalities, with voice technology being a key trend. As the application scope of robots expands into these non-structured environments, the design of robust and versatile control systems becomes paramount.

This research is grounded in the study of multi-legged insect bionics. By thoroughly examining their locomotion methods, systemic organization, and control paradigms, and integrating speaker-independent voice recognition technology, we have designed and implemented a multi-functional control system for a bionic robot. The system allows for real-time control of the robot’s actions through voice commands, offering a user-friendly and natural interaction mode.

The core of our bionic robot control system is built around the open-source, flexible Arduino platform. The primary controller is an Arduino Mega 2560 board, chosen for its extensive I/O capabilities and multiple hardware serial ports. The robot’s mechanical movement is driven by eighteen servo motors, one for each leg joint. Coordinating these many servos requires a secondary controller; we employ a dedicated 20-channel servo control board with an ARM core processor. This board generates stable PWM signals and can store pre-programmed motion sequences. For voice interaction, we integrated a WEGASUN-M6 voice recognition module. This module supports both Chinese and English, offers noise suppression, and is capable of non-specific speaker recognition. Communication between these modules is established via serial interfaces (UART), with a unified baud rate of 9600 Baud/s. Additionally, the system incorporates Bluetooth connectivity for wireless control from a smartphone or computer, and an ultrasonic sensor for basic obstacle detection, enhancing the autonomy of the bionic robot.

Table 1: Primary Hardware Components of the Bionic Robot System
Component Model/Specification Primary Function
Main Controller Arduino Mega 2560 (ATmega2560) Central processing, decision-making, and module coordination.
Servo Controller 20-channel PWM Servo Control Board (ARM core) Generates synchronized PWM signals for up to 32 servos; stores motion sequences.
Voice Module WEGASUN-M6 Non-specific speaker voice recognition and command parsing.
Actuators 18x Standard RC Servo Motors (0-180°) Provide joint movements for the hexapod legs.
Wireless Module Bluetooth HC-05/06 Enables wireless serial communication for remote control.
Distance Sensor Ultrasonic Module (HC-SR04) Measures distance to obstacles for simple autonomous behaviors.

The exceptional adaptability of a hexapod bionic robot stems from its redundant, bio-inspired limb structure. Designing smooth and stable locomotion, such as walking or turning, requires precise coordination among all eighteen servos, making gait programming complex. We developed a graphical user interface (GUI) on a host PC to facilitate this process. This GUI allows us to programmatically set the target angle (from 0 to 180 degrees) and the movement speed (execution time) for each servo. A complete motion, or “frame,” is defined by a set of angles for all servos. A sequence of these frames constitutes an “action group,” such as a single step forward.

Several gaits are fundamental to hexapod locomotion, including the tripod gait, quadruped (wave) gait, and pentapod gait. The tripod gait is the most stable and efficient for rapid locomotion on relatively flat ground. In this gait, the six legs are divided into two groups of three, forming alternating triangular supports.

Let $L_i$ represent the leg index ($i = 1…6$). We define the support phase $S$ and swing phase $W$ for each leg over a gait cycle period $T$. For a standard forward tripod gait:

$$ \text{Group A (Support at t=0)} = \{L_1, L_4, L_5\} $$
$$ \text{Group B (Swing at t=0)} = \{L_2, L_3, L_6\} $$

The phase relationship between groups is 0.5 (180° out of phase). The duty factor $\beta$, the fraction of cycle time a leg is in the support phase, is typically 0.5 for a symmetrical tripod gait. The foot trajectory during the swing phase is crucial for smooth motion. A common model for the foot tip position $(x_f, y_f, z_f)$ in the leg’s coordinate frame during swing can be defined by a parabolic lift:

$$ x_f(t_s) = x_{\text{start}} + (x_{\text{end}} – x_{\text{start}}) \cdot \frac{t_s}{T_s} $$
$$ z_f(t_s) = h_{max} \cdot \sin(\pi \cdot \frac{t_s}{T_s}) $$
$$ \text{for } 0 \le t_s \le T_s $$

where $t_s$ is the time within the swing phase, $T_s$ is the total swing phase duration ($T_s = (1-\beta)T$), and $h_{max}$ is the maximum lift height. The support phase involves simpler leg retraction to propel the body. The coordination of these trajectories for all six legs is what the servo control board executes based on pre-calculated action groups.

Table 2: Servo Assignment and Basic Tripod Gait Phase
Leg Position Servo Indices (Body, Femur, Tibia) Tripod Group Initial Phase (0°)
Right Front (RF) 1, 2, 3 B Swing
Right Middle (RM) 4, 5, 6 A Support
Right Back (RB) 7, 8, 9 B Swing
Left Front (LF) 10, 11, 12 A Support
Left Middle (LM) 13, 14, 15 B Swing
Left Back (LB) 16, 17, 18 A Support

The voice control pipeline integrates seamlessly with this gait system. The WEGASUN-M6 module is configured via its proprietary software. We selected the “Wake-up Word Mode” to prevent accidental activations. A specific wake-up word (e.g., “Hello Robot”) must be spoken to activate the command recognition state. Following this, pre-defined command entries are recognized. For instance:

  • Command Entry: “Move forward” -> Internal Code: 001
  • Command Entry: “Turn left” -> Internal Code: 002

These settings are formatted and written to the module’s flash memory. When a valid command is recognized, the module sends the corresponding internal code to the Arduino Mega via a serial port (UART2). The Arduino’s firmware contains a lookup routine that maps this received code to a specific action group number stored on the servo control board.

Let $C_{voice}$ be the command code received from the voice module. The Arduino executes a mapping function $f(\cdot)$ to select the corresponding action group $G_{action}$:

$$ G_{action} = f(C_{voice}) $$

where, for example:
$$ f(001) = G_{forward},\quad f(002) = G_{turn\_left} $$

Subsequently, the Arduino sends a command via UART1 to the servo control board to execute the selected action group $G_{action}$. This decoupled architecture—where the main controller handles high-level decision-making and the dedicated servo controller manages low-level, timing-critical PWM generation—ensures smooth and responsive operation of the bionic robot.

Table 3: Voice Command Mapping and System Response
Spoken Command (After Wake-up) Module Code (C_voice) Arduino Mapped Action Servo Board Action Group
“Move forward” 001 Send ‘F’ to servo board Execute pre-stored tripod gait forward sequence.
“Turn left” 002 Send ‘L’ to servo board Execute pre-stored left-turn gait sequence.
“Stop” 003 Send ‘S’ to servo board Halt all servos at current positions.
“Go home” 004 Send ‘H’ to servo board Move all servos to a default “standing” position.

Beyond basic locomotion, the kinematic analysis of each leg is vital for advanced motion planning. Our bionic robot uses a three-degree-of-freedom (3-DOF) leg design typical for hexapods: one joint for rotation at the body (yaw), and two for the leg itself (femur and tibia pitch). The forward kinematics, determining the foot position $[x, y, z]^T$ relative to the body from joint angles $[\theta_1, \theta_2, \theta_3]^T$, can be derived using the Denavit-Hartenberg (D-H) convention. For a simplified model with link lengths $l_1$ (coxa), $l_2$ (femur), and $l_3$ (tibia):

$$ x = (l_2 \cos\theta_2 + l_3 \cos(\theta_2 + \theta_3)) \cos\theta_1 $$
$$ y = (l_2 \cos\theta_2 + l_3 \cos(\theta_2 + \theta_3)) \sin\theta_1 $$
$$ z = l_1 + l_2 \sin\theta_2 + l_3 \sin(\theta_2 + \theta_3) $$

These equations allow us to calculate the reachable workspace of each leg, which is essential for designing effective swing and support trajectories. The inverse kinematics, solving for joint angles given a desired foot position, is necessary for terrain adaptation. For our planar 2-link (femur-tibia) chain in the leg’s sagittal plane, the solutions for $\theta_2$ and $\theta_3$ can be found using the law of cosines. Let the desired foot projection in that plane be at $(r, z’)$, where $r = \sqrt{x^2 + y^2} – l_{cox}$ and $z’ = z – l_1$. Then:

$$ D = \frac{r^2 + z’^2 – l_2^2 – l_3^2}{2 l_2 l_3} $$
$$ \theta_3 = \text{atan2}(\pm\sqrt{1-D^2}, D) $$
$$ \theta_2 = \text{atan2}(z’, r) – \text{atan2}(l_3 \sin\theta_3, l_2 + l_3 \cos\theta_3) $$

The $\theta_1$ body joint angle is simply: $\theta_1 = \text{atan2}(y, x)$. This kinematic foundation, though computationally handled offline during gait design, informs the creation of the action groups that empower the bionic robot‘s movement.

Stability is the hallmark of a legged bionic robot. For slow, static walking gaits like the wave gait, we can analyze static stability by ensuring the robot’s center of mass (CoM) projection remains inside the convex polygon formed by the supporting feet—the support polygon. The Static Stability Margin (SSM) is a quantitative measure, defined as the shortest distance from the CoM projection to the boundary of the support polygon. For dynamic gaits like the tripod, the concept of the Longitudinal Stability Margin (LSM), the distance from the CoM projection to the front or rear boundary of the support polygon along the direction of motion, is more relevant. Our gait design prioritizes maintaining positive stability margins throughout the motion cycle. The robot’s low center of gravity and wide stance, inspired by its biological counterparts, inherently contribute to a large support polygon and robust stability.

Table 4: Gait Parameters and Characteristic Metrics
Gait Type Duty Factor (β) Leg Phase Offset Max. Support Legs Primary Use Case
Tripod 0.5 0.5 (180°) 3 Fast, efficient locomotion on flat terrain.
Wave (Quadruped) > 0.83 1/6 (60°) 5 Slow, highly stable motion over rough terrain.
Ripple > 0.66 1/3 (120°) 4 Compromise between speed and stability.

Experimentation with the fully integrated system confirmed its operational effectiveness. The voice control system demonstrated reliable recognition at distances up to 4-5 meters in a moderately quiet indoor environment. The wake-up word mode successfully minimized false triggers. The bionic robot executed tripod gait walking, turning in place, and transitioning to a standing pose seamlessly based on voice commands. The Bluetooth control mode provided an alternative, low-latency control channel, while the direct servo control via the host PC GUI remained invaluable for debugging and creating new motion sequences. The multi-modal control approach—voice, Bluetooth, and manual—enhanced the system’s robustness; if one channel failed, others could maintain operation.

In conclusion, this study presents the design, implementation, and validation of a sophisticated control system for a hexapod bionic robot. By leveraging the open-source Arduino ecosystem, a dedicated multi-channel servo controller, and a modern non-specific speaker voice recognition module, we have created a platform that is both capable and accessible. The system successfully integrates multiple control interfaces, with voice control offering a particularly natural and intuitive human-robot interaction method. The bionic robot exhibits stable locomotion using bio-inspired gaits, demonstrating the practical application of bionic principles in robotics. Future work will focus on integrating more advanced sensors (e.g., IMUs, cameras) to enable true autonomous navigation and terrain assessment, further pushing the capabilities of this versatile bionic robot platform. The kinematic and stability models developed provide a solid foundation for implementing adaptive gaits, where the robot can adjust its foot placement and body posture in real-time to tackle uneven surfaces, moving closer to the admirable adaptability observed in its biological inspirations.

Scroll to Top