System Architecture

The Arttous platform is powered by the ESP32-S3 (N8R8) Dual-Core SoC running FreeRTOS (Firmware IK4 = v75.4). To prevent I²C starvation during high-speed calculations, peripherals are hardware-split across two independent I²C buses.

Hardware Interfaces

ESP32-S3 PinFunctionTarget
GPIO 4SDA (Bus 0)PCA9685 (Servos)
GPIO 5SCL (Bus 0)PCA9685 (Servos)
GPIO 6SDA (Bus 1)MPU6050 (IMU)
GPIO 7SCL (Bus 1)MPU6050 (IMU)
GPIO 38DATARGB Status LED
ESP32-S3
Fig 1.0 — ESP32-S3 Compute Unit

FreeRTOS Task Management

The standard single-threaded loop has been entirely deprecated. Processing is locked to dedicated silicon cores to ensure the Kinematic Engine never misses a 50 Hz deadline.

Core 0 — TaskNetwork
Priority: 1 · Unpinned
Handles asynchronous events: WiFi, HTTP server rendering, and WebSocket JSON telemetry broadcast every 100ms. Non-blocking.
Core 1 — TaskControl
Priority: 2 · Strict 50 Hz (20ms loop)
Executes IMU sensor fusion, Inverse Kinematics (Law of Cosines), Smooth Amplitude Decay, and generates hardware PWM signals.

Memory secured via SemaphoreHandle_t stateMutex to prevent race conditions during payload parsing.

Bill of Materials

ESP32-S3
ESP32-S3 (N8R8)
Dual-Core · FreeRTOS
Primary logic board. Handles matrix math and dual I²C routing.
PCA9685
PCA9685
16-Channel PWM · Bus 0
Dedicated servo driver. Offloads PWM generation for jitter-free legs.
MPU6050
MPU6050 IMU
6-DOF Sensor · Bus 1
Provides Pitch/Roll data for active Z-axis gravity compensation.
MG90S
MG90S Servos
Metal Gear · High Torque
Actuators for the 3DOF legs, driven dynamically by the IK engine.
Filament
Print Filament
PETG-CF / TPU 95A
Carbon-fibre PETG for chassis rigidity, TPU for high-friction foot pads.

Mechanical Assembly

Reference schematics for chassis assembly and frame orientation.

Frame A
Frame Orientation A
Top Plate
Top Plate Alignment

Dual I²C Wiring Schematic

ESP32 (GPIO 4)
PCA9685 (SDA)
ESP32 (GPIO 5)
PCA9685 (SCL)
ESP32 (GPIO 6)
MPU6050 (SDA)
ESP32 (GPIO 7)
MPU6050 (SCL)
Battery (7.4V)
PCA9685 (V+)

Kinematics API & Stabilisation

3DOF solver with active IMU balancing and NaN-protection clamps. Runs exclusively on Core 1.

// 1. Active Z-Axis Balancing (IMU Sensor Fusion) float p = constrain(pitch, -20.0f, 20.0f) * (PI_F/180.0f); float r = constrain(roll, -20.0f, 20.0f) * (PI_F/180.0f); balZ[i] = (lx * sin(p)) + (ly * sin(r)); // 2. Smooth Amplitude Decay (Soft leg parking) smoothVx += (targetVx - smoothVx) * (4.0f * dt); float lz = (currentHeight + gait.legZ[i]) - balZ[i]; // 3. Law of Cosines (NaN Protection Clamp prevents CPU crash) float D = sqrt(u*u + lz*lz); float cA = constrain((FEMUR_SQ + D*D - TIBIA_SQ) / (2.0f * FEMUR * D), -1.0f, 1.0f); float alpha = acos(cA);

Web UI & Digital Twin

Zero-install, browser-based Mission Control served directly from the ESP32-S3's PROGMEM.

Telemetry & Control Architecture

  • Rendering: WebGL via Three.js for 60 FPS 3D wireframe visualisation.
  • Transport: Core 0 handles WebSockets (Port 81) broadcasting JSON telemetry at 100ms intervals.
  • Flight Deck: Real-time Pitch/Roll horizon, auto-gait toggles, dual virtual joysticks via Gamepad API.
  • Engineering: Direct Kinematics API access — manipulate Coxa, Femur, Tibia, and Twist axes.
Digital Twin
Fig 2.0 — Digital Twin Interface