SlideShare a Scribd company logo
1 of 41
Download to read offline
Unit IV
IoT Physical Devices & Endpoints
Outline
• Basic building blocks of an IoT Device
• Exemplary Device: Raspberry Pi
• Raspberry Pi interfaces
• Programming Raspberry Pi with Python
• Other IoT 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
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".
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
Linux on Raspberry Pi
• 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
• RISC OS is a very fast and compact operating system.
Raspberry Pi GPIO
Raspberry Pi GPIO
When using the RPi.GPIO library in Python we have to call
import RPi.GPIO as GPIO
and then
GPIO.setmode(GPIO.BOARD)
or
GPIO.setmode(GPIO.BCM)
What is the difference between these two options?
Raspberry Pi GPIO
• The GPIO.BOARD option specifies that you are referring to the pins by the number
of the pin on the plug - i.e the numbers printed on the board (e.g. P1) and in the
middle of the diagrams below.
• The GPIO.BCM option means that you are referring to the pins by the "Broadcom
SOC channel" number, these are the numbers after "GPIO" in the green rectangles
around the outside of the below diagrams
Raspberry Pi GPIO
• Unfortunately the BCM numbers changed between versions of the Pi1 Model B, and
you'll need to work out which one. So it may be safer to use the BOARD numbers if you
are going to use more than one Raspberry Pi in a project.
• The Model B+ uses the same numbering as the Model B r2.0, and adds new pins (board
numbers 27-40).
• The Raspberry Pi Zero, Pi 2B, Pi 3B, and Pi 4B use the same numbering as the B+.
Raspberry Pi GPIO
Raspberry Pi GPIO
Raspberry Pi GPIO
Raspberry Pi GPIO
• Identification of the pin numberings via Linux command
• There is a Linux command to find out which name is for which GPIO pin. So in
that case, we do not have to worry about a tutorial or a cheat sheet to have by
our side to check out the pin numberings of the Raspberry Pi all the time.
• Type the following command in the terminal,
pinout
Raspberry Pi GPIO
Raspberry Pi Interfaces
Raspberry Pi Interfaces
Serial
• The serial interface on Raspberry Pi has receive (Rx) and transmit (Tx) pins
for communication with serial peripherals.
• GPIO 14 – UART Tx
• GPIO 15 – UART Rx
Raspberry Pi Interfaces
Serial Interface- UART
• UART (Universal Asynchronous Receiver/Transmitter) is a serial
communication protocol in which data is transferred serially bit by bit.
• Asynchronous serial communication is widely used for byte oriented
transmission.
• In asynchronous serial communication, a byte of data is transferred at a
time.
Frame Structure of UART
Raspberry Pi UART
Raspberry Pi Interfaces
SPI
• Serial Peripheral Interface (SPI) is a synchronous serial data protocol used
for communicating with one or more peripheral devices.
• In an SPI connection, there is one master device and one or more
peripheral devices.
Raspberry Pi Interfaces
• There are five pins on Raspberry Pi for SPI interface.
• MISO (Master In Slave Out) : Master Line for sending data to peripherals (GPIO 9).
• MOSI (Master Out Slave In) : Slave line for sending data to master (GPIO 10).
• SCK (Serial Clock) : Clock generated by master to synchronize data transmission (GPIO
11).
• CEO (Chip Enable 0) : To enable or disable devices (GPIO 8).
• CE1 (Chip Enable 1) : To enable or disable devices (GPIO 7).
Raspberry Pi Interfaces
I2C (Inter Integrated Circuit)
• It is a synchronous serial protocol that communicates data between two
devices
• It is a master slave protocol which may have one master or many master
and many slaves where as SPI has only one master
• It is generally used for communication over short distance.
Raspberry Pi Interfaces
I2C (Inter Integrated Circuit)
• The I2C interface pins on Raspberry Pi allows to connect hardware modules.
• I2C interface allows synchronous data transfer with just two pins –
SDA (I2C data line) GPIO 2 and SCL (I2C clock line) GPIO 3.
• It is used in many applications like reading RTC (Real Time Clock), assessing external
EEPROM memory and it is also used in sensor modules like gyro meter and
magnetometer.
Programming Raspberry Pi with Python
• Raspberry Pi runs Linux and supports Python Out of Box software.
• Therefore, we can run any python program that runs on a normal computer.
• GPIO pins provides capability on Raspberry Pi that makes useful devices for IoT.
• A wide variety of sensors and actuators can be interfaced with raspberry pi using the
GPIO pins and the SPI,I2C and serial interfaces.
• Input from the sensors connected to raspberry pi can be processed and various actions
can be taken, sending data to a server, sending an email, triggering a relay switch.
Raspberry Pi Example:
Interfacing LED and switch with Raspberry Pi
• In this example LED is connected to GPIO pin 18 and switch is connected to pin 25.
• In the infinite while loop the value of pin 25 is checked and the state of LED is toggled if
the switch is pressed.
• This example shows how to get input from GPIO pins and process the input and takes
action.
• The action in this example is toggling the state of an LED.
Raspberry Pi Example:
Interfacing LED and switch with Raspberry Pi
from time import sleep
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
#Switch Pin
GPIO.setup(25, GPIO.IN)
#LED Pin
GPIO.setup(18, GPIO.OUT)
state=false
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()
Python Program for Sending an Email on Switch Press
Python Program for Sending an Email on Switch Press
Python Program for Sending an Email on Switch Press
Interfacing Light Sensor (LDR) with RPi
• Connect one side of LDR to 3.3V and other side to a1μF capacitor and also to a
GPIO pin (pin 18 in this example).
• An LED is connected to pin 18 which is controlled based on the light-level sensed.
• The read LDR() function returns a count which is proportional to the light level.
• In this function the LDR pin is set to output and low and then to input.
Interfacing Light Sensor (LDR) with RPi
• At this point the capacitor starts charging through the resistor (and a counter is
started) until the input pin reads high (this happens when capacitor voltage
becomes greater than 1.4V).
• The counter is stopped when the input reads high.
• The final count is proportional to the light level as greater the amount of light,
smaller is the LDR resistance and greater is the time taken to charge the
capacitor.
Interfacing Light Sensor (LDR) with RPi
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
ldr_threshold = 1000
LDR_PIN = 18
LIGHT_PIN = 25
def readLDR(PIN):
reading = 0
GPIO.setup(LIGHT_PIN, GPIO.OUT)
GPIO.output(PIN, false)
time.sleep(0.1)
GPIO.setup(PIN, GPIO.IN)
while (GPIO.input (PIN) ==Flase):
reading=reading+1
return reading
def switchOnLight(PIN):
GPIO.setup(PIN, GPIO.OUT)
GPIO.output(PIN, True)
def switchOffLight(PIN):
GPIO.setup(PIN, GPIO.OUT)
GPIO.output(PIN, False)
while True:
ldr_reading = readLDR(LDR_PIN)
if ldr_reading < ldr_threshold:
switchOnLight (LIGHT_PIN)
else:
switchOffLight(LIGHT_PIN)
time.sleep(1)
Interfacing Light Sensor (LDR) with RPi
Interfacing Light Sensor (LDR) with RPi
Other Devices
• pcDuino
• BeagleBone Black
• Cubieboard
Comparison of Single Board Mini Computers

More Related Content

What's hot

Introduction to IoT Architectures and Protocols
Introduction to IoT Architectures and ProtocolsIntroduction to IoT Architectures and Protocols
Introduction to IoT Architectures and ProtocolsAbdullah Alfadhly
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfGVNSK Sravya
 
Application development for the internet of things
Application development for the internet of thingsApplication development for the internet of things
Application development for the internet of thingsPankesh Patel
 
Ppt 3 - IOT logic design
Ppt   3 - IOT logic designPpt   3 - IOT logic design
Ppt 3 - IOT logic designudhayakumarc1
 
IoT Design Principles
IoT Design PrinciplesIoT Design Principles
IoT Design Principlesardexateam
 
IOT and its communication models and protocols.pdf
IOT and its communication models and protocols.pdfIOT and its communication models and protocols.pdf
IOT and its communication models and protocols.pdfMD.ANISUR RAHMAN
 
Sources of IoT (JNTUK - UNIT 1)
Sources of IoT (JNTUK - UNIT 1)Sources of IoT (JNTUK - UNIT 1)
Sources of IoT (JNTUK - UNIT 1)FabMinds
 
Introduction to Raspberrypi
Introduction to  RaspberrypiIntroduction to  Raspberrypi
Introduction to RaspberrypiIheb Ben Salem
 
Technology Behind IoT (JNTUK - Unit - 1)
Technology Behind IoT (JNTUK - Unit - 1)Technology Behind IoT (JNTUK - Unit - 1)
Technology Behind IoT (JNTUK - Unit - 1)FabMinds
 
Raspberry Pi Using Python
Raspberry Pi Using PythonRaspberry Pi Using Python
Raspberry Pi Using PythonSeggy Segaran
 
IoT Communication Protocols
IoT Communication ProtocolsIoT Communication Protocols
IoT Communication ProtocolsPradeep Kumar TS
 
Business models for business processes on IoT
Business models for business processes on IoTBusiness models for business processes on IoT
Business models for business processes on IoTFabMinds
 
Chapter_1.pptx
Chapter_1.pptxChapter_1.pptx
Chapter_1.pptxAadiSoni3
 
IOT System Management with NETCONF-YANG.pptx
IOT System Management with NETCONF-YANG.pptxIOT System Management with NETCONF-YANG.pptx
IOT System Management with NETCONF-YANG.pptxArchanaPandiyan
 
Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Mandeesh Singh
 
Internet of things (IoT)
Internet of things (IoT)Internet of things (IoT)
Internet of things (IoT)Prakash Honnur
 

What's hot (20)

Iot architecture
Iot architectureIot architecture
Iot architecture
 
Introduction to IoT Architectures and Protocols
Introduction to IoT Architectures and ProtocolsIntroduction to IoT Architectures and Protocols
Introduction to IoT Architectures and Protocols
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdf
 
Application development for the internet of things
Application development for the internet of thingsApplication development for the internet of things
Application development for the internet of things
 
Ppt 3 - IOT logic design
Ppt   3 - IOT logic designPpt   3 - IOT logic design
Ppt 3 - IOT logic design
 
IoT Design Principles
IoT Design PrinciplesIoT Design Principles
IoT Design Principles
 
IOT and its communication models and protocols.pdf
IOT and its communication models and protocols.pdfIOT and its communication models and protocols.pdf
IOT and its communication models and protocols.pdf
 
Sources of IoT (JNTUK - UNIT 1)
Sources of IoT (JNTUK - UNIT 1)Sources of IoT (JNTUK - UNIT 1)
Sources of IoT (JNTUK - UNIT 1)
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Introduction to Raspberrypi
Introduction to  RaspberrypiIntroduction to  Raspberrypi
Introduction to Raspberrypi
 
Technology Behind IoT (JNTUK - Unit - 1)
Technology Behind IoT (JNTUK - Unit - 1)Technology Behind IoT (JNTUK - Unit - 1)
Technology Behind IoT (JNTUK - Unit - 1)
 
Domain specific IoT
Domain specific IoTDomain specific IoT
Domain specific IoT
 
Raspberry Pi Using Python
Raspberry Pi Using PythonRaspberry Pi Using Python
Raspberry Pi Using Python
 
IoT Communication Protocols
IoT Communication ProtocolsIoT Communication Protocols
IoT Communication Protocols
 
Business models for business processes on IoT
Business models for business processes on IoTBusiness models for business processes on IoT
Business models for business processes on IoT
 
IoT Control Units and Communication Models
IoT Control Units and Communication ModelsIoT Control Units and Communication Models
IoT Control Units and Communication Models
 
Chapter_1.pptx
Chapter_1.pptxChapter_1.pptx
Chapter_1.pptx
 
IOT System Management with NETCONF-YANG.pptx
IOT System Management with NETCONF-YANG.pptxIOT System Management with NETCONF-YANG.pptx
IOT System Management with NETCONF-YANG.pptx
 
Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)
 
Internet of things (IoT)
Internet of things (IoT)Internet of things (IoT)
Internet of things (IoT)
 

Similar to IoT Physical Devices and End Points.pdf

Baking a Raspberry PI with Chef Rob
Baking a Raspberry PI with Chef RobBaking a Raspberry PI with Chef Rob
Baking a Raspberry PI with Chef RobRobert Tisma
 
IoT Programming on the Raspberry Pi
IoT Programming on the Raspberry PiIoT Programming on the Raspberry Pi
IoT Programming on the Raspberry PiDamien Magoni
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiNeil Broers
 
ARDUINO AND RASPBERRYPI.pptx
ARDUINO AND RASPBERRYPI.pptxARDUINO AND RASPBERRYPI.pptx
ARDUINO AND RASPBERRYPI.pptxvennetikiran1
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxMadhurimaDas52
 
Java Webinar #9: “Raspberry Pi Platform for Java Programmers”
Java Webinar #9: “Raspberry Pi Platform for Java Programmers”Java Webinar #9: “Raspberry Pi Platform for Java Programmers”
Java Webinar #9: “Raspberry Pi Platform for Java Programmers”GlobalLogic Ukraine
 
Embedded Systems: Lecture 9: The Pi Control ARM
Embedded Systems: Lecture 9: The Pi Control ARMEmbedded Systems: Lecture 9: The Pi Control ARM
Embedded Systems: Lecture 9: The Pi Control ARMAhmed El-Arabawy
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptxBLACKSPAROW
 
Got Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOGot Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOAdam Englander
 
Python-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxPython-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxTuynLCh
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfssusere5db05
 
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdfJayanthi Kannan MK
 
Multipilot pres-ufficiale def
Multipilot pres-ufficiale defMultipilot pres-ufficiale def
Multipilot pres-ufficiale defRoberto Navoni
 
Internet of Things With PHP
Internet of Things With PHPInternet of Things With PHP
Internet of Things With PHPAdam Englander
 

Similar to IoT Physical Devices and End Points.pdf (20)

Unit 3 Complete.pptx
Unit 3 Complete.pptxUnit 3 Complete.pptx
Unit 3 Complete.pptx
 
IoT Heaps 5
IoT Heaps 5IoT Heaps 5
IoT Heaps 5
 
Baking a Raspberry PI with Chef Rob
Baking a Raspberry PI with Chef RobBaking a Raspberry PI with Chef Rob
Baking a Raspberry PI with Chef Rob
 
IoT Programming on the Raspberry Pi
IoT Programming on the Raspberry PiIoT Programming on the Raspberry Pi
IoT Programming on the Raspberry Pi
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry Pi
 
ARDUINO AND RASPBERRYPI.pptx
ARDUINO AND RASPBERRYPI.pptxARDUINO AND RASPBERRYPI.pptx
ARDUINO AND RASPBERRYPI.pptx
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptx
 
Arduino
ArduinoArduino
Arduino
 
Java Webinar #9: “Raspberry Pi Platform for Java Programmers”
Java Webinar #9: “Raspberry Pi Platform for Java Programmers”Java Webinar #9: “Raspberry Pi Platform for Java Programmers”
Java Webinar #9: “Raspberry Pi Platform for Java Programmers”
 
Embedded Systems: Lecture 9: The Pi Control ARM
Embedded Systems: Lecture 9: The Pi Control ARMEmbedded Systems: Lecture 9: The Pi Control ARM
Embedded Systems: Lecture 9: The Pi Control ARM
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
 
Got Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOGot Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIO
 
Python-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptxPython-in-Embedded-systems.pptx
Python-in-Embedded-systems.pptx
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
Arduino course
Arduino courseArduino course
Arduino course
 
UNIT 4.pptx
UNIT 4.pptxUNIT 4.pptx
UNIT 4.pptx
 
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
 
Raspberry pi led blink
Raspberry pi led blinkRaspberry pi led blink
Raspberry pi led blink
 
Multipilot pres-ufficiale def
Multipilot pres-ufficiale defMultipilot pres-ufficiale def
Multipilot pres-ufficiale def
 
Internet of Things With PHP
Internet of Things With PHPInternet of Things With PHP
Internet of Things With PHP
 

More from GVNSK Sravya

Introduction to Internet of Things.pdf
Introduction to Internet of Things.pdfIntroduction to Internet of Things.pdf
Introduction to Internet of Things.pdfGVNSK Sravya
 
Unit II GPS Signal Characteristics
Unit II GPS Signal CharacteristicsUnit II GPS Signal Characteristics
Unit II GPS Signal CharacteristicsGVNSK Sravya
 
Unit1 GPS Introduction
Unit1 GPS IntroductionUnit1 GPS Introduction
Unit1 GPS IntroductionGVNSK Sravya
 
Unit III GPS Receivers and Errors
Unit III GPS Receivers and ErrorsUnit III GPS Receivers and Errors
Unit III GPS Receivers and ErrorsGVNSK Sravya
 
EMI Unit 5 Bridges and Measurement of Physical Parameters
EMI Unit 5 Bridges and  Measurement of Physical ParametersEMI Unit 5 Bridges and  Measurement of Physical Parameters
EMI Unit 5 Bridges and Measurement of Physical ParametersGVNSK Sravya
 

More from GVNSK Sravya (12)

Python.pdf
Python.pdfPython.pdf
Python.pdf
 
IoT & M2M.pdf
IoT & M2M.pdfIoT & M2M.pdf
IoT & M2M.pdf
 
Introduction to Internet of Things.pdf
Introduction to Internet of Things.pdfIntroduction to Internet of Things.pdf
Introduction to Internet of Things.pdf
 
Unit 4 DGPS
Unit 4 DGPSUnit 4 DGPS
Unit 4 DGPS
 
Unit II GPS Signal Characteristics
Unit II GPS Signal CharacteristicsUnit II GPS Signal Characteristics
Unit II GPS Signal Characteristics
 
Unit1 GPS Introduction
Unit1 GPS IntroductionUnit1 GPS Introduction
Unit1 GPS Introduction
 
Unit III GPS Receivers and Errors
Unit III GPS Receivers and ErrorsUnit III GPS Receivers and Errors
Unit III GPS Receivers and Errors
 
EMI Unit IV
EMI Unit IVEMI Unit IV
EMI Unit IV
 
EMI Unit 5 Bridges and Measurement of Physical Parameters
EMI Unit 5 Bridges and  Measurement of Physical ParametersEMI Unit 5 Bridges and  Measurement of Physical Parameters
EMI Unit 5 Bridges and Measurement of Physical Parameters
 
EMI Unit 3 CRO
EMI Unit 3 CROEMI Unit 3 CRO
EMI Unit 3 CRO
 
EMI Unit II
EMI Unit IIEMI Unit II
EMI Unit II
 
Emi Unit 1
Emi Unit 1Emi Unit 1
Emi Unit 1
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 

IoT Physical Devices and End Points.pdf

  • 1. Unit IV IoT Physical Devices & Endpoints
  • 2. Outline • Basic building blocks of an IoT Device • Exemplary Device: Raspberry Pi • Raspberry Pi interfaces • Programming Raspberry Pi with Python • Other IoT devices
  • 3. 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.
  • 4. 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.
  • 5. 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.
  • 6. Block diagram of an IoT Device
  • 7. 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".
  • 8. 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".
  • 10. Linux on Raspberry Pi • 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 • RISC OS is a very fast and compact operating system.
  • 12. Raspberry Pi GPIO When using the RPi.GPIO library in Python we have to call import RPi.GPIO as GPIO and then GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) What is the difference between these two options?
  • 13. Raspberry Pi GPIO • The GPIO.BOARD option specifies that you are referring to the pins by the number of the pin on the plug - i.e the numbers printed on the board (e.g. P1) and in the middle of the diagrams below. • The GPIO.BCM option means that you are referring to the pins by the "Broadcom SOC channel" number, these are the numbers after "GPIO" in the green rectangles around the outside of the below diagrams
  • 14. Raspberry Pi GPIO • Unfortunately the BCM numbers changed between versions of the Pi1 Model B, and you'll need to work out which one. So it may be safer to use the BOARD numbers if you are going to use more than one Raspberry Pi in a project. • The Model B+ uses the same numbering as the Model B r2.0, and adds new pins (board numbers 27-40). • The Raspberry Pi Zero, Pi 2B, Pi 3B, and Pi 4B use the same numbering as the B+.
  • 18. Raspberry Pi GPIO • Identification of the pin numberings via Linux command • There is a Linux command to find out which name is for which GPIO pin. So in that case, we do not have to worry about a tutorial or a cheat sheet to have by our side to check out the pin numberings of the Raspberry Pi all the time. • Type the following command in the terminal, pinout
  • 21. Raspberry Pi Interfaces Serial • The serial interface on Raspberry Pi has receive (Rx) and transmit (Tx) pins for communication with serial peripherals. • GPIO 14 – UART Tx • GPIO 15 – UART Rx
  • 22. Raspberry Pi Interfaces Serial Interface- UART • UART (Universal Asynchronous Receiver/Transmitter) is a serial communication protocol in which data is transferred serially bit by bit. • Asynchronous serial communication is widely used for byte oriented transmission. • In asynchronous serial communication, a byte of data is transferred at a time.
  • 25. Raspberry Pi Interfaces SPI • Serial Peripheral Interface (SPI) is a synchronous serial data protocol used for communicating with one or more peripheral devices. • In an SPI connection, there is one master device and one or more peripheral devices.
  • 26. Raspberry Pi Interfaces • There are five pins on Raspberry Pi for SPI interface. • MISO (Master In Slave Out) : Master Line for sending data to peripherals (GPIO 9). • MOSI (Master Out Slave In) : Slave line for sending data to master (GPIO 10). • SCK (Serial Clock) : Clock generated by master to synchronize data transmission (GPIO 11). • CEO (Chip Enable 0) : To enable or disable devices (GPIO 8). • CE1 (Chip Enable 1) : To enable or disable devices (GPIO 7).
  • 27. Raspberry Pi Interfaces I2C (Inter Integrated Circuit) • It is a synchronous serial protocol that communicates data between two devices • It is a master slave protocol which may have one master or many master and many slaves where as SPI has only one master • It is generally used for communication over short distance.
  • 28. Raspberry Pi Interfaces I2C (Inter Integrated Circuit) • The I2C interface pins on Raspberry Pi allows to connect hardware modules. • I2C interface allows synchronous data transfer with just two pins – SDA (I2C data line) GPIO 2 and SCL (I2C clock line) GPIO 3. • It is used in many applications like reading RTC (Real Time Clock), assessing external EEPROM memory and it is also used in sensor modules like gyro meter and magnetometer.
  • 29. Programming Raspberry Pi with Python • Raspberry Pi runs Linux and supports Python Out of Box software. • Therefore, we can run any python program that runs on a normal computer. • GPIO pins provides capability on Raspberry Pi that makes useful devices for IoT. • A wide variety of sensors and actuators can be interfaced with raspberry pi using the GPIO pins and the SPI,I2C and serial interfaces. • Input from the sensors connected to raspberry pi can be processed and various actions can be taken, sending data to a server, sending an email, triggering a relay switch.
  • 30. Raspberry Pi Example: Interfacing LED and switch with Raspberry Pi • In this example LED is connected to GPIO pin 18 and switch is connected to pin 25. • In the infinite while loop the value of pin 25 is checked and the state of LED is toggled if the switch is pressed. • This example shows how to get input from GPIO pins and process the input and takes action. • The action in this example is toggling the state of an LED.
  • 31. Raspberry Pi Example: Interfacing LED and switch with Raspberry Pi from time import sleep import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) #Switch Pin GPIO.setup(25, GPIO.IN) #LED Pin GPIO.setup(18, GPIO.OUT) state=false 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()
  • 32. Python Program for Sending an Email on Switch Press
  • 33. Python Program for Sending an Email on Switch Press
  • 34. Python Program for Sending an Email on Switch Press
  • 35. Interfacing Light Sensor (LDR) with RPi • Connect one side of LDR to 3.3V and other side to a1μF capacitor and also to a GPIO pin (pin 18 in this example). • An LED is connected to pin 18 which is controlled based on the light-level sensed. • The read LDR() function returns a count which is proportional to the light level. • In this function the LDR pin is set to output and low and then to input.
  • 36. Interfacing Light Sensor (LDR) with RPi • At this point the capacitor starts charging through the resistor (and a counter is started) until the input pin reads high (this happens when capacitor voltage becomes greater than 1.4V). • The counter is stopped when the input reads high. • The final count is proportional to the light level as greater the amount of light, smaller is the LDR resistance and greater is the time taken to charge the capacitor.
  • 37. Interfacing Light Sensor (LDR) with RPi import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) ldr_threshold = 1000 LDR_PIN = 18 LIGHT_PIN = 25 def readLDR(PIN): reading = 0 GPIO.setup(LIGHT_PIN, GPIO.OUT) GPIO.output(PIN, false) time.sleep(0.1) GPIO.setup(PIN, GPIO.IN) while (GPIO.input (PIN) ==Flase): reading=reading+1 return reading def switchOnLight(PIN): GPIO.setup(PIN, GPIO.OUT) GPIO.output(PIN, True) def switchOffLight(PIN): GPIO.setup(PIN, GPIO.OUT) GPIO.output(PIN, False) while True: ldr_reading = readLDR(LDR_PIN) if ldr_reading < ldr_threshold: switchOnLight (LIGHT_PIN) else: switchOffLight(LIGHT_PIN) time.sleep(1)
  • 38. Interfacing Light Sensor (LDR) with RPi
  • 39. Interfacing Light Sensor (LDR) with RPi
  • 40. Other Devices • pcDuino • BeagleBone Black • Cubieboard
  • 41. Comparison of Single Board Mini Computers