Final Intrenship Report
Final Intrenship Report
INTERNSHIP REPORT
ON
“HOME AUTOMATION USING EMBEDDED SYSTEM AND C”
SUBMITTED IN PARTIAL FULFILMENT FOR THE REQUIREMENT
OF
BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
SUBMITTED BY
VIDYA M (1AH17EC014)
VIII SEMESTER
CERTIFICATE
This is to certify that the Internship report entitled “HOME AUTOMATION USING
EMBEDDED SYSTEM AND C ” carried out by VIDYA M (1AH17EC032) , a bonafide
student of ACS COLLEGE OF ENGINEERING, BENGALURU in partial fulfilment for
the award of Bachelor of Engineering in Electronics & Communication Engineering of
the Visvesvaraya Technological University, Belagavi during the year 2020-2021. It is
certified that all corrections/suggestions indicated for internal assessment have been
incorporated in the report deposited in the departmental library. The Internship report has
been approved as it satisfies the academic requirements in respect of Internship work
prescribed for the said degree.
1.
2.
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task would be
incomplete without mentioning names of the people who made it possible, whose constant
guidance and encouragement crowned our effort with success.
I am thankful to our honorable chairman Dr. A.C. Shanmugam for providing us with the better
facilities and his encouragement also helped me in completion of Internship.
I am grateful to our institution, ACS College of Engineering with its ideals and inspirations
for having provided me with the facilities, which has made this Internship success.
I earnestly thank Dr. M. S. Murali, Principal, ACSCE, for facilitating academic excellence
in the college that helped me in completing this Internship.
I wish to extend my profound thanks to Dr. Bharathi Gururaj, Internship coordinator, Head
of the Department, Electronics & Communication Engineering, for giving me the consent to
carry out this Internship.
I would like to express my heartful gratitude to Mr. Vijay Mahantesh, Founder & Director,
Cleverbit Solutions Private Limited, Bangalore for providing me an opportunity to complete
this Internship program at his organization.
I convey my thanks to friends for all the help they provided. Last but not the least I would like
to thank all the staff members and the institute, in general, for extending a helping hand and
making Internship possible.
VIDYA M
(1AH17EC032)
i
COMPANY PROFILE
Date of
Incorporation : 4th October 2017
Corporate
Identification No : U72900KA2017PTC106926
ii
ABOUT THE COMPANY
Clever bit works in association with various corporate technology-based companies to meet
their technical requirements by providing them with the right resources to address the
technical challenges.
Clever bit offers cost effective and reliable solutions to customers across various
engineering industries to meet their technical requirements by providing them with the right
resources to address the technical challenges.
Safety engineering
Clever bit also offers wide range of training services for professionals and students from
various engineering domains. They provide professional training in embedded systems,
mobile applications development, and Internet of Things (IoT) and deep learning.
They also offer range of technical staffing services to meet the requirements. They work on
various aspects of Embedded systems such as programming microcontrollers using
languages like C, C++, Embedded C and Python. They also work on Operating systems
used for embedded systems such as Real Time Operating Systems and Linux Operating
Systems.
iii
TABLE OF CONTENTS
COMPANY PROFILE ii
LIST OF FIGURES v
LIST OF ACRONYMS vi
1 INTRODUCTION 1
1.1 Basic C 1
2 METHODOLOGY 3
2.1 Hardware Requirements 3
iv
3 TASK PERFORMED 15
3.1 Home Automation using Tinker CAD 15
3.2 Proposed System 15
3.3 Circuit Diagram 16
4 REFLECTION 19
Interfacing 19
4.1 Arduino UNO with PIR Sensor and Buzzer 20
4.2 Multiple LED and potentiometer with Arduino 21
4.3 Multiple LED and Switch with Arduino 22
5 CONCLUSION 23
v
LIST OF FIGURES
FIGURE FIGURES PAGE
NO. NO.
1.1 Block diagram of the Embedded System 3
2.1 Symbol of Arduino UNO 4
2.2 Arduino UNO board 4
2.3 ATmega328P IC 5
2.4 Pin configuration of ATmega328P IC 5
2.5 Light Dependent Resistor (LDR) 7
2.6 Light Emitting Diode (LED) 8
2.7 DC motor 9
2.8 Slide Switch 10
2.9 Temperature Sensor 11
2.10 Buzzer 12
2.11 PIR sensor 13
2.12 Tinker CAD 14
vi
HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021
CHAPTER 1
INTRODUCTION
1.1 BASIC C
C is a general-purpose programming language, and is used for
writing programs in many different domains, such as operating systems, numerical computing,
graphical applications, etc. It is a small language, with just 32 keywords. It provides “high-level”
structured programming constructs such as statement grouping, decision making, and looping, as
well as “low level” capabilities such as the ability to manipulate bytes and addresses.
C achieves its compact size by providing spartan services within the
language proper, foregoing many of the higher-level features commonly built-in to other
languages. For example, C provides no operations to deal directly with composite objects such
as lists or arrays. There are no memory management facilities apart from static definition and
stack-allocation of local variables. And there are no input/output facilities, such as for printing
to the screen or writing to a file.
and performance. Some embedded systems are mass-produced, benefiting from economies of
scale.
CHAPTER 2
METHODOLOGY
Pin Details:
PC6 (RESET): Pin by default is used as RESET pin. PC6 can only be used as I/O pin when
RSTDISBL Fuse is programmed.
PD0 (RXD): RXD is as Data Input Pin for USART (Universal Serial Communication Interface).
It can be used for programming.
PD1 (TXD): TXD is a Data Output pin for USART.It can be used for programming. INT2
(External Interrupt 2 Input).
PD2 (INT0): Used as External Interrupt Source 0.
PD3 (INT1/OC2B): Used as External Interrupt Souce1. OC2B (PWM – Timer/Counter2
output compare Match B output).
PB6 (XTAL1/TOSC1): XTAL1 is the Chip Clock Oscillator pin 1 or External clock input.
TOSC1 is the Timer Oscillator pin 1.
PB7 (XTAL2/TOSC2): XTAL2 is the Chip Clock Oscillator pin 2 or External clock input.
TOSC2 is the Timer Oscillator pin 2.
PB0 (ICP1/CLKO): ICP1 is the Timer/Counter1 Input Capture pin. CLKO is the divided
system clock,can be output on the PB0 pin.
PB2 (SS/OC1B): SS(SPI Slave Select input).This pin is low when controller acts as slave.
OC1B is the Timer/Counter1 output compare Match B output.
PB3 (MOSI/OC2A): MISO is the Master Output Slave Input. When controller acts as slave,
the data is received by this pin.OC2A is Timer/Counter2 output Compare Match output.
PB4 (MISO): MISO is Master Input Slave Output. When the controller acts as slave, the data
is sent to master by this controller through this pin.
PB5 (SCK): SCK ( SPI Bus Serial Clock). This is the clock shared by the controller and other
systems for accurate data transfer.
PC4 (ADC4/SDA): ADC4 (ADC Input Channel 4). SDA (Two-wire Serial Bus Data
Input/Output Line).
PC5 (ADC5/SCL): ADC5 (ADC Input Channel 5). SCL (Two-wire Serial Bus Clock Line).
2.1.4 DC Motor
When the coils are turned on and off in sequence, a rotating magnetic
field is created that interacts with the differing fields of the stationary magnets in the stator to
create torque, which causes it to rotate. These key operating principles of DC motors allow them
to convert the electrical energy from direct current into mechanical energy through the rotating
movement, which can then be used for the propulsion of objects.
2.1.7 Buzzer
CHAPTER 3
TASK PERFORMED
Figure 3.2 shows the block diagram of the proposed system. The main Objective of the
proposed system is to automate a home by the following operations:
Automate lights using LDR.
Figure 3.2 shows the circuit connection of the proposed system. The circuit design consists of
Arduino UNO, slide switch, LDR (photo resistor), LED, Temperature sensor (TMP36), DC
Motor, PIR sensor and a buzzer. The connection is described as follows :
Slide Switch : Slide Switch has 3 terminals. Terminal 1 is connected to the ground. Terminal
2 is connected to the 5V power supply of the Arduino UNO. Common terminal of the slide
switch is connected to the digital pin 2 of the Arduino UNO.
LDR : LDR (photo resistor) has 2 terminals. Terminal 1 is connected to the 5V supply of the
Arduino UNO. Terminal 2 is connected to the ground through a resistor. The junction between
the terminal 2 and resistor is connected to analog pin A0 of the Arduino UNO.
LED : LED has 2 terminals namely cathode (negative) and anode (positive). Cathode is
connected to the ground. Anode is connected to the digital pin 3 of the Arduino UNO through
the resistor.
Temperature sensor : Temperature sensor has Power pin, Vout pin and a ground pin. Power pin
is given to 5V supply of the Arduino UNO. Ground pin is grounded. V out is connected to the
analog pin A1 of the Arduino UNO.
Buzzer : Buzzer has positive pin and negative pin. Positive pin is connected to the digital pin
7 of the Arduino UNO. Negative pin is grounded.
PIR Sensor : PIR Sensor has signal pin, Power pin and Grond pin. Signal pin is connected to
the digital pin 4 of the Arduino UNO. Power pin is connected to the 5V supply of the Arduino
UNO. Ground pin is grounded.
The proposed system works in two modes, namely - Manual mode and Auto mode.
If the slide switch is ON, then it is Auto mode else it is Manual mode.
Manual mode : In manual mode, each progress is checked manually. In the serial monitor if the
input we give is ‘0’, then the light will be OFF. If the input we give is ‘1’, then the light will be
ON. If the input we give is ‘o’, then the Fan is turned OFF. If the input we give is ‘l’, then the
Fan speed is turned ON with low speed. If the input we give is ‘h’, then the fan speed is turned
ON with high speed. If the input we give is ‘s’, then the buzzer is ON indicating that the motion
of the object is detected. If the input we give is ’d’, then the buzzer is OFF indicating that no
motion of the object is detected.
Auto mode : In Auto mode, each progress is checked automatically. If the intensity of the LDR
is more than 500, then automatically light will be turned OFF. If the intensity of the LDR is less
than 500, then automatically light will be turned ON. If the temperature sensor measures the
temperature less than 250C, then automatically fan will be turned OFF. If the temperature sensor
measures the temperature more than 250C and less than 350C, then automatically fan will be
turned ON with low speed. If the temperature sensor measures the temperature more than 35 0C,
then automatically fan will be turned ON with high speed. If the motion of the object is detected
by the PIR sensor, then the buzzer produces a beep sound. If the motion of the object is not
detected by the PIR sensor, then the buzzer do not produce any beep sound.
CHAPTER 4
REFLECTION
During the second half of the course, a mini project was assigned
where in the procedure of integrating several electronic modules together and working on the
home automation was learnt. During the progression of the project, an in depth of knowledge
of the embedded system and IoT was gained which thereby helped in self learning of various
other electronic modules and sensors.
The various prototypes of interfacing and their results are shown in the later pages.
Interfacing
Fig 4.1 Interfacing Arduino UNO with PIR sensor and buzzer
Figure 3.1 shows the circuit diagram of interfacing Arduino UNO with the PIR sensor and
Buzzer.
When PIR sensor detects any movement within the specified range, Buzzer gives a beep
sound and print as “motion is detected” in the serial monitor. Else Buzzer is off and print as
“no motion detected” in the serial monitor.
Fig 4.2 Output when movement of object is detected and not Detected
Fig 4.3 Shows the circuit diagram of interfacing multiple LEDs and arduino with the arduino.
When the voltage ranges from one to two volts LED 1 is ON.
When the voltage ranges from two to three volts LED 2 is ON.
When the voltage ranges above four volts all the LED are ON.
Figure 4.5 shows the interfacing multiple LED and switch to the Arduin UNO.
Fig 4.6 Output of LED when Switch is operated and not operated
CHAPTER 5
CONCLUSION
During the internship, the knowledge was acquired about the efficient
hardware component selection and also the efficient way to approach the processing of the
project requirement. As embedded systems are designed to do some specific task and IoT is the
environment in which physical items interact with each other, the combined use of them will
be very helpful and easier to build home automation.