UNIT IV
IOT Physical Devices
Introduction to different IoT tools
Eclipse IoT
Eclipse IoT is an open-source platform that allows IoT developers and IoT development companies
to develop applications in Java. With the help of Eclipse IoT, you can build IoT Devices, Cloud
Platforms, and Gateways. This tool focuses on the development, adoption, and promotion of open-
source IoT technologies.
These IoT protocols, application frameworks and services, and tools are promoted as the best-
suited programming language for IoT using Lua programming language.
2. Node-RED
Node-RED is a simple and open-source visualization tool built on [Link] which is used to
connect the devices, services, and APIs together for the Internet of Things. Node-RED is a user-
friendly interface, developed by IBM’s Emerging Technology department, allowing you to
connect, hardware, an API or an online service with tight integration. It helps you connect the
devices easily and quickly. It helps deal with the flow of the data, integrates with APIs, services
and any devices.
[Link] 2
Tessel 2 is a robust IoT platform that is used to build basic IoT solutions and prototypes. It
integrates additional sensors and modules. This board has a capacity to hold up to a dozen modules
including RFID, GPS, camera, and accelerometer.
This Tessel is very easier for those developers who are familiar with [Link] programming. This
way, Tessel can be used to host several servers and hardware firmware IoT solutions. You can
leverage all the libraries of [Link] to unveil a host of devices in minutes with Tessel.
4. Arduino
Arduino is an open-source prototyping platform offering both IoT hardware and software. Arduino
is a hardware specification that can be applied to interactive electronics and a set of software which
includes the Integrate Development Environment (IDE) and the Arduino programming language.
It’s one of the most preferable IDEs in all IoT development tools which is easy and simple to use.
Arduino can be your first choice if you are planning to build a computer that can sense and control
more of the physical world when compared to your normal stand-alone computing device.
5. Kinoma Create
Kinoma Create is a device that allows establishing a connection between two devices without
having too high programming knowledge in JavaScript. Kinoma Create consists of many features
that are required for developing small IoT applications like connecting light, temperature or
movement sensors for a specific purpose with mobile notifications in case of any alterations.
Kinoma Create has some fundamental components which are as follows:
• A touch screen.
• An ARM SoC 800 MHz processor.
• Bluetooth and integrated WiFi.
• Several ports to connect peripherals, including a USB 2.0 port.
• A memory of 128 MB and flash memory of 16 MB.
• MicroSD card slot.
• Speaker and microphone features.
• Linux distribution.
6. Device Hive
Based on Data Art’s AllJyone, Device Hive is a free open-source Machine to Machine (M2M)
communication framework. Launched in 2012, it’s considered as one of the most preferred
platforms for IoT app development. Since Device Hive is a cloud-based API, you can control
remotely without having network configuration. A similar thing applies to the libraries, portals and
management protocols.
7. Home Assistant
Home Assistant is an open-source tool that is used for home automation and functions with a
Python-based coding system. Mobile or desktop browser can easily have their control on the IoT
system developed with this tool. It’s very easy to set up and is trusted for operations, security, and
privacy. The software supports any systems which are running on Python 3.
IOT Physical Devices
What is an IoT Device
• A "Thing" in Internet of Things (IoT) can be any object that has a unique identifier and
which can send/receive data (including user data) over a network (e.g., smart phone,
smart TV, computer, refrigerator, car, etc. ).
• IoT devices are connected to the Internet and send information about themselves or
about their surroundings (e.g. information sensed by the connected sensors) over a network
(to other devices or servers/storage) or allow actuation upon the physical
entities/environment around them remotely.
IoT Device Examples
• A home automation device that allows remotely monitoring the status of appliances and
controlling the appliances.
• An industrial machine which sends information abouts its operation and health monitoring
data to a server.
• A car which sends information about its location to a cloud-based service.
• A wireless-enabled wearable device that measures data about a person such as the number
of steps walked and sends the data to a cloud-based service.
Basic building blocks of an IoT Device
• Sensing
• Sensors can be either on-board the IoT device or attached to the device.
• Actuation
• IoT devices can have various types of actuators attached that allow taking
• actions upon the physical entities in the vicinity of the device.
• Communication
• Communication modules are responsible for sending collected data to other
devices or cloud-based servers/storage and receiving data from other devices and
commands from remote applications.
• Analysis & Processing
• Analysis and processing modules are responsible for making sense of the
collected data.
Block diagram of an IoT Device
Stages of IoT Solutions Architecture
Sensors/Actuators: Sensors or Actuators are the devices that are able to emit, accept and
process data over the network. These sensors or actuators may be connected either through
wired or wireless. This contains GPS, Electrochemical, Gyroscope, RFID, etc. Most of the
sensors need connectivity through sensors gateways. The connection of sensors or actuators
can be through a Local Area Network (LAN) or Personal Area Network.
Gateways and Data Acquisition: As the large numbers of data are produced by this sensors
and actuators need the high-speed Gateways and Networks to transfer the data. This
network can be of type Local Area Network (LAN such as WiFi, Ethernet, etc.), Wide Area
Network (WAN such as GSM, 5G, etc.).
Edge IT: Edge in the IoT Architecture is the hardware and software gateways that analyze
and pre-process the data before transferring it to the cloud. If the data read from the sensors
and gateways are not changed from its previous reading value then it does not transfer over
the cloud, this saves the data used.
Data center/ Cloud: The Data Center or Cloud comes under the Management Services
which process the information through analytics, management of device and security
controls. Beside this security controls and device management the cloud transfer the data to
the end users application such as Retail, Healthcare, Emergency, Environment, and Energy,
etc.
End Points
Endpoints as edge computers. IoT endpoints extend the computing capacity of the network
and limit the amount of data that must be communicated from a host device to the backend
network for computation requirements. Endpoint functionality. Endpoint devices are
designed to perform specific, limited functions.
An Endpoint, from an IoT perspective, is a physical computing device that performs a
function or task as a part of an Internet connected product or service. An Endpoint, for
example, could be a wearable fitness device, an industrial control system, an automotive
telematics unit or even a personal drone unit.
Laptops, desktops, mobile phones, tablets, servers, and virtual environments can all be
considered endpoints.
Introduction to Raspberry PI, Interfaces
Exemplary Device: Raspberry Pi
Raspberry Pi is a low-cost mini-computer with the physical size of a credit card. Raspberry Pi
runs various flavors of Linux and can perform almost all tasks that a normal desktop computer
can do. Raspberry Pi also allows interfacing sensors and actuators through the general purpose
I/O pins. Since Raspberry Pi runs Linux operating system, it supports Python "out of the box".
Raspberry Pi is a low-cost mini-computer with the physical size of a credit card. Raspberry Pi
runs various flavors of Linux and can perform almost all tasks that a normal desktop computer
can do. Raspberry Pi also allows interfacing sensors and actuators through the general purpose
I/O pins. Since Raspberry Pi runs Linux operating system, it supports Python "out of the box".
Linux on Raspberry Pi
1. Raspbian: Raspbian Linux is a Debian Wheezy port optimized for RaspberryPi.
2. Arch: Arch is an Arch Linux port for AMDdevices.
3. Pidora: Pidora Linux is a Fedora Linux optimized for RaspberryPi.
4. RaspBMC: RaspBMC is an XBMC media-center distribution for RaspberryPi.
5. OpenELEC: OpenELEC is a fast and user-friendly XBMC media-centerdistribution.
6. RISC OS: RISC OS is a very fast and compact operatingsystem.
BCM: the Broadcom BCM2837 system-on-chip (SoC) includes four high-performance ARM
Cortex-A53 processing cores running at 1.2GHz with 32kB Level 1 and 512kB Level 2 cache
memory, a VideoCore IV graphics processor, and is linked to a 1GB LPDDR2 memory module
on the rear of the board.
GPIO: The Raspberry Pi 3 features the same 40-pin general-purpose input-output (GPIO) header
as all the Pis going back to the Model B+ and Model A+. Any existing GPIO hardware will work
without modification; the only change is a switch to which UART is exposed on the GPIO’s
pins, but that’s handled internally by the operating system
USB chip: The Raspberry Pi 3 shares the same SMSC LAN9514 chip as its predecessor, the
Raspberry Pi 2, adding 10/100 Ethernet connectivity and four USB channels to the board. As
before, the SMSC chip connects to the SoC via a single USB channel, acting as a USB-to-
Ethernet adaptor and USB hub
Antenna: There’s no need to connect an external antenna to the Raspberry Pi 3. Its radios are
connected to this chip antenna soldered directly to the board, in order to keep the size of the
device to a minimum. Despite its diminutive stature, this antenna should be more than capable of
picking up wireless LAN and Bluetooth signals – even through walls.
Raspberry Pi GPIO
The Raspberry Pi Model A and B boards have a 26-pin 2.54 mm (100 mil) expansion
header, marked as P1, arranged in a 2x13 strip. They provide 8 GPIO pins plus access to
I²C, SPI, UART), as well as +3.3 V, +5 V and GND supply lines.
A 40-pin GPIO header is found on all current Raspberry Pi boards (unpopulated on Pi
Zero and Pi Zero W). Prior to the Pi 1 Model B+ (2014), boards comprised a shorter 26-
pin header. Any of the GPIO pins can be designated (in software) as an input or output
pin and used for a wide range of purposes.
Raspberry Pi Interfaces
1. Serial: The serial interface on Raspberry Pi has receive (Rx) and transmit (Tx) pins for
communication with serialperipherals.
2. SPI: Serial Peripheral Interface (SPI) is a synchronous serial data protocol used for
communicating with one or more peripheraldevices.
3. I2C: The I2C interface pins on Raspberry Pi allow you to connect hardware modules.
I2C interface allows synchronous data transfer with just two pins - SDA (data line) and
SCL (clockline).
Serial Interfaces
The serial interface on Raspberry Pi has receive (Rx) and transmit (Tx) pins for
communication with serial peripherals.
The Raspberry Pi 3 Model B, B+, 4 and Raspberry Pi Zero W contain two UART
controllers which can be used for serial communication, the mini UART and PL011
UART.
By default, the mini UART is mapped to the TXD (GPIO 14) and RXD (GPIO 15) on the
40 pin GPIO header and the PL011 UART is used for the Bluetooth/Wireless module but
either module can be mapped to the GPIO port.
What is Serial Peripheral Interface?
Serial Peripheral Interface (SPI) is an synchronous serial bus commonly used to send
data between micro controllers and small peripherals such as shift registers, sensors, and
SD cards.
It uses separate clock (SCK) and data lines (MISO, MOSI), along with a select line(SS)
to choose among the multiple slave devices
With SPI, we can interface multiple peripheral devices as SPI slaves and control them with the
SPI master. In general, each slave will need a separate SS line. To talk to a particular slave, the
SPI master makes that slave’s SS line low and keeps the rest of them high
I2C Interface
➢ The I2C interface pins on Raspberry Pi allow you to connect hardware modules. I2C
interface allows synchronous data transfer with just two pins - SDA (data line) and SCL
(clock line).
➢ GPIO 2 and GPIO 3 - the Raspberry Pi's I2C1 pins - allow for two-wire communication
with a variety of external sensors and devices. ... I2C is a multi-drop bus, multiple
devices can be connected to these same two pins. Each device has its own
unique I2C address.
➢ I2C is a multi-device bus used to connect low-speed peripherals to computers and
embedded systems. The Raspberry Pi supports this interface on its GPIO header and it is
a great way to connect sensors and devices. Once configured you can connect more than
one device without using up additional pins on the header.
Python program with Raspberry PI
Recall -python program
Sum=0,i=1 Initialisation/declaration
while i<=5: Repetition i.e.,1<=5
sum=sum+1 0+1
i=i+1 i=2
print (sum)
This is a small example of python program
Arduino interface (program to interface with arduino)
Arduino interface
GPIO Zero
GPIO Zero started out as a friendly API on top of the [Link] library, but later we
extended it to allow other pin libraries to be used.
With GPIO Zero, you import the name of the interfaces you're using, for example: from
gpiozero import LED
Also you must correctly wire up any components you're using and connect them to the
GPIO pins
Raspberry Pi interface
Raspberry Pi Example: Interfacing LED and switch with Raspberry Pi
from time import sleeP
import [Link] asGPIO
[Link]([Link]
M)
#Switch Pin
[Link](25,[Link]) #LEDPin
[Link](18,[Link])
state=false
deftoggleLED(pin):
state = not state
[Link](pin,sta
te)
whileTrue:
try:
if ([Link](25) ==True):
toggleLED(pin) sleep(.01)
except Keyboard Interrupt:
exit()
Code for Blinking an LED with Raspberry Pi
#!/usr/bin/env python
import [Link] as GPIO # [Link] can be referred as GPIO from now
import time
ledPin = 22 # pin22
def setup():
[Link]([Link]) # GPIO Numbering of Pins
[Link](ledPin, [Link]) # Set ledPin as output
[Link](ledPin, [Link]) # Set ledPin to LOW to turn Off the
LED
def loop():
while True:
print 'LED on'
[Link](ledPin, [Link]) # LED On
[Link](1.0) # wait 1 sec
print 'LED off'
[Link](ledPin, [Link]) # LED Off
[Link](1.0) # wait 1 sec
def endprogram():
[Link](ledPin, [Link]) # LED Off
[Link]() # Release resources
if __name__ == '__main__': # Program starts from here
setup()
try:
loop()
except KeyboardInterrupt: # When 'Ctrl+C' is pressed, the destroy()
will be executed.
endprogram()
Other Devices :
• pcDuino
• BeagleBone Black
• Cubieboard