Cache Memory: Cache Memory Principles, Elements of Cache Design-Cache Addresses, Mapping Functions.
1.
22CB102006 - Internetof Things
Module 3
PROTOTYPING & HARDWARE
Embedded Computing Basics, Embedded platforms for prototyping, Things always
connected to the Internet/Cloud, Amazon Web Services for IoT.
2.
Embedded Computing Basics
EMBEDDED
COMPUTINGBASICS
Embedded
Software
Bootloade
r
Operating
System Real-Time
Operating
System
Integrated Development
Environment
Simulator
APIs and
Device
Interfaces
Device
Interfaces
Embedded Hardware
Units
Microcontroller
Unit
System-
on-Chip
Selection
of
Embedded
Platform
Hardware
Software
Platforms
and
Component
s
Embedding means embedding function software into a computing hardware to enable a system function for the
specific dedicated applications. A device embeds software into the computing and communication hardware,
and the device functions for the applications.
3.
Embedded Software
• Softwareconsists of instructions, commands and data.
• A computing and communicating device needs software.
• Software does the bootloading and enables the applications and
services.
• The software includes an OS.
• A device embeds software which also includes the device APIs and
middleware which enable the device to perform computing and
communication functions.
4.
Embedded Software…
Bootloader
• Bootloaderis a program which runs at the start of a computing device,
such as an MCU. A bootloader initiates loading of system software (OS)
when the system power is switched on, and power-on-self test
completes.
• Bootloader may also facilitate the use of system hardware and
networking capabilities.
• Bootloader can itself function as a system software, when the codes for
IO functions and OS basic system functions happen to be from the same
source. Booting is said to complete when normal, operational runtime
environment is attained.
5.
Embedded Software…
Operating System
•An operating system (OS) facilitates the use of system hardware and networking capabilities.
• When a load of the OS into RAM completes then the MCU starts the normal operational runtime
environment.
• When the device is executing multiple tasks or threads, then also an OS is required.
• The OS controls the multiple processes and device functions.
• Process, task and thread are the set of instructions which run under the control of the OS.
• The OS enables memory allocation to different processes, and prioritising of the processes
enables the use of network hardware and device hardware functions and execution of
software components and processes.
• The OS is at flash memory of the device. It may be required to load functions at the device RAM.
6.
Embedded Software…
Real-Time OperatingSystem
• Real-Time Operating System (RTOS) is an OS that
enables real-time execution of processes on computing
and communication hardware.
• RTOS uses prioritisation and priority allocation
concept to enable the execution of processes in real-
time.
7.
Integrated Development Environment
Applicationsoftware codes are perfected by a number of cycle of runs and tests. A cycle in the development phase consists of editing-
testing-debugging. The cycles repeat during different development phases till the system has thoroughly tested and debugged the
software.
Integrated Development Environment (IDE) is a set of software components and modules which provide the software and hardware
environment for developing and prototyping.
An IDE enables the codes development on a computer, and later on enables download of the codes on the hardware platform. IDE enables
software that communicates with the Internet web server or cloud service.
IDE consists of the device APIs, libraries, compilers, RTOS, simulator, editor, assembler, debugger, emulators, logic analyser, application
codes’ burner for flash, EPROM and EEPROM and other software components for integrated development of a system.
The IDE or prototype tool enables a prototype design. IDE is used for developing embedded hardware and software platforms, simulating,
and debugging. IDE is a tool for software development of embedded devices, which makes application development easy.
8.
Integrated Development Environment…
Simulator
•Simulator is software that
enables development on the
computer without any
hardware, and then prototyping
hardware can be connected for
embedding the software and
further tests.
APIs and Device Interfaces
• Major components of IoT
devices are software. Software
consists of device Application
Programming Interfaces (APIs)
and device interface for
ommunication over the
network and communication
circuit/port(s) which also
includes a middleware.
• The middleware creates IPv4,
IPv6, 6LowPAN, MQTT, COAP,
LWM2M, REST and other
communication protocol stacks.
Device Interfaces
• A connectivity interface consists
of communication APIs, device
interfaces and processing units.
Software commands the action
on the message or information
received followed by hardware
port outputs for the actuators.
9.
Embedded Hardware Units
Thehardware includes the
following:
Single VLSI (very-large
integrated) chip
A core in an application
specific instruction set
processor (ASIP), called
MCU
A core in an application
specific integrated circuit
(ASIC) core
A core in System-On-Chip
(SoC) or an SoC chip with
an SD card for embedded
software and operating
system (OS) software.
10.
Microcontroller Unit
Fig: Microcontroller,on-chip functional units and application specific units
An MCU is an IC chip,
available from a number of
sources, such as ATMEL,
Nexperia, Microchip, Texas
Instruments or Intel.
A source may manufacture
different types, families
and groups of MCUs, like
ATMEL manufactures
AVR®8 and AVR®32
families of MCUs. A family
of MCUs can have different
versions.
11.
Microcontroller Unit…
considerations
when
using
a
specific
MCU
MCU canbe of 8-bit, 16-bit or 32-bit family.
MCU clock frequency can be 8 MHz, 16 MHz, 100 MHz, 200 MHz or higher. The clock frequency
depends on the version and family. Performance defines number of instructions executed per sec
that primarily depends on the clock frequency also. A metric for performance is Million Instructions
Per Second (MIPS). Another metric for performance is Million Floating Point Operations Per Second
(MFLOPS).
MCU includes RAM which can be 4 kB, 16 kB, 32 B or higher. RAM read and write of byte takes an
instruction cycle each. RAM is used for temporary variables, stacks and run-time need of the
memory.
MCU includes EEPROM and flash memory, which may be 512 B, 1 kB, 2 kB, 4 kB, 16 kB, 64 kB, 128
kB, 512 kB or higher. Flash stores the programs, data, tables and required information during building
and testing stages, and then stores a final version of the application program in the embedded
device.
MCU includes timers, I/O ports, GPIO pins, serial synchronous and asynchronous ports and
interrupt controllers.MCU includes several functional units in specific version, such as ADC, multi-
channel ADC or ADC with programmable positive and negative reference voltage pins, PWMs, RTC,
I2C, CAN and USB ports, LCD interface, ZigBee interface, Ethernet, modem or other functional units,
depending on a specific source, family, group and version.
12.
System-on-Chip
The circuit consistsof multiple processors, hardware units and software. An SoC
is a system on a VLSI chip that has multiple processors, software and all the
needed digital as well as analog circuits’ on chip. An SoC embeds processing
circuit with memory and is specific to dedicated application(s) and may have the
analog circuits.
SoC may associate an external SD card in a mobile phone. The card stores
the external programs and operating system and enables the use of the chip
distinctly for distinct purposes. Secure Digital Association created the
SDIO (Secure Data Input-Output) card. The card consists of standard,
mini, micro or nano form. It consists of flash memory and communication
protocol.
13.
Selection of EmbeddedPlatform
• price,
• open source availability,
• ease of application development
• Needed capabilities,
• performance required from IoT device
• suitability for developing
• using for prototyping and designing.
Selection
among the
number of
different
available
platforms
depends on a
number of
factors
14.
Hardware
The choice, besidethe price, of embedded hardware depends on the following:
Processor speed required which depends upon the applications and services. For example, image and video processing need the high-speed
processors
RAM need which may be 4 kB or higher depending upon the OS and applications. For example, requirement is 256 kB for using the Linux
distribution. New generation mobile phones have over one GB RAM.
Connection needs to ZigBee, ZigBee IP, Bluetooth LE, Wi-Fi or Wired Ethernet for networking using a supporting circuit (shield)
USB host
Sensor, actuator and controllers interfacing circuits, such as ADC, UART, I2C, SPI, CAN single or multiples
Power requirements, V- and V+, 0 V and 3.3 V or 0 V and 5 V or other.
15.
Software Platforms andComponents
Selection among a number of different
available software depends on
• hardware platform,
• open source availability of software
components,
• cost of availability or development of other
required components for applications and
services.
The choice of embedded software, beside the
price, depends on the following:
• IDE with device APIs,
• libraries,
• OS or RTOS,
• emulator,
• simulator and other environment
components,
• middleware with communication and Internet
protocols,
• Cloud and sensor-cloud platform for
applications development,
• data storage and services.
16.
Embedded Platforms forPrototyping
Embedded Platforms for
Prototyping
Arduino
Intel®Gal
ileo
Intel®
Edison
Raspberry
Pi
BeagleBon
e
mBedT
M
Computing Systems
(Mobiles and Tablets)
Features of UNOand other IoT device and wearable device
boards
Board / Shield Application
AVR®
Microcontroller /
Clock
Operating / Input
V
EEPROM / SRAM /
Flash
Analog In / Out /
Digital IOs / n-bit
PWM
USB / UART Ethernet / Wi-Fi /
GSM
Due
Fast
computations,
ARM based MCU
ATSAMX8I 3.3 V / 7 – 12 V 0 kB / 96 kB / 512
MB
12 / 2 / 54 / 12 2 micro / 4 0 / 0 / 0
UNO
Getting started
with electronics
and coding
ATMega328 / 16
MHz 5 V / 7 – 12 V 1 kB / 2 kB / 32 kB 6 / 0 / 14 / 6 Standard / 1 0 / 0 / 0
Yun IoT
(i) ATmega32U4 /
16 MHz (ii)
AR9331 Linux /
400 MHz
5 V
(i) 1 kB / 2.5 MB /
32 MB (ii) 1 kB /
16 MB / 64 MB
(i) 20 / 7 / 12 / 0 Micro / 1 0 / 0 / 0
Ethernet IoT
ATMega328 / 16
MHz 5 V / 7 – 12 V 1 kB / 2 kB / 32 kB 6 / 0 / 14 / 4 Standard / 0 1 / 0 / 0
Fio IoT
ATMega328P / 8
MHz 3.3 V / 3.7 – 7 V 1 kB / 2 kB / 32 kB 8 / 0 / 14 / 6 Mini / 1 0 / 0 / 0
Gemma Wearable ATtiny85 / 8 MHz 3.3 V / 4 – 16 V 512 B / 512 B / 8
kB
1 / 0 / 3 / 2 Micro / 0 0 / 0 / 0
LilyPad Wearable
ATmega168 / 8
MHz,
ATmega328P / 8
MHz
2.7 – 5.5 V 512 B / 1 kB / 16
kB 6 / 0 / 14 / 6 0 / 0 0 / 0 / 0
LilyPad
SimpleSnap
Wearable ATmega328P / 8
MHz
2.7 – 5.5 V 512 B / 512 B / 8
kB
4 / 0 / 9 / 4 0 / 0 0 / 0 / 0
LilyPad USB Wearable ATmega32U4 / 8
MHz 3.3 V / 3.8 – 5 V 1 kB / 2.5 kB / 32
kB 4 / 0 / 9 / 4 Micro / 0 0 / 0 / 0
19.
Features of ARM-basedArduino for IoT device and
wearable device board
Board Application
ARM
Microcon
troller /
Clock
Operating /
Input V
EEPROM /
SRAM /
Flash
Analog In /
Out /
Digital IOs /
n-bit PWM
USB / UART
Ethernet /
Wi-Fi /
GSM
Due (ARM
based
MCU)
Fast
computations
ATSAMX8
I / 84
MHz
3.3 V / 7 –
12 V
0 kB / 96
kB / 512
MB
12 / 2 /
54 / 12
Two micro
USB / 4 0 / 0 / 0
20.
Intel Galileo
Architecture ofIntel Galileo Gen 2 board for advanced computer functionalities with network connectivity for
development of IoTs
Intel Edison
• Highperformance computation and communication module
• Seamless device internetworking and device-to-cloud communication
• Rapid prototype development for IoT and wearable computing devices
• Cloud data collection, storage, and processing tools
• Advanced analytics and OLTP/OLAP for data streams
• Superior performance compared to Galileo
Capabilitie
s
Raspberry Pi 3Model B
• Windows 10 IoT Core
• RISC OS
• FreeBSD, NetBSD
• Plan9, Inferno, AROS
• Linux distributions (Raspbian, Ubuntu)
• Ubuntu Core (Snappy) - stripped down version for autonomous machines
Operating
System
Support
• Media Server IoT devices
• Personal Computer functionality
• Home Automation systems
• Networked Security Camera systems
• ATM Applications and services
• Industrial IoT (IIoT) applications
• Drone control systems
Applications
BeagleBone-X15
Texas Instruments BeagleBone-X15(BB-X15) is the latest (November 2015) single-
board computer for computing and communication.
BB runs on the OS Linux, RISC OS, FreeBSD, OpenBSD and additional distributions of
Linux such as Ubuntu boards.
The SoC uses the processor (ARM Cortex A15 core) and DSP processor (TMS320C64x
plus multimedia 4 GB eMMC) for graphics and video. The power required is 2 W.
Memory on-board is 2 GB, plus in the memory support plus and microSD cards.
BB-X15 best applications are for IoT applications requiring fast media, 2D and 3D graphics, and video
streaming multimedia
Computing Systems (Mobilesand Tablets)
New generation mobiles other than regular phones also have the following features:
• Sensors and devices such as temperature sensors, accelerometer, gyroscope, magnetometer, camera, microphone, GPS
• Actuators, such as audio output speaker, vibrator elements, video, LEDs
• Connectivity, such as NFC, Bluetooth, USB, Wi-Fi, cellular
• Text communication such as SMS
• Multimedia communication such as MMS.
Tablets provide computing and network capabilities like a computer. Therefore, the mobiles and Tablets can
also be deployed for IoTs. For example, participatory sensing.
Mobiles and tablets can however be used for wiring the new circuits for prototyping, as input is through USB
connection, which can also be used for power to a prototype board.
They do not have easy and direct connectivity for external sensors, actuators and health monitoring devices.
Android Development Kit
• An ARM based Arduino board ‘Due’ is compatible with Android Development Kit (ADK).
• Android platform provides software for accessing the IO pins on the board and Internet communication.
30.
THINGS ALWAYS CONNECTED
TOTHE INTERNET/CLOUD
•Connecting Things to Arduino,
Galileo, Edison, RPi, BB and mBed
•Internet Connectivity
Connecting Things toArduino, Galileo, Edison, RPi, BB and
mBed…
ARP (Address Resolution Protocol) maps an IP address to a
physical MAC address, while RARP (Reverse Address Resolution
Protocol) maps a MAC address to an IP address.
ARP is used to find the hardware address of a device on a local
network when its IP address is known, whereas RARP helps a
device discover its IP address when only its MAC address is
available
33.
Internet Connectivity
Web connectivityof server or client ends use connected-device network protocol, gateway protocol or SOAP, REST,
HTTP RESTful and WebSockets.
Applications and services access the cloud or web server, using a protocol, such as HTTP, HTTPS, SOAP or web socket
Connecting Arduino USB to Internet
• Arduino board IDE supports USB. USB port connects to a mobile or computer or tablet with an Internet connection using IDE USB port functions.
• A computer then connects to the Internet using network interface cards.
Connecting Arduino to Internet
• Arduino IDE supports Ethernet protocol Library. Library means a set of codes which enable use of functions of the library for specific purposes.
• Ethernet LAN connects to the network router directly or through Wi-Fi adapter socket of a wireless modem to connect to the network router.
• When the shield sends data of the device to the cloud, then the Ethernet client mode of shield is used.
• When the shield sends data of the device to the computer, then the Ethernet server mode is used.