| Feature | RS-485 | RS-232 | TTL |
|---|---|---|---|
| Signal Type | Differential (A/B lines) | Single-ended | Single-ended (0V/5V or 3.3V) |
| Max Distance | 1200m (at ≤100kbps) | 15m (at 115.2kbps) | Typically <1m (on-board) |
| Baud Rate | Up to 10Mbps | Up to 1Mbps | Up to 50Mbps (short-range) |
| Node Capacity | 256 nodes (with termination) | Point-to-point | Point-to-point/multi-drop |
| Noise Immunity | Excellent (CMRR ≥20dB) | Poor | Very poor (low-noise only) |
| Parameter | RS-485 | RS-232 | TTL |
|---|---|---|---|
| Logic "1" | A-B > +200mV | -3V ~ -15V | >2.4V (5V system) |
| Logic "0" | A-B < -200mV | +3V ~ +15V | <0.8V (5V system) |
| Idle State | A-B ≈ 0V (needs bias) | Negative voltage | Determined by pull-up/down |
| Drive Voltage | ±1.5V ~ ±5V diff. | ±5V ~ ±15V single-ended | 0V-Vcc (chip supply) |
| Scenario | Recommended | Reason |
|---|---|---|
| Industrial Fieldbus | RS-485 | Long-distance, multi-node, EMI-resistant (e.g., Modbus RTU) |
| Legacy PC Serial | RS-232 | Backward compatibility (e.g., vintage PLC programming ports) |
| MCU Board-Level | TTL | Direct connection (e.g., Arduino-sensor communication) |
| High-Speed Short-Range | TTL | No protocol overhead (e.g., FPGA-ADC communication) |
RS-485 (Half-Duplex):
MCU_TX ----→ MAX485 DI
MCU_RX ←---- MAX485 RO
MAX485 DE/RE --→ Enable Control
Bus: A ────────┬─────── 120Ω terminator
B ────────┘
RS-232 (DB9 Pinout):
PC (DB9) ────── Device (DB9)
2 (TXD) ────→ 3 (RXD)
3 (RXD) ←─── 2 (TXD)
5 (GND) ────┐
└── 5 (GND)
TTL Direct Connect:
MCU_TX ───→ Sensor_RX MCU_RX ←─── Sensor_TX Shared GND
| Aspect | RS-485/RS-232 | TTL |
|---|---|---|
| Data Format | Configurable baud/stop bits | Raw voltage, no protocol |
| Error Check | Optional parity | Hardware-dependent |
| Typical ICs | MAX485/MAX232 | Direct MCU GPIO |
RS-485:
Must use twisted pair (120Ω impedance)
Terminate both ends with 120Ω resistors
Avoid star topology (use daisy-chain)
RS-232:
Beyond 15m requires line drivers
Avoid parallel routing with power cables
TTL:
30cm needs buffer (e.g., 74HC245)
Shield sensitive signals
| Type | IC Cost | Wiring Cost | Development Effort |
|---|---|---|---|
| RS-485 | Medium ($1-3) | High (shielded cable) | Medium (termination) |
| RS-232 | Low ($0.5-2) | Medium (DB9 cable) | Low (plug-and-play) |
| TTL | None | Very Low | Very Low (no protocol) |
TTL-to-RS485: MAX485/SP3485
TTL-to-RS232: MAX232/SP3232
RS232-to-RS485: Dedicated converter (e.g., Advantech ADAM-4520)
graph TD A{Distance >15m?} -->|Yes| B[Choose RS-485] A -->|No| C{Multi-node?} C -->|Yes| B C -->|No| D{Legacy device?} D -->|Yes| E[Choose RS-232] D -->|No| F[Choose TTL]
RS-485: Industrial首选 for long-distance/multi-node/EMI resistance
RS-232: Legacy compatibility, being replaced by USB
TTL: Optimal for high-speed board-level communication