23ITC01 Internet of things
Academic Year: 2025-2026 (Even Sem)
Module 2: SYSTEM HARDWARE FOR IOT
23ITC01 Internet of things –Course Outcomes
Understand the core principles and architecture of IoT systems to enable the
CO1 [U]
development of IoT-based solutions.
CO2 Interpret design constraints and challenges in developing IoT systems. [AN]
Develop cost-effective IoT solutions and interface with embedded platforms like
CO3 [AP]
Arduino, Raspberry Pi, or similar boards.
Analyze cloud platforms for deploying, managing, and ensuring the security of
CO4 [AN]
IoT solutions.
Apply data analytics to IoT data using Hadoop and MapReduce, demonstrating
CO5 [AP]
effective IoT design and implementation.
Syllabus
Module 1: INTRODUCTION TO INTERNET OF THINGS AND IOT DESIGN METHODOLOGIES 15 hrs
Characteristics of IoT, Physical Design of IoT, IoT Protocols, IoT Reference Architecture, Logical Design of
IoT, IoT Levels & Deployment Templates, Domain Specific IoT, IoT Vs M2M Vs IoE, IoT Design
Methodologies.
Module 2: SYSTEM HARDWARE FOR IOT 5 hrs
Sensors and Actuators – Hardware Kits: Arduino, Node MCU, Raspberry Pi. Arduino UNO: Physical Design
– Interfaces – Arduino IDE – Arduino Programming with examples: Digital IO – Analog IO – Serial
Communication – Condition and Looping statements. Raspberry Pi: Physical Design – Interfaces – Pi
programming using Python with examples – Python Packages for IoT.
Module 3: CLOUD AND DATA ANALYTICS FOR IOT 10 hrs
Cloud: Types of Cloud - loT with Cloud challenges - Selection of cloud for loT applications - Fog and Edge
computing for loT - Cloud security aspects for loT applications. Data Analytics for IoT: Overview of Hadoop
ecosystem – MapReduce architecture – MapReduce Job Execution – MapReduce Schedulers. Case study:
Internet of Medical Things (IoMT)
Books to refer
Text Books:
❑ Arshdeep Bahga and Vijay Madisetti, “Internet of Things: A Hands-on Approach”, 1st Edition,
Universities Press, 2015.
❑ Hanes David, Salgueiro Gonzalo, Grossetete Patrick, Barton Rob, Henry Jerome, “IoT Fundamentals:
Networking Technologies, Protocols and Use Cases for the Internet of Things”, 1st Edition, Pearson
Education, 2017
❑ Mark Torvalds, “Arduino Programming: Step-by-step guide to mastering Arduino hardware and
software”, 2nd Edition, 2018.
Reference Books:
❑ Srinivasa K. G.,Siddesh G. M., Hanumantha Raju R., “Internet of Things”, 1st Edition, Cengage
Learning India Pvt. Ltd., 2018.
❑ Raj Kamal, “Internet of Things”, 1st Edition, McGraw Hill Education, 2017.
❑ Dr. Simon Monk, “Programming the Raspberry Pi: Getting Started with Python”, 2nd Edition,
McGraw-Hill Education, 2016.
❑ Blum, “Arduino Programming”, 1st Edition, Pearson Education, 2020.
5
Module 2
SYSTEM HARDWARE FOR IOT: 5 hrs
Sensors and Actuators – Hardware Kits: Arduino, Node MCU, Raspberry Pi. Arduino UNO:
Physical Design – Interfaces – Arduino IDE – Arduino Programming with examples: Digital
IO – Analog IO – Serial Communication – Condition and Looping statements. Raspberry Pi:
Physical Design – Interfaces – Pi programming using Python with examples – Python
Packages for IoT
Watch this video: Click Here
Module 2
2.3 Node MCU
2.3 Node MCU
2.3 Features of NODE MCU
•Microcontroller: ESP8266EX
•Processor: 32-bit Tensilica L106 RISC processor
• Clock Speed: 80 MHz (can be overclocked to 160 MHz)
•Flash Memory: 4MB (default), expandable up to 16MB
•RAM: 64KB instruction RAM + 96KB data RAM
• Wi-Fi: 802.11 b/g/n (2.4 GHz) with WPA/WPA2 security
•SPI, UART, I2C Support: Communication with external devices
•ADC (Analog-to-Digital Converter): 10-bit ADC (0-1V range)
• The ESP8266 uses a 32bit microcontroller with 16 bit instructions.
• It is Harvard architecture which mostly means that instruction memory and data
memory are completely separate.
• The ESP8266 has on die program Read-Only Memory (ROM) which includes
some library code and a first stage boot loader.
• All the rest of the code must be stored in external Serial flash memory (provides
only serial access to the data - rather than addressing individual bytes, the user
reads or writes large contiguous groups of bytes in the address space serially).
• Depending on your ESP8266, the amount of available flash memory can vary.
• As any other microcontroller, ESP8266 has a set of GPIO pins (General
Purpose Input(Output pins) that we can use to “control” external sensors.
• Our ESP8266 has 17 GPIO pins but only 11 can be used (among 17 pins,
6 are used for communication with the on-board flash memory chip). It also
has an analog input (to convert a voltage level into a digital value that can
be stored and processed in the ESP8266).
• It also has a WIFI communication to connect your ESP8266 to your WIFI
network, connect to the internet, host a web server, let your smartphone
connect to it, etc.
Power Pins:
• There are four power pins. VIN pin and three 3.3V [Link] can be
used to directly supply the NodeMCU/ESP8266 and its peripherals.
• Power delivered on VIN is regulated through the onboard regulator
on the NodeMCU module – you can also supply 5V regulated to
the VIN pin
• 3.3V pins are the output of the onboard voltage regulator and can be
used to supply power to external components.
• GND are the ground pins of NodeMCU/ESP8266
I2C Pins
• I2C Pins are used to connect I2C sensors and peripherals.
• Both I2C Master and I2C Slave are supported.
• I2C interface functionality can be realized programmatically, and the
clock frequency is 100 kHz at a maximum.
• It should be noted that I2C clock frequency should be higher than the
slowest clock frequency of the slave device.
GPIO Pins
• NodeMCU/ESP8266 has 17 GPIO pins which can be assigned to functions such
as I2C, I2S, UART, PWM, IR Remote Control, LED Light and Button
programmatically.
• Each digital enabled GPIO can be configured to internal pull-up or pull-down, or
set to high impedance.
• When configured as an input, it can also be set to edge-trigger or level-trigger to
generate CPU interrupts.
ADC Channel
• The NodeMCU is embedded with a 10-bit precision SAR ADC. The two
functions can be implemented using ADC.
• Testing power supply voltage of VDD3P3 pin and testing input voltage
of TOUT pin. However, they cannot be implemented at the same time.
UART Pins
• NodeMCU/ESP8266 has 2 UART interfaces (UART0 and
UART1) which provide asynchronous communication (RS232
and RS485), and can communicate at up to 4.5 Mbps.
• UART0 (TXD0, RXD0, RST0 & CTS0 pins) can be used for
communication. However, UART1 (TXD1 pin) features only data
transmit signal so, it is usually used for printing log.
SPI Pins
• NodeMCU/ESP8266 features two SPIs (SPI and HSPI) in slave
and master modes. These SPIs also support the following
general-purpose SPI features:
• 4 timing modes of the SPI format transfer
• Up to 80 MHz and the divided clocks of 80 MHz
• Up to 64-Byte FIFO
SDIO Pins
• NodeMCU/ESP8266 features Secure Digital Input/Output
Interface (SDIO) which is used to directly interface SD cards.
4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO v2.0 are
supported.
• PWM Pins The board has 4 channels of Pulse Width Modulation
(PWM). The PWM output can be implemented programmatically and
used for driving digital motors and LEDs. PWM frequency range is
adjustable from 1000 μs to 10000 μs (100 Hz and 1 kHz).
• Control Pins are used to control the NodeMCU/ESP8266. These pins
include Chip Enable pin (EN), Reset pin (RST) and WAKE pin.
• EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled
LOW the chip works at minimum power.
• RST: RST pin is used to reset the ESP8266 chip.
• WAKE: Wake pin is used to wake the chip from deep-sleep.
On-board Switches & LED Indicator
• RST – Reset the ESP8266 chip
• FLASH – Download new programs
• Blue LED – User Programmable
Serial Communication
• CP2102 USB-to-UART converter
• 4.5 Mbps communication speed
• Flow Control support
NODE MCU
Disadvantages
● Advantages
❖ Low energy consumption Need to learn a new
❖ Integrated support for WIFI language and IDE
network Less pinout
❖ Reduced size of the board
❖ Low Cost
Smart Irrigation System using ESP32
• The smart irrigation system using ESP32 automatically takes care of the optimization
of the basic soil conditions.
• It continuously checks for values from different sensors and sends commands to the
other components to work accordingly.
• The Internet of Things (IoT) is a highly demanding field that is applied in multiple
domains of life such as agricultural.
• It is the most dominant field that has been revolutionized by integrating sensors,
machines, data analytics, etc.
• It has the potential to increase efficiency and performance, improve resource
management, enhance crop quality, and, as a result, empower farmers.
Block Diagram
Use a Smart Irrigation System
Smart Irrigation System Conserves Water
• The sensors of this system continuously sense the values of soil
moisture and deliver water only when required.
• The water schedule does not remain the same all the time, but
multiple factors affect the required amount of water for the
plant, such as humidity in the air and temperature.
• These factors are regularly monitored by the sensors
Smart Irrigation System Results in Better Yield
• The frequency of watering is an important factor in the plant's
health and yield.
• With the help of this system, the optimal watering level leads
to thriving plants with healthy growth.
Smart Irrigation System using ESP32 is a Time Saver
• The most prominent advantage of this watering system is that
it saves time.
• The plants have a unique nourishment system that requires
watering early in the morning or at the optimal time.
• This is usually different from the human routine, and the
automatic watering system is a stress-free solution in such
situations.
Flow Diagram of Smart Irrigation System using ESP32
Smart Irrigation System using ESP32
• Two temperature sensors placed at different points on the soil,
and these provide the values from two different parts of the
soil.
• The ESP32 is coded in the Arduino IDE, continuously checks the
information from the sensors, and when the threshold values
mentioned in the code are encountered,
• Whenever the moisture of the plants is lower than the set
values, the pump starts, and the steady flow of water starts on
the soil.
Smart Irrigation System using ESP32
• Similarly, the temperature sensed by the DHT11 is used to
provide the necessary optimized conditions.
• The water flow in the smart irrigation system using ESP32 is
controlled with the help of relays
• The relay controls the water pump or water valve in the smart
irrigation system.
• It takes the values from the moisture sensors and allows the
water to flow from different systems connected to them.
Smart Irrigation System using ESP32
• Reads the soil moisture level from the sensor using GPIO 34
(Analog Input).
• Compares the moisture level with a predefined threshold
(500).
• If soil is dry (moisture < 500) → The relay turns ON, activating
the water pump.
• If soil is wet (moisture ≥ 500) → The relay turns OFF, stopping
the water pump.
• Updates the Serial Monitor every 5 seconds with the moisture
level and pump status.
Smart Irrigation System using ESP32 -Program
#define SOIL_SENSOR_PIN 34
#define RELAY_PIN 26
#define MOISTURE_THRESHOLD 500
void setup()
{
[Link](115200);
pinMode(RELAY_PIN, OUTPUT);
digitalWrite(RELAY_PIN, LOW);
}
Smart Irrigation System using ESP32 -Program
void loop()
{
int moisture = analogRead(SOIL_SENSOR_PIN);
[Link]("Soil Moisture Level: ");
[Link](moisture);
if (moisture < MOISTURE_THRESHOLD)
{
[Link]("Soil is dry. Turning ON Water Pump...");
digitalWrite(RELAY_PIN, HIGH);
}
Smart Irrigation System using ESP32 -Program
else
{
[Link]("Soil has enough moisture. Turning OFF Water
Pump...");
digitalWrite(RELAY_PIN, LOW);
}
delay(5000);
}
To write an Arduino sketch for connecting ESP8266 to WiFi Service
#include <ESP8266WiFi.h>
char ssid[]=“SSID”;
char pass[]=“pass”;
void setup()
{
[Link](115200);
delay(1000);
[Link](“Trying to Connect…”);
[Link](ssid);
delay(1000);
[Link](); //Disconnect any other Wifi is connected
[Link](ssid, pass);
while([Link]() != WL_CONNECTED)
{
delay(500);
[Link](“…”);
}
[Link](“SSID...=“);
2.2 Hardware Kits: Raspberry Pi