Communication is the process of transferring information from one entity to another in a reliable and controlled manner.
In embedded systems, communication allows:
- Microcontrollers to talk to sensors
- Processors to talk to memory
- Devices to talk to other devices
- Systems to talk to cloud platforms
- Humans to talk to machines
Without communication, a microcontroller is just a calculator with no awareness of the outside world.
At the lowest level, communication is always:
Information → Encoding → Transmission → Decoding → Action
Now let’s formalize this using the basic communication model.
The Basic Communication Model
Every communication system contains three fundamental elements:
+----------+ Medium +----------+
| Sender | --------------------> | Receiver |
+----------+ +----------+
^ |
| |
+------------ Feedback -----------+
Components Explained
- Sender (Transmitter)
Generates the data.
- Medium (Channel)
Carries the signal (wire, air, fiber, etc.).
- Receiver
Interprets the signal and extracts information.
- Noise
Unwanted disturbance that corrupts data.
Noise
↓
Sender → Channel → Receiver
In embedded systems, noise is a serious enemy:
- Electro Magnetic Interference (EMI)
- Crosstalk
- Voltage spikes
- Radio Frequency Interference (RFI)
Understanding this model leads us to the next important question:
How is the data physically represented?
Signals: Analog vs Digital
Before discussing wired or wireless, we must understand signal types.
Analog Signals
Continuous waveform.
Voltage
|
| /¯\ /¯\ /¯\
| / \ / \ / \
|___/ \__/ \___/ \____ Time
Used in:
- Audio
- Radio
- Sensors (temperature, pressure)
Digital Signals
Discrete logic levels.
Voltage
|
5V| ┌───────┐ ┌───────┐
| │ │ │ │
0V└─┘ └──────┘ └──── Time
Used in:
- Microcontrollers
- Digital buses
- Computers
Digital communication dominates embedded systems because it is:
- Noise resistant
- Easy to process
- Reliable over distance (with proper design)
Now that we understand signals, we can divide communication into its two major physical categories.
Wired Communication
Wired communication uses a physical conductor to transmit signals.
MCU_A ======= Copper/Fiber ======= MCU_B
The medium may be:
- Copper wire
- Twisted pair
- Coaxial cable
- Optical fiber
Advantages
- High reliability
- High speed
- Low latency
- Secure (harder to intercept physically)
Disadvantages
- Physical installation required
- Limited mobility
- Cable management complexity
Now let’s break wired communication further.
Wired Communication Types in Embedded Systems
Parallel Communication
Multiple data lines transmit bits simultaneously.
D0 ───────────────
D1 ───────────────
D2 ───────────────
D3 ───────────────
CLK───────────────
Used in:
- Old microprocessor buses
- External memory interfaces
Pros
- High speed
Cons
- Many pins
- Crosstalk
- PCB routing complexity
Because of these limitations, industry shifted toward serial communication.
Serial Communication
Bits are transmitted one after another on fewer wires.
Data: 1 0 1 1 0 0 1
Line: ──▁▔▔▁▁▔────
This reduces:
- Pin count
- PCB complexity
- EMI
Now let’s see real-world serial protocols.
UART (Universal Asynchronous Receiver Transmitter)
Point-to-point communication.
MCU_A TX ───────── RX MCU_B
MCU_A RX ───────── TX MCU_B
GND ───────── GND
Characteristics:
- Asynchronous
- No clock line
- Uses baud rate agreement
Used in:
- Debug consoles
- GPS modules
- Bluetooth modules
SPI (Serial Peripheral Interface)
High-speed synchronous communication.
Master
|
MOSI ──────────┐
MISO ──────────┤
SCLK ──────────┤
CS ──────┐ │
│ │
+-------+
| Slave |
+-------+
Characteristics:
- Full duplex
- High speed
- Short distance
Used in:
- Displays
- ADC/DAC
- Flash memory
I2C (Inter-Integrated Circuit)
Multi-device two-wire bus.
SDA ─────────┬────────┬────────
SCL ─────────┬────────┬────────
| |
Slave1 Slave2
Characteristics:
- Address-based
- Multi-master possible
- Lower speed than SPI
Used in:
- Sensors
- EEPROM
- RTC
CAN (Controller Area Network)
Designed for automotive robustness.
MCU1 ----\
MCU2 ----- CAN_H / CAN_L ----- MCU3
MCU4 ----/
Features:
- Differential signaling
- Error detection
- Arbitration
Used in:
- Automotive ECUs
- Industrial systems
Now that we understand wired communication, let's transition naturally to wireless communication — where the medium is no longer copper, but air.
Wireless Communication
Wireless communication transmits data using electromagnetic waves.
Device A ))))) AIR ((((( Device B
Instead of voltage levels on wires, we transmit:
- Radio waves
- Infrared waves
- Microwave signals
Advantages
- Mobility
- No cabling
- Easy deployment
Disadvantages
- Interference
- Security risks
- Higher power consumption
- Regulatory constraints
Wireless communication requires modulation — encoding data into a radio carrier.
Data → Modulation → RF Signal → Antenna → Air
Now let's explore the common wireless technologies used in embedded systems.
Common Wireless Technologies in Embedded Systems
Wi-Fi
High data rate networking.
ESP32 ))))) Router ((((( Cloud
Features:
- TCP/IP stack
- High bandwidth
- Higher power consumption
Used in:
- IoT devices
- Smart home systems
Bluetooth & BLE
Short-range communication.
Phone )))) BLE (((( Sensor
BLE is:
- Low energy
- Ideal for battery devices
Used in:
- Wearables
- Beacons
- Health monitors
Zigbee
Mesh-based low power communication.
Node1 )) Node2 )) Node3 )) Node4
Features:
- Mesh topology
- Low data rate
- Long battery life
Used in:
- Smart lighting
- Building automation
LoRa
Long-range low-power communication.
Sensor )))))))) Gateway ((((((( Cloud
Features:
- Kilometer range
- Very low data rate
- Extremely low power
Used in:
- Agriculture
- Smart metering
- Industrial IoT
Wired vs Wireless Comparison
Let’s summarize from a system design perspective.
| Feature | Wired | Wireless |
|---|---|---|
| Reliability | Very High | Medium |
| Speed | High | Medium |
| Mobility | No | Yes |
| Power Consumption | Low | Higher |
| Security | Physical security | Needs encryption |
| Installation | Complex | Easy |
Engineering Perspective: How to Choose
As a system architect, ask:
- Is mobility required?
- What is the power budget?
- What is the data rate?
- What is the environment (industrial? automotive? home?)?
- What is the security level required?
There is no “best protocol.”
There is only correct protocol for the system constraints.
Network Topology
_(How devices are connected logically)_
Topology defines who communicates with whom.
Star Topology
Used in:
- Bluetooth Low Energy
- Wi-Fi
Structure:
Device A
|
Device B --- Gateway --- Device C
|
Device D
All communication goes through a central node.
In BLE:
- Central = phone
- Peripheral = sensors
In Wi-Fi:
- Access Point = center
- Stations = clients
Advantages:
- Simple design
- Easy security control
- Low memory requirement
- Easy debugging
Disadvantages:
- Single point of failure
- Limited coverage
- Central node overload risk
Mesh Topology
Used in:
- Zigbee
- Thread
Structure:
A ---- B ---- C
\ | |
\ | |
----D ---- E
Devices relay messages for others.
If A wants to talk to E:
A → D → E
Advantages:
- Large coverage
- Self-healing
- No single point of failure
Disadvantages:
- Complex routing
- More RAM/Flash required
- Higher power consumption (routers must stay awake)
Star vs Mesh — Embedded Engineering View
| Factor | Star | Mesh |
|---|---|---|
| Power Consumption | Lower | Higher |
| Complexity | Low | High |
| Coverage | Limited | Extended |
| Firmware Size | Small | Larger |
| Debug Difficulty | Easy | Hard |
If you're building:
- Battery sensor → Star is safer
- Smart building → Mesh scales better