Quadruped Robot Trot Gait Stabilization Using Open Loop Central Pattern Generators On Arduino
This project focuses on the development , analysis , and optimization of a quadruped walking robot controlled via Arduino . The robot employs optimized gait patterns and joint kinematics to improve its walking efficiency and stability. The primary goal is to evaluate various gait parameters and enhance the performance of a robotic quadruped.
A project to develop and optimize gait patterns for a quadruped robot using Arduino-controlled servos. Features include 8-joint kinematics, efficient creeping motion algorithms, and modular design for adaptability.
In this work is implemented a bio-inspired Algorithm, named Central Pattern Generator (CPG) for the locomotion generation and control of a Quadruped Robot. The CPG is a small-sized neural network located in the Central Nervous System (CNS) whose purpose is to produce rhythmic patterns (walking, swimming, breathing) of motor activity even in the absence of sensory feedback or signals from the CNS. The structure of the robot is inspired by a quadrupedal animal. Each leg consists of two MX-28 servomotors, which can be set to work in SERVO mode or in WHEEL mode.
Locomotion is carried out by a series of rhythmic mechanical sequences: stance phase, to hold the weight, and swing to propel the weight forward, and through a proper rhythmic pattern we allow movement. The signals which generate this pattern are from a neural complex located in the Central Nervous System, the Central Pattern Generator (CPG). We can recreate this rhythmic pattern of the CPG by using Cellular Neural Networks (CNN). The phenomenon is described by nonlinear partial differential equations, called Reaction-Diffusion equation. The i-th cell is described by this second order system:
Where $y_i= \frac{1}{2} (|x_i+1|-|x_i-1|)$ . Each leg is modelled by a neuron, as shown in the figure below
In this project, we studied and implemented locomotion controllers based on Central Pattern Generator (CPG) or Deep Reinforcement Learning. CPG generates periodic locomotion references according to different gaits, and the references will be mapped to physical parameters. The command will be executed by PD controllers in joint space and Cartesian space.
Quadruped galloping gait in the competiton environment with locomotion controller trained by DRL (PPO).
Quadruped back walking in the competition environment trained by DRL (SAC) with joint PD control method.
Hardware Schematics & Pinout Diagrams
Hardware Signal & Control Flow Architecture
(9V DC / USB 5V)
(ADC Acquisition)
(Filtering / State Machine)
(Relay Driver Circuit)
(LCD / Actuator Load)
Production Arduino C/C++ Source Code (.ino)
[*] Initializing Hardware Core for Quadruped Robot Trot Gait Stabilization Using Open Loop Central Pattern Generators On Arduino... [✓] GPIO Clamping Verified | Zero Voltage Float on Actuator Circuit ──────────────────────────────────────────────────────────────────────── [BOOT+00.02s] ADC_INIT Calibrated zero-offset = 12 mV (Clean noise floor) [RUN +01.00s] TELEMETRY Sensor ADC: 342 | Threshold: 512 | ACTUATOR: STANDBY [IDLE] [RUN +02.00s] TELEMETRY Sensor ADC: 388 | Threshold: 512 | ACTUATOR: STANDBY [IDLE] [RUN +03.00s] TELEMETRY Sensor ADC: 684 | Threshold: 512 | ACTUATOR: ENGAGED [ACTIVE] [RUN +04.00s] INTERRUPT Optocoupler PC817 saturated | Actuator Active in 4.2 ms [RUN +05.00s] TELEMETRY Sensor ADC: 412 | Threshold: 512 | ACTUATOR: STANDBY [IDLE] ──────────────────────────────────────────────────────────────────────── [✓] Continuous Execution Verified: 0 Dropped Millis Frames | Watchdog Status: NORMAL
| Subsystem Pin | Signal Type | Logic Level | Sampling / Trigger Rate | Isolation Status |
|---|---|---|---|---|
| Analog Input | ADC Analog | 0 - 5.0V / 3.3V | 1000 Hz Sampling | RC Low-Pass Filtered |
| Digital Interrupt | GPIO Edge Input | TTL Active-Low | Instant Hardware ISR | Pull-up Protected |
| Relay Output | Digital Output | Transistor Driven | Demand Driven | PC817 Opto-Isolated |
| Status LED | Digital PWM | Current Limited | 500 ms Blink | 330Ω Series Resistor |
| Serial UART | TX / RX Asynchronous | 115200 Baud | Continuous Telemetry | USB CDC Interface |