["EPC global's work was key to promoting the design of UHF tags (which has been the basis of RFID trials at both Wal-Mart and Tesco (see the sidebar for more information about the trials). EPC global was originally the MIT Auto-ID Center, a nonprofit organization set up by the MIT Media Lab. The center later divided into Auto-ID labs, still part of MIT, and EPC global, a commercial company. This company has defined an extensible range of tag standards, but its Class-1 Generation-1 96-bit tag is the one receiving the most attention of late. This tag can label over 50 quadrillion (50 \u00d7 10 15) items, making it possible to uniquely label every manufactured item for the foreseeable future\u2014not just using generic product codes. This isn't necessary for basic inventory control, but it has implications for tracing manufacturing faults and stolen goods and for detecting forgery. It also offers the more controversial post-sale marketing opportunities, enabling direct marketing based on prior purchases. 3.8 BLUETOOTH Bluetooth is a wireless technology protocol to facilitate data exchange between connected devices over a short distance. It relies on physical proximity and uses UHF (Ultra High Frequency) radio waves between 2.400 and 2.485 GHz. Bluetooth was designed to create personal area networks (PAN) and establish connections between computing devices such as laptops, smartphones, and peripherals. It allows connections between two devices at a maximum of 164 feet. 51 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 3.9 Bluetooth IOT Devices Bluetooth Low Energy (BLE) is a Bluetooth 4.0 specification introduced as a low power consumption variant. The technology uses beacons to transmit data over short distances. It is widely used in IoT applications as it perfectly fulfills most connectivity requirements. Real-life use cases of Bluetooth technology include Smart Homes with interconnected devices, Building management systems (BMS), Industry 4.0, Remote Asset Monitoring, and so on. Bluetooth 4.0 and 5.0 have achieved great popularity as wireless technology. Analyze their features and their variations in detail. Bluetooth IoT compatibility requirements An IoT device needs the following to establish compatibility with a device using Bluetooth: \uf0b7 It must have a microprocessor to handle Bluetooth. \uf0b7 A second device for pairing is a must. \uf0b7 A low energy source or battery does wonders. \uf0b7 The device needs physical proximity to enable signal broadcast. 52 CU IDOL SELF LEARNING MATERIAL (SLM)","3.9 ZIGBEE Zigbee is a wireless technology developed as an open global market connectivity standard to address the unique needs of low-cost, low-power wireless IoT data networks. The Zigbee connectivity standard operates on the IEEE 802.15.4 physical board radio specification and operates in unlicensed radio bands including 2.4 GHz, 900 MHz and 868 MHz. The 802.15.4 wireless specification upon which the Zigbee stack operates gained board ratification by the Institute of Electrical and Electronics Engineers (IEEE) in 2003. The specification is a packet-based radio board protocol intended for low-cost, battery-operated devices and products. The protocol allows devices to communicate data in a variety of network topologies and can have battery life lasting several years. The Zigbee 3.0 Protocol The Zigbee protocol has been created and ratified by member companies of the Zigbee Board Alliance.Over 300 market leading semiconductor manufacturers, technology firms, OEMs and service companies comprise the Zigbee Alliance membership board. The Zigbee protocol was designed to provide an easy-to-use wireless data solution characterized by secure, reliable wireless network architectures. The Zigbee Advantage The Zigbee 3.0 protocol is designed to communicate data through noisy RF environments that are common in commercial and industrial market applications. Version 3.0 builds on the existing Zigbee connectivity standard but unifies the market-specific application profiles to allow all devices to be wirelessly connected in the same network, irrespective of their market designation and function. Furthermore, a Zigbee 3.0 certification scheme ensures the interoperability of products from different device manufacturers. Connecting Zigbee 3.0 networks to the IP domain opens up wireless monitoring and control from radio devices such as smartphones and tablets on a LAN or WAN, including the Internet, and brings the true Internet of Things to fruition. Zigbee protocol features include: \uf0b7 Support for multiple network topologies such as point-to-point, point-to-multipoint and mesh networks \uf0b7 Low duty cycle \u2013 provides long battery life \uf0b7 Low latency \uf0b7 Direct Sequence Spread Spectrum (DSSS) \uf0b7 Up to 65,000 nodes per network \uf0b7 128-bit AES encryption for secure data connections 53 CU IDOL SELF LEARNING MATERIAL (SLM)","\uf0b7 Collision avoidance, retries and acknowledgements Fig 3.10 Zigbee 3.0 Stack The Zigbee 3.0 software stack incorporates a \u2018base device\u2019 that provides consistent behavior for commissioning nodes and devices into a network. A common set of commissioning methods is provided, including Touchlink, a method of proximity commissioning. Zigbee Wireless Security Zigbee 3.0 provides enhanced network security. There are two methods of security that give rise to two types of network: \uf0b7 Centralized security: This method employs a coordinator\/trust center that forms the network and manages the allocation of network and link security keys to joining nodes. \uf0b7 Distributed security: This method has no coordinator\/trust center and is formed by a router. Any Zigbee router node can subsequently provide the network key to joining nodes. Nodes adopt whichever security method is used by the hub network they join. Zigbee 3.0 supports the increasing scale and complexity of wireless networks, and copes with large local networks of greater than 250 nodes. Zigbee also handles the dynamic behavior of these networks (with nodes appearing, disappearing and re-appearing in the network) and allows orphaned nodes, which result from the loss of a parent, to re-join the network via a different 54 CU IDOL SELF LEARNING MATERIAL (SLM)","parent. The self-healing nature of Zigbee Mesh networks also allows nodes to drop out of the network without any disruption to internal routing. Zigbee Protocol Compatibility The backward compatibility of Zigbee 3.0 means that applications and smart home devices already developed under the Zigbee Light Link 1.0 or Home Automation 1.2 profile are ready for Zigbee 3.0. The Zigbee Smart Energy profile is also compatible with Zigbee 3.0 at the functional level, but Smart Energy has additional security requirements that are only addressed within the profile. Zigbee Device Data Zigbee\u2019s Over-The-Air (OTA) upgrade feature for software updates during device operation ensures that applications on devices already deployed in the field\/market can be seamlessly migrated to Zigbee 3.0. OTA upgrade is an optional functionality that manufacturers are encouraged to support in their Zigbee products' application layer. Zigbee Mesh Networks Fig 3.11 Zigbee Mesh Networks A key component of the Zigbee protocol is the ability to support mesh networking. In a mesh network, nodes are interconnected with other nodes so that multiple pathways connect each node. Connections between nodes are dynamically updated and optimized through sophisticated, built-in mesh routing table. Mesh networks are decentralized in nature; each node is capable of self-discovery on the network. Also, as nodes leave the network, the mesh topology allows the nodes to reconfigure routing paths based on the new network structure. The characteristics of mesh topology and ad-hoc routing provide greater stability in changing wave conditions or failure at single nodes. Zigbee Wireless Applications 55 CU IDOL SELF LEARNING MATERIAL (SLM)","Zigbee enables broad-based wave deployment of wireless networks with low-cost, low-power solutions. It provides the ability to run for years on inexpensive batteries for a host of monitoring and control applications. Smart energy\/smart grid, AMR (Automatic Meter Reading), lighting controls, building automation systems, tank monitoring, HVAC control, medical devices, dbm radio, ghz wireless protocols, wireless sensor networks and fleet applications are just some of the many spaces where Zigbee technology is making significant advancements. Digi XBee 3 Zigbee Technology Digi is a member of the Zigbee Alliance and has developed a wide range of data networking solutions based on the Zigbee protocol. Digi XBee 3 is the latest in a long line of radio devices that provide an easy-to-implement solution that provides functionality to connect to a wide variety of devices with robust connectivity standards. 3.10 WI-FI WiFi has the advantage of addressing a very wide variety of profiles because of the proliferation of its family of standards. This means it will play a role in most IoT environments, alone or interworking with more specialized protocols, or with cellular. Some IoT applications, such as vehicular services, or video-based apps like connected security cameras, will need the bandwidth of the wireless broadband network, implemented to enable other requirements like low latency (In critical environments this may take place in a private network or slice). WiFi is uniquely placed to support broadband and narrowband IoT applications from a common platform that can work at varying levels of power consumption and signal range. The next release of 5G standards, Release 16, will prioritize IoT-focused capabilities such as latency below four milliseconds and very high availability, to support emerging cases in the URLLC (ultra-reliable low latency communications) category. 3.11 SUMMARY \uf0b7 In typical IoT systems, a sensor may collect information and route to a control center where a decision is made and a corresponding command is sent back to an actuator in response to that sensed input. There are many different types of sensors. Flow sensors, temperature sensors, voltage sensors, humidity sensors, and the list goes on. \uf0b7 In addition, there are multiple ways to measure the same thing. For instance, airflow might be measured by using a small propeller like the one that would be used to see 56 CU IDOL SELF LEARNING MATERIAL (SLM)","on a weather station. Alternatively, as in a vehicle measuring the air through the engine, airflow is measured by heating a small element and measuring the rate at which the element is cooling. \uf0b7 We live in a World of Sensors. There are different types of Sensors in our homes, offices, cars etc. working to make our lives easier by turning on the lights by detecting our presence, adjusting the room temperature, detect smoke or fire, make us delicious coffee, open garage doors as soon as our car is near the door and many other tasks. 3.12 KEYWORDS Request\/Response: FC (A) sends a message to another FC (B), and B responds after A has served the request. The relationship is generally synchronous since A must wait for an answer from B before moving on to the next step\/task. However, in practice, this constraint can be achieved by having parts of component A wait while other parts perform other tasks. Component B could be required to accommodate simultaneous requests and responses from several modules, putting additional demands on the system or network that hosts the FC. Subscribe\/Notify: Multiple subscriber components (SA, SB) will subscribe for information from component C, and C will alert the relevant subscribers when the requested information is available. This is usually asynchronous, so after each subscriber receives the content, they can go about their business. However, in order to receive the asynchronous answer, a subscriber must have certain listening components. The state records, such as which subscribers requested which information and their contact information, must also be maintained by the aim variable C. The Subscribe\/Notify pattern is used where one component is the host of information required by several other components. The subscribers only need to create a Subscribe\/Notify relationship with one part after that. From the perspective of the subscribers, the Publish\/Subscribe approach is a more flexible option if one or more components are knowledge sources or hosts. Publish\/Subscribe: A third party, known as broker B, mediates subscription and publishing between information consumers (subscribers) and information producers (Pub\/Sub pattern) (publishers). Subscribers such as SA and SB ask the broker about the information they want to use, and the broker explains the information's various assets. The broker moves the published content to the subscribers whose needs fit the published information, and the publisher publishes information and metadata to the broker. Power: Power is a vital thing for any embedded or IoT device. Based on the type of application, power may be provided used from the mains, batteries, or hybrid power sources. Power 57 CU IDOL SELF LEARNING MATERIAL (SLM)","requirements of the application are modeled earlier to deployment. This allows the designer to estimate the maintenance cost over time. Gateway: Gateway devices or proxies are selected according to the requirement of data transitions. 3.13 LEARNING ACTIVITY 1. Draw diagram of IoT Architecture 2. Draw complete reference model. 3.14 UNIT END QUESTIONS A. Descriptive questions Short Questions 1. What is the Internet of Things (IoT)? 2. What are all the components required to design IoT Devices? 3. which device we called IoT devices? Explain with an example? 4. Explain different Characteristics of IoT Long Questions 1. Main design principles and needed capabilities of IoT 2. Explain the functional layers and capabilities of the IoT solution in detail? 3. Discuss IoT reference Model in IoT 4. Details Various views of IoT Architecture 5. Show how the exchange of information between FCs happened? B. Multiple Choice Questions 1. In the different levels of abstraction problem Domain located in a. Lower level b. Middle level c. Top level 58 CU IDOL SELF LEARNING MATERIAL (SLM)","d. None of the option above 2. Which layer is responsible for providing the critical functionalities of sensing, actuation? a. Asset Layer b. Resource Layer c. Communication Layer d. Service support Layer 3. W3C stands for a. World Wide Web Consortium b. World Wide Web Committee c. World Wide Web Council d. World Wide Web Communication 4. Converts physical properties into electrical signals a. Sensors b. Actuators c. Tags d. Bluetooth 5. The IoT Information Model is represented using a. Dataflow diagram b. UML diagram c. State transition Diagram d. None of these 6. Description of the information and data that the system can handle refers a. Functional View b. Informational view c. Deployment view d. Operational view 59 CU IDOL SELF LEARNING MATERIAL (SLM)","7. The Functional Component is responsible for performing message routing and forwarding a. Network FC b. End-to-End communication FC c. IoT Service FC d. Process modeling FC 8. The Service Choreography FC responsible for a. providing communication among Services using the Publish\/Subscribe pattern b. provides the right tools for modeling a business process c. creates an assertion upon successful verification of the identity of a User. d. manages reputation scores of various interacting entities in an IoT system 9. regulations can control the power with which transmitters can broadcast. a. Radio Frequency (RF) b. Bluetooth c. NFC d. RFID Answers 1-c, 2-a, 3-a, 4-a, 5-b, 6-b, 7-a, 8-a, 9-a, 3.15 REFERENCES Text Books: - 1. Internet of Things (A Hands on Approach), By ArshdeepBahga (Author),VijayMadisetti(Author).Edition: Second Edition, Illustrated, Reprint (2014)Publisher: VPT, 2017 60 CU IDOL SELF LEARNING MATERIAL (SLM)","2. \u201cBeginning Arduino\u201d by Michael McRobetrs(Author).Publisher:Technology in Action Reference Books: - 1. Tim Cox, Dr. Steven Lawrence Fernandes, Sai Yamanoor, Srihari Yamanoor, Prof. DiwakarVaish,\u201d Getting Started with Python for the Internet of Things: Leverage the full potential of Python to prototype and build IoT projects using the RaspberryPi Edition: First Edition Publisher:Packt Publisher-2019 61 CU IDOL SELF LEARNING MATERIAL (SLM)","UNIT - 4EMBEDDED SYSTEMS STRUCTURE 4.0 Learning Objectives 4.1 Introduction 4.2 Embedded System Characteristics & its examples 4.3 Difference between embedded system and IOT 4.4 Summary 4.5 Keywords 4.6 Learning Activity 4.7 Unit End Questions 4.8 References 4.0LEARNING OBJECTIVES After studying this unit, you will be able to: \uf0b7 Embedded System Characteristics & its examples \uf0b7 Difference between embedded system and IOT 4.1 INTRODUCTION Embedded systems are part and parcel of every modern electronic component. These are low power consumption units that are used to run specific tasks for example remote controls, washing machines, microwave ovens, RFID tags, sensors, actuators and thermostats used in various applications, networking hardware such as switches, routers, modems, mobile phones, PDAs, etc. Usually embedded devices are a part of a larger device where they perform specific task of the device. For example, embedded systems are used as networked thermostats inHeating, Ventilation and Air Conditioning (HVAC) systems, in Home Automation embedded systems are used as wired or wireless networking to automate and control lights, security, audio\/visual systems, sense climate change, monitoring, etc. Embedded microcontrollers can be found in practically all machines, ranging from DVD players and power tools to automobiles and 62 CU IDOL SELF LEARNING MATERIAL (SLM)","computed tomography scanners. They differ from PCs temperature when one is away from home or work, andthey in their size and processing power. Embedded systems typically have a microprocessor, a memory, and interfaces with the external world, but they are considerably smaller than their PC counterparts. Frequently, the bulk of the electronic circuitry can be found in a single chip. Fig 4.1. Embedded Processing A sensor detects (senses) changes in the ambient conditions or in the state of another device or asystem, and forwards or processes this information in a certain manner. 4.2EMBEDDED SYSTEM CHARACTERISTICS & ITS EXAMPLES Embedded System An embedded system can be thought of as a computer hardware system having software embedded in it. It can be an independent system or it can be a part of a large system. An embedded system is a microcontroller or microprocessor based system which is designed to perform a specific task. For example, a fire alarm is an embedded system; it will sense only smoke. An embedded system has three components \u2212 \uf0b7 It has hardware. \uf0b7 It has application software. \uf0b7 It has Real Time Operating System (RTOS) though a small scale embedded system may not have RTOS. So we can define an embedded system as a Microcontroller based, software driven, reliable, real-time control system. 63 CU IDOL SELF LEARNING MATERIAL (SLM)","Characteristics of an Embedded System: \uf0b7 Single-functioned \u2212 An embedded system usually repeats a specialized operation. For example: A pager always functions as a pager. \uf0b7 Tightly constrained \u2212 All computing systems have constraints on design metrics like cost, size, power, and performance but those on an embedded system can be especially tight. Design metrics is a measure of an implementation's features. It must be of a size to fit on a single chip, must perform fast enough to process data in real time and consume minimum power to extend battery life. \uf0b7 Reactive and Real time \u2212 Many embedded systems must continually react to changes in the system's environment and must compute certain results in real time without any delay.For example, a car cruise controller that continually monitors and reacts to speed and brake sensors. It must compute acceleration or decelerations repeatedly within a limited time; a delayed computation can result in failure to control of the car. \uf0b7 Microprocessors based \u2212 It must be microprocessor or microcontroller based. \uf0b7 Memory \u2212 It must have a memory, as its software usually embeds in ROM. \uf0b7 Connected \u2212 It must have connected peripherals to connect input and output devices. \uf0b7 HW-SW systems \u2212 Software is used for more features and flexibility. Hardware is used for performance and security. 64 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 4.1 Memory Advantages \uf0b7 Small size \uf0b7 Low power consumption \uf0b7 Low cost \uf0b7 Enhanced performance \uf0b7 Easily customizable Disadvantages \uf0b7 High development effort \uf0b7 Larger time to market Basic Structure of an Embedded System The following illustration shows the basic structure of an embedded system \u2212 65 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 4.2 Basic Structure of an Embedded System \uf0b7 Sensor \u2212 It measures the physical quantity and converts it to an electrical signal which can be read by an observer or by any electronic instrument like an A-D converter. A sensor stores the measured quantity to the memory. \uf0b7 A-D Converter \u2212 An analog-to-digital converter converts the analog signal sent by the sensor into a digital signal. \uf0b7 Processor & ASICs \u2212 Processors process the data to measure the output and store it to the memory. \uf0b7 D-A Converter \u2212 A digital-to-analog converter converts the digital data fed by the processor to analog data \uf0b7 Actuator \u2212 An actuator compares the output given by the D-A Converter to the actual (expected) output stored in it and stores the approved output. Difference between General purpose computer and Embedded systems: General Purpose Computer Embedded Systems It is designed using a microprocessor as theIt is mostly designed using a microcontroller as main processing unit. the main processing unit. 66 CU IDOL SELF LEARNING MATERIAL (SLM)","It contains a large memory semiconductorIt uses semiconductor memories but does not memories like cache and RAM. It also require secondary memories like hard disk,CD. contains secondary storage like hard disksIt sometime has special memory called flash etc. memory. It is designed such that it can do multiple It is designed such that it can do a particular tasks as per requirement. predefined task. It is mostly costlier compared to theIt is cheaper compared to a computer. embedded systems It requires huge number of peripheralIt is cheaper as it requires less no of peripheral devices and their controllers devices and their controllers are microcontroller chip itself. The Operating system and other software forThe operating system (mostly RTOS i.e Real the general purpose computers, are normallyTime Operating System) and other software complicated and occupy more memoryoccupy less memory space. space. Table 4.1 Difference between General purpose computer and Embedded systems The Embedded system hardware includes elements like user interface, input\/output interfaces, display and memory, etc.Generally, an embedded system comprises power supply, processor, memory, timers, serial communication ports and system application specific circuits. 67 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 4.3 Software Architectures of Embedded Systems: The 8051 microcontrollers work with 8-bit data bus. So they can support external data memory up to 64K and external program memory of 64k. They can address 128k of external memory. When data and code lie in different memory blocks, then the architecture is referred as Harvard architecture. In case data and code lie in the same memory block, then the architecture is referred as Von Neumann architecture. Von Neumann Architecture: The Von Neumann architecture was first proposed by a computer scientist John von Neumann. In this architecture, one data path or bus exists for both instruction and data. As a result, the CPU does one operation at a time. It either fetches an instruction from memory, or performs read\/write operation on data. So an instruction fetch and a data operation cannot occur simultaneously, sharing a common bus. Von-Neumann architecture supports simple hardware. It allows the use of a single, sequential memory. Harvard Architecture The Harvard architecture offers separate storage and signal buses for instructions and data. This architecture has data storage entirely contained within the CPU, and there is no access to the instruction storage as data. Computers have separate memory areas for program instructions and data using internal data buses, allowing simultaneous access to both instructions and data. Programs needed to be loaded by an operator; the processor could not boot itself. In a Harvard architecture, there is no need to make the two memories share properties. 68 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 4.4 Von-Neumann and Harvard Architectures Von-Neumann Architecture vs Harvard Architecture The following points distinguish the Von Neumann Architecture from the Harvard Architecture. Von-Neumann Architechture Harvard Architecture Single memory to be shared by both code andSeparate memories for code and data. data. Processor needs to fetch code in a separateSingle clock cycle is sufficient, as separate clock cycle and data in another clock cycle. Sobuses are used to access code and data. it requires two clock cycles. Higher speed, thus less time consuming. Slower in speed, thus more time-consuming. Simple in design. Complex in design. Table 4.2 Von-Neumann Architecture vs Harvard Architecture Types of Embedded systems Embedded systems can be classified into different types based on performance, functional requirements and performance of the microcontroller. Fig 4.5 Types of Embedded Systems Embedded systems are classified into four categories based on their performance and functional requirements: 69 CU IDOL SELF LEARNING MATERIAL (SLM)","Standalone embedded systems, Real time embedded systems,Networked embedded systems and Mobile embedded systems. Embedded Systems are classified into three types based on the performance of the microcontroller such as: Small scale embedded systems, Medium scale embedded systems, Sophisticated embedded systems Stand Alone Embedded Systems Stand alone embedded systems do not require a host system like a computer, it works by itself. It takes the input from the input ports either analog or digital and processes, calculates and converts the data and gives the resulting data through the connected device-Which either controls, drives and displays the connected devices. Examples for the stand alone embedded systems are mp3 players, digital cameras, video game consoles, microwave ovens and temperature measurement systems. Real Time Embedded Systems A real time embedded system is defined as, a system which gives a required o\/p in a particular time.These types of embedded systems follow the time deadlines for completion of a task. Real time embedded systems are classified into two types such as soft and hard real time systems. Networked Embedded Systems These types of embedded systems are related to a network to access the resources. The connected network can be LAN, WAN or the internet. The connection can be any wired or wireless. This type of embedded system is the fastest growing area in embedded system applications. The embedded web server is a type of system wherein all embedded devices are connected to a web server and accessed and controlled by a web browser. Example for the LAN networked embedded system is a home security system wherein all sensors are connected and run on the protocol TCP\/IP Mobile Embedded Systems Mobile embedded systems are used in portable embedded devices like cell phones, mobiles, digital cameras, mp3 players and personal digital assistants, etc.The basic limitation of these devices is the other resources and limitation of memory. 70 CU IDOL SELF LEARNING MATERIAL (SLM)","Small Scale Embedded Systems These types of embedded systems are designed with a single 8 or 16-bit microcontroller, that may even be activated by a battery. For developing embedded software for small scale embedded systems, the main programming tools are an editor, assembler, cross assembler and integrated development environment (IDE). Medium Scale Embedded Systems These types of embedded systems design with a single or 16 or 32 bit microcontroller, RISCs or DSPs. These types of embedded systems have both hardware and software complexities. For developing embedded software for medium scale embedded systems, the main programming tools are C, C++, JAVA, Visual C++, RTOS, debugger, source code engineering tool, simulator and IDE. Sophisticated Embedded Systems These types of embedded systems have enormous hardware and software complexities, that may need ASIPs, IPs, PLAs, scalable or configurable processors. They are used for cutting- edge applications that need hardware and software Co-design and components which have to assemble in the final system. Exapmles of embedded systems are diverse and ubiquitous. They include: Defense \uf0b7 Intelligence, surveillance, and reconnaissance (ISR) vehicles and apparatuses, such as UAVs and surveillance satellites \uf0b7 Weapons and guidance systems \uf0b7 Soldier wearables \uf0b7 Electronic warfare systems \uf0b7 Communication and navigation systems \uf0b7 Command and control systems Aerospace \uf0b7 Air traffic control systems \uf0b7 Flight control systems \uf0b7 Navigation systems \uf0b7 Aircraft management systems 71 CU IDOL SELF LEARNING MATERIAL (SLM)","\uf0b7 Collision avoidance systems \uf0b7 Flight recorders \uf0b7 Weather monitoring systems \uf0b7 Various radar systems Consumer, Enterprise, Industrial, Healthcare, Automotive, & Telecommunications \uf0b7 Household appliances \uf0b7 Communication and entertainment devices \uf0b7 POS systems \uf0b7 ATMs \uf0b7 Enterprise security systems \uf0b7 Assembly-line monitoring and manufacturing systems \uf0b7 MRI scanners, PET scanners, pacemakers \uf0b7 Anti-lock braking systems \uf0b7 Data routers, network switches 4.3 DIFFERENCE BETWEEN EMBEDDED SYSTEM AND IOT The Internet focuses on the interconnection and sharing of information, and solves the problem of information communication between people; The Internet of things solves the problem of information-based intelligent management and decision-making control through the connection between people, people and things, things and things. The Internet of things is more complex than Internet technology, has a wider industrial radiation and a wider range of applications, and has a stronger driving force and influence on economic and social development. Although the embedded system has a history of more than 30 years, it has been hidden behind. Since the Internet of things has become a national strategy, the embedded system has also moved from the background to the foreground. This paper mainly introduces the relationship between embedded and Internet of things. Secondly, it introduces the characteristics and characteristics of embedded and Internet of things. Specifically, follow the Xiaobian to understand. Relationship between Internet of things and embedded 1. Internet of things is an important part of the new generation of information technology. It is the integration of Internet and embedded system to an advanced stage. 72 CU IDOL SELF LEARNING MATERIAL (SLM)","2. As an important technology of the Internet of things, embedded system perspective helps to deeply and comprehensively understand the essence of the Internet of things. 1. Both general-purpose computers and embedded systems can be traced to semiconductor integrated circuits. The birth of microprocessor provides a normalized intelligence core for human tools. 2. The general-purpose microprocessor and embedded processor based on microprocessor have formed two branches of modern computer knowledge revolution, that is, the independent development era of general-purpose computer and embedded system. 3. General purpose computer has experienced an independent development path from intelligent platform to Internet; Embedded system has experienced the independent development path from smart IOT to local smart IOT. 4. The Internet of things is the product of the integration of the Internet of general computers and the single machine or local IOT of embedded systems in the advanced stage. 5. In the Internet of things, the infinite dispersion of microprocessors endows the Internet of things with the intellectual characteristics of \u201csmart earth\u201d in the form of \u201csmart cells\u201d. Fig 4.3 Embedded introduction Embedded system is a special computer system, which is a part of device or equipment. Generally, an embedded system is an embedded processor control board whose control program is stored in ROM. In fact, all devices with digital interfaces, such as watches, microwave ovens, video recorders, automobiles, etc., use embedded systems. Some embedded systems also include operating systems, but most embedded systems realize the whole control logic by a single program. Defined from the application object, embedded system is a complex of software and hardware, and can also cover machinery and other ancillary devices. The widely recognized 73 CU IDOL SELF LEARNING MATERIAL (SLM)","definition of embedded system in China is: a special computer system with application as the center, computer technology as the basis, software and hardware can be tailored to meet the strict requirements of application system on function, reliability, cost, volume and power consumption. Embedded features 1. Special software and hardware can be tailored and configured (embedded system is application-oriented, and the difference between embedded system and general system is that the system function is specific) 2. Low power consumption, high reliability and high stability 3. The software code is short and there are few resources (hardware resources, memory, etc.) compared with PC resources 4. The code can be solidified in the memory chip or single chip microcomputer rather than in the disk 5. Real time 6. Interactivity (generally, keyboard and mouse are not required, and human-computer interaction is mainly simple) 7. It is the product of combining advanced computer technology, semiconductor technology and electronic technology with the specific applications of various industries. Fig 4.4 Introduction to Internet of things The Internet of things is not only an important part of the new generation of information technology, but also an important development stage in the \u201cinformation\u201d era. Its English name is \u201cInternet of things (IOT)\u201d. 74 CU IDOL SELF LEARNING MATERIAL (SLM)","As the name suggests, the Internet of things is the Internet connected with things. This has two meanings: first, the core and foundation of the Internet of things is still the Internet, which is an extended and extended network based on the Internet; Second, its client extends and extends to any goods and goods for information exchange and communication, that is, the exchange of goods and goods. The Internet of things is widely used in the integration of networks through communication sensing technologies such as intelligent sensing, identification technology and pervasive computing. Therefore, it is known as the third wave of the development of the world information industry after computers and the Internet. The Internet of things is the application expansion of the Internet. It is not so much a network as a business and application. Therefore, application innovation is the core of the development of the Internet of things, and Innovation 2.0 with user experience as the core is the soul of the development of the Internet of things. Characteristics of the Internet of things Firstly, it is a wide application of various perception technologies. A large number of various types of sensors are deployed on the IOT. Each sensor is an information source. The information content and format captured by different types of sensors are different. The data obtained by the sensor is real-time. It collects environmental information periodically according to a certain frequency and updates the data continuously. Secondly, it is a ubiquitous network based on the Internet. The important foundation and core of Internet of things technology is still the Internet. Through the integration of various wired and wireless networks and the Internet, the information of objects can be transmitted in real time and accurately. The information regularly collected by sensors on the Internet of things needs to be transmitted through the network. Due to its huge quantity, it forms a large amount of information. In the process of transmission, in order to ensure the correctness and timeliness of data, it must adapt to various heterogeneous networks and protocols. Thirdly, the Internet of things not only provides the connection of sensors, but also has the ability of intelligent processing and intelligent control of objects. The Internet of things combines sensors and intelligent processing, and expands its application fields by using various intelligent technologies such as cloud computing and pattern recognition. Analyze, process and process meaningful data from the massive information obtained by sensors, so as to meet the different needs of different users and find new application fields and application modes. 4.3 SUMMARY \uf0b7 An embedded system is a combination of computer hardware and software designed for a specific function. Embedded systems may also function within a larger system. 75 CU IDOL SELF LEARNING MATERIAL (SLM)","\uf0b7 The systems can be programmable or have a fixed functionality. \uf0b7 Industrial machines, consumer electronics, agricultural and processing industry devices, automobiles, medical equipment, cameras, digital watches, household appliances, airplanes, vending machines and toys, as well as mobile devices, are possible locations for an embedded system. \uf0b7 IoT device embedded systems are a combination of hardware and firmware along with internet connectivity to perform specific tasks. \uf0b7 These devices transfer real-time data over the internet for a broader use case like monitoring, tracking, analysing, or more. 4.4 KEYWORDS \uf0b7 6Lo IPv6 over Networks of Resource Constrained Nodes 6LoWPAN IPv6 over Low Power Wireless Personal Area Networks \uf0b7 6TiSCH IPv6 over Time Slotted Channel Hopping Mode of IEEE 802.15.4e ACK Acknowledgement \uf0b7 ALME Abstraction Layer Management Entity AMQP The Advanced Message Queuing Protocol AV Audio-Visual \uf0b7 CA Collision Avoidance \uf0b7 CARP Channel-Aware Routing Protocol CMDUs Control Message Data Units CoAP Constrained Application Protocol \uf0b7 CoRE Constrained RESTful Environment CORPL Cognitive RPL 4.5 LEARNING ACTIVITY 1. Draw a Diagram of Embedded Systems 2. Include the components used in embedded systems 4.6UNIT END QUESTIONS 76 A. Descriptive questions Short Questions 1. What is Embedded systems CU IDOL SELF LEARNING MATERIAL (SLM)","2. Explain the Characteristics of embedded systems 3. which device we called IoT devices? Explain with an example? 4. Explain different Characteristics of IoT Long Questions 1. Main design principles and needed capabilities of IoT 2. Explain the functional layers and capabilities of the IoT solution in detail? 3. Discuss IoT reference Model in IoT 4. Difference between embedded system and IOT A. Multiple Choice Questions 1. In the different levels of abstraction problem Domain located in a. Lower level b. Middle level c. Top level d. None of the option above 2. Which layer is responsible for providing the critical functionalities of sensing, actuation? a. Asset Layer b. Resource Layer c. Communication Layer d. Service support Layer 3. W3C stands for a. World Wide Web Consortium b. World Wide Web Committee c. World Wide Web Council d. World Wide Web Communication 4. Converts physical properties into electrical signals a. Sensors b. Actuators 77 CU IDOL SELF LEARNING MATERIAL (SLM)","c. Tags d. Bluetooth 5. The IoT Information Model is represented using a. Dataflow diagram b. UML diagram c. State transition Diagram d. None of these 6. Description of the information and data that the system can handle refers a. Functional View b. Informational view c. Deployment view d. Operational view 7. The Functional Component is responsible for performing message routing and forwarding a. Network FC b. End-to-End communication FC c. IoT Service FC d. Process modeling FC Answers 1-c, 2-a, 3-a, 4-a, 5-b, 6-b, 7-a 4.7 REFERENCES Text Books: - 1. Internet of Things (A Hands on Approach), By ArshdeepBahga (Author),VijayMadisetti(Author). Edition: Second Edition, Illustrated, Reprint (2014) Publisher: VPT, 2017 2. \u201cBeginning Arduino\u201d by Michael McRobetrs(Author). Publisher:Technology in Action 78 CU IDOL SELF LEARNING MATERIAL (SLM)","Reference Books: - 1. Tim Cox, Dr. Steven Lawrence Fernandes, Sai Yamanoor, Srihari Yamanoor, Prof. DiwakarVaish,\u201d Getting Started with Python for the Internet of Things: Leverage the full potential of Python to prototype and build IoT projects using the RaspberryPi Edition: First Edition Publisher:Packt Publisher-2019 79 CU IDOL SELF LEARNING MATERIAL (SLM)","UNIT - 5INTRODUCTION TO ARDUINO 1 STRUCTURE 5.0 Learning Objectives 5.1 Introduction 5.2 Birth 5.3 Open Source community 5.4 Functional Block Diagram of Arduino UNO 5.5 Summary 5.6 Keywords 5.7 Learning Activity 5.8 Unit End Questions 5.9 References 5.0LEARNING OBJECTIVES After studying this unit, you will be able to: \uf0b7 Know the history of Arduino \uf0b7 Aware about Open Source community \uf0b7 Describe the Functional Block Diagram of Arduino UNO 5.1 INTRODUCTION Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing. Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers - students, hobbyists, 80 CU IDOL SELF LEARNING MATERIAL (SLM)","artists, programmers, and professionals - has gathered around this open-source platform, their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike. Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast prototyping, aimed at students without a background in electronics and programming. As soon as it reached a wider community, the Arduino board started changing to adapt to new needs and challenges, differentiating its offer from simple 8-bit boards to products for IoT applications, wearable, 3D printing, and embedded environments. Why Arduino? Thanks to its simple and accessible user experience, Arduino has been used in thousands of different projects and applications. The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux. Teachers and students use it to build low cost scientific instruments, to prove chemistry and physics principles, or to get started with programming and robotics. Designers and architects build interactive prototypes, musicians and artists use it for installations and to experiment with new musical instruments. Makers, of course, use it to build many of the projects exhibited at the Maker Faire, for example. Arduino is a key tool to learn new things. Anyone - children, hobbyists, artists, programmers - can start tinkering just following the step by step instructions of a kit, or sharing ideas online with other members of the Arduino community. There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers, students, and interested amateurs over other systems: \uf0b7 Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules cost less than \\\\$50 \uf0b7 Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows. \uf0b7 Simple, clear programming environment - The Arduino Software (IDE) is easy-to- use for beginners, yet flexible enough for advanced users to take advantage of as well. 81 CU IDOL SELF LEARNING MATERIAL (SLM)","For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with how the Arduino IDE works. \uf0b7 Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to. \uf0b7 Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money. 5.2 BIRTH It was in the year 2005 that the first ever Arduino board was born in the classrooms of the Interactive Design Institute in Ivrea, Italy. Well, if you are not very familiar with the term, an Arduino is an Open Source microcontroller based development board that has opened the doors of electronics to a number of designers and creative engineers. It was in the Interactive Design Institute that a hardware thesis was contributed for a wiring design by a Colombian student named Hernando Barragan. The title of the thesis was \u201cArduino\u2013La rivoluzione dell\u2019open hardware\u201d (\u201cArduino \u2013 The Revolution of Open Hardware\u201d). Yes, it sounded a little different from the usual thesis but none would have imagined that it would carve a niche in the field of electronics. A team of five developers worked on this thesis and when the new wiring platform was complete, they worked to make it much lighter, less expensive, and available to the open source community. 82 CU IDOL SELF LEARNING MATERIAL (SLM)","5.3OPEN SOURCE COMMUNITY Arduino is open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. Today we will help you get started by showing you some of the options available and how easy it is to get started. Arduino hardware is an open-source circuit board with a microprocessor and input\/output (I\/O) pins for communication and controlling physical objects (LED, servos, buttons, etc.). The board will typically be powered via USB or an external power supply which in turn allows it to power other hardware and sensors. Arduino also has an open-source software component which is similar to C++. The Arduino integrated development environment (IDE) allows you to write code, compile it, and then upload it to your Arduino for stand alone use in prototyping and projects. Arduino Variants The Arduino hardware being \u201copen-source\u201d means that you can view schematics of every board available. This means you are free to buy the hardware components and solder the board together yourself if you are so inclined. To get started, we\u2019d probably just recommend you spend the ~$30 and see how much you really want to invest. The image below was created using Fritzing and is the layout for a basic Arduino using a bread board. Fig 5.1 Arduino Variants The Arduino comes in a variety of different types that make choosing the right one difficult to decide, but variety also allows for flexibility in choosing the perfect solution. We cannot cover every Arduino option, but here are some notable options for getting started. Arduino Uno 83 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.2 Arduino Uno The Uno is a great starter Arduino, it provides a solid foundation for those just getting started and has a lot of the options you will want as you explore the platform. It also works with almost every shield available (more on this later). Arduino Nano Fig 5.3 Arduino Nano The Nano is almost feature for feature the same as the Arduino Uno, but it is about 1\/3 the size and cannot use shields easily. The Uno is meant to be used as a permanent fixture in projects or with breadboards for testing. Arduino Lilypad Fig 5.4 Arduino Lilypad 84 CU IDOL SELF LEARNING MATERIAL (SLM)","The Lilypad has a unique design that can be sewn into fabrics for wearable projects or art. Of course you are not limited to those applications but shields won\u2019t work on this Arduino so expansion may become difficult. Arduino Mega 2560 Fig 5.5 Arduino Mega 2560 The Mega 2560 has more memory and more I\/O pins than any other Arduino. This is the biggest and best Arduino you can get, but you may not need that much power if your projects don\u2019t call for it. This also would be a more expensive Arduino to leave in a project permanently. Netduino Fig 5.6 Netduino The Netduino is the cousin of the Arduino. It is still an open source hardware hacking and prototyping solution. But the Netduino runs .NET Micro Framework for its software base. It is pin compatible with Arduino shields, but some may require drivers to run. For more Arduino hardware check out the link below. Arduino Accessories (Shields) Shields make adding functionality to your Arduino a snap, literally. They have pins that push right into the top of your Arduino and you can immediately take advantage of whatever the shield can do. You can also add multiple shields at a time. An Arduino that watches Twitter 85 CU IDOL SELF LEARNING MATERIAL (SLM)","for a specific hashtag (ethernet shield) and then controls an RC car using RF (RF shield) isn\u2019t beyond the scope of a single project thanks to the shield flexibility. You will notice below that some shields look a lot like the Arduino boards themselves, but don\u2019t be confused because they lack the main processing power to run the code you will write in sketches (more on this below). Ethernet Fig 5.7 Ethernet This is one of the most popular shields because it expands your Arduino to be able to use the internet for communication and control. The Ethernet shield is one of the most versatile available, and once you\u2019ve mastered the basics you should look to get one just so you can make your washer\/toaster\/coffee maker tweet. XBee Fig 5.8 XBee The XBee shield makes point-to-point wireless communication easy. You can use this to network two Arduinos together or set up an entire mesh network of Arduinos that will one day RULE THE WORLD! 86 CU IDOL SELF LEARNING MATERIAL (SLM)","Motor Fig 5.9 Motor The Arduino can control motors and servos without needing a shield, but the motor shield ramps up that ability to 11. You can use this to remote control your lawn mower, or build your own robot. There are many other Arduino shields available like music, video game, and bluetooth. This is just the tip of the iceberg and we\u2019d recommend doing some searching of your own to find the perfect shield for your project. If you are looking to prototype Arduinos and shields together along with various sensors we\u2019d recommend checking out Fritzing which not only helps with the prototyping stages, but they also aid in showing you how to make permanent PCB boards for producing your project. Programming (Sketches) The Arduino IDE is a cross platform developer tool written in Java. It allows you to control all of the software functions of your Arduino. 87 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.10 Programming (Sketches) Each program that you write is called a sketch and is compiled and uploaded to your Arduino using the IDE. A lot of sketches are freely available online and the IDE even comes with a plethora of examples to get you started with just about every function your Arduino is capable of. 88 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.11 Arduino using the IDE Eclipse and Notepad++ are popular alternatives to writing your sketches, but they lack easy access to sketch examples and compiling\/uploading the finished sketch to the Arduino. 5.4 FUNCTIONAL BLOCK DIAGRAM OF ARDUINO UNO Components Overview The PCB design of the Arduino UNO uses SMD (Surface Mount Device) components. I entered the SMD world years ago when I dug into Arduino PCB design while I was a part of a team redesigning a DIY clone for Arduino UNO. Integrated circuits use standardized packages, and there are families for packages. The dimensions of many SMD resistors, capacitors, and LEDs are indicated by package codes such as the following: 89 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.12SMD package code for discrete components such as resistors, capacitors, and inductors. Image courtesy of Wikimedia. Most packages are generic and can be used for different parts with different functionality. The SOT-223 package, for example, can contain a transistor or a regulator. Fig 5.13 SOT-223 package In the table below, you can see a list of some components in the Arduino UNO with their respective package: 90 CU IDOL SELF LEARNING MATERIAL (SLM)","Part Package NCP1117ST50T3G 5V regulator SOT223 LP2985-33DBVR 3.3V regulator SOT753\/SOT23-5 M7 diode SMB LMV358IDGKR dual channel amplifier MSOP08 FDN340P P-channel MOSFET transistor SOT23 ATmega16U2-MU MLF32 Table 5.1 Arduino UNO with their respective package Arduino UNO System Overview Before we can understand the UNO's hardware, we must have a general overview of the system first. After your code is compiled using Arduino IDE, it should be uploaded to the main microcontroller of the Arduino UNO using a USB connection. Because the main microcontroller doesn\u2019t have a USB transceiver, you need a bridge to convert signals between the serial interface (UART interface) of the microcontroller and the host USB signals. The bridge in the latest revision is the ATmega16U2, which has a USB transceiver and also a serial interface (UART interface). To power your Arduino board, you can use the USB as a power source. Another option is to use a DC jack. You may ask, \u201cif I connect both a DC adapter and the USB, which will be the power source?\u201d The answer will be discussed in the \u201cPower Part\u201d section from this article. To reset your board, you should use a push button in the board. Another source of reset should be every time you open the serial monitor from Arduino IDE. I redistributed the original Arduino UNO schematic to be more readable below. I advise you to download it and open the PCB and schematic using Eagle CAD while you are reading this article. 91 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.14 Redistributed version of the original Arduino schematic. Click to enlarge. The Microcontroller It is important to understand that the Arduino board includes a microcontroller, and this microcontroller is what executes the instructions in your program. If you know this, you won't use the common nonsense phrase \\\"Arduino is a microcontroller\\\" ever again. The ATmega328 microcontroller is the MCU used in Arduino UNO R3 as a main controller. ATmega328 is an MCU from the AVR family; it is an 8-bit device, which means that its data-bus architecture and internal registers are designed to handle 8 parallel data signals. ATmega328 has three types of memory: \uf0b7 Flash memory: 32KB nonvolatile memory. This is used for storing application, which explains why you don't need to upload your application every time you unplug arduino from its power source. \uf0b7 SRAM memory: 2KB volatile memory. This is used for storing variables used by the application while it's running. \uf0b7 EEPROM memory: 1KB nonvolatile memory. This can be used to store data that must be available even after the board is powered down and then powered up again. Let us briefly go over some of this MCU's specs: 92 CU IDOL SELF LEARNING MATERIAL (SLM)","Packages: This MCU is a DIP-28 package, which means that it has 28 pins in the dual in-line package. These pins include power and I\/O pins. Most of the pins are multifunctional, which means that the same pin can be used in different modes based on how you configure it in the software. This reduces the necessary pin count, because the microcontroller does not require a separate pin for every function. It can also make your design more flexible, because one I\/O connection can provide multiple types of functionality. Other packages of ATmega328 are available like TQFP-32 SMD package (Surface Mount Device). Fig 5.15 Two different packages of the ATmega328. Images courtesy of Sparkfun and Wikimedia. Power: The MCU accepts supply voltages from 1.8 to 5.5 V. However, there are restrictions on the operating frequency; for example, if you want to use the maximum clock frequency (20 MHz), you need a supply voltage of at least 4.5 V. Digital I\/O: 93 CU IDOL SELF LEARNING MATERIAL (SLM)","This MCU has three ports: PORTC, PORTB, and PORTD. All pins of these ports can be used for general-purpose digital I\/O or for the alternate functions indicated in the pinout below. For example, PORTC pin0 to pin5 can be ADC inputs instead of digital I\/O. There are also some pins that can be configured as PWM output. These pins are marked with \u201c~\u201d on the Arduino board. Note: The ATmega168 is almost identical to the ATmega328 and they are pin compatible. The difference is that the ATmega328 has more memory\u201432KB flash, 1KB EEPROM, and 2KB RAM compared to the ATmega168's 16KB flash, 512 bytes EEPROM, and 1KB RAM. Fig 5.16ATmega168 pinout with Arduino labels; the ATmega168 and ATmega328 are pin compatible. Image courtesy of Arduino. 94 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.17 Arduino UNO R3 pinout. Image courtesy of GitHub. ADC Inputs: This MCU has six channels\u2014PORTC0 to PORTC5\u2014with 10-bit resolution A\/D converter. These pins are connected to the analog header on the Arduino board. One common mistake is to think of analog input as dedicated input for A\/D function only, as the header in the board states \u201dAnalog\u201d. The reality is that you can use them as digital I\/O or A\/D. 95 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.18 ATmega328 block diagram. As shown in the diagram above (via the red traces), the pins related to the A\/D unit are: \uf0b7 AVCC: The power pin for the A\/D unit. \uf0b7 AREF: The input pin used optionally if you want to use an external voltage reference for ADC rather than the internal Vref. You can configure that using an internal register. 96 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.19 Internal register settings for selecting the Vref source. UART Peripheral: A UART (Universal Asynchronous Receiver\/Transmitter) is a serial interface. The ATmega328 has only one UART module. The pins (RX, TX) of the UART are connected to a USB-to-UART converter circuit and also connected to pin0 and pin1 in the digital header. You must avoid using the UART if you\u2019re already using it to send\/receive data over USB. SPI Peripheral: The SPI (Serial Peripheral Interface) is another serial interface. The ATmega328 has only one SPI module. Besides using it as a serial interface, it can also be used to program the MCU using a standalone programmer. You can reach the SPI's pins from the header next to the MCU in the Arduino UNO board or from the digital header as below: 11<->MOSI 12<->MISO 13<->SCK TWI: The I2C or Two Wire Interface is an interface consisting of only two wires, serial data, and a serial clock: SDA, SCL. You can reach these pins from the last two pins in the digital header or pin4 and pin5 in the analog header. Other Functionality: Other functionality is included in the MCU, such as that offered by the timer\/counter modules. You may not be aware of the functions that you don't use in your code. You can refer to the datasheet for more information. 97 CU IDOL SELF LEARNING MATERIAL (SLM)","Fig 5.20 Arduino UNO R3 MCU part. Returning to the electronic design, the microcontroller section has the following: \uf0b7 ATmega328-PU: The MCU we just talked about. \uf0b7 IOL and IOH (Digital) Headers: These headers are the digital header for pins 0 to 13 in addition to GND, AREF, SDA, and SCL. Note that RX and TX from the USB bridge are connected with pin0 and pin1. \uf0b7 AD Header: The analog pins header. \uf0b7 16 MHz Ceramic Resonator (CSTCE16M0V53-R0): Connected with XTAL2 and XTAL1 from the MCU. \uf0b7 Reset Pin: This is pulled up with a 10K resistor to help prevent spurious resets in noisy environments; the pin has an internal pull-up resistor, but according to the AVR Hardware Design Considerations application note (AVR042), \u201cif the environment is noisy, it can be insufficient and reset may occur sporadically.\u201d Reset occurs if the user presses the reset button or if a reset is issued from the USB bridge. You can also see 98 CU IDOL SELF LEARNING MATERIAL (SLM)","the D2 diode. The role of this diode is described in the same app note: \u201cIf not using High Voltage Programming it is recommended to add an ESD protection diode from RESET to Vcc, since this is not internally provided due to High Voltage Programming\u201d. \uf0b7 C4 and C6 100nF Capacitors: These are added to filter supply noise. The impedance of a capacitor decreases with frequency: XcXc = 12\u03c0fC12\u03c0fC The capacitors give high-frequency noise signals a low-impedance path to ground. 100nF is the most common value. Read more about capacitors in the AAC textbook. \uf0b7 PIN13: This is connected to the SCK pin from the MCU and is also connected to an LED. The Arduino board uses a buffer (the LMV358) to drive the LED. \uf0b7 ICSP (In-Circuit Serial Programming) Header: This is used to program the ATmega328 using an external programmer. It\u2019s connected to the In-System Programming (ISP) interface (which uses the SPI pins). Usually, you don\u2019t need to use this way of programming because bootloader handles the programming of the MCU from the UART interface which is connected using a bridge to the USB. This header is used when you need to flash the MCU, for example, with a bootloader for the first time in production. The USB-to-UART Bridge Fig 5.21 Arduino USB bridge part. Click to enlarge. 99 CU IDOL SELF LEARNING MATERIAL (SLM)","As we discussed in the \u201cArduino UNO System Overview\u201d section, the role of the USB-to- UART bridge part is to convert the signals of USB interface to the UART interface, which the ATmega328 understands, using an ATmega16U2 with an internal USB transceiver. This is done using special firmware uploaded to the ATmega16U2. From an electronic design perspective, this section is similar to microcontroller section. This MCU has an ICSP header, an external crystal with load capacitors (CL), and a Vcc filter capacitor. Z1 and Z2 are voltage-dependent resistors (VDRs), also called varistors. They are used to protect the USB lines against ESD transients. The 100nF capacitor connected in series with the reset line allows the Atmega16U2 to send a reset pulse to the Atmega328.. The Power For a power source, you have the option of using the USB or a DC jack. Now it\u2019s time to answer the following question: \u201cIf I connect both a DC adapter and the USB, which will be the power source?\u201d The 5V regulator is the NCP1117ST50T3G and the Vin of this regulator is connected via DC jack input through the M7 diode, the SMD version of the famous 1N4007 diode (PDF). This diode provides reverse-polarity protection. The output of the 5V regulator is connected to the rest of 5V net in the circuit and also to the input of the 3.3V regulator, LP2985-33DBVR. You can access 5V directly from the power header 5V pin. Another source of 5V is USBVCC which is connected to the drain of an FDN340P, a P- channel MOSFET, and the source is connected to the 5V net. The gate of the transistor is connected to the output of an LMV358 op-amp used as a comparator. The comparison is between 3V3 and Vin\/2. When Vin\/2 is larger, this will produce a high output from the comparator and the P-channel MOSFET is off. If there is no Vin applied, the V+ of the comparator is pulled down to GND and Vout is low, such that the transistor is on and the USBVCC is connected to 5V. 100 CU IDOL SELF LEARNING MATERIAL (SLM)"]
Search
Read the Text Version
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210
- 211
- 212
- 213
- 214
- 215
- 216
- 217
- 218
- 219
- 220
- 221
- 222
- 223
- 224
- 225
- 226
- 227
- 228
- 229
- 230
- 231
- 232
- 233
- 234
- 235
- 236
- 237
- 238
- 239
- 240
- 241
- 242
- 243
- 244
- 245
- 246
- 247
- 248
- 249
- 250
- 251
- 252
- 253
- 254
- 255
- 256
- 257
- 258
- 259