Iot Using Arduino Report (Tushar)
Iot Using Arduino Report (Tushar)
ON
IOT USING ARDUINO
AT
NIELIT( National Institute of electronics and information technology)
SUBMITTED BY:-
NAME =Tushar kumar
Enrollment no.=01013207321
semester/year = 6th sem/ 3rd year
ACKNOWLEDGEMENT
I hereby take the opportunity to express my
deep sense of gratitude to my mentor guide for
his constant support and guidance.
His continuous encouragement during my
entire training period helped me to gain the
maximum knowledge.
I would like to extend my sincere gratitude to
members of the ECE Department for the
continuous guidance and encouragement.
TUSHAR KUMAR
CERTIFICATE
This is certify that the training done by (Tushar kumar),
Enrollment number = 01013207321 has successfully
completed 6 WEEKS industrial training programme on
NIELIT is engaged both in Formal & Non-Formal Education around IECT besides
development of industry-oriented quality education and training programmer in the
state-of-the-art areas. NIELIT has endeavored to establish standards to be the
country’s premier institution for Examination and Certification in the field of IECT. It
is also one of the National Examination Body, which accredits
institutes/organizations for conducting courses in IT in the non-formal sector.
INTRODUCTION OF IOT
The Internet of things (IoT) describes physical objects (or groups of such
objects) with sensors, processing ability, software and other technologies
that connect and exchange data with other devices and systems over the
Internet or other communications networks. Internet of things has been
considered a misnomer because devices do not need to be connected to
the public internet, they only need to be connected to a network,[6] and be
individually addressable.
There are a number of concerns about the risks in the growth of IoT
technologies and products, especially in the areas of privacy and security,
and consequently, industry and governmental moves to address these
concerns have begun, including the development of international and local
standards, guidelines, and regulatory frameworks.
IOT ECOSYSTEM:-
1. Level 1: In this level all the components are deployed locally. There is no any cloud or external network
involved in the process.
Sensors, routers, cloud components, application etc. all are at the user’s end. This standard is good for
those ecosystems where data is neither big nor varying. A uniform stream of data is coming from a pre-
set group of sensors and that is all happening in a simple way.
2. Level 2: In this level all the components are deployed locally except the
servers. There is a cloud or an external network involved in the process.
At the user’s end there are only sensors, routers and application. The cloud part
is having the servers configured for the purpose of storage and analysis. This
standard is good for those ecosystems where data is big. A huge amount of
data is coming from many components in the ecosystem and that too on a
rapid speed.
3. Level 3: In this level all the components are deployed locally except the
servers and the network connectivity part. There is a cloud or an external
network involved in the process.
At the user’s end there are only sensors and application. The cloud part is
having the essential networks for connectivity and servers configured for the
purpose of storage and analysis. This standard is good for those ecosystems
where data is big and varying. A huge amount of data is coming from many
components deployed in many ecosystems and that too on a rapid speed.
4. Level 4: In this level also, all the components are deployed locally except the
servers and the network connectivity part. In some cases, sensors are also in the
cloud.At the user’s end there is only the application. The cloud part is having the
essential networks for connectivity and servers configured for the purpose of
storage and analysis. This standard is good for those ecosystems where data big,
varying and is coming from mobile sources.
5. Level 5: Level 5 IoT is very similar to Level 4 but with one major advancement.
In level 5 IoT, coordinator devices are also there in the local part of the
ecosystem. A coordinator device coordinates a certain set of sensing devices.
There is an Observer Node also in the cloud part that observes the entire
process.
6. Level 6: Level 6 IoT is very similar to Level 5 but with one major advancement.
In level 6 IoT, coordinator devices are replaced by a single component
Centralized Controller and that is there in the cloud part of the ecosystem.
PHYSICAL DESIGN OF IOT:-
•Physical design of iot system refer to the iot device and iot protocol.
Things are node device which have unique identities and can perform remote
sensing actuating and monitoring capabilities. Communication established
between things and cloud base server over the internet by various iot protocol.
Things in iot:-
•BASICALLY THINGS REFER TO IOT DEVICE WHICH HAVE UNIQUE
IDENTIFICATION AND CAN PERFORM REMOTE SENSING ACTUATING
MONITORING CAPABILITIES.
THINGS ARE THE MAIN PART OF IOT APPLICATION IOT DEVICE CAN BE
VARIOUS TYPE SENSING DEVICE SMART WATCHES SMART ELECTRONICS
APPLICATIONS WEARABLE SENSORS AUTOMOBILES INDUSTRIAL
MACHINES.
Iot protocols:-
loT protcols help to establish Communication between IoT
Device and Cloud based Server over the Internet. It help to
Sent commands to loT Device and received data from an loT
Device over the Internet. An image is given below. By this
Image you can understand which protocols used.
Data Link layer protocols determine how data is physically sent over the network’s
physical layer or Medium (wired or wireless). Data Link Layer Determines how the
packets are coded and signalled by The hardware device over the medium to which
the host Is attached.
Here we explain some Data Link Layer Protocols :-
•802.3-Ethernet
•802.11-WiFi 802.16-Wi-Max
•802.15.4-LR-WPAN
•2G/3G/4G
LEARNING ARDUINO PLATFORM IN IOT:-
IN THIS SECTION I HAVE LEARN ABOUT THIS THINGS IN DURING MY
TRAINING PERIOD:-
Content:-
• Introduction to arduino
• Types of arduino board
• Arduino UNO
• Arduino board description.
Introduction to arduino
1. USB: can be used for both power and communication with the IDE
2. Barrel Jack: used for power supply
3. Voltage Regulator: regulates and stabilizes the input and output
voltages
4. Crystal Oscillator: keeps track of time and regulates processor
frequency
5. Reset Pin: can be used to reset the Arduino Uno
6. 3.3V pin: can be used as a 3.3V output
7. 5V pin: can be used as a 5V output
8. GND pin: can be used to ground the circuit
9. Vin pin: can be used to supply power to the board
10. Analog pins(A0-A5): can be used to read analog signals to the
board
11. Microcontroller(ATMega328): the processing and logical unit of
the board
12. ICSP pin: a programming header on the board also called SPI
13. Power indicator LED: indicates the power status of the board
14. RX and TX LEDs: receive(RX) and transmit(TX) LEDs, blink
when sending or receiving serial data respectively
15. Digital I/O pins: 14 pins capable of reading and outputting digital
signals; 6 of these pins are also capable of PWM
16. AREF pins: can be used to set an external reference voltage as
the upper limit for the analog pins
17. Reset button: can be used to reset the board
CONTENT:-
• BLINKING VARIOUS LED’S
• TMP36 TEMPERATURE SENSOR AND LCD DISPLAY USING
ARDUINO
Blinking various LEDs.
Here, we will discuss a project to blink Six LEDs.
All the Six LEDs will glow one after the other.
Principle:
•We will connect the Six LEDs to pins 7, 6, 5, 4, 3, and 2 of the Arduino
board. The required resistance of the resistors is enough to light up an LED
without damaging the board and other components.
•The LED arranged one after another will light up. We can also change or
rearrange the LEDs connected to the specified pin number on the board.
Structure of the project:
The structure clearly shows the UNO board’s pinout, and the Six LEDs with
resistors in series are connected to the board.It is shown below:
Connection:
CODE:-
int ledPins[] = {7, 6, 5, 4, 3, 2};
int pinCount = 6;
void setup() {
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
pinMode(ledPins[thisPin], OUTPUT);
}
}
Blinking various LEDs
void loop()
{
// loop from the lowest pin to the highest:
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
// turn the pin on:
digitalWrite(ledPins[thisPin], HIGH);
delay(1000); // turn the pin off:
digitalWrite(ledPins[thisPin], LOW);
}
Blinking various LEDs
// loop from the highest pin to the lowest:
for (int thisPin = pinCount - 1;
thisPin--) {
// turn the pin on:
digitalWrite(ledPins[thisPin], HIGH);
delay(1000); // turn the pin off:
digitalWrite(ledPins[thisPin], LOW);
}
}
thisPin >= 0;
TMP36 Temperature Sensor and LCD Display
Using Arduino
List of Components :
Arduino Uno R3
Temperature Sensor (TMP36)
LCD 16x2
250kΩ Potentiometer
220Ω Resistor
CODE:-
https://www.tinkercad.com/things/kTiwQUugzzH
#include <IRremote.h>
Int RECV_PIN = 3;
IRrecv irrecv(RECV_PIN);
Decode_results results;
Int toggleState_1 = 0;
Int toggleState_2 = 0;
Int toggleState_3 = 0;
Int toggleState_4 = 0;
Void setup() {
Serial.begin(9600);
Irrecv.enableIRIn();
pinMode(relay_1, OUTPUT);
pinMode(relay_2, OUTPUT);
pinMode(relay_3, OUTPUT);
pinMode(relay_4, OUTPUT);
pinMode(mswitch_1, INPUT_PULLUP);
pinMode(mswitch_2, INPUT_PULLUP);
pinMode(mswitch_3, INPUT_PULLUP);
pinMode(mswitch_4, INPUT_PULLUP);
}
Switch(relay){
Case 1:
If(toggleState_1 == 0){
digitalWrite(relay_1, HIGH); // turn on relay 1
toggleState_1 = 1;
}
Else{
digitalWrite(relay_1, LOW); // turn off relay 1
toggleState_1 = 0;
}
Delay(100);
Break;
Case 2:
If(toggleState_2 == 0){
digitalWrite(relay_2, HIGH); // turn on relay 2
toggleState_2 = 1;
}
Else{
digitalWrite(relay_2, LOW); // turn off relay 2
toggleState_2 = 0;
}
Delay(100);
Break;
Case 3:
If(toggleState_3 == 0){
digitalWrite(relay_3, HIGH); // turn on relay 3
toggleState_3 = 1;
}else{
digitalWrite(relay_3, LOW); // turn off relay 3
toggleState_3 = 0;
}
Delay(100);
Break;
Case 4:
If(toggleState_4 == 0){
digitalWrite(relay_4, HIGH); // turn on relay 4
toggleState_4 = 1;
}
Else{
digitalWrite(relay_4, LOW); // turn off relay 4
toggleState_4 = 0;
}
Delay(100);
Break;
Default : break;
}
Void loop() {
If (digitalRead(mswitch_1) == LOW){
Delay(200);
relayOnOff(1);
}
Else if (digitalRead(mswitch_2) == LOW){
Delay(200);
relayOnOff(2);
}
Else if (digitalRead(mswitch_3) == LOW){
Delay(200);
relayOnOff(3);
}
Else if (digitalRead(mswitch_4) == LOW){
Delay(200);
relayOnOff(4);
}
If (irrecv.decode(&results)) {
Switch(results.value){
Case 0xFD08F7:
relayOnOff(1);
break;
case 0xFD8877:
relayOnOff(2);
break;
case 0xFD48B7:
relayOnOff(3);
break;
case 0xFD28D7:
relayOnOff(4);
break;
default : break;
}
Irrecv.resume();
}
}