100% found this document useful (1 vote)
323 views58 pages

IOT Lab

Familiarization with Raspberry Pi and perform necessary software installation. To interface LED/Buzzer with Raspberry Pi and write a program to turn ON LED for 1 sec after every 2 seconds. To interface Push button/Digital sensor (IR/LDR) with Raspberry Pi and write a program to turn ON LED when push button is pressed or at sensor detection. To interface OLED with Raspberry Pi and write a program to print temperature and humidity readings using DHT11 sensor. To interface DC motor using motor

Uploaded by

Lenin. S.B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
323 views58 pages

IOT Lab

Familiarization with Raspberry Pi and perform necessary software installation. To interface LED/Buzzer with Raspberry Pi and write a program to turn ON LED for 1 sec after every 2 seconds. To interface Push button/Digital sensor (IR/LDR) with Raspberry Pi and write a program to turn ON LED when push button is pressed or at sensor detection. To interface OLED with Raspberry Pi and write a program to print temperature and humidity readings using DHT11 sensor. To interface DC motor using motor

Uploaded by

Lenin. S.B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 58

Internet of Things

Laboratory
Web Reference - program
• IoT Project Using Arduino Bluetooth Module to Control LED –
Javatpoint

• Raspberry Pi based Smart Phone (Bluetooth) Controlled Home


Automation (circuitdigest.com)
Cycle I: Sensor interfacing
• Familiarization with Raspberry Pi and perform necessary software installation.
• To interface LED/Buzzer with Raspberry Pi and write a program to turn ON LED for 1 sec after
every 2 seconds.
• To interface Push button/Digital sensor (IR/LDR) with Raspberry Pi and write a program to turn
ON LED when push button is pressed or at sensor detection.
• To interface OLED with Raspberry Pi and write a program to print temperature and humidity
readings using DHT11 sensor.
• To interface DC motor using motor driver circuit with Raspberry Pi and write a program to rotate
motor in clockwise and anticlockwise.
• To interface Bluetooth with Raspberry Pi and write a program to turn Relay ON/OFF when ‘1’/’0’
is received from smartphone using Bluetooth module.
• To Interface PIR sensor and LCD with Raspberry Pi to display “Motion Detected” when PIR senses
the value.
Cycle II: Server Configuration
• Write a program on Raspberry Pi to upload temperature and humidity data to thing
speak cloud and retrieve data from thing speak cloud.
• To install MySQL database on Raspberry Pi and perform basic SQL queries.
• Write a program on Raspberry Pi to publish temperature data to MQTT broker.
• Write a program on Raspberry Pi to subscribe to MQTT broker for temperature data and
print it.
• Write a program to create TCP server on Raspberry Pi and respond with humidity data
to TCP client when requested.
• Write a program to create UDP server on Raspberry Pi and respond with humidity data
to UDP client when requested.
• LoRaWAN Configuration to share the data in cloud.
1. Dr. SRN Reddy, Rachit Thukral and Manasi
Mishra, “Introduction to Internet of Things: A
practical Approach”, ETI Labs 2014
2. Jeeva Jose, “Internet of Things”, Khanna

Reference Publishing House, Delhi, 2012


3. Adrian McEwen, “Designing the Internet of
Things”, Wiley, 2007
Books 4. Cuno Pfister, “Getting Started with the Internet
of Things”, O Reilly Media, 2015
5. Pethuru Raj and Anupama C. Raman, “The
Internet of Things: Enabling Technologies,
Platforms, and Use Cases”, CRC Press
1. https://www.i-scoop.eu/internet-of-things-
guide/
2. https://www.theinternetofthings.eu/
3. https://www.udemy.com/course/complete-
Web guide-to-build-iot-things-from-scratch-to-
market/

References 4. https://www.coursera.org/learn/iot
5. https://onlinecourses.nptel.ac.in/noc21_ee85/
preview
6. https://components101.com/microcontrollers/
raspberry-pi-3-pinout-features-datasheet
Course Outcome

CO Knowledge
Course Outcome
Number Level
Memorize the concept of internet of Things and its hardware and software
CO1 K2
components
Demonstrate by Interfacing I/O devices, sensors & communication modules
CO2 K3
with Raspberry Pi
CO3 K2 Identify the concepts of remotely monitor data and control devices
Organize the server for various application to understand the data sharing in
CO4 K4
cloud
CO5 K6 Design and Develop the real time IoT projects with cloud
Course Outcome Experiment No Experiment Name
CO1 1 Familiarization with Raspberry Pi and perform necessary software installation

To interface LED/Buzzer with Raspberry Pi and write a program to turn ON LED for 1 sec after
2 every 2 seconds.

To interface Push button/Digital sensor (IR/LDR) with Raspberry Pi and write a program to turn
3 ON LED when push button is pressed or at sensor detection.

To interface OLED with Raspberry Pi and write a program to print temperature and humidity
CO2 4 readings using DHT11 sensor.

To interface DC motor using motor driver circuit with Raspberry Pi and write a program to
5 rotate motor in clockwise and anticlockwise.
To Interface PIR sensor and LCD with Raspberry Pi to display “Motion Detected” when PIR
7 senses the value.

To interface Bluetooth with Raspberry Pi and write a program to turn Relay ON/OFF when
6 ‘1’/’0’ is received from smartphone using Bluetooth module.

To install MySQL database on Raspberry Pi and perform basic SQL queries.


CO3 9 Write a program on Raspberry Pi to publish temperature data to MQTT broker.

Write a program on Raspberry Pi to subscribe to MQTT broker for temperature data and print
10 it.
Course Experiment
Experiment Name
Outcome No
Write a program on Raspberry Pi to upload temperature and humidity data to thing speak
8 cloud and retrieve data from things peak cloud

Write a program to create TCP server on Raspberry Pi and respond with humidity data to
11 TCP client when requested
CO4

Write a program to create UDP server on Raspberry Pi and respond with humidity data to
12 UDP client when requested. / LoRaWAN Configuration to share the data in cloud.

Content Beyond the Syllabus


Writing an application using Raspberry-Pi board to control the operation of hardware
13 simulated traffic signal.
CO5
Writing an application using Raspberry-Pi board to control the operation of a hardware
14 simulated Lift Elevator
Raspberry Pi
Outline
• Introduction to Raspberry Pi
• Comparisons
• Hardware Requirements
• Pin Diagram and its Description
• Programming Language
• Features & Specifications
• Setup
• OS Support
• Applications
What is a Raspberry Pi?

• University of Cambridge’s Computer Laboratory – Feb. 2012


• Designed for education
• A credit card sized PC
• Plugs into a TV or monitor
• Inexpensive ~$35 each
• Capability:
• Programming
• Electronic Projects
• Office
• Play HD Videos
Raspberry
Models:
• Essential:
• Raspberry Pi board
• Prepared Operating System SD Card
Hardware • USB keyboard
• Display (with HDMI, DVI, or Composite input)
Requirements: • Power Supply

• Highly suggested extras include:


• USB mouse
• Internet connectivity - LAN cable
• Heat sink for Processor
• Case
• Power supply (5V,2.5A)
• Class 10 micro-SD card, 8GB or more
• USB keyboard
• USB mouse
• HDMI cable
• HDMI screen
Pin Diagram & its
Description :
PIN GROUP PIN NAME DESCRIPTION

+5V -power output


POWER SOURCE +5V, +3.3V, GND and Vin +3.3V -power output
GND – GROUND pin

UART Interface (RXD, TXD)  UART (Universal Asynchronous Receiver Transmitter)


[(GPIO15,GPIO14)] used for interfacing sensors and other devices.

SPI Interface(MOSI, MISO, CLK,CE) x 2                       


COMMUNICATION SPI (Serial Peripheral Interface) used for communicating
[SPI0 -(GPIO10 ,GPIO9, GPIO11 ,GPIO8)]
INTERFACE with other boards or peripherals.
[SPI1 --(GPIO20 ,GPIO19, GPIO21 ,GPIO7)]

TWI Interface(SDA, SCL) x 2               


TWI (Two Wire Interface) Interface can be used to connect
[(GPIO2, GPIO3)]
peripherals.
[(ID_SD,ID_SC)]

Although these some pins have multiple functions they can


INPUT OUTPUT PINS 26 I/O
be considered as I/O pins.

These 4 channels can provide PWM (Pulse Width


Hardware PWM available on
PWM Modulation) outputs.
GPIO12, GPIO13, GPIO18, GPIO19
*Software PWM available on all pins

EXTERNAL INTERRUPTS All I/O In the board all I/O pins can be used as Interrupts.
Pin Description
Power Pins: (3)
The board consists of two 5V pins, two 3V3 pins, and 9 ground pins (0V), which are
unconfigurable.
• 5V: The 5v pins directly deliver the 5v supply coming from the mains adaptor. This pin
can use to power up the Raspberry Pi, and it can also use to power up other 5v devices.
• 3.3V: The 3v pin is there to offer a stable 3.3v supply to power components and to test
LEDs.
• GND: Ground is commonly referred to as GND. All the voltages are measured with
respect to the GND voltage.
Input/Outputs pins: (3)
• A GPIO pin that is set as an input will allow a signal to be received by the Raspberry Pi
that is sent by a device connected to this pin.
• A voltage between 1.8V and 3.3V will be read by the Raspberry Pi as HIGH and if the
voltage is lower than 1.8V will be read as LOW. 
Note: Do not connect a device with an input voltage above 3.3V to any of the GPIO pins.
• A GPIO pin set as an output pin sends the voltage signal as high (3.3V) or low (0V).
When this pin is set to HIGH, the voltage at the output is 3.3V and when set to LOW, the
output voltage is 0V.
Along with the simple function of input and output pins, the GPIO pins can also
perform a variety of alternative functions. Some specific pins are:
PWM (pulse-width modulation) pins: 
• Software PWM is available on all pins
• Hardware PWM is available on these pins only: GPIO12, GPIO13, GPIO18, GPIO19
SPI pins: 
• SPI (Serial Peripheral Interface) is another protocol used for master-slave
communication. It is used by the Raspberry pi board to quickly communicate between
one or more peripheral devices.
• Data is synchronized using a clock (SCLK at GPIO11) from the master (RPi) and the
data is sent from the Pi to our SPI device using the MOSI (Master Out Slave In) pin. If
the SPI device needs to communicate back to Raspberry Pi, then it will send data back
using the MISO (Master In Slave Out) pin. 
There are 5 pins involved in SPI communication:
SPI pins: 
• GND: Connect all GND pins from all the slave components and the Raspberry Pi 3
board together.
• SCLK: Clock of the SPI. Connect all SCLK pins together.
• MOSI: It stands for Master Out Slave In. This pin is used to send data from the master
to a slave.
• MISO: It stands for Master In Slave Out. This pin is used to receive data from a slave
to the master.
• CE: It stands for Chip Enable. We need to connect one CE pin per slave (or peripheral
devices) in our circuit. By default, we have two CE pins but we can configure more CE
pins from the other available GPIO pins.
SPI pins on board:
• SPI0: GPIO9 (MISO), GPIO10 (MOSI), GPIO11 (SCLK), GPIO8 (CE0), GPIO7 (CE1)
• SPI1: GPIO19 (MISO), GPIO20 (MOSI), GPIO21 (SCLK), GPIO18 (CE0), GPIO17 (CE1),
GPIO16 (CE2)

I2C pins:
• I2C is used by the Raspberry Pi board to communicate with devices that are compatible
with Inter-Integrated Circuit (a low-speed two-wire serial communication protocol).
• This communication standard requires master-slave roles between both devices.
• I2C has two connections: SDA (Serial Data) and SCL (Serial Clock).
• They work by sending data to and using the SDA connection, and the speed of data
transfer is controlled via the SCL pin.
• Data: (GPIO2), Clock (GPIO3)
• EEPROM Data: (GPIO0), EEPROM Clock (GPIO1)
UART Pins:
• Serial communication or the UART (Universal Asynchronous Receiver / Transmitter) pins
provide a way to communicate between two microcontrollers or the computers.
• TX pin is used to transmit the serial data and RX pin is used to receive serial data coming from a
different serial device.
• TX (GPIO14)
• RX (GPIO15)
Raspberry Pi 3
Model B Schematic
Programming Languages

• The Raspberry Pi Foundation recommends


Python
• Any language which will compile for ARMv6
can be used

Installed by default on the Raspberry Pi:


• C
• C++
• Java
• Scratch
• R
Features
• CPU: Quad-core 64-bit ARM Cortex A53 clocked at 1.2 GHz
• GPU: 400MHz Video Core IV multimedia
• Memory: 1GB LPDDR2-900 SDRAM (i.e., 900MHz)
• USB ports: 4
• Video outputs: HDMI, composite video (PAL and NTSC) via 3.5 mm
jack
• Network: 10/100Mbps Ethernet and 802.11n Wireless LAN
• Peripherals: 17 GPIO plus specific functions, and HAT ID bus
• Bluetooth: 4.1
• Power source: 5 V via Micro USB or GPIO header
• Size: 85.60mm × 56.5mm
• Weight: 45g
Specifications
Cont.
OS Setup:
https://www.yout
ube.com/watch?v
=UCwTJHUE3Z0&t
=427s
Operating
System(OS)
Support

Pi Supports All operating systems:


• Linux
• Windows
• Android
• Custom OS
• Screen
• OpenHAB
Major
Applications
of Raspberry
PI
Some of the major Application Areas of the Raspberry Pi is as
Fallows:

 Hobby projects
 Low-cost PC/tablet/laptop
 IoT applications
 Media center
 Robotics
 Industrial/Home automation
 Server/cloud server
 Print server
 Security monitoring
 Web camera
 Gaming
 Wireless access point
 Environmental sensing/monitoring (e.g. WEATHER STATION)
Thankyou

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy