Professional Documents
Culture Documents
of Things
INTRODUCTION
Internet of Things
Lets deconstruct it term by term:
A thing is any object or device besides a traditional computer, that has some
features and performs some function, for example, a refrigerator or air
conditioner.
This device is called an IoT device, a thing that doesnt look like a computer,
but has a computer hidden within it.
Cloud
Thing
Sensors
Actuators
Thing
Sensors
Actuators
Using sensors to detect human presence in the room, and switching on or off on
that basis.
Thus an intelligent device uses local sensors to collect physical data or requires
locally stored data to enhance the device functionality without network
connectivity
An IoT air conditioner has access to the internet and hence can:
Acquire information about when you come home via GPS and switch on a few
minutes before you arrive so that the temperature is set to an ambient value.
Monitor external weather conditions from weather data sites to improve its own
efficiency and to determine the inside temperature.
Book an appointment for servicing and repair online, instead of just indicating
need for repair.
Logistics and tagging: From 1970s, barcode scanning came into picture
to keep track of boxes and products.
It can store not only a unique identity tag for a box, but also data
related to when and where the box moved over time.
A barcode cant change over time while an RFID can have flash
memory that can change.
IoT device
INTERNET OF
THINGS
EMBEDDED SYSTEMS
The device interacts with the physical world through sensors, like
temperature sensors, humidity sensors, piezoelectric sensors, vibration
sensors, RFID sensors etc.
The device also has actuators that accordingly change the state of
the physical world, such as lights, motors etc.
Embedded Systems
One difference is that IoT devices are almost always connected to the
internet, whereas a general embedded system may not necessarily be.
Sometimes embedded systems dont directly interact with the user they
interact with another device, for example disk drives, anti-lock braking
systems in cars, pen-drives etc.
Hardware and software are co-designed. This makes design process more
efficient.
Efficiency is paramount
GENERIC
EMBEDDED
SYSTEM
STRUCTURE
Thermistor : reports
temperature
Photoresistor : light
intensity
CMOS camera :
captures images
IP (Intellectual
property) core
A special purpose IC
that performs a
specific task.
Cheap in high volume
manufacture
Useful for common
tasks like network
controllers
Most interact with the
microcontroller
LEDs
LCD displays
Seven- segment display
Servo motors
dc motors
Field Programmable
Gate Arrays
What is a microcontroller ?
ADC
Arduino :
Introduction
Development Board
The Arduino
It uses its own coding environment, the Arduino IDE, and the programs
written for Arduino are called sketches.
Sketch
Two default methods that are part of any Arduino sketch are:
void setup( ) //runs first time as code is executed, and only once
Pins on the Arduino can be used as both input and output, specified by
the function pinMode( ) in setup.
USE
Arduino
2
PWM
The discrete states can be from 0 to 1023(210 =1024 states, Uno uses
10 bits). Analog outputs have states only from 0 to 255 ( 2 8 = 256
states).
}
void loop( )
{
Switch Bounce
Switch bounce: The signal which the pin receives as HIGH or LOW
oscillates during the initial pressing of a button which is called bouncing
in the signal till a stable output is reached.
Bounce can cause anomalous output, but that can easily be prevented
by a debounce, implemented in either hardware or software. A
debounce code leading to normal switching operation on successive
button presses is as follows:
Analog Outputs
SYNTAX
USE
Arduino
3
ANALOG INPUTS
Most boards, including UNO, use 10 bit ADCs i.e. for a 5V reference voltage,
0V corresponds to 0, and 5V corresponds to state 1023, with 2 10 =1024
discrete states in between.
Analog outputs, however, have states only from 0 to 255 (2 8 = 256 states).
An analog input can be taken from analog premade sensors, or from the
variable resistor- potential divider combination.
Referring to potentiometer diagram, if R2 is fixed and R1 is
the photo resistor, then
If R2 is the photo resistance while R1 is fixed, then
The photoresistance varies inversely with incident light, i.e.
as light intensity increases the phtoresistance decreases.
Taking the first potential divider combination, output
voltage decreases as incident light decreases.
Syntax
Use
Serial.begin(9600)
Serial.print()
Serial.println()
Serial.read()
map( value, a , b , 255, 0)
Serial Monitor
Arduino IDE
Serial Communication
When Arduino is receiving data the LED marked RX blinks, while the
one marked TX blinks while transmitting data.