Skip to content
Phuc's Blog
Go back

Overview of Physical Works in IoT

Edit page
šŸ“ŒSeries:Internet of Things
Part 5 of 7
View all articles in this series

This blog will provide an overview of the physical layer of IoT devices and how microcontrollers interact with hardware components via GPIO.

Note

šŸ“Œ IoT Series (Part 5 of 6): This is the fifth article in our 6-part IoT series.

Overview of Physical Work

Table of contents

Open Table of contents

What is GPIO?

GPIO Digital Pins

GPIO Digital Pins

Digital Input (Reading Signals)

Microcontrollers read external voltages relative to Ground to determine binary states:

Digital Output (Controlling Components)

The microcontroller actively drives voltage at the pin based on your code to control connected components (e.g., turning on an LED, triggering a relay, or sounding a buzzer):

GPIO Analog Pins

GPIO Analog Pins

Hardware Communication Protocols

Microcontrollers use serial protocols to communicate with sensors, displays, and peripheral chips. Here are the 3 main protocols in IoT:

1. I²C (Inter-Integrated Circuit)

Inter Integrated Circuit


2. UART (Universal Asynchronous Receiver-Transmitter)

UART Communication


3. SPI (Serial Peripheral Interface)

SPI Communication


4. Wireless Protocols

⚔ Quick Protocol Comparison

FeatureUARTI²CSPI
TopologyPoint-to-Point (1 to 1)Multi-Device Bus (1 to Many)Multi-Device Bus (1 to Many)
Signal Wires2 (TX, RX)2 (SDA, SCL)4+ (COPI, CIPO, SCLK, CS)
Clock LineNone (Asynchronous)SCL (Synchronous)SCLK (Synchronous)
Data FlowFull-DuplexHalf-DuplexFull-Duplex
SpeedSlow (~115.2 kbps)Moderate (Up to 3.4 Mbps)Very Fast (10 – 100+ Mbps)
Best ForGPS modules, PC serial, BluetoothTemp/Light sensors, OLEDsSD Cards, Color Displays, Flash

šŸ“– Series Navigation

šŸ‘ˆ Back to Part 4: Connect your device to the Internet
šŸ‘‰ Continue to Part 6: Getting Started with PlatformIO

šŸ“š Complete IoT Getting Started Series

  1. Part 1: Introduction to Internet of Things (IoT)
  2. Part 2: Deeper Dive into Internet of Things (IoT)
  3. Part 3: Sensors and Actuators in Internet of Things (IoT)
  4. Part 4: Connect your device to the Internet
  5. Part 5: Overview of Physical Works in IoT
  6. Part 6: Getting Started with PlatformIO

Edit page
Share this post:

Previous Post
Some basic hardware devices in IoT
Next Post
Connect your device to the Internet

Comments