Iot Physical Devices
Iot Physical Devices
Iot Physical Devices
• 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
• 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
(Physical Design of IoT)
Exemplary Device: Raspberry Pi
• Raspberry Pi is defined as a minicomputer the size of a credit
card that is interoperable(compatible) with any input and output
hardware device like a monitor, a television, a mouse, or a
keyboard – effectively converting the set-up into a full-fledged PC
at a low cost.
• Raspberry Pi 4 measures 85.6mm × 56.5mm, or 2.22 inches × 3.37
inches
• 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
• Since Raspberry Pi runs Linux operating system, it supports Python "out of
the box".
• Linux is a Unix-like, open source and community-developed operating
system (OS) for computers, servers, mainframes, mobile devices and
embedded devices.
• An out-of-the-box feature or functionality (also called OOTB or off the
shelf), particularly in software, is a native feature or built-in functionality of
a product that comes directly from the vendor and works immediately
when the product is placed in service.
• out-of-the-box features and functionality: are available for all users by
default and do not require customization, modification, configuration,
scripting, add-ons, modules, third-party tools, or additional fees in order to be
used.
• An interpreted language is a programming language whose implementations
execute instructions directly and freely, without previously compiling a
program into machine-language instructions.
• In this language, once the program is compiled it is expressed in the
instructions of the target machine.
• Python is an interpreted language, which means the source code of a
Python program is converted into bytecode that is then executed by the Python
virtual machine.
• Python is different from major compiled languages, such as C and C + +, as
Python code is not required to be built and linked like code for these
languages.
Raspberry Pi
About the Board
About the Board
About the Board
• ARM(Advanced RISC Machine)processors are a family of central processing units (CPUs)
based on a reduced instruction set computer (RISC) architecture.
• SDRAM (synchronous dynamic random access memory) that are synchronized with
the clock speed that the microprocessor is optimized for.
• This tends to increase the number of instructions that the processor can perform in a
given time.
• The speed of SDRAM is rated in MHz rather than in nanoseconds (ns).
• You can convert the RAM clock speed to nanoseconds by dividing the chip speed into
1 billion ns (which is one second).
• For example, an 83 MHz RAM would be equivalent to 12 ns.
• DVI stands for "digital visual interface". DVI cables are most commonly used to transmit
video data from older PCs to older monitors
• HDMI cables are a more advanced replacement that transmit audio data as well as video,
unlike DVI cables.
About the Board
• The RCA connector (Radio Corporation of America) is a type of electrical
connector commonly used to carry audio and video signals.
• The name RCA derives from the company Radio Corporation of America, which introduced
the design in the 1930s.The connector’s male plug and female jack are called RCA
plug and RCA jack.
• NTSC "National Television Standards Committee" and PAL stands for "Phase Alternate
Lines". Both are ways to send a video signal to a display device, primarily television sets
that utilize analog signals.
• In, India, PAL video format is supported. NTSC is the video standard commonly used in
North America and most of South America. PAL is the video standard which is popular
in most of the European and Asian countries. The difference between NTSC and PAL is the
transmission of number of frames per second.
• PAL provides 25 alternating lines. It also produces 25 frames per second, which results in
a faster image display. The total lines of resolution in PAL are 625, which is higher than
NTSC. So, you can say that the picture quality of PAL is better compared to NTSC.
Linux on Raspberry Pi
Raspberry Pi supports various flavors of Linux including
• Raspbian
• Raspbian Linux is a Debian Wheezy port optimized for Raspberry Pi.
• Arch
• Arch is an Arch Linux port for AMD devices.
• Pidora
• Pidora Linux is a Fedora Linux optimized for Raspberry Pi.
• RaspBMC
• RaspBMC is an XBMC media-center distribution for Raspberry Pi.
• OpenELEC
• OpenELEC is a fast and user-friendly XBMC media-center distribution.
• RISC OS
Raspberry Pi GPIO
Raspberry Pi Interfaces
• Raspberry Pi Interfaces are used for connecting sensors and actuators.
• It has serial, SPI and I2C interfaces for data transfer as shown.
• Serial
• The serial interface on Raspberry Pi has receive (Rx) and transmit (Tx) pins
for communication with serial peripherals.
• 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
(Serial Data Line) and SCL (Serial clock line).
• SDA and SCL are bi-directional and assure the communication between the
network devices through the SDA and SCL signals.
• SDA-Transfer of data takes place through this pin
• SPI
• Serial Peripheral Interface (SPI) is a synchronous serial data protocol used for
communicating with one or more peripheral devices.
• A peripheral device is an internal/external device that connects directly to a
computer or other device but does not contribute to the computers primary
function such as computing. Eg: monitors, keyboards and printers.
Raspberry Pi Example:
Interfacing LED and switch with Raspberry Pi
from time import sleep import
RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
def toggleLED(pin):
state = not state
GPIO.output(pin, state)
while True:
try:
if (GPIO.input(25) == True):
toggleLED(pin)
sleep(.01)
except KeyboardInterrupt: exit()
Other Devices
• pcDuino
• BeagleBone Black
• Cubieboard