Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:embeddedcommunicationprotocols2 [2023/09/06 08:43] – external edit (Unknown date) 127.0.0.1en:iot-open:embeddedcommunicationprotocols2 [2024/03/05 13:43] (current) pczekalski
Line 1: Line 1:
-====== Embedded communication ====== +====== Embedded Communication ====== 
- +{{:en:iot-open:czapka_p.png?50| General audience classification icon }}{{:en:iot-open:czapka_b.png?50| General audience classification icon }}{{:en:iot-open:czapka_m.png?50| General audience classification icon }}{{:en:iot-open:czapka_e.png?50| General audience classification icon }}\\ 
-IoT systems and related data flows are typically structured into three basic layers {{ref>iotstack3}}, eventually into five {{ref>iotstack5}}, which is less popular and used mostly in advanced research +IoT systems and related data flows are typically structured into three primary layers {{ref>iotstack3}}, eventually into five {{ref>iotstack5}}, which is less popular and mainly used in advanced research 
 ((Internet of Things: Architectures, Protocols, and Applications; P. S. Smruti, R. Sarangi. https://doi.org/10.1155/2017/9324035)) ((Internet of Things: Architectures, Protocols, and Applications; P. S. Smruti, R. Sarangi. https://doi.org/10.1155/2017/9324035))
 ((Internet of Things: Security Vulnerabilities and Challenges; I. Andrea, C. Chrysostomou, G. Hadjichristofi, The 3rd IEEE ISCC 2015 International Workshop on Smart City and Ubiquitous Computing Applications, https://doi.org/10.1109/ISCC.2015.7405513)). \\ ((Internet of Things: Security Vulnerabilities and Challenges; I. Andrea, C. Chrysostomou, G. Hadjichristofi, The 3rd IEEE ISCC 2015 International Workshop on Smart City and Ubiquitous Computing Applications, https://doi.org/10.1109/ISCC.2015.7405513)). \\
-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, sensors, and actuators. External memories and other typical microcomputer peripherals are usually built into the microcontroller, so they do not require a special connection. Sensors are elements that convert a value of some physical parameter into an electrical signal, while actuators are elements that control environmental parameters. Sensors and actuators are interfaced with the microcontroller using different connection types, including simple digital or analogue connections or much more complex communication links and protocols. IoT nodes in the Perception layer communicate with higher layers using much more complex data transmission methods. The wire and wireless transmission protocols used between the Perception layer and other layers are described in [[en:iot-open:communications_and_communicating_sut|]]. +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, sensors, and actuators. External memories and typical microcomputer peripherals are usually built into the microcontroller, so they do not require a special connection. Sensors are elements that convert a value of some physical parameter into an electrical signal, while actuators are elements that control environmental parameters. Sensors and actuators are interfaced with the microcontroller using different connection types, including simple digital or analogue connections or much more complex communication links and protocols. IoT nodes in the Perception layer communicate with higher layers using more complex data transmission methods. The wireless transmission protocols between the Perception layer and other layers are described in [[en:iot-open:communications_and_communicating_sut|]]. 
  
 <figure iotstack3> <figure iotstack3>
Line 20: Line 20:
 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; this process can be made by the Analogue to Digital Converters (ADC), implemented as the internal part of a microcontroller or separate integrated circuit. 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; this process can be made by the Analogue to Digital Converters (ADC), implemented as the internal part of a microcontroller or separate integrated circuit.
 Examples of sensors with analogue output are a photoresistor, thermistor, potentiometer, and resistive touchscreen. Examples of sensors with analogue output are a photoresistor, thermistor, potentiometer, and resistive touchscreen.
 ADC conversion is a process of conversion of the continuous-time signal into a 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 e.g. 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 that the device can measure, i.e. 12-bit resolution brings 4096 values that are mapped to the input range. Obviously, the ideal ADC converter maps the discrete values to the voltage input range in a linear way. Still, in real-life applications, input characteristics of the ADC used to be non-linear, and software correction may be required once input characteristics are evaluated. +  * 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. The ideal ADC converter linearly maps the discrete values to the voltage input range. Still, in real-life applications, input characteristics of the ADC used to be non-linear, and software correction may be required once input characteristics are evaluated. 
-It is worth noting to mention that each ADC has its useable input range (voltage), and the input and analogue signal should be altered accordingly. In real applications, input signal adaptation requires external electronics; thus, many ADC converters provide the ability to amplify the input signal, and it can be programmed.+It is worth noting that each ADC has its useable input range (voltage), and the input and analogue signal should be altered accordingly. In real applications, input signal adaptation requires external electronics; thus, many ADC converters provide the ability to amplify the input signal, and it can be programmed.
  
-===== Digital ===== +=== Digital === 
-Simple, true/false information can be processed via digital I/O. Most devices use positive logic, where, i.e. +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 presents a logical zero, referenced as //LOW//. In real systems, this bounding is fuzzy. It brings some tolerance, simplifying, e.g. communication from 3.3 V output to 5 V input, without a need for the conversion (note, the reverse conversion is usually not so straightforward, as 3.3 V inputs driven by the 5V output may burn quickly). A sample sensor providing binary data is a button (On/Off).\\ +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, e.g. communication from 3.3 V output to 5 V input, without a need for the conversion (note, the reverse conversion is usually not so straightforward, as 3.3 V inputs driven by the 5V output may burn quickly). A sample sensor providing binary data is a button (On/Off).\\ 
-Alternating //HIGH// and //LOW// constitutes a square wave signal, usually used as a clock signal (when symmetrical) or used to control the power delivered to the external devices with means of so-called [[en:iot-open:embeddedcommunicationprotocols2:pwm|PWM]].+Alternating //HIGH// and //LOW// constitutes a square wave signal, usually used as a clock signal (when symmetrical) or used to control the power delivered to the external devices with means of so-called PWM.
  
- +=== Communication Protocols ===
-===== Communication protocols =====+
 Elements that need more data to be transferred (e.g. displays) usually use some digital data transmission protocol. It is often a serial protocol, meaning that data is transmitted bit by bit. Serial communication can be done in three modes.  Elements that need more data to be transferred (e.g. displays) usually use some digital data transmission protocol. It is often a serial protocol, meaning that data is transmitted bit by bit. Serial communication can be done in three modes. 
   * 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.
Line 40: Line 39:
  
 Serial data transmission can be done synchronously or asynchronously. In synchronous data transmission, bits are synchronized with a clock signal common to the transmitter and receiver. Examples of synchronous protocols are TWI (Two Wire Interface) and SPI (Serial Peripheral Interface). Serial data transmission can be done synchronously or asynchronously. In synchronous data transmission, bits are synchronized with a clock signal common to the transmitter and receiver. Examples of synchronous protocols are TWI (Two Wire Interface) and SPI (Serial Peripheral Interface).
-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 timingsand 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). 
- +
-  * [[en:iot-open:embeddedcommunicationprotocols2:spi|SPI]], +
-  * [[en:iot-open:embeddedcommunicationprotocols2:twi|I2C]], +
-  * [[en:iot-open:embeddedcommunicationprotocols2:1wire|1-Wire]], +
-  * [[en:iot-open:embeddedcommunicationprotocols2:uart|UART]].+
  
 +<WRAP excludefrompdf>
 +Details for selected protocols are presented in the following chapters:
 +  * [[en:iot-open:embeddedcommunicationprotocols2:PWM]],
 +  * [[en:iot-open:embeddedcommunicationprotocols2:spi]],
 +  * [[en:iot-open:embeddedcommunicationprotocols2:twi]],
 +  * [[en:iot-open:embeddedcommunicationprotocols2:1wire]],
 +  * [[en:iot-open:embeddedcommunicationprotocols2:uart]].
 +</WRAP>
  
en/iot-open/embeddedcommunicationprotocols2.1693989834.txt.gz · Last modified: 2023/09/06 08:43 by 127.0.0.1
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0