IOT Lab
IOT Lab
Laboratory
Web Reference - program
• IoT Project Using Arduino Bluetooth Module to Control LED –
Javatpoint
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.
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.
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
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