Arduino
Arduino
“DEPARTMENTAL LAB-IOT”
Submitted in partial fulfillment for the award of degree of
Bachelor of Engineering
In
Electronics and Communication Engineering
Submitted by
K A MOHAMED YUSUF(USN: 1HK21EC038)
IV SEMESTER
UNDER THE GUIDANCE OF
External Guide Internal Guide
Prof. Yogananda Raj Urs KH Dr. Abdul Azeez
Assistant Professor Associate Professor
Dept of ECE Dept of ECE
CERTIFICATE OF INTERNSHIP
This is to certify that this internship report titled “DEPARTMENTAL LAB-IOT” carried
out by K A MOHAMED YUSUF bearing USN 1HK21EC063 a bonafide student of HKBK
College of Engineering, in partial fulfillment for the award of Bachelor of Engineering
Degree in Electronics and Communication Engineering of the Visvesvaraya Technological
University, Belagavi during the year 2022-23 is a genuine curriculum program.
Intern has successfully completed his/her training from 11 th October 2022 to 31 st October,
2022. During the internship, the intern maintained a professional demeanor and has gained
several skills and competencies.
It is certified that all the corrections/suggestions indicated before the assessment and evaluation
have been incorporated by the intern in this internship report. The internship report has been
approved as it satisfies the academic requirements prescribed by the relevant VTU notifications
and institute for the award of B.E degree.
[Link] Raj Urs [Link] Azeez Dr. Latha R Dr. Tabassum Ara
KH
External Guide Internal Guide HOD, Principal,
Department of ECE, Department of ECE, Department of ECE, HKBKCE, Bengaluru
HKBKCE HKBKCE HKBKCE, Bengaluru
DECLARATION
I,K A MOHAMMED YUSUF bearing USN No. 1HK21EC063 student of IV semester,
B.E degree in Electronics and Communication Engineering declare that this Intra
Institutional InternshipProgram titled “Departmental Lab-IOT’’ is original work carried
out by me, the undersigned in the college campus at after endorsement and authorization
from competentauthorities of HKBK College of Engineering, in partial fulfillment of the
curriculum requirements of prescribed by Visvesvaraya Technological University ,
Belagavi in the 2022 B.E Degree Choice Based Credit System Scheme.
The content in this report is not submitted to any other university partially or wholly for
the award of any other degree
K A MOHAMMED YUSUF
USN: 1HK21EC063
Date: 09/08/2023
IV Sem, B.E
Place: Bengaluru
Electronics and Communication Engineering
ACKNOWLEDGEMENT
The euphoria that accompanies the acquisition of vocational skills by professing
internship program and compiling internship report would be complete only by acknowledgingthe
governing bodies and the personnel, who by their supervision steered and crowned out myeffort
with success.
I am grateful to the Chairman, Mr. C. M. Ibrahim, for having provided me an opportunity
to emerge as a responsible citizen with Professional Engineering Skills and moral ethics.
I am grateful to the Director, Mr. C. M. Faiz Mohammed, for having provided me with
excellent facilities in the college during my course.
I would like to express my heartfelt thanks to our Principal, Dr. Tabassum Ara, HKBK
College of Engineering for her enduring encouragement and support to the students inacademic
and co-curricular pursuits
I would like to express my genuine thanks to our Head of Department of Electronics and
Communication Engineering, Dr. Latha Rajagopalan for facilitating the internshipprogram and
her support in our academic and co-curricular activities.
I would like to extend my profound thanks and admiration to my Prof Yogananda Raj
Urs KH, Department of ECE, for his constant guidance and critical comments through the
course of the internship
I thank my Guide Dr. Abdul Azeez, Assistant Professor for his valuable guidance,
suggestions and encouragement during the course of my internship.
I thank my internship coordinator Dr. Abdul Azeez, Associate Professor for his constant
guidance, support and critical comments during the course of my internship.
K A MOHAMMED YUSUF
1HK21EC063
Internship Objectives:
1. Expose Technical students to the industrial environment, which cannot be simulated in the
classroom and hence create competent professionals in the industry.
2. Provide possible opportunities to learn, understand and sharpen the real-time
technical/managerial skills required at the job.
3. Get exposed to the current technological developments relevant to the subject area of training.
4. Use the experience gained from the industrial internship in discussions held in the classrooms.
5. Create conditions conducive to the quest for knowledge and its applicability on the job.
6. Learn to apply technical knowledge in real industrial situations.
7. Gain experience in writing reports in technical works/projects.
8. Expose students to the engineer’s responsibilities and ethics.
9. Familiarize with various materials, processes, products, and applications along with relevant
aspects of quality control and safety measures.
10. Promote academic, career, and/or personal development.
11. Expose the students to future employers.
12. Make students available to industry for employment.
13. Understand the psychology of the workers and their habits, attitudes, and approach to
problem-solving.
14. Understand the social, economic, and administrative considerations that influence the
working environment of industrial organizations.
Outcomes:
1. Build and enhance industrial relations.
2. Make the placement process easier.
3. Improve institutional credibility & branding.
4. Improve the teaching-learning process.
5. Expose of Staff to Industrial process.
6. Serve human
MISSION
[Link] achieve academic excellence through in-depth knowledge in science, engineering and
technology through dedication to duty, innovation in teaching and faith in human values.
[Link] enable our students to develop into outstanding professionals with high ethicalstandards to
face the challenges of the 21st century.
[Link] provide educational opportunities to the deprived and weaker section of thesociety, to
uplift their socio-economic status.
VISION
To empower students through wholesome education and enable the students to developinto highly qualified
and trained professionals with ethics and emerge as responsible citizens with broad outlook to build a
vibrant nation
To prepare students to serve society with a holistic approach and participate in nation-building.
ACHIEVEMENTS
The institute is accredited by the National Board of Accreditation and National Assessment and
Accreditation Council and approved by UGC.
Computer Science & Engineering and Information Science & Engineering provided additional certificate
courses to students to improve their employability.
HKBK College of Engineering opened its Technology Incubator to promote start-ups and
entrepreneurship in young talents.
HKBK College of Engineering has established strong relations with industry leaders to provide the
students with both knowledge and an exceptional career.
The highest CTC offered in 2019 was 14.4 lakhs and the highest internship stipend was 31,000. Overall,
more than 91% of the students get placed at various firms.
Over the years, HKBK College of Engineering has seen an increase in start-ups with over 23 start-ups
being fully functional.
Accredited by NBA (National Board of Accreditation) for quality education and infrastructure.
Industry Collaboration:
Collaborations with prominent industries and organizations to enhance practical exposure and
employability of students.
Tie-ups with leading IT companies for internships, workshops, and placement opportunities.
Quality Faculty:
The college boasts a diverse and experienced faculty team, with a mix of industry experts and
academicians.
ABSTRACT
The Internet of Things (IoT) is a network of physical objects that can communicate
and interact with each other through the internet. Arduino is an open-source platform
that allows users to create electronic projects using hardware and software
components. In this internship, the intern will learn how to use Arduino to design and
develop smart home devices that can monitor and control various aspects of the home
environment, such as temperature, humidity, light, motion, sound, etc. The intern will
also learn how to use various sensors, actuators, and communication modules to
connect the devices to the internet and cloud services. The intern will work on a
project that involves creating a prototype of a smart home device using Arduino and
IoT technologies.
The project will require the intern to apply the skills and knowledge acquired during
the internship, such as circuit design, programming, debugging, testing,
documentation, etc. The intern will also present the project to the mentor and other
interns at the end of the internship. The internship will provide the intern with
valuable experience and exposure to the field of IoT and Arduino. The intern will also
develop problem-solving, creativity, teamwork, and communication skills. The
internship will be a great opportunity for the intern to explore their interest and
passion in IoT and Arduino.
TABLE OF CONTENT
CONTENT [Link]
CHAPTER 1:
INTRODUCTIONINTRODUCTION OF BASIC ELECTRONIC DEVICES……......12
1.1 Resistors………………………………………………………………………….12
1.2 Capacitor…………………………………………………………………………13
1.3 Diode……………………………………………………………………………..14
1.4 Transistor ………………………………………………………………………...15
1.5 Breadboard ………………………………………………………………………15
CONCLUSION…………………..………………………………………………………….41
REFERENCES……………………………………………………………………………. .42
LIST OF EXHIBITS-FIGURES
CHAPTER 1
The importance of knowing the required amount of current flow and voltage in any electronic device
is very essential.
We learnt the significance of Ohm’s law by rigging up the electronic circuit on a breadboard of LED
without resistor and with resistor, where we used 9V battery power supply.
The most basic electronic components are:
1.1 Resistors
Resistor is used to limit the current flow in an electronic circuit. It is used based on its band values
and circuit design requirement.
1.2 Capacitor
Capacitor is used to store the voltage value in it. It is used in all the major circuit applications.
Measuring Devices:
We have used the following major electronic instruments for electronic circuit output measurements:
1. Ammeter
2. Voltmeter
3. Cathode Ray Oscilloscope (CRO)
1.5 BREADBOARD:
To build and test the electronic circuits we have used the BREADBOARD as alias to PCB(Printed
Circuit Board).
CHAPTER 2
OVERVIEW OF ARDUINO UNO
Arduino is a student friendly, cost effective open-source platform for electronic circuit designing and
to implement hobby to graduation project. It is easy-to-use hardware and software gateway.
Arduino has both the Software IDE (Integrated Development Environment) and Hardware board of
various types. We have used Arduino UNO hardware board for our first programming based
electronic design.
Arduino Uno is a microcontroller board. It uses the ATmega328 microcontroller. There are Analog
Input pins, Digital Input pins, Digital Output pins.
1. 6 Analog input pins,
2. 14 Digital Input-Output pins.
3. Among the Digital input-output pins 6 can be used as PWM outputs.
4. It also contains
a. A 16 MHz ceramic resonator,
b. a USB connection,
c. a power jack,
d. an ICSP header and a reset button.
Looking at the board from the top down, this is an outline of what you will see (parts of the board
you might interact with in the course of normal use are highlighted)
USB (used for uploading sketches to the board and for serial communication between the board
and the computer; can be used to power the board) (yellow)
2.1 Microcontrollers
ATmega328P (used on most recent boards)
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. On the
Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI USB-to-TTL
Serial chip. On the Arduino BT, they are connected to the corresponding pins of the WT11
Bluetooth® module. On the Arduino Mini and LilyPad Arduino, they are intended for use with
an external TTL serial module (e.g. the Mini-USB Adapter).
External Interrupts: 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. On
boards with an ATmega8, PWM output is available only on pins 9, 10, and 11.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which,
although provided by the underlying hardware, is not currently included in the Arduino language.
LED: 13. On the Diecimila and LilyPad, 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.
In addition to the specific functions listed below, the analog input pins support 10-bit analog-to-digital
conversion (ADC) using the analogRead() function. Most of the analog inputs can also be used as digital
pins: analog input 0 as digital pin 14 through analog input 5 as digital pin 19. Analog inputs 6 and 7 (present
on the Mini and BT) cannot be used as digital pins.
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library
(documentation on the Wiring website).
VIN (sometimes labelled "9V"). The input voltage to the Arduino board when it's using an
external power source (as opposed to 5 volts from the USB connection or other regulated power
source). You can supply voltage through this pin, or, if supplying voltage via the power jack,
access it through this pin. Note that different boards accept different input voltages ranges,
please see the documentation for your board. Also note that the LilyPad has no VIN pin and
accepts only a regulated input..
3V3. (Diecimila-only) A 3.3 volt supply generated by the on-board FTDI chip.
GND. Ground pins.
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically used to add
a reset button to shields which block the one on the board.
CHAPTER 3
BASICS OF ARDUINO PROGRAMMING
Arduino programming uses ‘C++’ programming syntax.
Initially, the Arduino programming contains two default functions:
1. void setup ( ) { }
2. void loop ( ) { }
3.1 Variable:
Here we learnt the concept of declaring variables for the Arduino UNO input-output pins.
Example: int sensor = A0;
int buzzer = 2;
where sensor and buzzer are variables, sensor variable is applied to the Analog pin A0, buzzer variable
is applied to the Digital pin 2.
3.2 Input-Output Direction:
Syntax:
pinMode(pinNumber, Mode);
Example: pinMode( 2, OUTPUT);
Here,
pinNumber is the Arduino UNO board Input-Output pin number and buzzer variable is defined as
OUTPUT pin.
Mode means the direction for input or output of any particular available pin number or declared
variable.
3.3 Write-Read Instruction:
1. Write Instruction: Write means which gives value to the connected the device from the program.
Example: Output devices like, LED, Buzzer.
Syntax:
digitalWrite(variableName, Value);
Example: digitalWrite(buzzer, HIGH);
Here,
variableName is the name given Input or Output pin number.
Value means the logic 1 (HIGH) or logic 0 (LOW) value.
2. Read Instruction: Read means which takes the value from the external environment through the
connected device. Example: Input Devices like Push button, Keypad, Water Sensor, Gas Sensor,
Temperature Sensor, Humidity Sensor.
Syntax:
digitalRead(variableName, Value);
Example: digitalRead(sensor, LOW);
Here, variableName is the name given Input or Output pin number.
Value means the logic 1 (HIGH) or logic 0 (LOW) value.
3.4 Delay:
Delay means adding pause in between the simultaneous or multiple operations.
Syntax:
delay(Value);
Example: delay(3000);
Here, Value means the time unit in seconds, 1000 means 1second, 500 means 0.5second.
3.5 Arduino Coding Basics
We have already discussed the popular Arduino Boards, Arduino IDEs, and Installation process of the Arduino
software. We learned that Arduino IDE (Integrated Development Environment) allows us to draw the sketch
and upload it to the various Arduino boards using code. The code is written in a simple programming language
similar to C and C++.
The initial step to start with Arduino is the IDE download and installation.
Brackets
There are two types of brackets used in the Arduino coding, which are listed below:
o Parentheses ( )
o Curly Brackets { }
Parentheses ( )
The parentheses brackets are the group of the arguments, such as method, function, or a code
statement. These are also used to group the math equations.
Curly Brackets { }
The statements in the code are enclosed in the curly brackets. We always require closed curly brackets
to match the open curly bracket in the code or sketch.
There are two types of line comments, which are listed below:
o Multi-line comment
The text that is written after the two forward slashes are considered as a single line comment. The
compiler ignores the code written after the two forward slashes. The comment will not be displayed
in the output. Such text is specified for a better understanding of the code or for the explanation of
any code statement.
The // (two forward slashes) are also used to ignore some extra lines of code without deleting it.
The Multi-line comment is written to group the information for clear understanding. It starts with the
single forward slash and an asterisk symbol (/ *). It also ends with the / *. It is commonly used to
write the larger text. It is a comment, which is also ignored by the compiler.
The coding screen is divided into two blocks. The setup is considered as the preparation block, while
the loop is considered as the execution block. It is shown below:
The set of statements in the setup and loop blocks are enclosed with the curly brackets. We can write
multiple statements depending on the coding requirements for a particular project.
For example:
1. void setup ( )
2. {
3. Coding statement 1;
4. Coding statement 2;
5. .
6. .
7. .
8. Coding statement n;
9. }
10. void loop ( )
11. {
It contains an initial part of the code to be executed. The pin modes, libraries, variables, etc., are
initialized in the setup section. It is executed only once during the uploading of the program and after
reset or power up of the Arduino board.
Zero setup () resides at the top of each sketch. As soon as the program starts running, the code inside
the curly bracket is executed in the setup and it executes only once.
The loop contains statements that are executed repeatedly. The section of code inside the curly
brackets is repeated depending on the value of variables.
Time in Arduino
For example, for a 5-second delay, the time displayed will be 5000 milliseconds.
Example:
pinMode ( )
The specific pin number is set as the INPUT or OUTPUT in the pinMode () function.
Where,
pin: It is the pin number. We can select the pin number according to the requirements.
Mode: We can set the mode as INPUT or OUTPUT according to the corresponding pin [Link]'
understand the pinMode with an example.
Code:
The OUTPUT mode of a specific pin number provides a considerable amount of current to other
circuits, which is enough to run a sensor or to light the LED brightly. The output state of a pin is
considered as the low-impedance state.
The high current and short circuit of a pin can damage the ATmel chip. So, it is recommended to set
the mode as OUTPUT.
The digitalWrite () will disable the LOW during the INPUT mode. The output pin will be considered
as HIGH.
We can use the INPUT mode to use the external pull-down resistor. We are required to set the
pinMode as INPUT_PULLUP. It is used to reverse the nature of the INPUT mode.
The sufficient amount of current is provided by the pull-up mode to dimly light an LED, which is
connected to the pin in the INPUT mode. If the LED is working dimly, it means this condition is
working out.
o The void loop () would include digitalWrite( ) and delay ( ) as the main function.
digitalWrite( )
The digitalWrite ( ) function is used to set the value of a pin as HIGH or LOW.
Where,
HIGH: It sets the value of the voltage. For the 5V board, it will set the value of 5V, while for 3.3V,
it will set the value of 3.3V.
If we do not set the pinMode as OUTPUT, the LED may light dim.
Example:
The HIGH will ON the LED and LOW will OFF the LED connected to pin number 13.
The digitalRead () function will read the HIGH/LOW value from the digital pin, and the digitalWrite
() function is used to set the HIGH/LOW value of the digital pin.
delay ( )
The delay () function is a blocking function to pause a program from doing a task during the specified
duration in milliseconds.
Code:
4. delay (1000);
Here, the LED connected to pin number 13 will be ON for 2 seconds and OFF for 1 second. The task
will repeatedly execute as it is in the void loop ().
Example: To light the LED connected to pin number 13. We want to ON the LED for 4 seconds and
OFF the LED for 1.5 seconds.
Code:
1. void setup ()
2. {
3. pinMode ( 13, OUTPUT); // to set the OUTPUT mode of pin number 13.
4. }
5. void loop ()
6. {
7. digitalWrite (13, HIGH);
8. delay (4000); // 4 seconds = 4 x 1000 milliseconds
9. digitalWrite (13, LOW);
10. delay (1500); // 1.5 seconds = 1.5 x 1000 milliseconds
11. }
CHAPTER 4
EXPERIMENTS IN ANALOG ELECTRONICS
We have performed the below basic analog experiments:
1. Verifying Ohm’s law
2. Light Detection Resistor
3. Photodiode
Applications of LDRs
There are many applications for Light Dependent Resistors. These include:
Lighting switch
The most obvious application for an LDR is to automatically turn on a light at a certain light level.
An example of this could be a street light or a garden light.
LDRs can be used to control the shutter speed on a camera. The LDR would be used to measure the
light intensity which then adjusts the camera shutter speed to the appropriate level.
The circuit shown above shows a simple way of constructing a circuit that turns on when it goes
dark. In this circuit the LDR and the other Resistor form a simple 'Potential Divider' circuit, where
the centre point of the Potential Divider is fed to the Base of the NPN Transistor. When the light
level decreases, the resistance of the LDR increases. As this resistance increases in relation to the
other Resistor, which has a fixed resistance, it causes the voltage dropped across the LDR to also
increase. When this voltage is large enough (0.7V for a typical NPN Transistor), it will cause the
Transistor to turn on. The value of the fixed resistor will depend on the LDR used, the transistor
used and the supply voltage.
We connected the circuit as per the circuit diagram and the voltage across the photodiode was kept
constant. We used Room light (Darkness) and LED light to know the working principle of
photodiode
Lighting switch
The most obvious application for an LDR is to automatically turn on a light at a certain light
level. An example of this could be a street light or a garden light.
CHAPTER 5
CHAPTER 6
Programs of Mini-Projects using Arduino
void setup( )
{
pinMode(led, OUTPUT); // designate port 13 as output
}
void loop( )
{
digitalWrite(led, HIGH); // turn the led on
delay(1000); // wait for 1 second
void loop() {
switchState = digitalRead(switchPin); // Read the digital value of the switch (LOW/HIGH)
[Link](switchState); // Print the read value in the serial monitor
void setup() {
// put your setup code here, to run once:
[Link](9600);
[Link]();
}
void loop() {
// put your main code here, to run repeatedly:
[Link]();
[Link]("Humidity: ");
[Link](humidity);
[Link]("%");
delay(1500);
[Link]("Temperature: ");
[Link](temperature);
[Link]("C");
delay(1500);
}
void loop() {
// put your main code here, to run repeatedly:
int gasSensorData = analogRead(gasSensor);
[Link](gasSensorData);
delay(500);
if(SensorValue >= 200)
{
digitalWrite(buzzer, HIGH);
}
else
{
digitalWrite(buzzer, LOW);
}
}
SS
CONCLUSION
In conclusion, the exploration and implementation of the Internet of Things (IoT)
using Arduino Uno have opened up a world of endless possibilities and opportunities.
This report delved into the fascinating realm of IoT, showcasing how the integration
of everyday objects with the power of the internet can revolutionize the way we
interact with our surroundings. As we conclude this report, several key takeaways
highlight the significance of this technology and its implications for the future.
Firstly, the Arduino Uno has proven to be an invaluable tool in the development of
IoT projects. Its user-friendly interface and compatibility with various sensors,
actuators, and communication modules have enabled enthusiasts, hobbyists, and
even professionals to embark on innovative ventures. Through practical examples,
we have witnessed how the Arduino Uno acts as the backbone of IoT systems,
facilitating the collection, processing, and transmission of data.
Furthermore, the IoT has transcended mere convenience and has become a catalyst
for efficient resource utilization and smart decision-making. The ability to monitor
and control devices remotely, as demonstrated in the report, is transforming sectors
ranging from agriculture and healthcare to industrial automation and home
management. This has the potential to enhance productivity, optimize resource
allocation, and contribute to sustainable practices on a global scale.
REFERENCES
[1].[Link]
[2]. [Link]
[3]. [Link]
[4].[Link]
[5]. [Link]
[6].[Link]