INTRODUCTION TO IoT
Introduction to IoT
• IoT stands for Internet of things
• It means network of physical objects
embedded with electronics for sensing,
actuation and communication
• Objects with embedded electronics is known
as Sensor Node.
Sensor Node
Processor
• The Processor is a general term (Brian of the
computing device)
• It can be a dedicated microcontroller or a
microprocessor
• Three most commonly used processing devices
for simple IoT applications are:
• ARDUINO
• Raspberry pi
• Node MCU (ESP8266/ESP32)
Raspberry Pi
• The Raspberry Pi is single-board computer
(SBC)
• Raspberry Pi does not look like a typical
computer.
• However, when connected to a monitor, USB
keyboard and mouse, the Raspberry Pi is just
like an entry-level Linux computer.
ARDUINO
• Launched in 2005
• Arduino boards are manufactured by the Italian company Arduino
• Arduino is an open-source electronics platform based on easy-to-
use hardware and software.
• Arduino boards are available in variety of models such as Arduino
Uno, Arduino Mega, Arduino Nano, Arduino Micro, Arduino Pro
Mini etc.
• Out of these, Arduino Uno is the most widely used model by
beginners
ESP32/ESP8266
• Espressif Systems introduced ESP8266 in 2014
• Next launch was ESP32 with a more powerful
processor and support for both WiFi and Bluetooth
connectivity
• ESP8266 and ESP32 both come with Xtensa cores,
and run FreeRTOS real-time operating system
• They offers a middle road between the power-
efficiency, real-time capabilities of Arduino boards,
and the full-feature nature of Raspberry Pi Linux
SBC.
ARDUINO VS Raspberry Pi Vs
ESP32/ESP8266
• Arduinos may not have as much computing power as other microcontrollers, their availability,
simplicity, and intuitive design are unbeatable.
• Raspberry Pi is more powerful than the Arduino.
• Raspberry Pi can often put out a processing power of 1.6 GHz–100x more than the Arduino’s
usual 16 MHz.
• Raspberry Pi is much more robust, but is more expensive- Impractical for basic applications
• The high cost of Raspberry Pi also makes it impractical for basic IoT applications that don’t
require as much power, but still need WiFi/Bluetooth capabilities.
• Arduino does not have WiFi /Bluetooth capabilities and that’s where this next microcontroller
comes in handy.
• The ESP32 is a very low-cost, low-power microcontroller with WiFi and Bluetooth capabilities
that make it perfect for IoT and Home Automation projects.
• It is compatible with Arduino IDE, making it easy to adapt to it without much experience.
• There’s even a cheaper option (the ESP8266) if we don’t need all the power that the ESP32
provides.
• Raspberry Pi could perform the job that an ESP32 does, but the cost and size of each make it
impractical.
• The ESP32 fills the gap between the Arduino and the Raspberry Pi for a WiFi/Bluetooth
capable microcontroller that has enough processing power to handle IoT tasks.
INTRODUCTION TO ARDUINO
INTRODUCTION TO ARDUINO
Arduino is an open-source electronics platform based on
easy-to-use hardware and software.
INTRODUCTION TO ARDUINO
Arduino is an open-source electronics platform based on
easy-to-use hardware and software.
Arduino boards are available in variety of models such as
Arduino Uno, Arduino Mega, Arduino Nano, Arduino Micro,
Arduino Pro Mini etc.
INTRODUCTION TO ARDUINO
Arduino is an open-source electronics platform based on
easy-to-use hardware and software.
Arduino boards are available in variety of models such as
Arduino Uno, Arduino Mega, Arduino Nano, Arduino Micro,
Arduino Pro Mini etc.
Out of these, Arduino Uno is the most widely used model
by beginners.
INTRODUCTION TO ARDUINO UNO
Arduino UNO is a microcontroller board based on
the ATmega328P.
INTRODUCTION TO ARDUINO UNO
Arduino UNO is a microcontroller board based on
the ATmega328P.
It has 14 digital input/output pins (of which 6 can be used
as PWM outputs), 6 analog inputs, a 16 MHz clock, a USB
connection, a power jack, an ICSP header and a reset button.
INTRODUCTION TO ARDUINO UNO
Arduino UNO is a microcontroller board based on
the ATmega328P.
It has 14 digital input/output pins (of which 6 can be used
as PWM outputs), 6 analog inputs, a 16 MHz clock, a USB
connection, a power jack, an ICSP header and a reset button.
We can simply connect it to a computer with a USB cable
or power it with a AC-to-DC adapter or battery to get started.
ARDUINO UNO PIN CONFIGURATION
ARDUINO UNO PIN CONFIGURATION
A0 to A5 – Analog input pins.
Voltage range – 0 to 5V
Use these pins with analogRead() function
ARDUINO UNO PIN CONFIGURATION
A0 to A5 – Analog input pins.
Voltage range – 0 to 5V
Use these pins with analogRead() function
D0 to D13 – Digital I/O pins
Use these pins with digitalRead(),
digitalWrite(), and analogWrite()
functions
ARDUINO UNO PIN CONFIGURATION
Pulse Width Modulation (PWM) Pins:
ARDUINO UNO PIN CONFIGURATION
Pulse Width Modulation (PWM) Pins:
PWM pins are indicated by ~ symbol.
ARDUINO UNO PIN CONFIGURATION
Pulse Width Modulation (PWM) Pins:
PWM pins are indicated by ~ symbol.
The pins 3,5,6,9,10 and 11 can be used as a PWM
pins.
ARDUINO UNO PIN CONFIGURATION
Pulse Width Modulation (PWM) Pins:
PWM pins are indicated by ~ symbol.
The pins 3,5,6,9,10 and 11 can be used as a PWM
pins.
These pins of the board are used to convert the
digital signal into an analog by varying the width
of the Pulse.
ARDUINO UNO PIN CONFIGURATION
Pulse Width Modulation (PWM) Pins:
PWM pins are indicated by ~ symbol.
The pins 3,5,6,9,10 and 11 can be used as a PWM
pin.
These pins of the board are used to convert the
digital signal into an analog by varying the width
of the Pulse.
analogWrite() function works only with these
pins.
ARDUINO UNO PIN CONFIGURATION
Pin 13 LED - The only actuator built-in to your
board.
Useful for debugging.
ARDUINO UNO PIN CONFIGURATION
Pin 13 LED - The only actuator built-in to your
board.
Useful for debugging.
Power LED - Indicates that your Arduino is
receiving power.
Useful for debugging.
ARDUINO UNO PIN CONFIGURATION
GND and 5V pins - Use these pins to provide
ground and +5V power to your circuits.
ARDUINO UNO PIN CONFIGURATION
GND and 5V pins - Use these pins to provide
ground and +5V power to external circuits.
3.3 V pin – Use this pin to provide 3.3V to external
circuits.
ARDUINO UNO PIN CONFIGURATION
GND and 5V pins - Use these pins to provide
ground and +5V power to external circuits.
3.3 V pin – Use this pin to provide 3.3V to external
circuits.
Reset button - Resets the ATmega microcontroller.
ARDUINO UNO PIN CONFIGURATION
USB port - Used for powering your Arduino UNO,
uploading your sketches to your Arduino, and for
communicating with your Arduino sketch (via Serial.
println() etc.).
Power connector - This is how you power your
Arduino when it's not plugged into a USB port for
power. Can accept voltages between 7-12V.
ARDUINO UNO PIN CONFIGURATION
TX and RX LEDs - These LEDs indicate
communication between your Arduino and your
computer.
ARDUINO UNO PIN CONFIGURATION
TX and RX LEDs - These LEDs indicate
communication between your Arduino and your
computer.
Expect them to flicker rapidly during sketch upload
as well as during serial communication. Useful for
debugging.
ARDUINO UNO PIN CONFIGURATION
UART Pins – UART stands for Universal
Asynchronous Receiver Transmitter.
ARDUINO UNO PIN CONFIGURATION
UART Pins – UART stands for Universal
Asynchronous Receiver Transmitter.
It's a protocol that allows two devices to exchange
data serially, or bit by bit, over a single line.
ARDUINO UNO PIN CONFIGURATION
UART Pins – UART stands for Universal
Asynchronous Receiver Transmitter.
It's a protocol that allows two devices to exchange
data serially, or bit by bit, over a single line.
Pins D0 and D1 can be used as transmit and receive
pins, respectively.
ARDUINO UNO PIN CONFIGURATION
SPI Pins: This is the Serial Peripheral Interface
pin, it is used to maintain SPI communication with
the help of the SPI library.
ARDUINO UNO PIN CONFIGURATION
SPI Pins: This is the Serial Peripheral Interface
pin, it is used to maintain SPI communication with
the help of the SPI library.
SPI pins include:
SS: Pin number 10 is used as a Slave Select
MOSI: Pin number 11 is used as a Master Out
Slave In
MISO: Pin number 12 is used as a Master In
Slave Out
SCK: Pin number 13 is used as a Serial Clock
ARDUINO UNO PIN CONFIGURATION
External Interrupt Pins: These pins are used to
produce the External interrupt and it is done by pin
numbers 2 and 3.
ARDUINO UNO PIN CONFIGURATION
I2C Pins – I2C stands for Inter Integrated Circuits.
It is a protocol that allows you to connect several
peripheral devices, such as sensors, displays, motor
drivers, and so on, with only a few wires.
ARDUINO UNO PIN CONFIGURATION
I2C Pins – I2C stands for Inter Integrated Circuits.
It is a protocol that allows you to connect several
peripheral devices, such as sensors, displays, motor
drivers, and so on, with only a few wires.
The I2C protocol involves using two lines to send
and receive data: a serial clock pin (SCL) that the
Arduino Controller board pulses at a regular interval,
and a serial data pin (SDA) over which data is sent
between the two devices.