A humanoid robot system design submitted to Guangdong University of Technology in June 2018 has drawn attention for its practical approach to balancing real-time control, onboard computation, software extensibility, and commercial affordability. The work, titled “The Design of Humanoid Robot System Based on Dual Controller and ROS Platform,” was completed by Li Buheng under the supervision of Associate Professor Du Yuxiao in the School of Automation. The research focuses on a humanoid robot architecture that combines an embedded industrial control board with a real-time microcontroller, and it places strong emphasis on modular hardware, deployable software, sensor integration, and a ROS-based development environment for future humanoid robot applications.
The humanoid robot is described as a highly intelligent and information-rich robotic platform with industrial, commercial, and military value. As global industrialization continues to develop, conventional industrial robots alone are seen as insufficient for emerging market demands. The humanoid robot has therefore attracted attention from research institutions and enterprises in many countries. Over more than thirty years of humanoid robot research, major breakthroughs have been made in hardware system architecture, upper-layer software design, and physical structure. The work notes that key humanoid robot technologies are still concentrated in developed countries, including Japan, the United States, Germany, and the United Kingdom, while domestic research started later but has developed rapidly and achieved significant progress.
At the same time, the research identifies a practical gap. Many humanoid robot prototypes remain concentrated in universities and research institutes, and they often feature complex control systems, high cost, low cutability, complicated actuators, and heavy mechanical structures. These characteristics make it difficult for enterprises to bring humanoid robot products to market efficiently. The design therefore responds to enterprise technical requirements by proposing a humanoid robot control scheme in which both hardware and software can be tailored. The final architecture selects a high-performance PC104 embedded industrial control board and a high-real-time STM32 series microcontroller as the humanoid robot hardware control framework. On this foundation, Ubuntu is deployed and the ROS secondary operating system is installed to create a humanoid robot software environment suitable for complex algorithmic tasks.
The humanoid robot collects sensor information to obtain state information and to provide a basis for later function development. The main research content includes the hardware design of the humanoid robot control system, the software environment, communication protocols, sensor acquisition, face tracking, simulation modeling, and system commissioning. The humanoid robot design is presented as a complete system-level effort rather than an isolated component study. It covers power supply, actuation, serial communication, attitude measurement, vision, printed circuit board integration, operating system deployment, ROS modeling, motion parameter tuning, and system testing.
1. Research Context and Market Demand
The humanoid robot research context is shaped by the need for machines that can perceive their surroundings, process information in real time, plan movements dynamically, and behave in a human-like manner. The humanoid robot is inherently multidisciplinary, drawing on control theory, mechanical structure, electronic circuits, computer software systems, materials, and humanoid bionics. A mature humanoid robot technology base can represent national strength in control and artificial intelligence, and related technologies can be applied across many industries. The work also connects the humanoid robot agenda with broader manufacturing modernization goals, including the “Made in China 2025” initiative, which was created to promote advanced manufacturing and strengthen national industrial capability.
Compared with industrial robots, the humanoid robot has broader application prospects in several respects. Many people expect robots to have human-like form and to perform human-like actions, so a humanoid robot structure can be more acceptable than an industrial robot that consists mainly of a mechanical arm. In terms of beneficiary groups, the humanoid robot can serve different age groups. Companies have developed humanoid robot products for children’s interaction, firefighting in high-risk environments, and intelligent elder care. In terms of technical difficulty, the humanoid robot has head, legs, hands, and torso characteristics, and each joint must move flexibly. This makes the humanoid robot control system more complex and technically demanding than a typical industrial robot control system. Research on humanoid robot behavior, intelligence, and flexibility therefore has long-term practical significance, and mature humanoid robot technologies can feed back into society, daily life, and industrial production.
The humanoid robot project is also shaped by enterprise requirements. The target product must enter the market with distinctive features and selling points. It should primarily address users aged 10 and above, with a height range of approximately 0.5 m to 1 m, and it should support multiple robot versions within that range. The humanoid robot hardware performance must support face recognition, speech recognition, intelligent assistant tasks, human-like walking, and complex actions. The development cycle should not be too long and should be completed within one year. Hardware and software should be modular for easy maintenance. These requirements directly influence the humanoid robot system architecture and the selection of controllers, sensors, actuators, and software tools.
| Requirement Area | Humanoid Robot Design Consideration | Resulting System Direction |
|---|---|---|
| Market positioning | The humanoid robot must be distinctive and suitable for commercial introduction | Modular hardware and software with practical cost control |
| Target users | The humanoid robot should serve users aged 10 and above and support 0.5 m to 1 m platforms | Scalable architecture and cutable design |
| Functional scope | The humanoid robot should support face recognition, speech recognition, intelligent assistant functions, walking, and complex actions | High-performance host controller plus real-time sensor controller |
| Development schedule | The humanoid robot project should be completed within one year | Use of existing open-source tools and modular design |
| Maintenance | The humanoid robot system should be easy to maintain | Object-oriented software abstraction and replaceable hardware modules |
2. Domestic and International Humanoid Robot Research Landscape
The humanoid robot research landscape includes several generations of platforms and control approaches. In the 1960s, Waseda University in Japan began research on lower-limb biped control for the humanoid robot. In the 1970s, the WAP-1 robot was developed, and three years later the Kato Laboratory began work on the WAP-2 series of humanoid walking robots. In the mid-to-late 1980s, the laboratory developed a humanoid robot using hydraulic drive and joint torque control. The WABIAN and WABIAN-RII humanoid robot platforms followed, adding more degrees of freedom. The stable motion of WABIAN-RII was based on an advanced whole-body coordinated motion control method. Its hardware resources included a Pentium M processor at 1.26 GHz, a PCI backplane, three HRP interface boards, a six-axis sensor receiver board, 16-channel D/A, 16-channel counters, a 16-channel PIO, and a QNX real-time operating system.
In the mid-to-late 1980s, Honda in Japan formulated a plan for indoor household humanoid robot development and introduced the first-generation ASIMO humanoid robot in 2003. Honda equipped ASIMO with different sensors according to indoor environment differences, enabling different gait control strategies in complex environments. The HRP humanoid robot project also produced prototype platforms after five years of intensive development. The HRP-2 humanoid robot used a DSP Board TMS320F2812 as its controller and sent PWM signals through a serial port to drive 17 servo motors.
In the United States, humanoid robot research has placed greater emphasis on artificial intelligence. Many American robots may not have a human-like form, but they exhibit high intelligence. In gait control, the United States has also studied bipedal walking with reduced structural complexity, achieving stable walking on complex surfaces. In artificial intelligence, research aims to give the humanoid robot human-like learning ability, so that it can rely on its own sensors rather than only pre-programming. The “Cog” platform is an artificial intelligence development platform whose “brain” consists of heterogeneous processors and is controlled and communicated through the Internet. The Atlas series, developed by the U.S. Defense Advanced Research Projects Agency and Boston Dynamics, represents another major humanoid robot direction. Atlas has reached its third generation and generally uses a hydraulic drive system. The humanoid robot carries multiple sensors for balance, and its head includes two vision systems, a laser rangefinder, and a stereo camera. Atlas can walk stably on complex ground and can close valves, open and close doors, and operate power supply equipment.
International humanoid robot competitions have also produced capable platforms. The NAO humanoid robot from Aldebaran Robotics is a prominent example. NAO includes an Intel processor, and its processing capability supports fast information processing, smooth motion completion, and quick response. NAO runs a customized operating system based on Android and supports programming in multiple mainstream languages such as Python and Java. Aldebaran Robotics also provides a graphical programming software system for NAO. The customized software system is NAOqi, which can be used to edit robot motions and control the robot camera. The NAO humanoid robot has 32 degrees of freedom, an inertial navigation unit for walking stability, ultrasonic sensors for obstacle avoidance, and four pressure sensors in the feet for gait algorithm research.
Domestic humanoid robot research began in 1991. In the humanoid robot field, domestic research has been positioned to provide major technical support for the economy and national information security. Universities and research institutes have been catching up rapidly with developed countries, and humanoid robot research results have been significant. In November 2000, the National University of Defense Technology in Changsha developed the first domestic humanoid robot, named Forerunner. The humanoid robot was 1.4 m tall, had 17 degrees of freedom, and completed motion control tasks such as turning in place, forward walking on flat ground, and left and right turning. In 2005, Beijing Institute of Technology developed the BHR-2 humanoid robot. BHR-2 included torque sensors, vision sensors, inclinometers, and encoders, enabling complex actions such as Tai Chi and broadsword performance. In 2012, the platform was upgraded with the BHR-4 humanoid robot.
In 2004, Harbin Institute of Technology developed a humanoid soccer robot. Its head and body were constructed from aluminum and steel, and the body included two high-performance processors and 17 degrees of freedom. A camera was installed in the head to observe opposing players on the soccer field. In 2006, the Institute of Automation of the Chinese Academy of Sciences studied the “Tongtong” and “Beigi” humanoid robot platforms. Tongtong could produce multiple facial expressions as an expression humanoid robot, while Beigi was characterized by its ability to draw. Tongtong’s expressions were realized using ten miniature servo motors inside the humanoid robot to control facial features and produce different actions. Beigi used computer vision and high-precision motion control for drawing. A camera inside Beigi’s eyes and high control precision in the hands supported the drawing function.
In 2016, a dance performance by hundreds of UBTECH Alpha 1S humanoid robot units attracted wide attention and reflected the application potential of humanoid robot products. Alpha 1S uses self-developed servos and an STM32 controller to drive the servos. Dedicated host software supports graphical programming of the humanoid robot. UBTECH has also released multiple products. The Alpha 2 humanoid robot is 438 mm tall, weighs 2.4 kg, uses an Exynos 5260 as the main controller, runs the Android operating system, uses 20 self-designed servos for various actions, recognizes faces intelligently, perceives sound location, and supports many human-robot interaction functions.
3. Control System Approaches Compared
Several typical humanoid robot control systems illustrate the trade-offs between centralized control, distributed control, and bus-based control. The WABIAN-RV humanoid robot from the Takanishi Laboratory at Waseda University is presented as an advanced platform with a height similar to a human and 43 degrees of freedom. More degrees of freedom can increase flexibility, but they also increase control difficulty. Waseda University used a whole-body coordinated motion control method in which the upper body performs large movements while the lower body cooperates to maintain balance. The control system is a master/slave architecture. The master controls the joints, and each joint has an actuator corresponding to it and communicating with the host. For gait control, the slave generates gait through a teaching method, and video signals are realized through a visual tracking module. The humanoid robot control method is centralized.
The Honda ASIMO humanoid robot has a height similar to a human child, approximately 1.20 m. Because it uses servo motors, it weighs 52 kg and has 26 degrees of freedom. ASIMO adopts advanced predictive motion control technology. With this gait control system, ASIMO can perform automatic obstacle avoidance, figure-eight walking, stair ascent and descent, and single-leg standing. The ASIMO control system mainly uses four powerful processors to meet different needs, including visual information acquisition, high-speed image processing, speech signal processing, and gait control planning. ASIMO is therefore a distributed architecture.
The THBIP-I humanoid robot from the Tsinghua University humanoid robot research group has 32 degrees of freedom. It carries gyro sensors, six-axis force/torque sensors, and position sensors, and its head contains image and speech acquisition systems. THBIP-I has achieved stable flat-ground walking, stair ascent and descent, Tai Chi, and many other complex actions. The humanoid robot consists of many interrelated subsystems that handle different tasks, including gait planning, human-robot interaction, and sensor information processing. To achieve fast and stable human-like walking, the control system must process subsystem tasks in real time and coordinate their work. THBIP-I uses a CAN bus communication protocol, making the system a bus-based control system.
The UBTECH Alpha 1S humanoid robot differs from the previously described platforms because it is driven by servos and uses centralized control with a relatively simple control system. The humanoid robot contains a controller based on an STM32 microcontroller, which is mainly responsible for servo control. The controller can connect to other PC devices through a serial port, and serial programming enables real-time motion control tasks. Comparative analysis shows that humanoid robot control systems have evolved through centralized control, distributed control, and fieldbus control. Centralized control is simple and convenient but places a heavy burden on the main controller and can introduce signal interference. Distributed control offers good real-time performance, while fieldbus control has strong openness, faster transmission, and better support for complex real-time control. The emergence of these three typical control systems also represents the development direction of humanoid robot control.
| Humanoid Robot Platform | Control Architecture Characteristic | Notable System Feature |
|---|---|---|
| WABIAN-RV humanoid robot | Centralized master/slave control | Whole-body coordinated motion and teaching-based gait generation |
| ASIMO humanoid robot | Distributed processing architecture | Multiple processors for vision, image processing, speech, and gait planning |
| THBIP-I humanoid robot | Bus-based control | CAN bus communication and multiple sensor subsystems |
| Alpha 1S humanoid robot | Centralized servo control | STM32-based servo control with serial programming |
The final platform referenced in the comparison is a recently emerging small humanoid robot that uses servos as drive components. Its most distinctive feature is the use of servos for actuation. However, many small humanoid robot platforms use centralized control, which cannot change gait in real time to adapt to the environment and therefore has notable disadvantages in adaptability and flexibility. If a humanoid robot control system with good performance and high cutability can be designed, it will have broader prospects. This observation directly supports the dual-controller and ROS-based humanoid robot design direction.
4. Overall Design Requirements for the Humanoid Robot
Before designing the overall humanoid robot system, the project must address the problems it faces and satisfy enterprise requirements. Detailed requirement analysis is therefore an important part of the work. The humanoid robot application scenario analysis yields several points. The humanoid robot must eventually enter the market and must differ from existing products with distinctive features and selling points. The humanoid robot should primarily target users aged 10 and above and should be available in a height range of approximately 0.5 m to 1 m, with multiple robot versions to meet the needs of lower age groups while remaining attractive to adults. Hardware and software should be cutable. The humanoid robot hardware performance must be able to complete intelligent tasks such as face recognition, speech recognition, and intelligent assistant functions. Most importantly, the humanoid robot should have a human-like form, walk like a human, and perform complex actions. This means the humanoid robot hardware performance must also be able to run complex algorithms. The humanoid robot system development cycle should not be too long and should be completed within one year. Hardware and software should be modular for later maintenance.
Functional analysis adds further requirements. The humanoid robot must detect its posture through necessary sensor circuits and collect posture information. It must have a drive system and select appropriate drive actuators according to the humanoid robot size. Its performance must satisfy complex graphical computation, which requires a powerful CPU. The development cycle must be short, so existing resources and open-source tools should be used to shorten hardware and software development time.
Other factors also matter. The humanoid robot controller is often placed in the chest, where space is limited, so hardware must not occupy too much space. The humanoid robot should be highly playable and should have many degrees of freedom and many joints. It must operate without any connecting cable and must use battery power. Power consumption must not be too high so that the humanoid robot can achieve long endurance and extended user operating time. The humanoid robot system must be highly reliable, and its components must be durable and impact-resistant. Cost performance must be as high as possible so that the product can have a larger market, and the final humanoid robot must not be priced too high.
5. Hardware Development Platform Selection
The humanoid robot must complete biped walking, voice command recognition, and image recognition tasks, so it requires a robust motion control system, precise perception capability, powerful processor performance, and low power consumption. The design of the humanoid robot control system therefore considers three main aspects. The drive system represents the humanoid robot joints and must realize flexible rotation and smooth action execution. The humanoid robot sensor perception system must collect information about the surrounding environment and feed sensor information back to the control system in real time. The humanoid robot control system must also collect and process sensor information in real time and drive the humanoid robot according to pre-designed control instructions. Hardware and software design must also consider future maintenance, upgrades, and portability, so the completed system should be easy to apply to other systems with high cross-platform capability.
The humanoid robot targets autonomy, adaptability, and interactivity. The platform must support biped walking, voice command recognition, and image recognition. The humanoid robot perception of the outside world must be fast and accurate, with high real-time performance and precision, to support posture adjustment. Hardware requirements are therefore high, interfaces must be rich enough to meet data transmission needs for external circuits, and an operating system is necessary for multitasking and complex control. As motion control algorithms continue to optimize, algorithm complexity and program code size will continue to increase, and complex algorithms cannot run on low-power microcontrollers alone. Considering cost performance and real-time performance, the humanoid robot uses a PC104 embedded control board and an STM32 microcontroller as a dual-controller hardware control architecture. The PC104 board is selected in a small form factor. The STM32 model is STM32F103RET6, referred to as STM32. Because the STM32 mainly collects sensor information and does not handle complex tasks, an F4-series or higher-performance microcontroller is not necessary. The F103 series is sufficient, and using fewer pins avoids resource excess and saves printed circuit board space.
The STM32 is responsible for real-time collection of sensor information so that the humanoid robot can perceive the external environment. It also acts as the servo control board and sends data to the PC104 board through a serial port. The PC104 obtains external information from the STM32, performs corresponding calculations, and enables the humanoid robot to respond and implement various functions. The PC104 is an embedded industrial control core board with high reliability and an integrated Atom 2600 dual-core processor. Its processor performance is superior to ARM processors and can handle complex algorithm computation and image processing tasks. This architecture balances processor performance, power consumption, and price, giving the humanoid robot hardware and software strong portability and cutability. For these reasons, the PC104 plus STM32 dual-controller architecture is selected as the humanoid robot control core.
6. Software Development Platform and Operating System Choice
The STM32 mainly collects sensor information and drives servos, so it requires high real-time performance and fast response. The STM32 board therefore does not run an operating system. It collects sensor and actuator information and communicates with the PC104 host through serial communication. The PC104 host control board must handle complex tasks with diverse functions, so a task scheduling system is needed. Porting an operating system to the host board makes hardware resource scheduling more convenient and supports subsequent function development. Several popular embedded operating systems are compared.
Windows CE, also known as Windows Embedded Compact, is a Microsoft embedded operating system product. It is the most open and upgradeable Windows variant and is mainly used in small electronic devices that require an operating system. Because it is a streamlined Windows 95 operating system, Windows CE has an excellent graphical user interface. Many software programs can be ported to Windows CE with only simple modifications. Windows CE can be selected for systems with strict cost control. Palm OS is an operating system developed by Palm for PDA products and occupied 90 percent of the PDA market. Its excellence and strong support for mobile devices make it an excellent mobile phone operating system, but its software development environment is not very friendly and lacks useful development tools. μC/OS and μC/OS-II are small operating systems developed specifically for embedded devices, written in C and assembly. With only 200 lines of assembly code, the system has low hardware dependence and high portability. μC/OS-II has a simple structure, complete functions, and high real-time performance, but it is not free software, and companies must purchase a license for system development. Linux is a Unix-like operating system with Unix advantages and supports multiple users, multiple tasks, and multiple processors. It inherits Unix’s network-centered design philosophy and is a highly stable operating system. Its kernel is highly customizable, with a minimum size of around 100 KB. Because Linux is Unix-like, it is largely compatible with most Unix system programs, making application development and porting more convenient. It is widely used in embedded hardware devices.
Embedded Linux has several major advantages beyond the basic functions of a general operating system. Its installability and removability are strong, and the system can be trimmed according to business requirements so that it occupies the least resources while retaining high openness and scalability. It offers fast real-time performance, which allows timely collection and processing of sensor information. It provides unified interfaces, and everything in Linux is treated as a file, offering convenient driver interfaces for various devices. It can provide graphical GUI support when needed, and it has strong network protocol support. It is highly stable and can operate for long periods without downtime. Its code can be highly solidified in system ROM. For these reasons, the PC104 runs Linux, specifically an Ubuntu distribution. In addition to Ubuntu, the humanoid robot requires many algorithms, and the open-source ROS robot operating system is deployed on Linux to make humanoid robot software and algorithm development more convenient.
ROS, the Robot Operating System, supports rapid humanoid robot development. ROS provides many development tools, including Rviz for building humanoid robot simulation models and Gazebo for simulation. ROS also provides tools and libraries for compiling, linking, and running code. ROS improves code reuse in robotics research, so programs written by others can be ported to another humanoid robot with minor modifications. ROS achieves this through a distributed process framework packaged in easily shared and released packages and function packages. All projects can be integrated with ROS basic tools. Considering ROS version and Ubuntu version compatibility, Ubuntu 12.04 LTS and ROS Indigo were selected as the most compatible combination during the research period.
| Software Environment | Role in the Humanoid Robot | Selection Outcome |
|---|---|---|
| STM32 firmware | Real-time sensor acquisition and servo communication | No operating system; direct real-time control |
| Ubuntu 12.04 LTS | Host operating system on the PC104 board | Provides Linux environment for complex tasks |
| ROS Indigo | Secondary robot operating system for software framework and simulation | Supports modular humanoid robot development |
| OpenCV 2.4.9 | Image processing and face tracking support | Compatible with the humanoid robot vision module |
7. Power Module Design
The humanoid robot requires a stable power supply and long endurance. The power circuit provides power for the entire hardware system, so the quality of the power module directly affects system stability. The system requires several voltage levels. The STM32 main chip requires 3.3 V, the gyroscope and accelerometer require 3.3 V, the servo regulated power supply requires 12 V, the TTL communication network requires 5 V, and the PC104 power supply requires 12 V.
The humanoid robot must operate without any connecting cable, so a rechargeable battery is required. Rechargeable batteries for electronic products mainly fall into three categories: nickel-cadmium, nickel-metal hydride, and lithium batteries. Considering price, environmental friendliness, battery size, and rechargeable cycle life, a rechargeable lithium battery meets the humanoid robot power design requirements. It is relatively small, has sufficient capacity, and offers good stability. The system therefore uses an 11.1 V/1800 mAh lithium battery. The power supply must also be small and reliable. The humanoid robot power management module uses the lithium battery input, which is filtered and then regulated. A 5 V stage uses an LM78M05 and LM7805 linear regulator discussion, while a 3.3 V stage uses an EZ1117 regulator. The system therefore requires 3 groups of operating voltages: 12 V, 5 V, and 3.3 V.
The 5 V power regulation module uses an LM7805 linear three-terminal regulator. It has overcurrent and overtemperature protection and can deliver a maximum current of 1 A with a heat sink. A surface-mount package is used to reduce printed circuit board size. The battery positive and negative terminals are connected at the input, and a fuse prevents excessive input current from damaging the board. Simple capacitor filtering uses the energy storage property of capacitors to slow voltage changes during charging and discharging, thereby stabilizing and filtering the voltage. The 3.3 V power regulation module uses the EZ1117 series, a high-performance positive voltage regulator with low dropout. EZ1117 provides online regulation against load and temperature changes, rated current low dropout, fast transient response, internal current limiting, and thermal shutdown protection. Its SOT-223 package saves board space. The 5 V input enters the device and the 3.3 V output is filtered with a bypass capacitor. A 3.3 V power indicator LED allows the module to be checked during testing.
| Humanoid Robot Module | Required Voltage | Power Design Note |
|---|---|---|
| STM32 main chip | 3.3 V | Regulated from the 5 V stage through EZ1117 |
| Gyroscope and accelerometer | 3.3 V | Low-voltage sensor supply |
| Servo regulated power supply | 12 V | Battery-level supply for servo actuation |
| TTL communication network | 5 V | Serial and interface circuit supply |
| PC104 board | 12 V | Host controller power input |
8. Servo Drive Module and MX-28T Selection
In the humanoid robot field, execution components are mainly selected from DC motors, stepper motors, and servos for motion control joints. The project requires 20 high-precision, high-torque, small-volume motors as humanoid robot motion joints. DC motor speed and torque are limited, and a reducer is needed, resulting in low control accuracy. If a stepper motor is selected as the execution joint, it can control angle, but a corresponding driver is required, which makes the humanoid robot too large. Considering these factors, a servo is selected as the humanoid robot execution component to meet the design requirements.
Many domestic servos have disadvantages such as low precision, low torque, and complex control methods, and they cannot meet the design requirements. The project therefore selects a foreign digital servo to facilitate control and quickly build the humanoid robot servo system. The Dynamixel series from ROBOTIS in Korea is a highly intelligent and integrated drive component. It mainly consists of a gear reducer, DC motor, and control chip. The control chip provides communication functions, so controlling the servo means transmitting data to the chip. The Dynamixel series includes AX-12A, AX-18, RX-24F, RX-28, RX-64, MX-28T/R, MX-64T/R, and MX-106R models. Considering cost, performance, and precision while meeting control requirements, the MX-28T servo is selected as the humanoid robot actuator.
The MX-28T servo weighs 72 g and measures 35.6 mm by 50.6 mm by 35.5 mm. Its gear ratio is 193:1. Operating voltage is 10 V, 12 V, or 14.8 V. Stall torque is 2.3 N·m, 2.5 N·m, or 3.1 N·m depending on voltage. Stall current is 1.3 A, 1.4 A, or 1.7 A. No-load speed is 50 RPM, 55 RPM, or 67 RPM. Minimum angle is 0.088 degrees times 4096, and the operating range is 360 degrees. Operating temperature is from -5 degrees Celsius to 85 degrees Celsius. The command packet is a digital signal, and communication uses half-duplex asynchronous serial communication. The physical connection is TTL multi-channel, and the ID range is 0 to 253 with 254 broadcast capability. Baud rate ranges from 8000 bps to 4.5 Mbps. Feedback includes position, temperature, load, voltage, and other values. The housing is plastic, and the gears are metal.
The MX-28T digital servo contains a microprocessor that receives and feeds back controller data packets. The servo RAM stores a control table. After parsing the table, the servo sends PWM signals to the motor to control it. The STM32 controls the servo by sending and receiving data to and from the internal processor. The servo manual specifies the communication protocol and the servo state parameter table stored in RAM and EEPROM. The STM32 servo controller only needs to send communication packets in the fixed format specified by the MX-28T manual to control the servo.
The MX-28T digital servos use a bus connection and communicate through a half-duplex asynchronous serial protocol. There are two packet types: an instruction packet and a status packet. The instruction packet consists of a fixed header, the servo ID number, the packet length, the instruction, parameters, and a checksum. The servo ID can support up to 254 servos and also supports broadcast mode. The packet length adds 2 to the parameter count. The checksum is calculated by summing the servo ID, packet length, instruction, and parameters and then taking the inverse. The status packet format is similar to the instruction packet, but the instruction field becomes an error parameter. The servo manual’s control table contains model number, firmware version, ID, baud rate, status feedback level, torque enable, clockwise and counterclockwise compliance margins, torque limit, current position, current speed, current load, and current temperature. Before communicating with the servo, the baud rate must be set. The MX-28T baud rate table shows that 1 Mbps has zero error and the fastest speed, so 1 Mbps is selected as the humanoid robot servo communication baud rate.
| MX-28T Parameter | Specification |
|---|---|
| Weight | 72 g |
| Dimensions | 35.6 mm × 50.6 mm × 35.5 mm |
| Gear ratio | 193:1 |
| Operating voltage | 10 V to 14.8 V |
| Stall torque | 2.3 N·m to 3.1 N·m depending on voltage |
| Stall current | 1.3 A to 1.7 A depending on voltage |
| No-load speed | 50 RPM to 67 RPM depending on voltage |
| Minimum angle | 0.088 degrees × 4096 |
| Operating range | 360 degrees |
| Operating temperature | -5 degrees Celsius to 85 degrees Celsius |
| Communication | Half-duplex asynchronous serial communication |
| Physical connection | TTL multi-channel |
| ID range | 0 to 253, with 254 for broadcast |
| Baud rate | 8000 bps to 4.5 Mbps |
| Feedback | Position, temperature, load, voltage, and other values |
| Materials | Plastic housing and metal gears |
9. Serial Communication and Data Protocol
The serial communication module is divided into 2 circuits: one for communication with the PC104 host and one for communication with the servos. For servo communication, the humanoid robot controller must be adaptable to the specific protocol of the servo. Mainstream servos mainly use TTL level and RS485 level. A communication circuit matched to these protocols solves the servo communication problem. The MX-28T uses TTL level. The communication circuit includes DXL_RXD and DXL_TXD as the servo data transmission and reception ends, and data passes through TTL_DATA into the STM32 microcontroller. A transmit/receive enable bit distinguishes whether data is being sent or received. A MAX3440 RS485 protocol chip supports MX-28R servos and strengthens the expandability of the humanoid robot.
The single-wire serial communication implementation relies on a 74HC126 buffer chip. The 74HC126 is a quad bus three-state buffer gate. When the output enable is high, the output follows the input; when the output enable is low, the output is high-impedance. This characteristic allows RX and TX to be separately enabled for transmission and reception, converting full-duplex operation into half-duplex operation and achieving the design goal.
For communication with the host, the STM32 has abundant serial resources and the PC104 has many USB interfaces. To simplify development, a USB-to-serial chip is selected to avoid firmware driver design. Common USB-to-serial chips include FT232, PL2303, and CH340. PL2303 is the lowest-cost of the three but also the least stable. CH340 has weaker hardware compatibility than FT232. The future development platform is Linux, and FT232 offers the best stability among the three chips. Although it is the most expensive, communication stability directly affects humanoid robot system stability. FT232 is therefore selected as the USB-to-serial chip. The STM32 servo control board uses FT232 to convert PC104 USB data into serial I/O data and to convert STM32 serial I/O data into PC104 USB data. The chip handles data conversion automatically, so development is convenient: the STM32 side writes serial programs, and the PC side writes USB driver programs without complicated firmware design. FT232 data conversion relies on a USB transceiver, serial interface engine, USB protocol engine, universal asynchronous FIFO controller, and universal asynchronous receiver/transmitter. The FT232 chip connects to the STM32 through TXD, RXD, and GND.
The STM32 communicates with the servo through USART1. The STM32 receive flow starts with port initialization in the main function, including setting the baud rate to 1 Mbps, loading the servo control table, configuring the clock, configuring the GPIO structure, enabling servo power, and configuring interrupts. After configuration, the system waits for a USART1 interrupt. When the servo sends data, the data is received into a defined buffer array, and the interrupt is reconfigured for the next serial interrupt. The STM32 sends data to the MX-28T servo through USART1 using interrupts and checks the send register to determine data transmission status. The key step is to package the data according to the servo protocol before sending it to the buffer. For example, sending data to servo ID 1 produces a packet beginning with the fixed header, followed by the ID, length, instruction, parameters, and checksum. A Pack_Data function accepts the ID, control instruction, and parameters and returns the packaged data. USART_SendData then sends the packet to the servo and drives the humanoid robot joint.
The STM32 communicates with the PC104 host through USART3. The receive flow is similar to the servo receive flow. After receiving data, the packet is parsed by using the command field in the third parameter of the buffer array. If the parsed data is servo data, the STM32 sends the data to the servo. Because the host also packages data according to the servo protocol, the STM32 can directly send the buffered data to the servo through serial port 1. Ubuntu includes the FT232 driver, so after the USB device is connected, the FT232 USB device appears in the dev folder. In actual development, after obtaining the device descriptor, data transmission and reception can be handled like file operations, avoiding driver porting. To maintain consistency, the baud rate is set to 1 Mbps, the same as the servo communication. To simplify use of the STM32 device on Ubuntu, a C++ serial program is compiled with G++, and object-oriented methods abstract the entire STM32 as a USB device. The STM32Board class includes construction, destruction, and common member methods such as communication with the STM32 board and host-to-servo communication, which in practice means reading and writing data.
10. Attitude Measurement Module
During humanoid robot motion control, posture angle information is key to precise real-time control. A single attitude sensor can obtain posture angle information, but its accuracy is mainly limited by inertial device precision. Hardware structure and process improvements are difficult, and system error increases over time, so a single attitude sensor is not suitable for long-duration humanoid robot posture determination. Humanoid robot posture information can be obtained from many sensors. Inclinometers have high reliability, good low-speed performance, impact resistance, high precision, and small cumulative error, but they are slow dynamically, have large high-speed error, phase lag, narrow bandwidth, and slow update rate. Gyroscopes have good dynamic response, short startup time, high sensitivity, and impact resistance, but long-duration measurement accumulates drift error. Accelerometers have simple structure, good low-speed motion performance, high precision, and short startup time, but dynamic response is slow, high-speed response error is large, and bandwidth is narrow. Ultrasonic transceivers are simple, convenient, and fast, but they are suitable for distance measurement and perform poorly on non-planar surfaces. Infrared rangefinders have fast measurement speed, good dynamic performance, and fast update frequency, but they have high requirements for reflective materials and perform poorly on inclined planes.
Comparative analysis shows that no single sensor can accurately and reliably obtain humanoid robot posture information. A combination of multiple sensor types can fuse their strengths and compensate for weaknesses. Common gyroscope and accelerometer chips include LIS331DLH, MAX21000, L3G4200D, LSM303D, ADXL345, and MPU6050. Considering the humanoid robot volume, shape, and sensor price, the design uses separate gyroscope and accelerometer devices rather than a module. This supports hardware cutability: if a later humanoid robot does not need a particular module, it can be removed easily without redesigning the printed circuit board. LIS331DLH and L3G4200D are both STMicroelectronics products and share programming logic. The gyroscope and accelerometer therefore use the L3G4200D and LIS331DLH modules respectively.
The LIS331DLH is a three-axis linear accelerometer with digital output from STMicroelectronics. It has a small package and lower power consumption than other sensors. Its operating voltage range is 2.16 V to 3.6 V, and it supports a 1.8 V low-voltage mode. It supports IIC and SPI communication protocols, provides 16-bit data output, and has 2 independent programmable interrupt generators for humanoid robot posture state detection. The measurement range is selectable, and this work selects -4 g to +4 g. The hardware parameters meet the design requirements, so this accelerometer is used to collect humanoid robot acceleration information.
The L3G4200D is selected as the gyroscope. Its low range is suitable for high-precision slow motion, while its high range is suitable for very fast changes. The measurement range is selectable, and this work selects -500 to +500 DPS. The output data is also 16-bit, and the device supports IIC and SPI protocols. Its data remains stable over time and temperature changes. Both devices support SPI and IIC. Because IIC is not full-duplex and is slower than SPI, both chips use SPI to ensure real-time performance. The STM32 distinguishes the two devices through chip-select signals. SPI uses MISO, MOSI, SCLK, and CS or SS. The gyroscope and accelerometer share the same SPI resource, and the chip-select signal determines which chip is being accessed. The STM32 receives gyroscope and accelerometer data through SPI and sends it to the host through the serial port. The SPI read and write timing uses CS as the active-low chip-select signal, SPC as the clock signal, and SDI and SDO as data input and output. Data is read on the rising edge after the clock falling edge. The STM32 SPI registers are configured according to this timing, and STM32 library functions simplify programming.
Register configuration is required for proper operation. LIS331DLH and L3G4200D share common register configuration logic. For the L3G4200D gyroscope, CTRL_REG1 at address 0x20 and CTRL_REG4 at address 0x23 are the main registers. CTRL_REG1 configures output data frequency, bandwidth, power mode, and enables the X, Y, and Z output ports. It is configured as 0xFF, giving an output rate of 800 Hz, normal power mode, and enabled output on all 3 axes. CTRL_REG4 sets the measurement range and is configured as 0x01, selecting -500 to +500 DPS. FIFO is not used in the design, so the gyroscope and accelerometer send data when available to ensure real-time performance. After configuration, because the gyroscope and accelerometer output 16-bit two’s complement data, the data must be processed before sending to the host. The low 8 bits and high 8 bits are combined into a 16-bit raw value, and the raw value is converted to decimal data.
| Attitude Sensor Type | Measured Quantity | Advantages | Limitations |
|---|---|---|---|
| Inclinometer | Angle | High reliability, good low-speed performance, impact resistance, high precision, small cumulative error | Slow dynamic response, large high-speed error, phase lag, narrow bandwidth, slow update rate |
| Gyroscope | Angular velocity | Good dynamic response, short startup time, high sensitivity, impact resistance | Long-duration measurement accumulates drift error |
| Accelerometer | Acceleration | Simple structure, good low-speed motion performance, high precision, short startup time | Slow dynamic response, large high-speed error, narrow bandwidth |
| Ultrasonic transceiver | Distance | Simple structure, convenient use, short startup time, fast speed | Suitable for distance measurement and poor on non-planar surfaces |
| Infrared rangefinder | Distance | Fast measurement speed, good dynamic performance, fast update frequency | High requirements for reflective materials and poor on inclined planes |
11. Vision Module
The vision module mainly involves camera selection. Digital cameras and 3D somatosensory cameras are common choices. Based on the system function analysis, the camera only needs to support image acquisition. Professional image acquisition cameras are often too expensive or troublesome to install and configure, and somatosensory cameras are generally large and heavy. The design therefore uses a Logitech C905 driver-free USB camera. The C905 uses a Carl Zeiss lens with autofocus, a USB 2.0 PC interface, a 2-megapixel sensor, a maximum resolution of 1920 by 1080, and a built-in microphone. The camera can later support video call function development. Because it is driver-free, it can be plugged directly into the PC104 USB port and used. The acquired image can be passed to OpenCV for algorithm processing, satisfying the humanoid robot system design requirements.
The vision module supports humanoid robot face tracking and environment perception. It is combined with OpenCV to process images and provide coordinate information for the head servos. The humanoid robot head tracking function is built on the Ubuntu and ROS software environment. The camera is used with the Cheese application on Ubuntu to verify that image capture works correctly. After Cheese is installed, entering the command in the terminal displays the current camera image. OpenCV face recognition is then used to verify normal camera module operation. OpenCV identifies the face and draws the face region. The PC104 host displays the face recognition area and outputs the face coordinate center and the current image coordinate center in real time, providing tracking information for the head servos.
12. PCB Integration and Hardware Layout
The humanoid robot servo STM32 control board uses a 4-layer board design. The gyroscope and accelerometer are placed in the middle of the board, and other interface circuits are placed around the board edges as much as possible. This layout supports sensor stability and keeps external connectors accessible. The printed circuit board design includes wiring, top-layer layout, and bottom-layer layout. The hardware integration process pays attention to module placement, power routing, and communication interfaces. Quality inspection remains a critical part of humanoid robot hardware integration because stable electronics and reliable assembly directly affect the performance of the humanoid robot system.

The humanoid robot control board integrates the STM32, gyroscope, accelerometer, servo communication circuit, host communication circuit, and power regulation circuits. The board is designed to be compact enough for the humanoid robot chest space while preserving the interfaces needed for future expansion. The dual-controller architecture keeps high-speed computation on the PC104 and real-time sensor and servo tasks on the STM32. This division reduces the burden on the host and allows the humanoid robot to maintain deterministic communication with its joints and sensors.
13. Embedded Operating System Deployment
The PC104 embedded development board runs Ubuntu 12.04 LTS. To achieve high system portability and convenient development, the project generates a system image and installs it onto the PC104 hardware platform. Clonezilla is used as a free and open software system for batch operating system deployment. Clonezilla can restore multiple operating systems, including Linux, Mac OS, and Microsoft Windows. It supports automated mode, local image storage, and SSH server storage. The restoration process has 4 main steps. The first step is to create a debugged Ubuntu image file. The second step is to create a Clonezilla USB boot disk. The third step is to copy the image file to the boot disk. The fourth step is to select USB boot in the BIOS and follow Clonezilla settings to complete system restoration.
- The Ubuntu image is created with Remastersys. The Remastersys 3.0.3 deb package is downloaded and installed from the official website. After installation, the command sudo remastersys displays usage information. The command sudo remastersys backup my_ubuntu.iso generates the image file of the debugged system.
- The Clonezilla USB boot disk is created in Windows because Windows integrates convenient tools. UltraISO is selected as the USB boot disk creation tool, and the Clonezilla archive is downloaded from the official website. Clonezilla is written to the prepared USB disk according to the UltraISO installation steps.
- The prepared image file is copied to the USB disk, and the USB disk is inserted into the development board USB interface. The BIOS is entered during startup, USB boot is selected, and the system restarts into the Clonezilla recovery software.
- After the Clonezilla startup screen appears, the default Clonezilla live option is selected, English is selected as the language, the console data default option is selected, Clonezilla is started, the device-image mode is selected, the existing home/partimag writable device is selected, beginner mode is selected, restoredisk is selected, the image file is selected, the target disk is selected, and confirmation is given to continue. After installation completes, the development board restarts with the pre-debugged system installed.
This image-based deployment method is important for humanoid robot production and maintenance. When configuring another humanoid robot, the debugged system can be installed directly through the image instead of starting from zero. This makes software system deployment faster and more convenient and supports repeated humanoid robot system integration.
14. ROS Platform and Simulation Model
The ROS platform is deployed on the Ubuntu system. The ROS official wiki provides beginner tutorials that form the basis for later development. ROS can be installed from resources or from source. Source installation is cumbersome, so the apt-get command is used for installation. At the time of the work, the latest ROS version was Lunar, but considering compatibility with Ubuntu 12.04 LTS, ROS Indigo was selected. After installation, entering roscore in the terminal confirms that ROS is installed correctly.
After ROS is installed, a humanoid robot simulation model is established to provide a foundation for later work. The URDF tool in ROS is used to edit humanoid robot model parameters. URDF, the Universal Robotic Description Format, is a robot description language based on XML. Understanding URDF attribute definitions allows construction of a humanoid robot model. Link attributes include visual appearance, size, color, and material; geometry shape such as box, cylinder, or sphere; origin position and rotation; inertial properties; collision detection properties; material color RGB values and transparency; and mesh import for STL format 3D model files. Joint attributes include joint type, such as revolute for rotation around a specified axis with maximum and minimum values, torque, and angular velocity; continuous for rotation around a specified axis without maximum and minimum limits and with fixed 360-degree rotation; fixed for a joint that cannot move; axis for the rotation axis; limit for revolute joint parameters; and origin for the position change of the child coordinate system relative to the parent coordinate system.
A biped humanoid robot model is constructed by defining links such as the arm and torso and defining the relationships between links and joints. A joint definition determines whether the humanoid robot part can rotate. After configuring other links and joints, the simulation model is displayed in ROS. A full humanoid robot 3D model is then built. The mesh model is provided by other team members, while this work establishes the coordinate systems between humanoid robot joints and sets joint and link attributes. The ROS simulation model provides a structured representation of the humanoid robot for future algorithm development and system visualization.
15. Motion Parameter Design and Servo Calibration
Humanoid robot gait can be obtained by solving the joint matrix. Gait parameters are obtained by measuring humanoid robot physical parameters such as joint distances and servo speed, establishing forward and inverse kinematics relationships according to the Jacobian matrix, solving for each servo parameter, and sending the parameters to the servos to complete humanoid robot motion control. Another approach uses human walking data to control humanoid robot walking, essentially studying humanoid robot gait planning based on human joint data. However, because the humanoid robot differs from humans in kinematics and dynamics, human walking data cannot be directly applied to the humanoid robot. Dynamics and kinematics knowledge and different parameter optimization methods are needed for humanoid robot gait planning. Human walking data can be collected through USB cameras and sensors, and key data must be corrected and optimized before application to the humanoid robot.
The work focuses on humanoid robot system hardware and software design. Gait algorithm development is handled by other team members, and the joint data for actions is sent to the servo controller so that the humanoid robot completes the corresponding actions. The servo parameters must be tuned before use so that humanoid robot motion is smoother. Servo compliance margin and slope settings improve servo torque output, reduce impact on the output shaft during humanoid robot motion, reduce mechanical vibration, improve motion stability, and enhance action accuracy and smoothness. Humanoid robot compliance is mainly determined by position error and output torque. The MX-28T servo compliance margin and compliance slope are divided into clockwise and counterclockwise categories according to rotation direction. Compliance margin is the error between the current position and the target position, with a range of 0 to 255. A larger value represents a larger difference. Compliance slope is the degree of torque change as the servo reaches the target position. Compliance parameter levels range from level 1 with values 0 to 3 and typical value 2, to level 7 with values 128 to 254 and typical value 128.
A variable Q is used as a measure of compliance parameter quality. Q represents the time required to complete a specified action. A servo compliance parameter function is written with parameters Data1 and Data2 for clockwise and counterclockwise compliance margins and Data3 and Data4 for clockwise and counterclockwise compliance slopes. For servo ID 1, compliance margin values are sampled from 0 to 255, and the corresponding Q value is measured. The resulting curve shows that a larger compliance margin increases servo response time, while a smaller compliance margin improves the speed and precision of the humanoid robot action. The best compliance margin for servo ID 1 is therefore 0. For servo ID 1 compliance slope, values are also sampled from 0 to 255, and the Q value is measured. The curve shows that the Q value is smallest when servo ID 1 compliance slope is 52. Other servos are measured in the same way to determine their compliance parameters.
The humanoid robot uses 20 MX-28T servos. The STM32F103 can be configured at a maximum frequency of 72 MHz, giving a clock period of 1/72 microseconds. If a single-write servo program is used and each servo is written once, the action delay from the first servo to the 20th servo is about 0.264 seconds after the servo data transmission is completed. Over long humanoid robot operation, time delay accumulates and becomes larger, causing slow action response and decreasing action accuracy. The humanoid robot servo control therefore uses synchronous write. The response of 20 servos is completed through 1 instruction. The MX-28T supports broadcast mode, and the SYNC WRITE function changes multiple instruction data transmissions into one instruction data transmission. When the servo receives the instruction packet, it does not immediately send data but stores it in a buffer and remains in standby. Only when the MX-28T receives the ACTION instruction does execution proceed, achieving synchronous control of multiple servos.
Torque feedback detection is also used during humanoid robot control. The humanoid robot torque condition must be fed back in real time to observe the humanoid robot swing state. A torque feedback function is written and used with a serial debugging assistant to measure torque values during humanoid robot motion, providing a parameter for humanoid robot posture adjustment. The ReadWord function reads servo data, and P_PRESENT_LOAD_L reads the current servo torque value.
| Compliance Level | Value Range | Typical Value |
|---|---|---|
| 1 | 0 to 3 | 2 |
| 2 | 4 to 7 | 3 |
| 3 | 8 to 15 | 8 |
| 4 | 16 to 31 | 16 |
| 5 | 32 to 63 | 32 |
| 6 | 64 to 127 | 64 |
| 7 | 128 to 254 | 128 |
16. Software Framework and Face Tracking
On the humanoid robot hardware architecture, the Ubuntu software system is established, and servo parameters are tuned. To make development more convenient, object-oriented design methods abstract the humanoid robot low-level hardware and encapsulate the main function classes. The humanoid robot software framework includes the STM32 development board and MX-28T servos, implemented with 2 C++ classes. The main member methods include communication with the STM32 board and host-to-servo communication, which in practice means reading and writing data. After the low-level classes are implemented, unified interface functions make later development more compatible and portable. The framework implements the PlatformSTM32 and MotionModule interfaces. PlatformSTM32 targets the STM32 control board, and MotionModule targets motion control. MotionModule has 3 implementation classes for walking, teaching action editing, and head control. Later function development builds on the motion class to implement more member methods and complete more complex functions.
The humanoid robot software framework also supports face tracking. OpenCV is used for face tracking. OpenCV 2.4.9 is selected to match the humanoid robot operating system. The face recognition algorithm used in the tracking program provides face coordinates. Face recognition itself is not the main research focus, so the OpenCV built-in algorithm program is used to provide coordinate information for face tracking. The head has 2 servos for left-right and up-down rotation. The image frame center coordinate is set as X0 and Y0, and the face center coordinate is Xi and Yi. Thresholds Xc and Yc are set for the X and Y directions. A simple PD controller is used for servo control. The proportional-derivative controller improves system dynamic performance.
Before tracking, the image is analyzed. The Logitech C905 camera has a maximum pixel resolution of 1600 by 1200, and large image size increases computation, so the original image is compressed 5 times to 320 by 240 for algorithm analysis. The X-direction threshold Xc is set to 5 percent of the image, which is 16 pixels because the X-axis has 320 pixels. If the difference between the recognized face center coordinate and the current frame image center coordinate is greater than 16 pixels, control is applied. A PD controller calculates the servo rotation angle. The angle calculation uses P times the error plus D times the error difference, and an Angle value represents 1 degree of servo rotation. Vertical direction control is similar to X-direction control, but the threshold is set to 12 pixels because the Y-axis has 240 pixels. When the difference is greater than 12, the servo rotates, and a PD controller is used.
The humanoid robot head first rotates left and right and then up and down to search for a face. Once a face is detected, tracking begins. If tracking fails midway, the head continues rotating left and right and up and down to search again. Because the algorithm is simple, the head may lose the target in some complex situations. This face tracking function demonstrates the integration of the humanoid robot vision module, host software framework, and head servo control.
17. System Commissioning and Test Results
The humanoid robot prototype was built according to the hardware and software design. Mechanical structure design was handled by team members, and the prototype and joint rotation were verified. The power module was tested with an oscilloscope. The battery voltage measured 11.8 V. The LM78M05 pin 3 output measured 5 V, and the EZ1117 pin 2 output measured 3.3 V. The operating voltages of the main control chip, gyroscope, and accelerometer were also measured and found to be within their required values. These tests confirmed that the humanoid robot power module provides the required voltage levels.
The gyroscope and accelerometer were tested during humanoid robot walking, falling, left turning, and right turning. During walking, the humanoid robot sways left and right, and the X and Y directions show angular velocity. When the humanoid robot stops, the gyroscope is stationary and the X and Y directions show no change. When the humanoid robot continues walking, the gyroscope data changes again. Accelerometer data also reflects humanoid robot state changes. During falling tests, the humanoid robot starts from rest and then falls forward, stands up, falls forward again, and stands up again. The X-axis direction shows acceleration, and a reverse angular velocity appears when standing up. Because the fall is forward, the Y direction changes little. During left and right turning, the gyroscope and accelerometer data show little difference from forward walking data. The algorithm team designed the humanoid robot so that left and right turning corresponds to hip joint rotation followed by forward motion. Hip joint rotation is basically a vertical change, so there is no obvious change on the X and Y axes.
The camera module was tested with the driver-free Logitech C905 camera. The Cheese application was installed on Ubuntu, and the command cheese displayed the current camera image. OpenCV face recognition was then used to verify normal camera module operation. OpenCV identified the face and drew the face region. The PC104 host displayed the face recognition area and output the real-time face coordinate center and current image coordinate center for head servo tracking. During face tracking, head servo data was recorded. Servo ID 19 controls left-right head rotation, and servo ID 20 controls up-down head rotation. When the face moved left and right, the servo followed the face. When the face was centered and then moved up and down, servo ID 20 moved while servo ID 19 basically did not move. These observations confirmed the expected humanoid robot head tracking behavior.
| Test Area | Observed Humanoid Robot Behavior | Result |
|---|---|---|
| Power module | Battery measured 11.8 V; 5 V and 3.3 V rails measured at the expected regulator outputs | Power supply functions normally |
| Gyroscope and accelerometer | Walking, falling, and turning produced corresponding sensor changes | Posture sensing data is available for humanoid robot state estimation |
| Camera module | Driver-free USB camera displayed images through Cheese and supported OpenCV processing | Vision acquisition works with the humanoid robot host |
| Head face tracking | Servo ID 19 followed left-right face motion; servo ID 20 followed up-down face motion | Humanoid robot head tracking responds to face coordinates |
18. Significance for Humanoid Robot Development
The humanoid robot design addresses common difficulties in humanoid robot hardware and software development, including long development time, high design complexity, and unbalanced performance. By using hardware and software modularization, the project presents a humanoid robot system that can be adapted to different product requirements. The humanoid robot hardware uses a dual-controller architecture with STM32F103 and PC104. The design includes power, vision, gyroscope and accelerometer, servo, and serial communication modules. Each module went through selection, circuit design, and integration. The hardware design considers humanoid robot volume and cost, selects cost-effective chips and modules, uses a driver-free camera to avoid firmware design, and unifies communication around serial protocols. The power supply uses low-power devices, and the humanoid robot servo control board is kept small and light enough for the mechanical structure.
The humanoid robot software environment is equally important. Ubuntu 12.04 LTS is selected as the humanoid robot operating system, and the open-source ROS robot operating system is deployed to support later function development and algorithm implementation. The humanoid robot can therefore use hardware performance more fully and run more complex tasks. The humanoid robot system design supports a high degree of cutability. If a robot does not need rich functions, the PC104 processor can be omitted. On the software side, the Ubuntu-based system can later support a customized human-machine interface and additional functions, making the product more competitive.
The humanoid robot was commissioned as a complete system. Motion control algorithm work was combined with sensor data collection to determine humanoid robot posture during motion. The power module, vision module, and serial communication module were tested, and all modules operated normally. The humanoid robot prototype and test results show that the dual-controller and ROS platform design is feasible for a compact, modular, and maintainable humanoid robot system. The design offers a short development cycle, convenient development and maintenance, high hardware and software cutability, and strong cost performance. It has practical application value and guiding significance for enterprise humanoid robot hardware and software system design.
Several limitations remain. In servo selection, the selected servo torque is not large enough, so the humanoid robot height cannot be too high. If the height exceeds the servo torque capability, the servo can be damaged. The ROS system currently includes a simulation model for the humanoid robot, but connecting ROS to the physical humanoid robot still requires further work. Future research should strengthen this direction so that the ROS simulation model and the actual humanoid robot are connected, allowing the ROS humanoid robot model to be rotated while also controlling the physical humanoid robot. The humanoid robot posture sensor suite currently includes only a gyroscope and accelerometer, which is not sufficient. Force/torque sensors, infrared sensors, and ultrasonic sensors are also needed to support more intelligent functions. Because of the limited sensor suite, the humanoid robot obtains less information about the external environment, making automatic navigation and localization difficult.
Despite these limitations, the humanoid robot design demonstrates a practical integration path for a dual-controller humanoid robot with an Ubuntu and ROS software stack. The humanoid robot combines real-time sensor and servo control on STM32 with high-level computation on PC104. The humanoid robot uses MX-28T servos for joint actuation, LIS331DLH and L3G4200D sensors for posture measurement, a driver-free USB camera for vision, and OpenCV for face tracking. The humanoid robot software framework abstracts low-level hardware and supports modular motion functions. The humanoid robot simulation model in ROS provides a basis for later algorithm development. The humanoid robot power, communication, sensing, and vision tests confirm that the system functions as intended. The work therefore provides a reference for developing affordable, modular, and maintainable humanoid robot systems for commercial and research applications.
