This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:iot-open:embeddedcommunicationprotocols2 [2023/08/21 10:27] – [Digital] pczekalski | en:iot-open:embeddedcommunicationprotocols2 [2024/03/05 13:43] (current) – pczekalski | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Embedded | + | ====== Embedded |
- | + | {{: | |
- | IoT systems and related data flows are typically structured into three basic layers {{ref> | + | IoT systems and related data flows are typically structured into three primary |
((Internet of Things: Architectures, | ((Internet of Things: Architectures, | ||
((Internet of Things: Security Vulnerabilities and Challenges; I. Andrea, C. Chrysostomou, | ((Internet of Things: Security Vulnerabilities and Challenges; I. Andrea, C. Chrysostomou, | ||
- | The lowest layer is the Perception (physical, acquisition) Layer, the intermediate is the Network Layer, and the higher is the Application Layer. The function of the Perception layer is to keep in contact with the physical environment. Devices working in this layer are designed as embedded systems with a network module. The modern embedded device includes a microcontroller, | + | The lowest layer is the Perception (physical, acquisition) Layer, the intermediate is the Network Layer, and the higher is the Application Layer. The function of the Perception layer is to keep in contact with the physical environment. Devices working in this layer are designed as embedded systems with a network module. The modern embedded device includes a microcontroller, |
<figure iotstack3> | <figure iotstack3> | ||
- | {{: | + | {{ : |
< | < | ||
</ | </ | ||
<figure iotstack5> | <figure iotstack5> | ||
- | {{: | + | {{ : |
< | < | ||
</ | </ | ||
- | This chapter describes some popular internal protocols used to communicate between microcontrollers and other electronic elements | + | This chapter describes some popular internal protocols used to communicate between microcontrollers and other electronic elements |
The embedded protocol that can be used in specific implementation depends mainly on the type of peripheral element. The method of connection and data exchange strictly depends on the kind of element. Some parts are analogue sensors that should be connected to an analogue-digital converter; some can be connected to digital pins working as inputs (for sensors) or outputs (for actuators). | The embedded protocol that can be used in specific implementation depends mainly on the type of peripheral element. The method of connection and data exchange strictly depends on the kind of element. Some parts are analogue sensors that should be connected to an analogue-digital converter; some can be connected to digital pins working as inputs (for sensors) or outputs (for actuators). | ||
- | ===== Analog | + | === Analog === |
- | Simple sensors do not implement the conversion and communication logic, and the output is just the analogue signal – voltage level depending on the value of the measured parameter. It needs to be further converted into a digital representation; | + | Simple sensors do not implement the conversion and communication logic, and the output is just the analogue signal – voltage level, depending on the value of the measured parameter. It needs to be further converted into a digital representation; |
Examples of sensors with analogue output are a photoresistor, | Examples of sensors with analogue output are a photoresistor, | ||
- | ADC conversion is a process of conversion of the continuous-time signal into the discrete one. It has 2 crucial parameters to consider: | + | ADC conversion is a process of conversion of the continuous-time signal into a discrete one. It has 2 crucial parameters to consider: |
- | * Sampling rate: usually measured in Hz (kHz, MHz) is a sampling frequency, or in other words, defines a time period between two consecutive reads. A Nyquist-Shannon theorem defines minimum sampling frequency. Oversampling (using higher than Nyquist-Shannon) is common because many ADC converters built into the MCUs tend to be noisy due to the electromagnetic inference of other components, such as, i.e. built-in radio. Oversampling brings the capability to average consecutive reads and obtain more reliable and less noisy ADC conversion. | + | * Sampling rate: usually measured in Hz (kHz, MHz) is a sampling frequency, or in other words, defines a time period between two consecutive reads. A Nyquist-Shannon theorem defines minimum sampling frequency. Oversampling (using higher than Nyquist-Shannon) is common because many ADC converters built into the MCUs tend to be noisy due to the electromagnetic inference of other components, such as e.g. built-in radio. Oversampling brings the capability to average consecutive reads and obtain more reliable and less noisy ADC conversion. |
- | * Sampling resolution: measured in bits, defines the minimum change in the input voltage | + | * Sampling resolution: measured in bits, defines the minimum change in the input voltage the device can measure, e.g. 12-bit resolution brings 4096 values mapped to the input range. |
- | It is worth nothing to mention | + | It is worth noting |
- | ===== Digital | + | === Digital === |
- | Simple, true/false information can be processed via digital I/O. Most devices use positive logic, where, | + | Simple, true/false information can be processed via digital I/O. Most devices use positive logic, where, e.g. +5 V (TTL) or +3.3 V (the most popular, yet other voltage standards exist) presents a logical one, also referenced as //HIGH//. In contrast, 0V gives a logical zero, referenced as //LOW//. In real systems, this bounding is fuzzy. It brings some tolerance, simplifying, |
- | Alternating //HIGH// and //LOW// constitutes a square wave signal, usually used as a clock signal (when symmetrical) or used to control power delivered to the external devices with means of so-called | + | Alternating //HIGH// and //LOW// constitutes a square wave signal, usually used as a clock signal (when symmetrical) or used to control |
- | + | === Communication | |
- | ===== Communication | + | Elements that need more data to be transferred (e.g. displays) usually use some digital data transmission protocol. |
- | Elements that need more data to be transferred (e.g. displays) usually use some digital data transmission protocol. | + | |
* In simplex mode, only one of the two devices on a link can transmit; the other can only receive. The simplex mode can use the entire capacity of the channel to send data. | * In simplex mode, only one of the two devices on a link can transmit; the other can only receive. The simplex mode can use the entire capacity of the channel to send data. | ||
* In half-duplex mode, each station can transmit and receive, but not simultaneously. When one device sends, the other can only receive, and vice versa. | * In half-duplex mode, each station can transmit and receive, but not simultaneously. When one device sends, the other can only receive, and vice versa. | ||
Line 42: | Line 41: | ||
Asynchronous data transmission does not need any separate synchronization signal, but the transmitter and receiver must use the exact timings, and synchronization information must be included in the information transmitted. Examples of asynchronous interfaces implemented in microcontrollers are 1-Wire and UART (Universal Asynchronous Receiver Transmitter). | Asynchronous data transmission does not need any separate synchronization signal, but the transmitter and receiver must use the exact timings, and synchronization information must be included in the information transmitted. Examples of asynchronous interfaces implemented in microcontrollers are 1-Wire and UART (Universal Asynchronous Receiver Transmitter). | ||
- | | + | <WRAP excludefrompdf> |
- | * [[en: | + | Details for selected protocols are presented in the following chapters: |
- | * [[en: | + | * [[en: |
- | * [[en: | + | |
+ | * [[en: | ||
+ | * [[en: | ||
+ | * [[en: | ||
+ | </ | ||