Communication Protocols
The Modular Mechanica system uses several communication protocols to ensure seamless integration between components.
MMS-Link Protocol
MMS-Link is the primary backbone protocol that connects all components in the system.
Physical Connection
MMS-Link uses an RJ45 connector with 8 pins:
| Pin | Function |
|---|---|
| 1 | CAN2 Low |
| 2 | CAN2 High |
| 3 | Ground |
| 4 | CAN1 Low |
| 5 | CAN1 High |
| 6 | 12V Standby |
| 7 | USB D- |
| 8 | USB D+ |
Communication Buses
The system supports multiple communication buses:
- CAN Buses - Two independent CAN buses (CAN1 + CAN2) for main communication
- USB Bus - For debugging, programming, and data transfer
- 12V Standby - Auxiliary power supply
- Ground - Common reference point
Topology
The MMS-Link protocol follows this topology:
Moducard Cards ↔ Backplane ↔ Adapter ↔ MMS Modules
Chainbus Protocol
Chainbus is the communication protocol between MMS modules and their hat modules.
Physical Connection
Chainbus uses a DIN41612 connector with 3 rows × 16 pins:
ROW A (16 pins):
- Raw GPIO lines (Altmode1–Altmode16)
ROW B (8 pins):
- Address lines (8× addr0–addr7)
- Digital bus: I2C (SDA, SCL), SPI (CS, SCK, MOSI, MISO), UART (RX, TX)
ROW C (4 pins):
- Power supply: GND, +5V, BRD_VIN, +12V stdby
Communication Modes
Chainbus Mode
- Uses ROW B + ROW C
- Standard communication with addressable hat modules
- Supports I2C, SPI, UART protocols
Altmode
- Uses all three rows (A + B + C)
- Full GPIO access for advanced applications
- Used primarily for VESC and Betaflight integration
Addressing System
The addressing system works through position-based selection:
- Address Lines: Each hat has one address line
- Chain Propagation: Addresses are passed through the chain with position-based addressing
- Selection Process: MMS activates addrN to select hat at position N
Example Communication Flow
-
Step 1: MMS sets addr1 = active
- Hat at position 0 sees addr1 (not addr0) – doesn't react
- Hat at position 1 sees addr1 as addr0 – activates
-
Step 2: MMS sends data via I2C/SPI/UART
- All hats connected to same data lines
- Only active hat receives and processes the data
-
Step 3: MMS changes address to different value
- New hat at different position becomes active
- Previous hat is disconnected from communication
Protocol Comparison: Moducard vs MMS
| Feature | Moducard | MMS |
|---|---|---|
| Communication Medium | Backplane and MMS-Link | Chainbus and MMS-Link |
| Main Functions | CPU, PSU, microcontrollers | Peripheral modules (sensors, drivers) |
| Primary Protocol | CAN buses | Chainbus protocol |
| Physical Connection | DIN41612 connectors | DIN41612 and RJ45 |
| Role in System | "Brain" | "Nerves" and "Muscles" |
Integration Between Systems
The two systems work together through the MMS-Link protocol:
- Moducard cards communicate with MMS modules via MMS-Link
- MMS modules connect to cards using CAN buses
- Communication flows through the backplane to the central unit
- Data exchange between systems is seamless and transparent
This architecture allows for:
- Easy debugging and prototyping from external computers
- Full system visibility as ROS topics
- Ability to control robots from anywhere in the world via WiFi
- Transparent system operation with no hidden complexity