Integrated Intelligence
Why A.V.A outperforms single-controller robots
A.V.A fuses Raspberry Pi intelligence, Arduino real-time control and PCA9685 precision actuation into a coordinated mechatronics system.
See Control ArchitectureA.V.A vs Single-Controller Design
A.V.A (Distributed)
- ✓Distributed Brain — Pi, Arduino, PCA handle different layers independently
- ✓Gesture-based — High-level motion commands (not raw PWM)
- ✓Isolated Power — Separate rails prevent voltage sag
- ✓Safety Layer — Arduino watchdog keeps posture if Pi hangs
- ✓Hardware PWM — PCA9685 eliminates jitter
Typical Single-Controller
- •Single CPU handles all logic and timing
- •Motor-level commands (raw PWM)
- •Shared power rail (limited capacity)
- •CPU overload → motion failure
- •Software-timed PWM (jittery)
Three-Layer Architecture
Cognitive & Interaction (Raspberry Pi)
High-level intelligence and decision-making
- →Behavior selection & AI inference
- →Network connectivity & data logging
- →Dialogue and speech processing
- →Web UI and remote control
Real-Time Control & Safety (Arduino)
Deterministic loops and safety enforcement
- →Joint limit validation
- →Heartbeat monitoring & failsafe
- →Current limiting and thermal checks
- →Emergency stop handling
Precision Motion (PCA9685 + Servos)
Hardware-timed PWM and actuation
- →12-bit PWM resolution
- →Jitter-free synchronized pulses
- →Independent from CPU timing
- →Smooth, lifelike motion
Key Advantage: If the Pi becomes unresponsive, the Arduino layer maintains control and safety. If software spikes CPU, motion continues without jitter because PCA9685 is hardware-independent. This separation prevents cascading failures and enables reliable long-running demos.
Command Execution Flow
Step 1: High-Level Decision (Pi)
User triggers gesture from web UI or dialogue system decides response
{
"gesture": "greeting_wave",
"speed": "normal",
"priority": "high"
}Step 2: Command Packet (Pi → Arduino)
Motor gateway translates gesture into binary serial packet
UART /dev/serial0
[0xAA][CMD_TRAJ][LEN][joint_0_angle][joint_1_angle]...[CRC]
Baud: 115200
Timing: ~50ms latencyStep 3: Real-Time Execution (Arduino)
Arduino receives command, validates, enforces limits, computes per-joint angles
// Pseudo-code validation
for each joint:
angle = clamp(requested_angle, min, max)
current_limit = check_servo_load()
if current_limit exceeded:
ABORT and notify Pi
else:
queue_for_pca(joint_id, angle)Step 4: Actuation (PCA9685 → Servos)
Arduino issues I²C writes to PCA boards for synchronized motion
I²C (GPIO2/GPIO3)
Write to PCA1 (0x40) channels 0-15
Write to PCA2 (0x41) channels 0-15
50 Hz clock synchronized across all boards
All servos move together (no jitter)Motion Intelligence & Choreography
Gesture-Level Sequences
Rather than raw servo commands, A.V.A uses gesture-level abstractions that combine multiple joints into context-aware behaviors.
// Example sequence: "Greeting Wave"
{
"sequence_id": "seq_greeting_01",
"name": "Greeting",
"steps": [
{
"time": 0.0,
"joints": {
"head_yaw": 0,
"right_shoulder_pitch": -45,
"right_elbow_pitch": 0
}
},
{
"time": 0.6,
"joints": {
"head_yaw": 20,
"right_shoulder_pitch": 30,
"right_elbow_pitch": -60
}
},
{
"time": 1.2,
"joints": {
"head_yaw": 0,
"right_shoulder_pitch": -45,
"right_elbow_pitch": 0
}
}
]
}Benefits:
- • Reusable sequences
- • Context-aware execution
- • Easy choreography editing
- • Safety enforced per-step
Export & Import:
- • JSON format for portability
- • Version control friendly
- • Server validates before dispatch
- • Rollback on failure
Safety & Fault Isolation
State Machine
In SafeHold, servos freeze at current position. No new commands accepted until Pi confirms heartbeat and system health.
Heartbeat
Pi sends periodic signal. Arduino enters SafeHold if lost.
E-STOP
Hardware button cuts servo power immediately. Notifies Pi via GPIO interrupt.
Brownout
Low battery triggers graceful shutdown. Arduino holds safe pose.
Scalability & Expansion
Add PCA9685 Boards
Chain additional boards via I²C address pins (0x40 – 0x45 = 6 boards max)
- • Each board adds 16 servo channels
- • Configure address via A5-A0 pins
- • Update pca_channels.csv with new mappings
Add Sensors
IMU, depth camera, or other peripherals
- • Use existing I²C or SPI buses
- • Monitor CPU & bandwidth usage
- • May require heatsink / cooling
OTA Firmware Updates
Update Arduino and Pi firmware over network
- • Web UI upload interface
- • Rollback on failure
- • Log all updates for audit
Upgrade AI Models
Move from TF-Lite to ONNX or add accelerators
- • Coral or AI HAT offload
- • Monitor thermal & power
- • Benchmark inference latency
Why This Architecture Matters
No Single-Point Failure
Pi overload doesn't halt motion. Arduino maintains control independently. If one PCA board fails, motion continues on remaining boards.
Uptime for Long Demos
Dedicated watchdogs, power isolation, and thermal monitoring ensure stable operation for hours without interruption. Graceful degradation if faults occur.
Smooth, Human-Like Motion
Hardware PWM eliminates jitter. Synchronized multi-servo sequences feel coordinated and intentional. Users perceive A.V.A as responsive and lifelike.
Maintainable & Extensible
Clear separation of concerns. Software engineers, hardware engineers, and researchers can work independently. Easy to add new joints, sensors, or behaviors without redesign.
Software Details
For complete information on the Raspberry Pi, ROS2 stack, and telemetry APIs, visit the Software page.
Hardware Details
For wiring diagrams, PCA channel mapping, power architecture, and testing checklists, visit the Hardware page.