Unit 2 Elements of IoT Notes PDF
Document Details
![IntegralPopArt3790](https://quizgecko.com/images/avatars/avatar-3.webp)
Uploaded by IntegralPopArt3790
Tags
Summary
This document provides notes on the elements of IoT, focusing on hardware components, specifically Arduino and Raspberry Pi, and communication methods. It's designed for students learning about IoT.
Full Transcript
Unit -2 Elements of IoT 2. 1 Hardware Components - Computing (Arduino, Raspberry Pi) IoT(Internet of Things) is no longera buzzword. With several inspiring use cases, emanating daily, multiple f1rms are now discovering how they could leverage the techno...
Unit -2 Elements of IoT 2. 1 Hardware Components - Computing (Arduino, Raspberry Pi) IoT(Internet of Things) is no longera buzzword. With several inspiring use cases, emanating daily, multiple f1rms are now discovering how they could leverage the technology for business growth. It is fast becoming an important feature for new devices to be IoT based, irrespective of the other technologies implemented, and according to Gartner, by 2020, 95% of new devices and systems will use the IoT. Each is a part of an IoT hardware platform — a combination of hardware, connectivity tools, and software development environment forIoTprojects. Arduino and Pi are not the only and the best IoT platforms worth knowing. In fact, there are dozens of platforms with a diverse choice of hardware, support, security, development infrastructure, and communities. In this article, we'll focus on some popular platforms and try to f1gure out the perfect matches fordifferent IoT projects. Arduino hardware is an affordable and easy to set up option for building a basic IoT device that is supposed to perform one action, for example, read humidity sensor data. Arduino community is one of the oldest in this domain, so there won't bea lack of support or resources. On top of that, Arduino's functionality is easily expandable with on-top shields and multiple digital and analog general-purpose input/output pins. Raspberry Pi is the best choice for data-heavy connected devices like hubs, gateways, datum collectors, or personal cloud servers, however, it will also bea good f1t for simpler IoT applications. Arduino Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino boards can read inputs — light on a sensor,a finger on a button, ora Twitter message — and turn it into an output - activating a motor, turning on an LED, publishing something online. With the ease of programming and the plug and play nature of Arduino based system, it quickly became loved by many in the hardware space. The early Arduino boards were mostly general-purpose microcontrollers that were connected to the internet using GSM and WiFi modules, but as the IoT began to Open up,boards with special features that support the IoT were developed. Boards like the Arduino 101(developed with Downloaded by Manish Mahajan Intel), the MKR 1000, Arduino WiFi Rev 2, and the MKR Vidor 4000 which is the f1rst Arduino board based on an FPGA Chip. Raspberry pi The Raspberry Pi is a Single Board Computer developed by Raspberry Pi Foundation. It is widely popular as a small, inexpensive computing board among experimenters, hobbyists, educators, and technology enthusiasts. While the Raspberry Pi is naturally a general-purpose device, it will be an injustice to ignore the contribution of the raspberry to the development of some oftheIoTproducts and projects currently in vogue. They are generally too robust and sophisticated to be used in the development of simple connected sensors or actuators, but they f1nd applications serving as data aggregators, hubs, and device gateways in IoT projects. The latest of the raspberry pi boards; the Raspberry pi3 model B+ features a 1.4GHz Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC, 2.4GHz and 5GHz IEEE 802.11.b/g/n/ac wireless LAN, Bluetooth 4.2, BLE, and a Gigabit Ethernet port over USB 2.0 (maximum throughput 300 Mbps). Asides from several other features including 4 USB ports, Audio output, to mentiona few, the board comes witha 1GB LPDDR2 SDRAM which makes it quite fast for IoT-based tasks. Key takeaway Arduino is an open-source prototyping platform based on easy-to-use hardware and software. The Raspberry Pi isa Single Board Computer developed by Raspberry Pi Foundation. It is widely popular as a small, inexpensive computing board among experimenters, hobbyists, educators, and technology enthusiasts. 2.2 Communication The communication module is the device's final, but most important, component. This isa device that connects devices to storage, either locally or in the cloud. Communication ports including USB, Modbus, and Ethernet/IP, to mentiona few, can be found in this module. Wireless communication radio technology, such as Wireless fidelity, might be included as well. Communication ports such as USB, serial (232/485), and CAN, to namea few, may be included in this module. It could also contain Wi-Fi, LoRA, ZigBee, and other wireless communication technologies. Downloaded by Manish Mahajan The communications module might be part of the same device as the other modules, or it can be a distinct device dedicated to communications only.A "gateway architecture" isa term used to describe this approach. If you have three sensors ina room that need to send data to the Cloud, you could link them all to a single gateway in the same room, which then consolidates the data and delivers it to the Cloud. WiFi Wi-Fi networking is typically an obvious choice for many developers, especially with Wi-pervasiveness Fi's within the LAN home environment. It's a wireless local area network that uses IEEE 802.11 specifications ina 5GHz ISMfrequency band. Wi-Fi isa short-range technology witha range of around 60 feet between an access point and the user. Wi-Fi isa wireless technology that was created to take the role of Ethernet. Its purpose was to promote cross-seller interoperability using off-the-shelf, simple-to-install, and simple-to-use short-range wireless communication. Although ordinary Wi-Fi isn't always the optimal IoT technology, some IoTapplications can benefit from it, especially in in-building or campus locations. Building and home automation, as well as in-house energy management, are obvious examples of applications where Wi-Fi can be utilized as the communication channel and devices can be connected to electrical outlets. Wi-Fi 802.11ah, often known as "HaLow," is intended specifically for IoT and requires particular clients and infrastructure. Wi-Fi technology vendors are always improving and striving to give better technology. ZigBee ZigBee isa wireless technology that is comparable to Bluetooth and is primarily utilized in industrial environments. It offers low-power operation, high security, robustness, and high performance in complex systems, and it is well positioned to take advantage of wireless control and sensor networks in IoT applications. The most recent version of ZigBee is version 3.0, which essentially unifies the multiple ZigBee wireless technologies intoa single standard. LoRAWAN Downloaded by Manish Mahajan LoRaWAN isa widely used Internet of Things (IoT) technology that addresses wide-area network (WAN) applications. The LoRaWAN standard was created to give low-power WANs thefeatures they need to allow low-cost mobile secure communication in IoT, smart city, and industrial applications. Data rates range from 0.3 kbps to 50 kbps, and it is designed to meet low-power requirements and sustain huge networks with millions of devices. Fig 1: LoRA Satellite communication Mobile phones can communicate with the nearest antenna, which is around 10-15 miles away, thanks to satellite communications. Depending on the speed of communication, these are referred to as GSM, GPRS/ GSM, 3G, 4G / LTE, 5G, and others. Satellite communication, also known as Machine to Machine communication in the loT, allows mobile devices to communicate with one another. The only viable answer to the communication restriction that is the wide-scale interconnection of IoT devices appears to be custom-designed satellite communication. Satellite technology may be able to assist the loT sector in growing and addressing this wide-ranging connection problem. Forsuch heavy loads, data transport speed could become an issue. Nonetheless, it is justa matter of time before novel solutions become available. Satellite providers are already collaborating to develop services and equipment that will allow IoT to reach its full potential. A system to merge f1ber, satellite, and wireless networks is already being developed. Satellite systems are the most effective signal transmission on Earth because of their global nature and capacity to simultaneously broadcast to many sites. Satellite transmission is used in conjunction with terrestrial networks to obtain global coverage. Bluetooth Since Ericsson's inception in 1994, Bluetooth technology has comea long way. Bluetooth was created asa replacement forordinary RS connections, which were previously used to link external devices to computers. Inthe Internet of Things, Bluetooth is used to track devices in the commercial, educational, and health care sectors. Indoor tracking scenarios with minimal power needs benefit greatly from Bluetooth applications. Bluetooth communication, on the other hand, is classified as short-range and does not permit transmission or tracking underwater. Furthermore, Bluetooth connectivity is not recommended forsecurity solutions that involve the transmission of visual or audio data over the network. Low-Energy Bluetooth, which was introduced in 2009, allowed IoT to use Bluetooth asa communication medium. BLE isa wireless standard for small-scale IoT devices like wearables and beacons, allowing Downloaded by Manish Mahajan them to deliver modest quantities of data while consuming very little power. Bluetooth's importance and applications in cars and homes will continue to increase and expand. Imagine getting automatic traffic updates or weather reports on your dashboard throughout your daily commute, or utilizing Bluetooth to set up lighting, thermostat, and home theater systems forthe right mood oroccasion. Key takeaway The communication module is the device's f1naI, but most important, component. This isa device that connects devices to storage, either locally or in the cloud. Wi-Fi networking is typically an obvious choice for many developers, especially with Wi-pervasiveness Fi's within the LAN home environment. ZigBee isa wireless technology that is comparable to Bluetooth and is primarily utilized in industrial environments. Satellite communication, also known as Machine to Machine communication in the IoT, allows mobile devices to communicate with one another. Bluetooth communication, on the other hand, is classified as short-range and does not permit transmission or tracking underwater. 2.3 Sensing Sensors can be found all over the place. They can be found inour homes and businesses, as well as retail malls and hospitals. They're built into smartphones and playa key role in the Internet of Things (IoT). Sensors have existed for quite some time. Infrared sensors have been around since the late 1940s, while the flrst thermostat was launched in the late 1880s. The Internet of Things (IoT) and its industrial cousin, the Industrial Internet of Things (IIoT), are taking sensor usage to new heights. Sensors, in general, are devices that detect and respond to changes intheir surroundings. Light, temperature, motion, and pressure are all examples of possible inputs. Sensors produce useful data, which they can exchange with other connected devices and management systems if they are connected to a network. Sensors are vital to the success of many modern organizations. They can alert you to possible issues before they turn into major issues, allowing flrms to do preventative maintenance and avoid costly downtime. Downloaded by Manish Mahajan A good sensor should have these three characteristics: It needs to be attentive to the phenomenon it's tracking. It shouldn't be affected by other bodily factors. During the measuring procedure, it should not change the phenomenon being measured. We can usea variety of sensors to measure practically all of the physical properties around us. Thermometers, pressure sensors, light sensors, accelerometers, gyroscopes, motion sensors, gas sensors, and many other common sensors are widely used ineveryday life. Several properties can be used to describea sensor, the most essential of which is: Range - The sensor's range refers to the phenomenon's highest and minimum values. Sensitivity - Sensitivity is defined as the smallest change in the measured parameter that results ina noticeable change inthe output signal. Resolution - The sensor's resolution is the smallest change in the phenomenon it can detect. Sensor classification Several criteria can be used to classify sensors: Passive or Active - Active sensors, on the other hand, require an external power source to monitor an environment, whereas passive sensors do not. Another classification is dependent on how the property was detected and measured (mechanical, chemical, etc.). Analog or Digital - Digital sensors produce a discrete signal, whereas analog sensors produce an analog, or continuous, signal. Types of sensors Downloaded by Manish Mahajan There are many different types of IoT sensors, as well as numerous applications and use cases. Here are ten of the most common types of IoT sensors, as well as some oftheir applications. 1. Temperature sensors Temperature sensors detect temperature changes and translate them to data by measuring the quantity of heat energy present in a source. Manufacturing machinery frequently necessitates specific environmental and device temperatures. Similarly, soil temperature is an important determinant incrop growth inagriculture. 2. Humidity sensors These sensors determine how much water vapor is present in the environment of airor other gases. Humidity sensors are often found in both industrial and domestic heating, venting, and air conditioning systems. They can also be found ina variety of different places, such as hospitals and meteorology stations, where they record and forecast weather. 3. Pressure sensors Changes ingases and liquids are detected bya pressure sensor. The sensor monitors changes inpressure and conveys them toconnected systems when they occur. Leak testing, which might occur asa result of degradation, isa common application case. Pressure sensors are also important in the manufacture of water systems since they can easily detect pressure variations or dips. 4. Proximity sensors Proximity sensors are used to detect objects that are close to the sensor without having to touch them. Electromagnetic fields or beams ofradiation, such as infrared, are frequently emitted by these sensors. Proximity sensors havea variety of applications.A proximity sensor in retail can detect motion between a customer and a product that piques his or her attention. Any discounts or special offers on products near the sensor might be notified to the user. Mall parking lots, stadium parking lots, and airport parking lots all use proximity sensors to signal parking availability. They can also be Downloaded by Manish Mahajan employed in production lines in the chemical, food, and a variety of other industries. 5. Level sensors The level of substances such as liquids, powders, and granular materials is detected using level sensors. Level sensors are used ina variety of industries, including oil production, water treatment, and beverage and food manufacturing. Level sensors can measure the amount of rubbish ina garbage can or dumpster, which is a frequent use case for waste management systems. 6. Gyroscope sensors Gyroscope sensors measure the angular rate or velocity, which is commonly defined as the speed and rotation around an axis. Automobiles, such as automobile navigation and electronic stability control (anti-skid) systems, are examples of use cases. Motion sensing for video games and camera shake detection systems are two other applications. 7. Gas sensors These sensors track and detect changes inairquality, such as the presence of toxic, flammable, or dangerous gases. Mining, oil and gas, chemical research, and manufacturing are all industries that use gas sensors. Carbon dioxide detectors, which are found in many homes, area common consumer use case. 8. Infrared sensors By producing or detecting infrared radiation, these sensors detect features in their surroundings. They can also detect the heat that objects emit. Infrared sensors are employed ina range of IoT projects, including healthcare, because they make blood flow and blood pressure monitoring easier. Infrared sensors are used by televisions to decipher the signals supplied bya remote control. Art historians utilizing infrared sensors to observe hidden layers in paintings to assist establish whethera work ofartis real or fake, or has been altered bya restoration technique, is another intriguing application. Downloaded by Manish Mahajan 9. Optical sensors Optical sensors are devices that transform light beams into electrical impulses. Optical sensors havea wide range of applications and use cases. Vehicles in the automotive industry utilize optical sensors to detect signs, obstructions, and other objects that a driver might see while driving or parking. Optical sensors are crucial in the development of self-driving cars. Optical sensors are widely used inmobile phones. Key takeaway Sensors can be found all over the place. They can be found in our homes and businesses, as well as retail malls and hospitals. Sensors are vital to the success of many modern organizations. Temperature sensors detect temperature changes and translate them to data by measuring the quantity of heat energy present ina source. Humidity sensors are often found in both industrial and domestic heating, venting, and air conditioning systems. Pressure sensors are also important in the manufacture of water systems since they can easily detect pressure variations or dips. Proximity sensors are used to detect objects that are close to the sensor without having to touch them. Optical sensors are devices that transform light beams into electrical impulses. 2.4 Actuation A physical object (“thing”) + controller (“brain”) + sensors + actuators + networks make up an IoTdevice (Internet).A machine component or system that moves or regulatesa mechanism or system is known as an actuator. The device's sensors detect the surroundings, and control signals are sent to the actuators based on the activities required. Downloaded by Manish Mahajan An actuator is something likea servo motor. They can move toa defined angular or linear location and are either linear or rotatory actuators. For IoT applications, we can use servo motors and rotate them to 90 degrees, 180 degrees, and other angles as needed. The controller instructs the actuator to conduct the task depending on the sensor data, as shown inthediagram below. Fig 2: Use of actuations Through the actuator, the control system affects the environment. It necessitates an energy supply as well asa control signal. It turns the source of energy intoa mechanical operation when it getsa control signal. On this premise, on the form of energy it uses, it has different types given below. Types of Actuators 1. Hydraulic actuator A hydraulic actuator isa mechanical device that employs hydraulic power to completea task.A cylinder ora fluid motor drives them. According to the needs of the IoTdevice, mechanical motion is translated to rotary, linear, or oscillatory motion. Hydraulic actuators are used in construction equipment because they can createa considerable amount offorce. Advantages Downloaded by Manish Mahajan Hydraulic actuators have the ability to generate significant amounts of force ata high rate. Used inwelding, clamping, and other applications. In car transport carriers, it's used to lower or raise the vehicles. Disadvantages Leaks inhydraulic fluid can reduce performance and complicate cleanup. Noise reduction equipment, heat exchangers, and high-maintenance systems are all required. It is expensive. 2. Pneumatic Actuators A pneumatic actuator converts energy created by vacuum or high-pressure compressed airinto linear or rotary motion. For example, sensors that act like human fingers and are powered by compressed airare used inrobotics. Advantages They area low-cost solution that is employed in extreme temperatures where employing airrather than chemicals isa safer option. They require little maintenance, are long-lasting, and have a lengthy service life. It is quite quick to initiate and stop the action. Disadvantages It can become less efficient if there isa loss of pressure. The aircompressor should be turned on all the time. Downloaded by Manish Mahajan It is possible for airto be polluted, and it must be maintained. 3. Electrical actuators An electric actuator works by converting electrical energy into mechanical torque and is usually powered bya motor.A solenoid-based electric bell is an example ofan electric actuator. Advantages It can automate industrial valves, which makes it useful ina variety of sectors. It makes less noise and is completely safe to use because there are no fluid leaks. It has the ability to be reprogrammed and delivers the highest level of control and precision positioning. Disadvantages It's not cheap. It is highly dependent on the surrounding environment. Key takeaway A physical object (“thing”) + controller (“brain”) + sensors + actuators + networks make up an IoTdevice (Internet). A machine component or system that moves or regulatesa mechanism or system is known as an actuator. A hydraulic actuator isa mechanical device that employs hydraulic power to completea task. Downloaded by Manish Mahajan A pneumatic actuator converts energy created by vacuum or high-pressure compressed airinto linear or rotary motion. An electric actuator works by converting electrical energy into mechanical torque and is usually powered bya motor. 2.5 I/O interfaces The Input Output Interface (IOI) isa technique for exchanging data between internal and external storage and I/Odevices. The Input-Output Interface (I/O) isa means formoving data between internal storage devices, such as memory, and external peripheral devices. A peripheral device, often known as an input-output device, isa device that provides input and output fora computer. Consider the following scenario: Input devices, such asa keyboard and mouse, offer input to the computer, and output devices, such asa monitor and printer, provide output to the computer. In addition to external hard drives, several peripheral devices that can provide both input and output are also available. For peripherals connected toa computer to communicate with the central processing unit, special communication cables are required. The communication link's aim is to reconcile the disparities between the central computer and each peripheral. The following are the main differences: 1. Electronic devices are CPU and memory, whereas electromechanical and electromagnetic devices are peripherals. As a result, signal values may need to be converted. 2. Because peripheral data transfer rates are typically slower than CPU data transfer rates,a synchronization mechanism may be required. 3. The word format inthe CPU and RAM differs from the data codes and formats inthe peripherals. 4. Peripheral operating modes differ from one another and must be managed so as not to interfere with the operation of other peripherals attached to the CPU. Downloaded by Manish Mahajan Computer systems include additional hardware components between the CPU and peripherals to supervise and synchronize all input and out transfers in order to resolve these mismatches. Because they connect the CPU bus to peripheral devices, these components are known as Interface Units. Functions It's utilized to keep the CPU's operating speed in sync with the input- output devices. It chooses the input-output device that is best suited for the input-output device's interpretation. It can send out signals such as control and timing signals. Data buffering is possible through the data bus inthis case. There are several types of error detectors. Serial data is converted to parallel data and vice versa. It can also convert digital data to analog signals and the other way around. 2.6 Software Components- Programming API's (using Python/ Node.js /Arduino) for Communication The Arduino Rest API is a way for Arduino and other external systems to communicate data. It is possible to operate Arduino from afar using the Arduino Rest API framework. The confluence of APIs and IoT creates new integration possibilities. The creation of an API ecosystem is a fascinating topic, and the way we use APIs to access IoT services exposed by remote IoT boards isa difficult component. In greater detail, a client application uses the Arduino Rest API to read or transmit data to the Arduino board. An external system or application that retrieves sensor values isa common usecase forHTTP Rest API. Downloaded by Manish Mahajan When different systems and boards are connected and share information, the Arduino Rest API framework can be used in IoT projects. The Arduino Rest API is used by IoT cloud companies as well. This type of method is used when an external application (client) submits a request to Arduino, and Arduino responds with data. Because the Arduino Rest API uses the HTTP protocol, these queries are synchronous. Other protocols, like as MQTT, can be utilized in IoT applications. When Arduino is acting asa server ina client- server scenario, the Arduino API over HTTP playsa critical role. MQTT, for example, employsa structure known as publish-subscribe. Arduino rest framework There is an intriguing library called a Rest that may be used to constructa Rest API architecture. This library is a framework for Restful services that includes a number of useful features. This library works with a variety of development boards, including Arduino, Raspberry Pi, and ES8266. More information is available on thea Rest website. This library is easy to use and may be acquired from the Arduino library directly through the Arduino IDE. We can implement the API using this library because it supportsa Rest: Reading pinvalues in rest style Writing pin values in rest style Remote sketch function call Arduino implementations Now that we've covered the fundamentals of Arduino and how to utilize it to connect it to an external system, we'll go through how to put it into reality. We'll use Rest API requests to control an LED strip in this example. Because we need to concentrate on the Arduino Rest API, the sketch is straightforward. The LED strip isa Neopixels RGB Stick Board, and it is able to selecta single RGB led color using the Adafruit library. The following sketch demonstrates how to connect it to an Arduino UNO. Downloaded by Manish Mahajan Fig 3: Arduino UNO The Neopixel components inthis image are different, but the connections are the same. We want to change the color of the led strip usinga Rest jSON API call. The color is supplied as a HEX parameter to the sketch function. This sample exemplifies the library's versatility. The Arduino code is straightforward: // Createa REST instance AREST rest = a REST(); /f NeoPixel Init Downloaded by Manish Mahajan Adafruit NeoPixel pixels = Adafruit NeoPixeI(NUMPIXELS, PIN, NEO GRB + NEO KHZ800); Void setup()( Serial.begin(115200); // Register RGB function Rest.function("rgb", setPixelColor); Serial.printIn("Try DHCP..."); If (Ethernet.begin(macAdd) == 0)( Serial.printIn("DHCP FAIL...Static IP"); Ethernet.begin(macAdd, ip, myDns, myGateway); Server.begin(); Serial.print("server IP: "); Serial.printIn(Ethernet.IocallP()); Pixels.begin(); Serial.printIn("Setup complete.\n"); Void loop()( // listen for incoming clients EthernetClient client = server.available(); Downloaded by Manish Mahajan Rest.handle(client); Wdt reset(); Int setPixeICoIor(String hexColor)( HexCoIor="0x" -I- hexColor; Serial.println("Hex color" + hexColor); Longn = strtol( &hexCoIor, NULL, 16); Serial.printIn("N :" + String(n)); Longr =n < < 16; Longg =n <