0% found this document useful (0 votes)
133 views

Introduction To IoT Lecture

The Internet of Things (IoT) is a global network that connects physical objects through standard communication protocols. IoT devices have unique identities and can seamlessly communicate data about themselves and their environments. Arduino is an open-source prototyping platform that simplifies working with microcontrollers. It features inexpensive, cross-platform boards with simple programming environments. The Arduino Uno is a popular board with 14 digital pins, 6 analog pins, and support for interfacing with sensors and actuators.

Uploaded by

PRACHI RAUT
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views

Introduction To IoT Lecture

The Internet of Things (IoT) is a global network that connects physical objects through standard communication protocols. IoT devices have unique identities and can seamlessly communicate data about themselves and their environments. Arduino is an open-source prototyping platform that simplifies working with microcontrollers. It features inexpensive, cross-platform boards with simple programming environments. The Arduino Uno is a popular board with 14 digital pins, 6 analog pins, and support for interfacing with sensors and actuators.

Uploaded by

PRACHI RAUT
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Internet of Things

Definition:

A dynamic global network infrastructure with self-configuring capabilities based on


standard and interoperable communication protocols where physical and virtual “things”
have identities, physical attributes, and virtual personalities and use intelligent interfaces,
and are seamlessly integrated into the information network, often communicate data
associated with users and their environments.

Characteristics:

 Dynamic and self-adapting: IoT devices and systems may have the capability to
dynamically adapt with the changing contexts and take actions based on their
operating conditions, user’s context, or sensed environment. For example,
consider a surveillance system comprising of a number of surveillance cameras.
The surveillance cameras can adapt their modes (normal to infra-red night
modes) based on whether it is day or night. Cameras could switch from lower
resolution to higher resolution modes when any motion is detected and alert
nearby cameras to do the same.
 Self-configuring: IoT devices may have self-configuring capability, allowing a
larger number of devices to work together. These devices have the ability to
configure themselves (in association with the IoT infrastructure), setup the
networking, and fetch latest software upgrades with minimal manual or user
intervention.
 Interoperable Communication Protocols: IoT devices may support a number of
interoperable communication protocols and can communicate with other devices
and also with the infrastructure.
 Unique Identity: Each IoT device has a unique identity and unique identifier (such
as an IP address or URI). IoT systems may have intelligent interfaces which
adapt based on the context, allow communicating with users and the
environmental contexts. IoT device interfaces allow users to query the devices,
monitor their status, and control them remotely, in association with the control,
configuration and management infrastructure.
 Integrated into information network: IoT devices are usually integrated into the
information network that allows them to communicate and exchange data with
other devices and systems. IoT devices can be dynamically discovered in the
network, by other devices and/or other network, and have the capability to
describe themselves (and the characteristics) to other devices or user
applications. For example, a weather monitoring node can describe its monitoring
capabilities to another connected node so that they can communicate and
exchange data. Integration into information network helps in making IoT systems
“smarter” due to the collective intelligence of the individual devices in
collaboration with the infrastructure. Thus the data from the large number of
weather monitoring IoT nodes can be aggregated and analysed to predict the
weather.

Introduction to Arduino

Arduino is an open-source prototyping platform based on simple input/output board and


an Integrated Development Environment (IDE). Arduino simplifies the process of working
with microcontrollers, but it offers some advantage for teachers, students, and interested
amateurs over other systems:

 Inexpensive - Arduino boards are relatively inexpensive compared to other


microcontroller platforms. The least expensive version of the Arduino module can
be assembled by hand, and even the pre-assembled Arduino modules cost less
than Rs. 500.
 Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX,
and Linux operating systems. Most microcontroller systems are limited to
Windows.
 Simple, clear programming environment - The Arduino Software (IDE) is easy-to-
use for beginners, yet flexible enough for advanced users to take advantage of as
well.
 Open source and extensible software - The Arduino software is published as
open source tools, available for extension by experienced programmers. The
language can be expanded through C++ libraries, and people wanting to
understand the technical details can make the leap from Arduino to the AVR C
programming language on which it's based. Similarly, you can add AVR-C code
directly into your Arduino programs if you want to.
 Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers
can make their own version of the module, extending it and improving it. Even
relatively inexperienced users can build the breadboard version of the module in
order to understand how it works and save money.

Arduino Board:

The Arduino board is a small microcontroller board, which is small circuit (the board)
which contains all the components required for this microcontroller to work properly
and to communicate with the computer. There are many types of Arduino boards
available, suitable for different requirements.

Microcontroller (MCU): The microcontroller is the heart (or, more appropriately, the
brain) of the Arduino board. Most Arduino boards consist of an Atmel 8-bit AVR
microcontroller ATmega8, ATmega168, ATmega328, ATmega1280, ATmega2560
with varying amounts of flash memory, pins, and features.

Clock Speed is the operating frequency of the microcontroller and is related to the
speed at which it can execute commands. Although there are rare exceptions, most
ATmega microcontrollers running at 3V will be clocked at 8MHz, whereas most
running at 5V will be clocked at 16MHz. The clock speed of the Arduino can be
divided down for power savings with a few tricks if you know what you’re doing.

Flash memory is the amount of program memory that the microcontroller chip has
available for storing your program.

Digital I/O: This is the number of digital input/output (I/O) pins that are broken out on
the Arduino board. Each of these can be configured as either an input or an output
using pinMode(), digitalWrite(), and digitalRead() functions. Some are capable of
PWM, and some double as serial communication pins.

Analog Inputs: This is the number of analog input pins that are available on the
Arduino board. Analog pins are labeled "A" followed by their number, they allow you
to read analog values using the analog-to-digital converter (ADC) in the ATMega
chip. Analog inputs can also be configured as more digital I/O if you need it.

PWM: This is the number of digital I/O pins that are capable of producing a Pulse-
width modulation. (PWM) signal. A PWM signal is like an analog output; it allows
your Arduino to “fake” an analog voltage between zero and the system voltage.
ADC: There are number of Analog to digital converter channels on Arduino boards.
An analog input pin gives input to particular ADC channel. The digital output is in 10
bits. Also there is one analog reference pin which determines how much maximum
analog voltage can be converted into digital.

Most widely used Arduino board is 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 quartz crystal, a USB
connection, a power jack, an ICSP (In-circuit serial programming) header and a reset
button. It contains everything needed to support the microcontroller; 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 Pinout Diagram:

Input and Output

Each of the 14 digital pins on the Arduino Uno can be used as an input or output,
using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts.
Each pin can provide or receive a maximum of 40 mA and has an internal pull-up
resistor (disconnected by default) of 20-50 kOhms.

In addition, some pins have specialized functions:

 Serial: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL
serial data. These pins are connected to the corresponding pins of the
ATmega328.
 External Interrupts: pins 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value. See the
attachInterrupt() function for details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.
 SPI: The SPI (Serial Peripheral Interface) is another serial interface. The
ATmega328 has only one SPI module. Besides using it as a serial interface, it
can also be used to program the MCU using a standalone programmer. 10
(SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it’s off.
 The Uno has 6 analog inputs, labeled A0 through A5, each of which provide
10 bits of resolution (i.e. 1024 different values). By default they measure from
ground to 5 volts, though is it possible to change the upper end of their range
using the AREF pin and the analogReference() function. Additionally, some
pins have specialized functionality:
 TWI:. The I2C or Two Wire Interface is an interface consisting of only two
wires, serial data, and a serial clock: SDA, SCL.
 AREF. Reference voltage for the analog inputs. Used with analogReference().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to add
a reset button to shields which block the one on the board.

Arduino Mega is a microcontroller board based on the ATmega2560. It has 54 digital


input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, a 16
MHz quartz crystal, a USB connection, a power jack, an ICSP (In-circuit serial
programming) header and a reset button. It has 128 KB flash memory and 8KB
SRAM. USB, ICSP (programming), SPI, I2C and USART.
Controller Pins:

RESET: (Reset input) A low level on this pin for longer than the 4 clock cycle will
generate a reset. Arduino Mega has inbuilt reset circuit with push button to reset system
and this pin can be used by other devices to reset controller.

XTAL1, XTAL2: Crystal (16Mhz) is connected to supply clock for controller with 2 bypass
capacitor to ground.

AREF: This pin is used, when we use Adc for analog to digital conversion with external
reference voltage for conversion and don’t want to use internal 1.1V or 5v reference.

Digital pins (0-53) + Analog (0-15) = Total Digital I/O pins.

Digital Pins: From 0-53(digital) and 0-15(analog) can be use as input or output for digital
transducer and output devices by pinMode() for pin direction, digtalWrite() to write pin
and digitalRead() to read pin status.

Analog Pins (16):

Analog pins: From 0-15(analog) can be used as analog input pin for adc, if not used than
it work as normal digital pin. It can be used by pinMode() for pin direction, analogRead()
to read pin status and get digital value for analog signal, care must be taken for internal
or external reference voltage selection and Aref pin.

Alternative Pins Function:

SPI Pins:

Pin 22 - SS, Pin 23 - SCK, Pin 24 - MOSI, Pin 25 – MISO

These pins are used for serial communication with SPI protocol for communication
between 2 or more devices. SPI enable bit must be set to start communication with other
devices.

I2C Pins:
Digital pin 20 for SDA and 21 for SCK (Speed 400khz) to enable two wire
communication with others devices. Function used are wire.begin() to start I2C
conversion, with wire.Read() to read i2c data and wire.Write() to write i2c data.

PWM Pins:

Digital pin 2-13 can be used as PWM output with analogWrite() to write pwm value from
0-255.It’s alternative of DAC for low cost system to get analog signal at output by using
filter.

USART Pins :

Pin 0 – RXD0, pin 1 – TXD0

Pin 19 – RXD1, pin 18 – TXD1

Pin 17 – RXD2, pin 16 – TXD2

Pin 15 – RXD3, pin 14 – TXD3

This pin is used for serial usart communication with pc or other system for data sharing
and logging. It is used with serialBegin() to set baud rate setting and start communication
with serial.Println() to print array of char on other device output.

Hardware Interrupt Pins :

Digital pin 18 – 21, 2, 3 hardware interrupt is used for interrupt services. Hardware
interrupt must be enabled with global interrupt enable to get interrupt from other devices.

Comparison of Arduino Uno and Arduino Mega 2560

Arduino Uno Ardunio Mega 2560


Processor ATmega328P ATmega2560
Operating/ Input Voltage 5 V/7-12 V 5 V/7-12 V
CPU Speed 16 MHZ 16 MHZ
Analog I/O 6/0 16/0
Digital Io/ PWM 14/4 54/15
FLASH Memory (KB) 32 256
SRAM (KB) 3 8
EEPROM (KB) 1 4
UART 1 4
Various Types of Arduino boards:

Picture: https://en.wikipedia.org/wiki/Arduino

You might also like