The evolution of intelligent systems, driven by advances in data processing and artificial intelligence, has ushered in a new era of automation. This paradigm shift creates a growing demand for smart, interactive products that enhance daily life and operational efficiency across various sectors. In response to this trend, I present the design and development of an autonomous mobile platform—a robot dog. This project focuses on creating a wheeled, intelligently navigating robot dog capable of dynamic obstacle avoidance. By utilizing a microcontroller as its core processor and integrating multi-directional environmental sensing, this robot dog exemplifies a practical application of embedded intelligence for adaptive navigation in unstructured environments.
The concept of mobile robotic platforms, often colloquially termed robot dogs or robotic carts when wheeled, has seen significant development. These systems are integral components within the broader spectrum of smart devices and service robotics. Their functionalities have expanded from simple remote-controlled operation to encompass autonomous navigation, sensor fusion, real-time localization, and intelligent decision-making. This evolution has been particularly impactful in fields such as logistics, warehousing, and hazardous environment inspection, where mobile robots can perform tasks ranging from material transport to surveillance, thereby augmenting human capabilities and safety.

The core intelligence of a mobile robot dog lies in its ability to perceive its surroundings and react accordingly. The fundamental challenge, and a primary focus of this design, is robust obstacle avoidance. A reliable avoidance system must be dynamic, capable of handling randomly placed obstacles without pre-programmed paths, and robust enough to function under varying environmental conditions. This project addresses this challenge by implementing a multi-sensor perception strategy controlled by a streamlined algorithmic logic, ensuring the robot dog can navigate autonomously and safely.
Literature Review and Design Motivation
The development of intelligent mobile robots is a well-established field with diverse approaches to mobility and perception. Legged platforms offer high terrain adaptability but at the cost of mechanical and control complexity. In contrast, wheeled platforms, like the one developed in this project, provide stability, efficiency, and simpler control architectures on flat or moderately uneven surfaces, making them ideal for indoor or structured environments.
Obstacle avoidance algorithms range from simple reflexive behaviors, triggered by immediate sensor data, to complex path planning based on mapped environments. For a cost-effective and responsive robot dog, a reflexive behavior-based approach is highly suitable. Sensors commonly employed include infrared (IR) sensors, Light Detection and Ranging (LiDAR) units, ultrasonic rangefinders, and vision-based cameras. Each has its trade-offs in terms of cost, range, accuracy, and environmental susceptibility. This design selects ultrasonic sensors for their favorable balance of cost, adequate range for indoor navigation, and reasonable accuracy, forming the primary perceptual layer for the robot dog.
The design philosophy for this robot dog prioritizes a unique and simplified approach to dynamic avoidance. Instead of relying on computationally intensive mapping or complex predictive algorithms, the system uses a strategic arrangement of multiple ultrasonic sensors. The control logic is designed to interpret distance data from these sensors directly, triggering pre-defined but effectively combined turning maneuvers. This method allows the robot dog to exhibit seemingly intelligent, randomized avoidance behavior without intricate programming, fulfilling the goal of creating an accessible yet capable autonomous platform.
System Design Methodology
The development of the robot dog followed a structured methodology encompassing mechanical design, electronic system integration, control algorithm development, and experimental validation. The core objective was to create a cohesive system where hardware and software work in unison to achieve reliable autonomous obstacle avoidance.
Mechanical and Structural Design
The mechanical chassis of the robot dog was designed for modularity, serviceability, and robustness. It features a three-tiered structure fabricated from ABS plastic, chosen for its good mechanical strength, lightweight properties, and ease of fabrication.
- Upper Layer: This layer houses the perceptual system. It features a removable cover and enclosures for easy access to the ultrasonic sensors and their wiring during debugging and maintenance. The open-frame design facilitates future upgrades or the addition of supplementary sensors.
- Middle Layer: This forms the main compartment, a large cavity measuring 160 mm × 140 mm × 45 mm with 3 mm walls. It provides ample protected space for the central microcontroller (STM32), motor drivers, voltage regulators, and the battery pack. Its design ensures all electronic components are securely housed and shielded.
- Lower Layer: This is the motion platform. It is a solid plate designed to mount four DC gearmotors. The stiffness of the plate ensures alignment of the wheels, while the inherent slight flexibility of ABS provides minor vibration damping for smoother operation on imperfect surfaces.
Mobility Platform: Mecanum Wheel Drive
To achieve omnidirectional movement—crucial for flexible obstacle avoidance in tight spaces—the robot dog employs a Mecanum wheel drive system. Each wheel consists of a central hub with several free-spinning rollers mounted at a 45-degree angle relative to the wheel’s plane.
The principle of operation relies on velocity vector decomposition. When a conventional wheel rotates, it generates a velocity vector tangential to its circumference. A Mecanum wheel, due to its angled rollers, generates a primary force vector at a 45-degree angle to the wheel’s axis. By independently controlling the speed and direction of each of the four wheels, the resultant force vectors can be summed to produce net movement in any desired direction (forward, backward, sideways, or rotation) without changing the wheel’s orientation. The kinematic model for a typical four-Mecanum-wheel platform can be described. Let the robot’s translational velocities in the X (forward) and Y (lateral) axes of its body frame be $v_x$ and $v_y$, and its angular velocity be $\omega$. The relationship between these velocities and the rotational speeds of the four wheels ($\omega_1, \omega_2, \omega_3, \omega_4$) is given by:
$$
\begin{bmatrix}
\omega_1 \\
\omega_2 \\
\omega_3 \\
\omega_4
\end{bmatrix}
=
\frac{1}{r}
\begin{bmatrix}
1 & -1 & -(l_w + l_l) \\
1 & 1 & (l_w + l_l) \\
1 & 1 & -(l_w + l_l) \\
1 & -1 & (l_w + l_l)
\end{bmatrix}
\begin{bmatrix}
v_x \\
v_y \\
\omega
\end{bmatrix}
$$
where $r$ is the wheel radius, and $l_w$ and $l_l$ are half the track width and half the wheelbase length, respectively. This omnidirectionality allows the robot dog to sidestep obstacles efficiently, a key advantage over differential drive systems.
Control System Architecture
The brain of the robot dog is an STM32 series microcontroller (MCU), a powerful and energy-efficient ARM Cortex-M core device. It was selected for its sufficient computational resources, multiple timer channels for motor Pulse-Width Modulation (PWM) control, and multiple communication interfaces (UART) for sensor data acquisition.
The electronic system integrates several key modules:
- Power Management: A lithium-polymer battery supplies power, which is regulated to 5V and 3.3V for the sensors, MCU, and motor drivers.
- Perception Module: Three US-100 ultrasonic distance sensors are installed on the front and sides of the upper layer. Their key parameters are summarized below:
| Parameter | Specification |
|---|---|
| Operating Voltage | DC 2.4 – 5.5 V |
| Measuring Range | 2 cm – 450 cm |
| Accuracy | ± (3 mm + 1% of reading) |
| Beam Angle | < 15° |
| Interface | UART (9600 baud, 8N1) / Pulse |
| Static Current | ~2 mA |
- Actuation Module: Four DC geared motors are connected to motor drivers (e.g., TB6612FNG or L298N), which are controlled by PWM signals from the MCU to regulate speed and direction.
- Motor Speed Feedback: Incremental rotary encoders attached to the motors provide closed-loop speed control. The encoder ticks are read by the MCU’s timer in encoder mode.
The system flowchart is linear and efficient. The MCU continuously polls the three ultrasonic sensors via UART. The received distance values ($d_{left}$, $d_{center}$, $d_{right}$) are compared against predefined threshold distances ($T_{side}$, $T_{front}$). Based on simple conditional logic, the MCU selects a movement command (move forward, turn left, turn right, or move laterally) and calculates the required PWM duty cycles for the four motors using inverse kinematics derived from the Mecanum wheel model.
Obstacle Avoidance Algorithm and Sensor Fusion Logic
The intelligence of the robot dog is embedded in a reactive avoidance algorithm. The core principle is to always move forward unless an obstacle is detected within a critical zone. Three ultrasonic sensors provide a simplified frontal and side perception field.
The algorithm operates as follows:
- Data Acquisition: Read distances $d_L$, $d_C$, $d_R$ from left, center, and right sensors.
- Decision Matrix:
- If $d_C > T_{front}$ AND $d_L > T_{side}$ AND $d_R > T_{side}$: Command = FORWARD.
- Else if $d_C \leq T_{front}$:
- If $d_L > d_R$: Command = TURN LEFT (or sidestep left).
- Else: Command = TURN RIGHT (or sidestep right).
- Else if $d_L \leq T_{side}$: Command = TURN RIGHT.
- Else if $d_R \leq T_{side}$: Command = TURN LEFT.
Where $T_{front}$ is typically set around 50 cm and $T_{side}$ around 60 cm, defining the robot’s personal space. This logic allows the robot dog to handle obstacles appearing directly ahead or from the sides, creating a wall-following or obstacle-avoiding behavior that appears dynamic and random in simple environments.
The distance measurement by the ultrasonic sensor is based on the time-of-flight principle. The sensor emits a sound wave at frequency $f_{ultrasonic}$ (typically 40 kHz) and measures the time $\Delta t$ until the echo is received. Assuming the speed of sound in air is $v_{sound}$, the distance $d$ to the obstacle is:
$$
d = \frac{v_{sound} \cdot \Delta t}{2}
$$
The speed of sound varies with air temperature $T$ (in °C), which can be corrected using the formula $v_{sound} \approx 331.4 + 0.6 \cdot T \, \text{m/s}$. The US-100 module has a built-in temperature sensor for this correction, enhancing the robot dog‘s measurement accuracy.
Closed-Loop Motor Control
To ensure precise movement execution, each motor is controlled by a Proportional-Integral-Derivative (PID) controller in a closed loop. The encoder provides real-time motor speed feedback. The PID algorithm calculates the corrective PWM signal. The incremental form of the PID algorithm used is:
$$
u(k) = K_p e(k) + K_i \sum_{j=0}^{k} e(j) T_s + K_d \frac{e(k) – e(k-1)}{T_s}
$$
where:
– $u(k)$ is the control output (PWM duty cycle) at sample $k$.
– $e(k) = \omega_{target}(k) – \omega_{measured}(k)$ is the speed error.
– $K_p$, $K_i$, $K_d$ are the proportional, integral, and derivative gains.
– $T_s$ is the sampling period.
This controller ensures that the robot dog‘s wheels maintain the desired speeds accurately, leading to straight-line travel and precise turning, which is fundamental for effective avoidance maneuvers.
Experimental Validation and Results Analysis
To validate the design, a series of experiments were conducted focusing on sensor accuracy, avoidance reliability, and motion control stability.
Sensor Calibration and Accuracy Test
The ultrasonic sensors were tested against known distances measured with a tape measure. Multiple readings were taken at various distances within the operational range (10 cm to 200 cm). The results demonstrated a mean error of less than 1 cm and a standard deviation of under 0.5 cm, confirming the sensor’s suitability for the robot dog‘s navigation needs. The built-in temperature compensation was found to be effective in minimizing drift.
Obstacle Avoidance Performance
The robot dog was tested in a controlled environment with obstacles (cardboard boxes) placed at random positions and orientations. The test aimed to evaluate the success rate of avoidance without collision over a fixed course. A sample of raw distance data collected from the serial monitor during one avoidance event (approaching a left-side obstacle) is shown below:
| Sample # | Distance (mm) | Sample # | Distance (mm) |
|---|---|---|---|
| 1 | 700 | 13 | 530 |
| 2 | 670 | 14 | 530 |
| 3 | 660 | 15 | 530 |
| 4 | 640 | 16 | 530 |
| 5 | 620 | 17 | 550 |
| 6 | 590 | 18 | 560 |
| 7 | 570 | 19 | 560 |
| 8 | 560 | 20 | 560 |
| 9 | 560 | 21 | 590 |
| 10 | 550 | 22 | 600 |
| 11 | 550 | 23 | 650 |
| 12 | 540 | 24 | 740 |
As the data shows, the distance decreased until it crossed the left threshold ($T_{side} = 600$ mm) at sample #6. Subsequently, the control algorithm initiated a right-turn command. The distance then began to increase (samples 17-24), confirming successful avoidance. Over 50 trial runs with varying obstacle configurations, the robot dog achieved a **96% successful avoidance rate**, with failures only occurring in extremely cluttered corners that exceeded the sensor field-of-view.
Motor Control Stability Test
The performance of the PID controller was evaluated by commanding a step change in target motor speed from 0 to 30 RPM. The actual speed, reported via the encoder, was logged over time. The response graph showed a rapid rise time with minimal overshoot (less than 10%), settling to a steady-state value with oscillations within ±2 RPM. This demonstrates that the motion platform of the robot dog is stable and responsive, capable of executing the abrupt direction changes required for reactive obstacle avoidance.
A summary of key performance metrics for the developed robot dog is as follows:
| Performance Metric | Measured Result | Target Specification |
|---|---|---|
| Obstacle Avoidance Success Rate | 96% | >90% |
| Ultrasonic Sensor Accuracy (at 1m) | ±8 mm | ±10 mm |
| Maximum Navigation Speed | 0.5 m/s | 0.4 m/s |
| Motor Speed Settling Time | ~0.8 s | < 1.0 s |
| Continuous Operation Time | ~45 min | > 30 min |
Conclusion and Future Work
This project successfully designed, implemented, and validated a wheeled autonomous robot dog with dynamic obstacle avoidance capabilities. The integration of an STM32 microcontroller, a Mecanum wheel drive system for omnidirectional mobility, and a multi-ultrasonic sensor array with a reactive control algorithm resulted in a robust and functional platform. The robot dog demonstrates intelligent-looking behavior, navigating cluttered spaces by making real-time decisions based on local sensory input. The experimental results confirm that the system meets its core objectives: high avoidance success rates, accurate environmental perception, and stable motion control.
The design offers a compelling reference for educational and prototyping purposes in mobile robotics. The robot dog platform is inherently modular. Future work can significantly enhance its capabilities. Potential upgrades include integrating an Inertial Measurement Unit (IMU) for dead-reckoning and orientation stabilization, adding a camera module and implementing simple computer vision algorithms (e.g., for object following or color detection), and employing more advanced navigation algorithms like Bug algorithms or potential field methods. Furthermore, transitioning to a ROS (Robot Operating System) framework would facilitate the development of higher-level autonomous behaviors and swarm coordination for multiple robot dog units. This project lays a solid foundation for such advanced explorations in embodied artificial intelligence.
