Beruflich Dokumente
Kultur Dokumente
Foremost of all, I express my sincere indebtedness to the “Almighty”, for bestowing me with
favourable circumstances and kept me in high spirits.
I am thankful to Ms. DEEPTI, HOD, ECE for her support, cooperation and motivation provided
to me during training for constant inspiration, presence and blessings.
I am also thankful to Indovision institution as a whole that is doing yeoman’s service by teaching
the learner with the computer, networking and hardware knowledge that is the need of the day.
Last but not the least, I thank all my classmates at Indovision for extending kind co-operation.
RAVI SAGWAL
(1214078)
1
ABSTRACT
Automation is a trending topic in the 21st century making it play an important role in our
daily lives. The main attraction of any automated system is reducing human labour, effort, time
and errors due to human negligence. With the development of modern technology, smart phones
have become a necessity for every person on this planet. Applications are being developed on
Android systems that are useful to us in various ways. Combining all of these, our paper presents
a micro controller based Android controlled home automation system using smart phones. Such
a system will enable users to have control over every appliance in his/her home with their Phone.
All that the user needs is an Android smart phone, which is present in almost everybody’s hand
nowadays, and a control circuit. The control circuit consists of an microcontroller, which
processes the user commands and controls the switching of devices. The connection between the
microcontroller and the Smartphone is established via Bluetooth, a widespread wireless
technology used for sharing data.
2
LIST OF FIGURES PAGE NO.
3
CONTENTS PAGE NO.
1. INTRODUCTION 5
1.1. BLOCK DIAGRAM 6
1.2. ANDROID MOBILE PHONE 6
1.3. BLUETOOTH MODULE 7
1.4. RELAY BOARDS 8
2. HARDWARE REQUIREMENTS 9
3.1 TRANSFORMERS 9
3.2 VOLTAGE REGULATOR (LM7805) 11
3.3 RECTIFIER 14
3.4 FILTER 14
3.5 MICROCONTROLLER (AT89S52/C51) 15
3.6 LED 23
3.7 BC 547 28
3.8 1N4007 29
3.9 RESISTOR 31
3.10 CAPACITOR 34
3.11 BLUETOOTH MODULE HC-05 38
3.12 RELAY 39
3. SCHEMATIC DIAGRAM 40
3.1 DESCRIPTION 44
3.2 OPERATION EXPLANATION 45
4. CONCLUSION 47
5. BIBLIOGRAPHY 48
4
INTRODUCTION
The foremost aim of technology has been to increase efficiency and decrease effort. With
the advent of ‘Internet of Things’ in the last decade, we have been pushing for ubiquitous
computing in all spheres of life. It thus is of extreme importance to simplify human interfacing
with technology. Automation is one such area that aims that achieves simplicity whilst increasing
efficiency. Android controlled House Automation System aims to further the cause of automation
so as to achieve the goal of simplicity.
The primitive man realized that an effective way to communicate with one another is
through voice. With minimum effort, ideas could be narrated with relative ease. When the first
computers came around, achieving the level of sophistication so as to narrate commands using
voice to a machine was only realized in science fiction. However with tremendous breakthroughs
in the field, we are at the precipice of truly using voice to interface with devices.
Using this effective yet ingrained form of communication we would humanize technology
to a great extent. Voice controlled House Automation System deploys the use of voice to control
devices.
The advantages of using voice as an interfacing medium are multifold. Firstly we would
do away with or significantly decrease the need of training for operating technology. Secondly,
the simplification of services would entail a wider adoption of existing technology and would help
people with varied disabilities access the same technology. We have deployed an Android
Application as user front end primarily because of the ease at which the platform provides us with
means to use complex technology and due to the widespread adoption in the mobile industry.
Android is being used as the operating system for over 80% of the smartphones.
5
Block Diagram
The Android-operated Android Home automation system uses an Android based Bluetooth
enabled phone for its application and the 8051 as the microcontroller. The key components of this
system are:
2. Bluetooth module
3. Relay boards
As the button is tapped and the a command is given to switch the corresponding device on/off. The
Android interface converts the pressed button to signal. The Bluetooth adapter present in the phone
is configured to send this signal to the Bluetooth module on the Microcontroller board that would
in turn control the electrical appliances through the relay boards.
Bluetooth Module
Bluetooth is a wireless technology standard for exchanging data over short distances (using short-
wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from fixed and mobile
devices, and building personal area networks (PANs). The Bluetooth module being used allows us
to transmit and receive signals. It receives the text from the Android phone and transmits it to the
serial port of the Microcontroller.
7
The Bluetooth module being used here is the HC‐05 module. It is an easy to use Bluetooth SPP
(Serial Port Protocol) module, designed for transparent wireless serial connection setup. Serial port
Bluetooth module is fully qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps
Modulation with complete 2.4GHz radio transceiver and baseband. It uses CSR Bluecore 04‐
External single chip Bluetooth system with CMOS technology and with AFH (Adaptive Frequency
Hopping Feature). It has a slave default Baud rate of 9600. It auto connects to the last device on
power as default. Pairing pin code is “1234” as default.
Relay Boards
A relay is an electromagnetic switch. In other words it is activated when a current is applied to it.
Normally a relay is used in a circuit as a type of switch there are different types of relays and they
operate at different voltages. When a circuit is built the voltage that will trigger it has to be
considered. In this project the relay circuit is used to turn the appliances on/off. The high/low
signal is supplied from the microcontroller. When a low voltage is given to the relay of an
appliance it is turned off and when a high voltage is given it is turned on. The relay circuit to drive
three appliances in the Voiceoperated Android Home automation system is shown below. The
number of appliances can be modified according to the user’s requirements.
8
HARDWARE REQUIREMENTS
HARDWARE COMPONENTS
3.1 - TRANSFORMER
Transformers convert AC electricity from one voltage to another with a little loss of power. Step-
up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use
a step-down transformer to reduce the dangerously high voltage to a safer low voltage.
9
The input coil is called the primary and the output coil is called the secondary. There is no
electrical connection between the two coils; instead they are linked by an alternating magnetic
field created in the soft-iron core of the transformer. The two lines in the middle of the circuit
symbol represent the core. Transformers waste very little power so the power out is (almost) equal
to the power in. Note that as voltage is stepped down and current is stepped up.
The ratio of the number of turns on each coil, called the turn’s ratio, determines the ratio
of the voltages. A step-down transformer has a large number of turns on its primary (input) coil
which is connected to the high voltage mains supply, and a small number of turns on its secondary
(output) coil to give a low output voltage.
TURNS RATIO = (Vp / Vs) = ( Np / Ns )
Where,
Vp = primary (input) voltage.
Vs = secondary (output) voltage
Np = number of turns on primary coil
Ns = number of turns on secondary coil
Ip = primary (input) current
Is = secondary (output) current.
Ideal power equation
10
The ideal transformer as a circuit element
If the secondary coil is attached to a load that allows current to flow, electrical power is transmitted
from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly efficient; all
the incoming energy is transformed from the primary circuit to the magnetic field and into the
secondary circuit. If this condition is met, the incoming electric power must equal the outgoing
power:
If the voltage is increased, then the current is decreased by the same factor. The impedance in one
circuit is transformed by the square of the turns ratio. For example, if an impedance Zs is attached
across the terminals of the secondary coil, it appears to the primary circuit to have an impedance
of (Np/Ns)2Zs. This relationship is reciprocal, so that the impedance Zp of the primary circuit appears
to the secondary to be (Ns/Np)2Zp.
Features
• Output Current up to 1A.
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V.
• Thermal Overload Protection.
• Short Circuit Protection.
• Output Transistor Safe Operating Area Protection.
11
Description
The LM78XX/LM78XXA series of three-terminal positive regulators are available in the
TO-220/D-PAK package and with several fixed output voltages, making them useful in a Wide
range of applications. Each type employs internal current limiting, thermal shutdown and safe
operating area protection, making it essentially indestructible. If adequate heat sinking is provided,
they can deliver over 1A output Current. Although designed primarily as fixed voltage regulators,
these devices can be used with external components to obtain adjustable voltages and currents.
12
Internal Block Diagram
13
3.3 - RECTIFIER
A rectifier is an electrical device that converts alternating current (AC), which periodically
reverses direction, to direct current (DC), current that flows in only one direction, a process known
as rectification. Rectifiers have many uses including as components of power supplies and as
detectors of radio signals. Rectifiers may be made of solid statediodes, vacuum tube diodes,
mercury arc valves, and other components. The output from the transformer is fed to the rectifier.
It converts A.C. into pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In
this project, a bridge rectifier is used because of its merits like good stability and full wave
rectification. In positive half cycleonly two diodes( 1 set of parallel diodes) will conduct, in
negative half cycle remaining two diodes will conduct and they will conduct only in forward bias
only.
3.4 - FILTER
Capacitive filter is used in this project. It removes the ripples from the output of rectifier and
smoothens the D.C. Output received from this filter is constant until the mains voltage and load
is maintained constant. However, if either of the two is varied, D.C. voltage received at this point
changes. Therefore a regulator is applied at the output stage.
14
The simple capacitor filter is the most basic type of power supply filter. The use of this
filter is very limited. It is sometimes used on extremely high-voltage, low-current power supplies
for cathode-ray and similar electron tubes that require very little load current from the supply. This
filter is also used in circuits where the power-supply ripple frequency is not critical and can be
relatively high. Below figure can show how the capacitor changes and discharges.
Introduction:
Features:
16
Block Diagram of AT89S52:
17
Pin Configurations of AT89S52
Pin Description:
VCC:
Supply voltage.
GND:
Ground.
18
Port 0:
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink
eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance
inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during
accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also
receives the code bytes during Flash programming and outputs the code bytes during program
verification. External pull-ups are required during program verification.
Port 1:
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal
pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured
to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input
(P1.1/T2EX).
Port 2:
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal
pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte
during fetches from external program memory and during accesses to external data memory that
use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups
when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @
RI), Port 2 emits the contents of the P2 Special Function Register.
Port 3:
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal
19
pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will
source current (IIL) because of the pull-ups.
RST:
Reset input. A high on this pin for two machine cycles while the oscillator is running resets
the device. This pin drives high for 98 oscillator periods after the Watchdog times out. The
DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state
of bit DISRTO, the RESET HIGH out feature is enabled.
ALE/PROG:
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG) during Flash
programming.
In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be
used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during
each access to external data memory.
PSEN:
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external data
memory.
EA/VPP:
External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up to FFFFH. Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be
strapped to VCC for internal program executions. This pin also receives the 12-volt programming
enable voltage (VPP) during Flash programming.
20
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2:
Output from the inverting oscillator amplifier.
Oscillator Characteristics:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which
can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or
ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should
be left unconnected while XTAL1 is driven as shown in Figure 6.2. There are no requirements on
the duty cycle of the external clock signal, since the input to the internal clocking circuitry is
through a divide-by-two flip-flop, but minimum and maximum voltage high and low time
specifications must be observed.
21
FIG 4.5.4: External Clock Drive Configuration
Idle Mode
In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The mode
is invoked by software. The content of the on-chip RAM and all the special functions registers
remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or
by a hardware reset.
Power down Mode
In the power down mode the oscillator is stopped, and the instruction that invokes power
down is the last instruction executed. The on-chip RAM and Special Function Registers retain
their values until the power down mode is terminated. The only exit from power down is a
hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should
not be activated before VCC is restored to its normal operating level and must be held active long
enough to allow the oscillator to restart and stabilize.
22
3.6 - LED’S
LEDs are semiconductor devices. Like transistors, and other diodes, LEDs are made out of silicon.
What makes an LED give off light are the small amounts of chemical impurities that are added to
the silicon, such as gallium, arsenide, indium, and nitride.
When current passes through the LED, it emits photons as a byproduct. Normal light bulbs
produce light by heating a metal filament until it is white hot. LEDs produce photons directly and
not via heat, they are far more efficient than incandescent bulbs.
Not long ago LEDs were only bright enough to be used as indicators on dashboards or
electronic equipment. But recent advances have made LEDs bright enough to rival traditional
lighting technologies. Modern LEDs can replace incandescent bulbs in almost any application.
Types of LED’S
LEDs are produced in an array of shapes and sizes. The 5 mm cylindrical package is the most
common, estimated at 80% of world production. The color of the plastic lens is often the same as the
actual color of light emitted, but not always. For instance, purple plastic is often used for infrared LEDs,
and most blue devices have clear housings. There are also LEDs in extremely tiny packages, such as
those found on blinkers and on cell phone keypads. The main types of LEDs are miniature, high power
devices and custom designs such as alphanumeric or multi-color.
23
Fig 4.2.4(c) Different types of LED’S
White LED’S
Light Emitting Diodes (LED) have recently become available that are white and bright, so
bright that they seriously compete with incandescent lamps in lighting applications. They are still
pretty expensive as compared to a GOW lamp but draw much less current and project a fairly well
focused beam.
The diode in the photo came with a neat little reflector that tends to sharpen the beam a
little but doesn't seem to add much to the overall intensity.
When run within their ratings, they are more reliable than lamps as well. Red LEDs are
now being used in automotive and truck tail lights and in red traffic signal lights. You will be able
to detect them because they look like an array of point sources and they go on and off instantly as
compared to conventional incandescent lamps.
24
LEDs are monochromatic (one color) devices. The color is determined by the band gap of
the semiconductor used to make them. Red, green, yellow and blue LEDs are fairly common.
White light contains all colors and cannot be directly created by a single LED. The most common
form of "white" LED really isn't white. It is a Gallium Nitride blue LED coated with a phosphor
that, when excited by the blue LED light, emits a broad range spectrum that in addition to the blue
emission, makes a fairly white light.
There is a claim that these white LED's have a limited life. After 1000 hours or so of
operation, they tend to yellow and dim to some extent. Running the LEDs at more than their rated
current will certainly accelerate this process.
There are two primary ways of producing high intensity white-light using LED’S. One is
to use individual LED’S that emit three primary colours—red, green, and blue—and then mix all
the colours to form white light. The other is to use a phosphor material to convert monochromatic
light from a blue or UV LED to broad-spectrum white light, much in the same way a fluorescent
25
light bulb works. Due to metamerism, it is possible to have quite different spectra that appear
white.
Efficiency:
LEDs produce more light per watt than incandescent bulbs; this is useful in battery
powered or energy-saving devices.
Size:
LEDs can be very small (smaller than 2 mm2) and are easily populated onto printed
circuit boards.
On/Off time:
LEDs light up very quickly. A typical red indicator LED will achieve full brightness
in microseconds. LEDs used in communications devices can have even faster
response times.
Cycling:
LEDs are ideal for use in applications that are subject to frequent on-off cycling,
unlike fluorescent lamps that burn out more quickly when cycled frequently, or
HID lamps that require a long time before restarting.
Cool light:
In contrast to most light sources, LEDs radiate very little heat in the form of IR
that can cause damage to sensitive objects or fabrics. Wasted energy is dispersed as
heat through the base of the LED.
Lifetime:
LEDs can have a relatively long useful life. One report estimates 35,000 to 50,000
hours of useful life, though time to complete failure may be longer.
No Toxicity:
LEDs do not contain mercury, unlike fluorescent lamps.
26
Disadvantages of using LEDs
High price:
LEDs are currently more expensive, price per lumen, on an initial capital cost basis,
than most conventional lighting technologies.
Temperature dependence:
LED performance largely depends on the ambient temperature of the operating
environment. Over-driving the LED in high ambient temperatures may result in
overheating of the LED package, eventually leading to device failure.
Voltage sensitivity:
LEDs must be supplied with the voltage above the threshold and a current below
the rating. This can involve series resistors or current-regulated power supplies.
Area light source:
Blue Hazard:
There is increasing concern that blue LEDs and cool-white LEDs are now capable
of exceeding safe limits of the so-called blue-light hazard as defined in eye safety.
27
3.7 - BC547
TECHNICAL SPECIFICATIONS:
The BC547 transistor is an NPN Epitaxial Silicon Transistor. The BC547 transistor is a
general-purpose transistor in small plastic packages. It is used in general-purpose switching and
amplification BC847/BC547 series 45 V, 100 mA NPN general-purpose transistors.
28
An NPN Transistor Configuration
3.8 - 1N4007
Diodes are used to convert AC into DC these are used as half wave rectifier or full wave
rectifier. Three points must he kept in mind while using any type of diode.
1.Maximum forward current capacity
2.Maximum reverse voltage capacity
3.Maximum forward voltage capacity
29
Diodes of number IN4001, IN4002, IN4003, IN4004, IN4005, IN4006 and IN4007 have
maximum reverse bias voltage capacity of 50V and maximum forward current capacity of 1 Amp.
Diode of same capacities can be used in place of one another. Besides this diode of more
capacity can be used in place of diode of low capacity but diode of low capacity cannot be used in
place of diode of high capacity. For example, in place of IN4002; IN4001 or IN4007 can be used
but IN4001 or IN4002 cannot be used in place of IN4007.The diode BY125made by company
BEL is equivalent of diode from IN4001 to IN4003. BY 126 is equivalent to diodes IN4004 to
4006 and BY 127 is equivalent to diode IN4007.
PN JUNCTION OPERATION
Now that you are familiar with P- and N-type materials, how these materials are joined
together toform a diode, and the function of the diode, let us continue our discussion with the
operation of the PNjunction. But before we can understand how the PN junction works, we must
first consider current flow inthe materials that make up the junction and what happens initially
within the junction when these twomaterials are joined together.
30
Current Flow in the N-Type Material
Current flow through the P-type material is illustrated. Conduction in the P material isby
positive holes, instead of negative electrons. A hole moves from the positive terminal of the P
materialto the negative terminal. Electrons from the external circuit enter the negative terminal of
the material andfill holes in the vicinity of this terminal. At the positive terminal, electrons are
removed from the covalentbonds, thus creating new holes. This process continues as the steady
stream of holes (hole current) movestoward the negative terminal
3.9 - RESISTORS
V = IR
Resistors are used as part of electrical networks and electronic circuits. They are extremely
commonplace in most electronic equipment. Practical resistors can be made of various compounds
and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).
31
The primary characteristics of resistors are their resistance and the power they can
dissipate. Other characteristics include temperature coefficient, noise, and inductance. Less well-
known is critical resistance, the value below which power dissipation limits the maximum
permitted current flow, and above which the limit is applied voltage. Critical resistance depends
upon the materials constituting the resistor as well as its physical dimensions; it's determined by
design.
Resistors can be integrated into hybrid and printed circuits, as well as integrated circuits.
Size, and position of leads (or terminals) are relevant to equipment designers; resistors must be
physically large enough not to overheat when dissipating their power.
Resistors are common elements of electrical networks and electronic circuits and are
ubiquitous in most electronic equipment. Practical resistors can be made of various compounds
32
and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome).
Resistors are also implemented within integrated circuits, particularly analog devices, and can also
be integrated into hybrid and printed circuits.
The electrical functionality of a resistor is specified by its resistance: common commercial
resistors are manufactured over a range of more than 9 orders of magnitude. When specifying that
resistance in an electronic design, the required precision of the resistance may require attention to
the manufacturing tolerance of the chosen resistor, according to its specific application. The
temperature coefficient of the resistance may also be of concern in some precision applications.
Practical resistors are also specified as having a maximum power rating which must exceed the
anticipated power dissipation of that resistor in a particular circuit: this is mainly of concern in
power electronics applications. Resistors with higher power ratings are physically larger and may
require heat sinking. In a high voltage circuit, attention must sometimes be paid to the rated
maximum working voltage of the resistor.
The series inductance of a practical resistor causes its behavior to depart from ohms law;
this specification can be important in some high-frequency applications for smaller values of
resistance. In a low-noise amplifier or pre-amp the noise characteristics of a resistor may be an
issue. The unwanted inductance, excess noise, and temperature coefficient are mainly dependent
on the technology used in manufacturing the resistor. They are not normally specified individually
for a particular family of resistors manufactured using a particular technology. A family of discrete
resistors is also characterized according to its form factor, that is, the size of the device and position
of its leads (or terminals) which is relevant in the practical manufacturing of circuits using them.
Units
The ohm (symbol: Ω) is the SI unit of electrical resistance, named after Georg Simon Ohm.
An ohm is equivalent to a volt per ampere. Since resistors are specified and manufactured over a
very large range of values, the derived units of milliohm (1 mΩ = 10−3 Ω), kilohm (1 kΩ = 103 Ω),
and megohm (1 MΩ = 106 Ω) are also in common usage.
The reciprocal of resistance R is called conductance G = 1/R and is measured in Siemens
(SI unit), sometimes referred to as a mho. Thus a Siemens is the reciprocal of an ohm: S = Ω − 1.
33
Although the concept of conductance is often used in circuit analysis, practical resistors are always
specified in terms of their resistance (ohms) rather than conductance.
VARIABLE RESISTORS
Adjustable resistors
A resistor may have one or more fixed tapping points so that the resistance can be changed
by moving the connecting wires to different terminals. Some wire wound power resistors have a
tapping point that can slide along the resistance element, allowing a larger or smaller part of the
resistance to be used.
Where continuous adjustment of the resistance value during operation of equipment is
required, the sliding resistance tap can be connected to a knob accessible to an operator. Such a
device is called a rheostat and has two terminals.
3.10 - CAPACITORS
A capacitor or condenser is a passive electronic component consisting of a pair of conductors
separated by a dielectric. When a voltage potential difference exists between the conductors, an
electric field is present in the dielectric. This field stores energy and produces a mechanical force
between the plates. The effect is greatest between wide, flat, parallel, narrowly separated
conductors.
An ideal capacitor is characterized by a single constant value, capacitance, which is
measured in farads. This is the ratio of the electric charge on each conductor to the potential
difference between them. In practice, the dielectric between the plates passes a small amount of
leakage current. The conductors and leads introduce an equivalent series resistance and the
dielectric has an electric field strength limit resulting in a breakdown voltage.
The properties of capacitors in a circuit may determine the resonant frequency and quality factor
of a resonant circuit, power dissipation and operating frequency in a digital logic circuit, energy
capacity in a high-power system, and many other important aspects.
34
A capacitor (formerly known as condenser) is a device for storing electric charge. The
forms of practical capacitors vary widely, but all contain at least two conductors separated by a
non-conductor. Capacitors used as parts of electrical systems, for example, consist of metal foils
separated by a layer of insulating film.
Capacitors are widely used in electronic circuits for blocking direct current while allowing
alternating current to pass, in filter networks, for smoothing the output of power supplies, in the
resonant circuits that tune radios to particular frequencies and for many other purposes.
A capacitor is a passiveelectronic component consisting of a pair of conductors separated
by a dielectric (insulator). When there is a potential difference (voltage) across the conductors, a
static electric field develops in the dielectric that stores energy and produces a mechanical force
between the conductors. An ideal capacitor is characterized by a single constant value, capacitance,
measured in farads. This is the ratio of the electric charge on each conductor to the potential
difference between them.
The capacitance is greatest when there is a narrow separation between large areas of
conductor, hence capacitor conductors are often called "plates", referring to an early means of
construction. In practice the dielectric between the plates passes a small amount of leakage
35
currentand also has an electric field strength limit, resulting in a breakdown voltage, while the
conductors and leads introduce an undesired inductance and resistance.
Theory of operation
Capacitance
36
surfaces, and the dielectric develops an electric field. In SI units, a capacitance of one farad means
that one coulomb of charge on each conductor causes a voltage of one volt across the device.
The capacitor is a reasonably general model for electric fields within electric circuits. An ideal
capacitor is wholly characterized by a constant capacitance C, defined as the ratio of charge ±Q
on each conductor to the voltage V between them:
Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to vary. In
this case, capacitance is defined in terms of incremental changes:
Energy storage
Work must be done by an external influence to "move" charge between the conductors in a
capacitor. When the external influence is removed the charge separation persists in the electric
field and energy is stored to be released when the charge is allowed to return to its equilibrium
position. The work done in establishing the electric field, and hence the amount of energy stored,
is given by:
Current-voltage relation
The current i(t) through any component in an electric circuit is defined as the rate of flow of a
charge q(t) passing through it, but actual charges, electrons, cannot pass through the dielectric
layer of a capacitor, rather an electron accumulates on the negative plate for each one that leaves
the positive plate, resulting in an electron depletion and consequent positive charge on one
electrode that is equal and opposite to the accumulated negative charge on the other. Thus the
charge on the electrodes is equal to the integral of the current as well as proportional to the voltage
as discussed above. As with any antiderivative, a constant of integration is added to represent the
initial voltage v (t0). This is the integral form of the capacitor equation,
37
Taking the derivative of this, and multiplying by C, yields the derivative form,
.
The dual of the capacitor is the inductor, which stores energy in the magnetic field rather than the
electric field. Its current-voltage relation is obtained by exchanging current and voltage in the
capacitor equations and replacing C with the inductance L.
HC-05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module, designed for
transparent wireless serial connection setup.
Serial port Bluetooth module is fully qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps
Modulation with complete 2.4GHz radio transceiver and baseband. It uses CSR Bluecore 04-
External single chip Bluetooth system with CMOS technology and with AFH(Adaptive Frequency
Hopping Feature).
Hardware Features
38
5. UART interface with programmable baud rate
6. With integrated antenna
7. With edge connector
Software Features
Default Baud rate: 38400, Data bits:8, Stop bit:1,Parity:No parity, Data control: has.
are paired, red and blue led blinks 1time/2s in interval, while disconnected only blue led blinks
2times/s.
3.12 - RELAY
A relay is an electrically operated switch. Many relays use an electromagnet to
mechanically operate a switch, but other operating principles are also used, such as solid-state
relays. Relays are used where it is necessary to control a circuit by a low-power signal (with
complete electrical isolation between control and controlled circuits), or where several circuits
must be controlled by one signal. The first relays were used in long distance telegraph circuits as
amplifiers: they repeated the signal coming in from one circuit and re-transmitted it on another
circuit. Relays were used extensively in telephone exchanges and early computers to perform
logical operations.
3. SCHEMATIC DIAGRAM
39
4.1 - SCHEMATIC EXPLANATION
40
POWER SUPPLY
There are many types of power supply. Most are designed to convert high voltage AC mains
electricity to a suitable low voltage supply for electronics circuits and other devices. A power
supply can by broken down into a series of blocks, each of which performs a particular function.
Power supplies made from these blocks are described below with a circuit diagram and a graph
of their output:
Transformer only
The low voltage AC output is suitable for lamps, heaters and special AC motors. It
is not suitable for electronic circuits unless they include a rectifier and a smoothing capacitor.
41
Transformer + Rectifier
The varying DC output is suitable for lamps, heaters and standard motors. It is not suitable for
electronic circuits unless they include a smoothing capacitor.
The smooth DC output has a small ripple. It is suitable for most electronic circuits.
The regulated DC output is very smooth with no ripple. It is suitable for all electronic circuits.
42
STANDARD CONNECTIONS TO 8051 SERIES MICRO
CONTROLLER
ATMEL series of 8051 family of micro controllers need certain standard connections. The
actual number of the Microcontroller could be “89C51” , “89C52”, “89S51”, “89S52”, and as
regards to 20 pin configuration a number of “89C2051”. The 4 set of I/O ports are used based on
the project requirement. Every microcontroller requires a timing reference for its internal program
execution therefore an oscillator needs to be functional with a desired frequency to obtain the timing
reference as t =1/f.
A crystal ranging from 2 to 20 MHz is required to be used at its pin number 18 and 19 for
the internal oscillator. It may be noted here the crystal is not to be understood as crystal oscillator
It is just a crystal, while connected to the appropriate pin of the microcontroller it results in
oscillator function inside the microcontroller. Typically 11.0592 MHz crystal is used in general
for most of the circuits using 8051 series microcontroller. Two small value ceramic capacitors of
33pF each is used as a standard connection for the crystal as shown in the circuit diagram.
RESET
43
For example: A 10µF capacitor and a 10kΩ resistor would render a 100ms time to pin number 9
from logic high to low, there after the pin number 9 remains low.
External Access(EA):
Pin no 31 of 40 pin 8051 microcontroller termed as EA¯ is required to be connected to 5V for
accessing the program form the on-chip program memory. If it is connected to ground then the
controller accesses the program from external memory. However as we are using the internal
memory it is always connected to +5V.
An NPN transistor is "on" when its base is pulled high relative to the emitter. The arrow in the
NPN transistor symbol is on the emitter leg and points in the direction of the conventional current
flow when the device is in forward active mode. Whenever base is high, then current starts flowing
through base and emitter and after that only current will pass from collector to emitter.
44
BRIEF DESCRIPTION OF RELAY SWITCH
Here in above circuit, the transistor is used to act like switch to drive the relay. Now when the
logic 1 is applied at the input of the base of transistor, the transistor gets its biasing and will start
acting like a closed switch. As a result the current will start flowing through the coil of the relay.
The coil gets magnetized and the movable iron plate gets attracted to the coil magnetic field and
hence a connection is established at the output pins of the relay.
45
All the ports of this microcontroller can be used for both inputs and outputs. In our project
we are using port 2 as output port to control the relays. Port 3 is used for multiple functions i.e.
P3.0 is used as input from Bluetooth Module.
Circuit working:
As it is an embedded project, the circuit compilations are reduced with an efficient
program. In the circuit diagram of our purposed design The Bluetooth Module will be waiting for
a connection from an android mobile. When an android mobile phone is connected to the Bluetooth
module, the Bluetooth Module waits for a voice command by the user to the smart phone. The
voice command is converted to the string and given to the Bluetooth module by communication.
The Bluetooth module receives the string and send it to microcontroller through serial port. The
microcontroller than checks the received string by the programand check whether the string
matches the stored command or not. If the command is matched, the controller switches on/offthe
relay respected to the command.The relay is switched on by sending 1 or 0 to the transistor
connected to the relay.
46
CONCLUSION
The proposed project undertakes a viable solution the need of automation at the very basic level,
that is, in our homes. The project will enable us to bring every appliance at every corner of our
home under our control from a single point without having to get up and manually switch on or
off the appliance. The use of a Bluetooth module assists the use of this system from various
locations in our house.
The system is further simplified by allowing appliances to be controlled by buttons. The user need
not have to have to immense knowledge over Embedded System. Just by pressing the respective
appliance button and switch on or off will enable the user to have complete control over any
appliance without any effort.
Android applications are very simple and user friendly allowing the user to understand its
functionalities in very little time. Hence, the use of android application in this system allows a user
to easily learn the process and get accustomed to the functions. Moreover, the entire system is very
flexible and scalable. Any number of appliances can be added as and when required. Hence, the
systems finds use not only in houses but also in many offices where appliances such as fans or
lights on multiple floors can be controlled by a person on any of the floors, saving manual labour
and human effort to switch on or off the electronic appliances, thereby saving time.
This system, though primarily aimed to reduce human effort, will be of much importance to old
aged people and physically handicapped people. It will enable them to control their home devices
with ease, without going through much pressure or stress of moving about.
Due to the inexpensive materials used in the construction and further cost optimization if the device
is taken to the market, it finds application in a wide area. Scalability of the project would be
considerably easier as the device can be used in every building using electrical appliances and
devices.
47
BIBLIOGRAPHY
1. “The 8051 Microcontroller and Embedded systems” by Muhammad Ali Mazidi and Janice
Gillispie Mazidi , Pearson Education.
http://www.electronica60norte.com/mwfls/pdf/newBl uetooth.pdf
http://electronicsclub.info/powersupplies.htm
http://wiki.iteadstudio.com/Serial_Port_Bluetooth_Module_(Master/Slave)_:_HC-05
http://research.ijcaonline.org/volume121/number15/pxc3904904.pdf
48