33% found this document useful (3 votes)
5K views32 pages

Final Intrenship Report

This internship report describes a home automation project using an Arduino Uno and various sensors. The project aims to automate functions like lighting, appliance control, security and temperature monitoring in a home. Key components used include a PIR sensor, buzzer, LEDs, DC motor, temperature sensor and slide switch. The circuit design and Arduino code for various automation tasks are discussed. Interfacing of sensors like the PIR sensor and buzzer with Arduino is reflected upon. The report concludes noting the learning from implementing this home automation system using embedded programming.

Uploaded by

046 KISHORE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
33% found this document useful (3 votes)
5K views32 pages

Final Intrenship Report

This internship report describes a home automation project using an Arduino Uno and various sensors. The project aims to automate functions like lighting, appliance control, security and temperature monitoring in a home. Key components used include a PIR sensor, buzzer, LEDs, DC motor, temperature sensor and slide switch. The circuit design and Arduino code for various automation tasks are discussed. Interfacing of sensors like the PIR sensor and buzzer with Arduino is reflected upon. The report concludes noting the learning from implementing this home automation system using embedded programming.

Uploaded by

046 KISHORE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI - 590018

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

UNDER THE GUIDANCE OF


Internal guide External guide
Dr. H.B. Bhuvaneswari Mr. Vijay Mahantesh
Professor Founder & Director
Department of ECE Cleverbit Solutions
ACS College Of Engineering

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING
ACS COLLEGE OF ENGINEERING
KAMBIPURA, MYSORE ROAD, BENGALURU – 560074
2020-2021
ACS COLLEGE OF ENGINEERING
KAMBIPURA, MYSORE ROAD, BENGALURU – 560074

DEPARTMENT OF ELECTRONICS & COMMUNICATION


ENGINEERING

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.

Dr. H.B Bhuvaneswari Dr. Bharathi Gururaj Dr. M. S. Murali


Internal Guide Internship Coordinator Principal
Professor, Dept., of ECE HOD, ECE

Name of the Examiners Signature with date

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 sincere thanks to my guide Dr. H B Bhuvaneswari Professor,


Department of ECE, for her able guidance and valuable advice at every stage of my Internship,
which helped me in the successful completion of the 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

CLEVERBIT SOLUTIONS PRIVATE LIMITED

Director : Vijay Mahantesh Shankrappa Mulge,


Neelakantappa Asha Rani

Date of
Incorporation : 4th October 2017

Corporate
Identification No : U72900KA2017PTC106926

Location : #2514/U, 7th A main, RPC Layout,


Opposite BBMP swimming pool,

Vijayanagar, Bengaluru, Karnataka-560040


E-mail ID : [email protected],
[email protected]
Contact No : +91-9845011148

CLEVERBIT SOLUTIONS PRIVATE LIMITED was founded by Mr. Vijay Mahantesh


with an object to be the leader in IT services by offering cost effective and reliable solutions
to customers across various engineering industries like automotive, aerospace and
consumer electronics.

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.

Some offerings of the company are:

 EUC (Electronic Control Unit) systems

 EUC software development

 In-Vehicle Network and diagnostics

 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

CHAPTER CONTENTS PAGE


NO. NO.
ACKNOWLEDGEMENT i

COMPANY PROFILE ii

ABOUT THE COMPANY iii

LIST OF FIGURES v

LIST OF ACRONYMS vi

1 INTRODUCTION 1
1.1 Basic C 1

1.2 Embedded Systems 1

2 METHODOLOGY 3
2.1 Hardware Requirements 3

2.1.1 Arduino UNO 3

2.1.2 Light Dependent Resistor (LDR) 7


2.1.3 Light Emitting Diode (LED) 8
2.1.4 DC motor 9
2.1.5 Slide Switch 10
2.1.6 Temperature Sensor 11
2.1.7 Buzzer 12
2.1.8 PIR Sensor 13
2.1.9 Tinker CAD 14

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

3.1 Block Diagram of Proposed System 15

3.2 Circuit Diagram of Proposed System 16

3.3 Working of A Proposed System with Flow chart 17

4.1 Interfacing Arduino UNO with PIR Sensor and buffer 20

4.2 Output when movement of object is detected and not detected 20

4.3 Interfacing Multiple Led and potentiometer with Arduino 21

4.4 Output when the voltage is maximum 21

4.5 Interfacing Multiple LED and Switch to Arduino 22

4.6 Output of LED when Switch is operated and not operated 22

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.

1.2 EMBEDDED SYSTEM


An embedded system is a combination of hardware and the software
(generally known as the firmware). Embedded systems are known for their fast response; they
produce output in real time hence are used in real time systems. The software in such embedded
systems is referred to as Real Time Operating System (RTOS). These systems are a type of small
computer where the processor or controller forms the core of the system.
Embedded systems differ from the general purpose systems by the fact
that they are used for a specific purpose while the general purpose systems are widely used for a
variety of applications. These systems are small in size, reliable, responsive, low cost, robust in
nature and consumes low power.
Modern embedded systems are often based on microcontrollers (i.e.
CPUs with integrated memory or peripheral interfaces), but ordinary microprocessors (using
external chips for memory and peripheral interface circuits) are also common, especially in more
complex systems. In either case, the processor(s) used may be types ranging from general purpose
to those specialized in certain class of computations or even custom designed for the application
at hand.
Since the embedded system is dedicated to specific tasks, design
engineers can optimize it to reduce the size and cost of the product and increase the reliability

Dept. of ECE, ACSCE Page 1


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

and performance. Some embedded systems are mass-produced, benefiting from economies of
scale.

Embedded systems range from portable devices such as digital


watches and MP players, to large stationary installations like traffic lights, factory controllers
and largely complex systems like hybrid vehicles, magnetic resonance imaging an avionics.
Complexity varies from low, with a single microcontroller chip, to very high with multiple
units, Complexity varies from low, with a single microcontroller chip, to very high with
multiple units, peripherals and networks mounted inside a large chassis or enclosure.
The internship was purely based on embedded systems where the day to
day role of the interns were to work on the interface of various electronics modules with the
controller board also known as the arduino board. Arduino is an open-source hardware and
software company, project and user community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices.
The microcontrollers can be programmed using C and C++
programming languages. The arduino project provides an Integrated Development Environment
(IDE) based on the processing language project. Arduino project started in 2005 as a program for
students at the Intraction Design Institute Ivrea in Italy, aming to provide a low-cost and
professionals to create devices that interact with the environment using sensors and actuators.
Arduino board designs use a variety of microprocessors and controllers.
The boards are equipped with sets of digital and analog input/output (I/O) pins that may be
interfaced to various expansion boards or breadboards and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some models, which are also
used for loading programs from personal computers.
Common examples of such devices intended for beginner hobbyists
include simple robots, thermostats and motion detectors. Different types of arduino boards are :
Arduino Uno, Lilypad Arduino Board, RedBoard Arduino Board, Arduino Mega Board, Arduino
Mega Board, Arduino Leonardo Board, Arduino Shields. Arduino Uno was also interfaced with
various input and output peripherals like LED’s, Moisture Sensor, Ultrasonic Sensor, Servo motor,
Motor Driver and Water Pump.
During the internship a project titled “Home Automation Systems using
Embedded system and C” was successfully completed. The aim of the project was to monitor the
garden that estimate volumetric water content using Moisture Sensor, monitor the sump and tank
using Utrasonic Sensor Based Water Level Controller and Automatic Fish Feeder using Servo
motor.
Dept. of ECE, ACSCE Page 2
HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

Fig 1.1 Block Diagram of embedded System

CHAPTER 2
METHODOLOGY

2.1 Hardware Requirements


2.1.1 Arduino UNO
The Arduino Uno is a microcontroller board based on the ATmega328
as shown in the figure 2.1. It has 20 digital input/output pins (of which 6 can be used as Pulse
Width Modulation (PWM) outputs and 6 can be used as analog inputs), a 16 MHz resonator, a
USB connection, a power jack, an In-circuit System Programming (ICSP) header, and a reset
button.
It contains everything needed to support the microcontroller, simply
connecting it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to
get started as shown in the figure 2.2. Arduino hardware components are cheaper in relation with
other controller architecture and programming language is easy. Arduino has greater academic
applications.

Dept. of ECE, ACSCE Page 3


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

Arduino is a microcontroller kit for beginners which facilities the


hardware and firmware (software) interaction with a microcontroller chip in a sort of plug and
play. Arduino Uno is based on ATmega328P chip which is manufactured by Microchip
Technology co as shown in the figure 2.3.

Fig 2.1 Symbol of Arduino

Fig 2.2 Arduino UNO Board

Dept. of ECE, ACSCE Page 4


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

Fig 2.3 ATmega328P IC

Fig 2.4 Pin configuration of AT328P IC

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).

Dept. of ECE, ACSCE Page 5


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

 PD (XCK/T0): T0 is Timer0 External Counter Input.XCK (USART External clock I/O).

 VCC: Connected to positive voltage.

 GND: Connected to ground it has 0volts.

 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.

 PD5 (T1/OC0B): T1 is Timer 1 External Counter Input. OC0B (PWM – Timer/Counter0


output compare Match B output).

 PD6 (AIN0/OC0A): AIN0 is Analog Comparator Positive I/P. OC0A (PWM –


Timer/Counter0 output compare Match A output).

 PD7 (AIN1): AIN1 is a Analog Comparator Negative I/P.

 PB0 (ICP1/CLKO): ICP1 is the Timer/Counter1 Input Capture pin. CLKO is the divided
system clock,can be output on the PB0 pin.

 PB1 (OC1A): OC1A is the Timer/Counter1 output Compare Match A output.

 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.

 AVCC: Power for Internal ADC Converter.

 AREF: Analog Reference Pin for ADC.

 GND: Ground which means 0vots.

 PC0 (ADC0): ADC0 (ADC Input Channel 0).

 PC1 (ADC1): ADC1 (ADC Input Channel 1).

Dept. of ECE, ACSCE Page 6


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

 PC2 (ADC2): ADC2 (ADC Input Channel 2).

 PC3 (ADC3): ADC3 (ADC Input Channel 3).

 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.2 Light Dependent Resistor (LDR)


Photo resistors, also known as light dependent resistors (LDR), are
light sensitive devices most often used to indicate the presence or absence of light, or to measure
the light intensity. In the dark, their resistance is very high, sometimes up to 1MΩ, but when
the LDR sensor is exposed to light, the resistance drops dramatically, even down to a few ohms,
depending on the light intensity. LDRs have a sensitivity that varies with the wavelength of the
light applied and are nonlinear devices. They are used in many applications but are sometimes
made obsolete by other devices such as photodiodes and phototransistors. Some countries have
banned LDRs made of lead or cadmium over environmental safety concerns.

Based on the materials used, photo resistors can be divided into


two types; intrinsic and extrinsic. Intrinsic photo resistors use undoped materials such as silicon
or germanium. Photons that fall on the device excite electrons from the valence band to the
conduction band, and the result of this process are more free electrons in the material, which
can carry current, and therefore less resistance. Extrinsic photo resistors are made of materials
doped with impurities, also called dopants. The dopants create a new energy band above the
existing valence band, populated by electrons. These electrons need less energy to make the
transition to the conduction band thanks to the smaller energy gap. The result is a device
sensitive to different wavelengths of light.

Fig 2.5 Light Dependent Resistor (LDR)

Dept. of ECE, ACSCE Page 7


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

2.1.3 Light Emitting Diode (LED)


A Light Emitting Diode (LED) is one of the latest inventions and
is extensively used these days. From your cell phone to the large advertising display boards, the
wide range of applications of these magical light bulbs can be witnessed almost everywhere.
Today their popularity and applications are increasing rapidly due to some remarkable properties
they have. Specifically, LEDs are very small in size and consume very little power.

A light-emitting diode is a two-lead semiconductor light source.


It is a p–n junction diode that emits light when activated. When a suitable voltage is applied to
the leads, electrons are able to recombine with electron holes within the device, releasing energy
in the form of photons. This effect is called electroluminescence, and the color of the light
(corresponding to the energy of the photon) is determined by the energy band gap of the
semiconductor.

The material used in LEDs is basically aluminum-gallium-


arsenide (AlGaAs). In its original state, the atoms of this material are strongly bonded. Without
free electrons, conduction of electricity becomes impossible here. By adding an impurity, which
is known as doping, extra atoms are introduced, effectively disturbing the balance of the
material.

The intensity of light emitted from a source (LED in this case)


will depend on the energy level of the emitted photons which in turn will depend on the energy
released by the electrons jumping in between the atomic orbits of the semiconductor material.

Fig 2.6 Light Emitting Diode (LED)

Dept. of ECE, ACSCE Page 8


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

2.1.4 DC Motor

The term ‘DC motor’ is used to refer to any rotary electrical


machine that converts direct current electrical energy into mechanical energy. DC motors can
vary in size and power from small motors in toys and appliances to large mechanisms that
power vehicles, pull elevators and hoists, and drive steel rolling mills.

DC motors include two key components: a stator and an armature.


The stator is the stationary part of a motor, while the armature rotates. In a DC motor, the stator
provides a rotating magnetic field that drives the armature to rotate.

A simple DC motor uses a stationary set of magnets in the stator, and


a coil of wire with a current running through it to generate an electromagnetic field aligned with
the centre of the coil. One or more windings of insulated wire are wrapped around the core of the
motor to concentrate the magnetic field.

The windings of insulated wire are connected to a commutator (a


rotary electrical switch), that applies an electrical current to the windings. The commutator allows
each armature coil to be energised in turn, creating a steady rotating force (known as torque).

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.

Fig 2.7 DC motor

Dept. of ECE, ACSCE Page 9


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

2.1.5 Slide Switch

Slide switches are mechanical switches defined by their method of


Operation.In this switch there is a slider that moves(slides) from position to position linearly
making it easy to ON/OFF circuit or as selector switch with a finger tip easily.Slide switch has
a rectangle casing with a bar handle which slides from one position to another changing its
state.It can handle between a 1/10th of an amp to several amps of current, and up to about 200
volts, which depends on the size of the switch.It has 0.1" spacing making it easy to mount on
the pcb and making it advantageous over toggle switch.
Slide switches are used, for example, in smaller circuits, such as
main switches in battery-powered electrical devices. Despite the functional parallels to
pushbuttons, slide switches usually have a clearer haptic structure that accurately indicates the
on and off states. The mounting depends on the design and can be done for example via contacts
or direct mounting on a printed circuit board. Different industries rely on the use of slide
switches.
There are two common internal designs of slide switches. The most
common design uses metal slides that make contact with the flat metal parts on the switch. As
the slider is moved it causes the metal slide contacts to slide from one set of metal contacts to
the other, actuating the switch. The second design uses a metal seesaw. The slider has a spring
that pushes down on one side of the metal seesaw or the other.
Slide switches are maintained-contact switches. Maintained-
contact switches stay in one state until actuated into a new state and then remain in that state
until acted upon once again.Depending on the actuator type, the handle is either flush or raised.
Choosing a flush or raised switch will depend on the intended application.

Fig 2.8 Slide Switch

Dept. of ECE, ACSCE Page 10


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

2.1.6 Temperature Sensor

A temperature sensor is a device used to measure temperature. This


can be air temperature, liquid temperature or the temperature of solid matter. There are
different types of temperature sensors available and they each use different technologies and
principles to take the temperature measurement.

They are devices to measure temperature readings through electrical


signals. The sensor is made up of two metals, which generate electrical voltage or resistance
once it notices a change in temperature. The temperature sensor plays a critical role in
maintaining a specific temperature within any equipment used to make anything from
medicine to beer. To produce these types of content, the accuracy and responsiveness of the
temperature and temperature control are critical to ensuring the end product is perfect.
Temperature is the most common physical measurement type in industrial applications.
Accurate measurements are vital in ensuring the success of these processes. There are many
applications that are not-so-obvious, which use temperature sensors. Melting chocolate, using
a blast furnace, controlling a hot air balloon, freezing substances in a lab, running a motor
vehicle, and firing a kiln.

Temperature sensors come in different forms, which are used for


different methods of temperature management. There are two categories of temperature
sensors which are contact and non-contact. Contact sensors are used mainly in hazardous
areas.

Fig 2.9 Temperature Sensor

Dept. of ECE, ACSCE Page 11


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

2.1.7 Buzzer

A buzzer is a small yet efficient component to add sound features to


our project/system. It is very small and compact 2-pin structure hence can be easily used
on breadboard, Perf Board and even on PCBs which makes this a widely used component in
most electronic applications. There are two types are buzzers that are commonly available. The
one shown here is a simple buzzer which when powered will make a Continuous Beeeeeeppp....
sound, the other type is called a readymade buzzer which will look bulkier than this and will
produce a Beep. Beep. Beep. Sound due to the internal oscillating circuit present inside it. But,
the one shown here is most widely used because it can be customised with help of other circuits
to fit easily in our application. This buzzer can be used by simply powering it using a DC power
supply ranging from 4V to 9V. A simple 9V battery can also be used, but it is recommended to
use a regulated +5V or +6V DC supply. The buzzer is normally associated with a switching
circuit to turn ON or turn OFF the buzzer at required time and require interval.

When current is applied to the buzzer it causes the ceramic disk to


contract or expand. Changing the This then causes the surrounding disc to vibrate. That’s the
sound that you hear. By changing the frequency of the buzzer, the speed of the vibrations
changes, which changes the pitch of the resulting sound.

Fig 2.10 Buzzer

Dept. of ECE, ACSCE Page 12


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

2.1.8 PIR Sensor

A passive infrared sensor (PIR sensor) is an electronic sensor that


measures infrared (IR) light radiating from objects in its field of view. They are most often used
in PIR-based motion detectors. PIR sensors are commonly used in security alarms and
automatic lighting applications. PIR sensors detect general movement, but do not give
information on who or what moved. For that purpose, an imaging IR sensor is required. PIR
sensors are commonly called simply "PIR", or sometimes "PID", for "passive infrared detector".
The term passive refers to the fact that PIR devices do not radiate energy for detection purposes.
They work entirely by detecting infrared radiation (radiant heat) emitted by or reflected from
objects.

2.11 PIR Sensor

Dept. of ECE, ACSCE Page 13


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

2.1.9 Tinker CAD


Tinkercad is a browser-based 3D design and modeling program created
to provide a way for a variety of users (beginners to experts) to create projects. Conventional
CAD software options are not only expensive, but they’re also often quite complicated to learn.
These programs often have many features, that you won’t even use for something as simple as
a custom case. While they are great for professional users, makers will more likely be happy
with Tinkercad, which I regularly use. It’s not only free but also very easy to learn and to use.

Tinkercad is a free online collection of software tools that help people


all over the world think, create and make.The software consists of various components to design
a circuit and contains code blocks.The Tinkercad code blocks a visual blocks we can drag-and-
drop to create Arduino programs.Using the Tinkercad Circuits simulator, we can test any code
we create directly in the browser, before we build and program our devices with real physical
components.

2.12 Tinker CAD

Dept. of ECE, ACSCE Page 14


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

CHAPTER 3

TASK PERFORMED

3.1 Home Automation using Tinker CAD


A home automation system will monitor and control home attributes.
The proposed system is designed in Tinkercad online simulator. The system implements a smart
home which provides greater benefit over the traditional home.

The proposed system consists of slide switch, photo resistor, LED,


temperature sensor (TMP 36), DC Motor, PIR sensor and buzzer, all interfaced to Arduino
UNO. The system comprises LED which is automated using photo resistor, Speed of the fan
can be controlled using temperature sensor. In this project we have assumed DC Motor to
represent fan. This system also implements PIR sensor for the motion detection of the object.
The motion detection is given an alert using a buzzer.

3.2 Proposed System

Fig 3.1 Block Diagram of Proposed Diagram

Dept. of ECE, ACSCE Page 15


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

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.

 Automate fan using temperature sensor.

 Secure a room using PIR sensor.

3.3 Circuit Diagram

Fig 3.2 Circuit Diagram of proposed system

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.

Dept. of ECE, ACSCE Page 16


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

 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.

 DC Motor : DC motor has 2 terminals. Terminal 1 is grounded. Terminal 2 is connected to


the digital pin 5 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.

Fig 3.3 Working of A proposed System using Flow chart

Dept. of ECE, ACSCE Page 17


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

Working of A Proposed System


 Figure 3.4 shows the working of the proposed system using Flow Chart.

 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.

Dept. of ECE, ACSCE Page 18


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

CHAPTER 4

REFLECTION

During the course of internship, the basic fundamentals of


Embedded C language have been learnt and efficiently used it to program Arduino UNO
which is programmable with the Arduino IDE (Integrated Development Environment). Also,
an in depth of knowledge of working and application of tinkercad software. Tinkercad is a
free online service for creating basic 3D shapes and developing digital prototypes of electronic
components. These prototypes include basic circuits with LED lights, buzzers, switches, and
even light sensors.

Interfacing is the process of connecting devices together so that


they can exchange the information. During the course various devices were interfaced with
Arduino, like LEDs, LDR, PIR Sensor, DC Motor (which is a open source IoT platform),
TMP36, Buzzer. TMP36 is a temperature sensor, which is used to control the speed of the fan
based on the surrounding temperature and PIR sensor was used to control the speed of the fan
based on the surrounding temperature and PIR Sensor was used to ensure the security of the
secret room. By working on such modules and different integrated circuits, the data sheet, pin
description and the specifications have been thoroughly studied.

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.

Dept. of ECE, ACSCE Page 19


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

Interfacing

4.1 Arduino UNO with PIR sensor and Buzzer

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

Dept. of ECE, ACSCE Page 20


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

4.2 Multiple LED and Potentiometer with Arduino

Fig 4.3 Interfacing Multiple LED and potentiometer with Arduino

 Fig 4.3 Shows the circuit diagram of interfacing multiple LEDs and arduino with the arduino.

 When the potentiometer is varied to vary the voltage range.

 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 from three to four volts LED 3 IS ON .

 When the voltage ranges above four volts all the LED are ON.

Fig 4.4 Output when voltage is maximum, when LED is on

Dept. of ECE, ACSCE Page 21


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

4.3 Multiple LED and Switch with Arduino

Fig 4.5 Interfacing multiple LED and switch with Arduino

Figure 4.5 shows the interfacing multiple LED and switch to the Arduin UNO.

 If switch is pressed, LED1 is OFF and LED2 is ON.

 If switch is not pressed, LED1 is ON and LED2 is OFF.

Fig 4.6 Output of LED when Switch is operated and not operated

Dept. of ECE, ACSCE Page 22


HOME AUTOMATION USING EMBEDDED SYSTEM AND C 2020-2021

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.

Experience in designing embedded systems based on the user


requirements, hardware specifications and software specifications have been gained.
Troubleshooting problems faced such as interfacing non-compatible devices or modules, code
debugging based errors occurred, integration of different modules together and controlling them
using a single microcontroller. The internship provides with enough knowledge so that it would
be helpful in developing different projects based on the problem description stated.

These experiences and learning will be very much helpful to get


through selection process of companies which work in embedded systems domain and also to
carry out industry standard projects in future.

Dept. of ECE, ACSCE Page 23

You might also like