188  Protocol Bridging Fundamentals

188.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Size Gateway Processors: Determine processor and memory requirements based on edge processing needs
  • Select Connectivity: Choose between wired and wireless links for different IoT scenarios
  • Choose Embedded OS: Evaluate when an OS is needed and select appropriate embedded operating systems
  • Understand Bridging Complexity: Recognize why protocol translation requires more than simple message forwarding

188.2 Introduction

Learn the foundational concepts of protocol bridging including processor requirements, connectivity options, and operating system considerations for IoT gateways.

188.3 Determining Processor Requirements

⏱️ ~15 min | ⭐⭐ Intermediate | 📋 P04.C11.U01

To determine processor and memory requirements for an IoT device is complex, depending on: - How much processing is done at the Edge - How complex the filtering and signal conditioning is - The rate at which data is read

Use case examples: - Room temperature monitoring: Reading every few minutes → low-end processor with very limited memory - Industrial fan vibration measurement: Sampling at several thousand samples per second, storing several minutes’ worth of data → substantial memory and processing power needed

The amount of available memory and processor specifications (clock speed, number of cores) determine the rate at which data can be processed. Non-volatile flash memory capacity determines how much data can be stored on the device.

Processing requirements: - Edge processing: Requires substantially more processing capabilities - Basic processing: Validating, normalizing, scaling, or data conversion only

188.4 Connectivity

⏱️ ~10 min | ⭐ Foundational | 📋 P04.C11.U02

We can’t have an Internet of Things device without connectivity to the Internet! How we connect, and what attributes are important for the application, are additional considerations when selecting a platform or prototyping kit.

188.4.1 Communication Requirements

Foundational

The microcontroller needs to: - Talk to sensors and actuators - Connect to the Internet, either directly or via a gateway/concentrator - Publish data to services and apps in the Cloud

188.4.2 Wireless vs Wired

Wireless links (802.11 Wi-Fi, Bluetooth, LPWAN, LoRa, SigFox): - Advantages: Mobile, flexible deployment - Limitations: Power consumption, restricted range, comparatively low data rates

Wired links (SPI, I2C, Ethernet, RS-232): - Advantages: Higher data rates, power efficiency - Disadvantages: Require infrastructure installation - Best for: Stationary devices (smart housing, industrial manufacturing lines)

188.5 Operating System Considerations

The decision to run an Operating System, or not, significantly impacts your choice of micro. One way to determine whether to include an OS is to look at memory and I/O requirements.

188.5.1 When is an OS NOT Necessary?

If your application: - Requires less than 16 kilobytes of RAM or Flash (usually 8 or 16-bit micro) - Can be implemented in a single loop program - Example: digital clock

However, with ever-reducing hardware costs, even simple applications now include an OS.

188.5.2 Things to Consider When Choosing an Embedded OS

Memory Footprint: - RAM requirement to run the OS - Must be minimal for constrained IoT devices - Low memory, power, and processing requirements

Security: - Communication encryption - Secure bootloader - Code protection

Modularity/Compatibility: - Kernel (core) performs basic requirements - Isolates software from hardware specifics - All other features (e.g., USB support) should be modular - Kernel often ported to other hardware platforms for easier migration

Support and Reliability: - Devices often installed in remote locations - Expected to run for years without rebooting - Well-supported by vendor or established open source community - Certifications may be required: - DO-178B for avionics systems - IEC 61508 for industrial control systems - ISO 62304 for medical devices - SIL3/SIL4 IEC for transportation and nuclear systems

188.6 Summary

This chapter covered learn the foundational concepts of protocol bridging including processor requirements, connectivity options, and operating system considerations for iot gateways.

Key Takeaways: - Protocol bridging requires understanding timing semantics, not just message translation - Gateway processor requirements depend on edge processing complexity - Different protocols (I2C, SPI, UART, MQTT) have fundamentally different characteristics - Effective gateways implement buffering, state management, and data transformation

188.8 What’s Next

Continue to Sensor Communication Protocols to learn about deep dive into sensor-to-microcontroller protocols including i2c, spi, uart, and system communication methods.