IoT Hardware Interfacing

Introduction to IoT Interfaces, Communication & Processing

Ngesa Marvin 10x
IoT/5G Extreme Ideas Lab
4 min readJan 4, 2017

--

I this blog I discuss the basic common interfaces used when building embedded devices.

A Microcontroller is a wonderful piece of engineering. For it to do many things, it needs to interact with the outside world(Input and Output devices). The process of connecting devices together so that they can exchange the information is called interfacing. In order for these devices to swap their information, they must share a common communication protocol.

Generally, communication protocol can be separated two categories: parallel or serial.

Interfaces

A parallel interface refers to a multi line channel with each line capable of transmitting several bits of data simultaneously. They usually require buses of data — transmitting across eight, sixteen, or more wires. Data is transferred in huge, crashing waves of 1’s and 0’s.

Serial interfaces stream their data, one single bit at a time. These interfaces can operate on as little as one wire, usually never more than four.

Serial interfaces have certain advantages over parallel interfaces. The most significant advantage is simpler wiring. In addition, serial interface cables can be longer than parallel interface cables, because there is much less interaction (crosstalk) among the conductors in the cable.

Most hardware interfaces are serial interfaces sacrificing potential speed in parallel. Serial interfaces generally use multiple wires to control the flow and timing of binary information along the primary data wire. Each type of hardware interface defines a method of communicating between a peripheral and the central processor.

IoT hardware platforms use a number of common interfaces. Sensor and actuator modules can support one or more of these interfaces:

  • USB. Universal Serial Bus is a technology that allows a person to connect an electronic device to a microcontroller. It is a fast serial bus.
  • GPIO. General-purpose input/output pins area generic pin on an integrated circuit or computer board whose behavior — including whether it is an input or output pin — is controllable by the user at run time. GPIO pins have no predefined purpose, and go unused by default. GPIO pins can be designed to carry digital or analog signals, and digital pins have only two states: HIGH or LOW.
  • Digital GPIO can support Pulse Width Modulation (PWM). PWM lets you very quickly switch a power source on and off, with each “on” phase being a pulse of a particular duration, or width. The effect in the device can be a lower or higher power level. For example, you can use PWM to change the brightness of an LED; the wider the “on” pulses, the brighter the LED glows.
  • Analog pins might have access to an on-board analog-to-digital conversion (ADC) circuit. An ADC periodically samples a continuous, analog waveform, such as an analog audio signal, giving each sample a digital value between zero and one, relative to the system voltage.
  • When you read the value of a digital I/O pin in code, the value can must be either HIGH or LOW, where an analog input pin at any given moment could be any value in a range. The range depends on the resolution of the ADC. For example an 8-bit ADC can produce digital values from 0 to 255, while a 10-bit ADC can yield a wider range of values, from 0 to 1024. More values means higher resolution and thus a more faithful digital representation of any given analog signal.
  • The ADC sampling rate determines the frequency range that an ADC can reproduce. A higher sampling rate results in a higher maximum frequency in the digital data. For example, an audio signal sampled at 44,100 Hz produces a digital audio file with a frequency response up to 22.5 kHz, ignoring typical filtering and other processing. The bit precision dictates the resolution of the amplitude of the signal.
  • I2C. Inter-Integrated Circuit serial bus uses a protocol that enables multiple modules to be assigned a discrete address on the bus. I2C is sometimes pronounced “I two C”, “I-I-C”, or “I squared C”. I has two wires, a clock and data wire.
  • SPI. Serial Peripheral Interface/Interchange Bus devices employ a master-slave architecture, with a single master and full-duplex communication.
  • UART. Universal Asynchronous Receiver/Transmitter devices translate data between serial and parallel forms at the point where the data is acted on by the processor. UART is required when serial data must be laid out in memory in a parallel fashion.
  • RS 232 Recommended Standard 232 is used for obtaining communication between the computer and circuit such to transfer data between circuit and computer.

Developing embedded systems that interface microcontrollers to the outside world is a fascinating endeavor.

If you found this helpful, click the 👏. Follow this publication for more tutorials on The Internet of Things.

NB-If you have any IoT concepts you’d like explained in a post, any question, comment, or suggestions, please let me know. I’ll get back to as many as I can.

--

--

Ngesa Marvin 10x
IoT/5G Extreme Ideas Lab

Electronic Engineer. Engineering Manager. AI Innovator, Intel. Grew @LiquidInTech, Deep Learning Abantu. Wabi -Sabi. #AI #Cloud #5G Freak. Opinions are my own