Você está na página 1de 55

Android Based Device Controlling Using Bluetooth

Abstract:

With the development of modern technology and Android Smartphone, Smart Living is
gradually changing people’s life. Bluetooth technology, which aims to exchange data wirelessly
in a short distance using short-wavelength radio transmissions, is providing a necessary
technology to create convenience, intelligence and controllability. In this project, a new Smart
Living system called device control system using Bluetooth-based Android Smartphone is
proposed and prototyped. First Smartphone, Smart Living and Bluetooth technology are
reviewed. Second the system architecture, communication protocol and hardware design are
described. Then the design of a Bluetooth-based Smartphone application and the prototype are
presented. It is shown that Android Smartphone can provide a platform to implement Bluetooth
based application for Smart Living.
Introduction:

In this modern era of development, automation of everything is the need of the hour. The
basic aim of any development is to ease the human life. The system aims at automating the
human lives. Activating the home appliances without conventional switch but by using a smart
phone is known as automation. In present day world, more emphasis is put on wireless
technology. It is because; wired networks are messy and really complicated. These wireless
technologies have impacted human life in a positive manner and human development speed has
increased fore fold. Our proposed project aims to have control over the Ac power applied to a
load by controlling the firing angle of a thyristor. In comparison to various methods this method
is quite effective to control such a power supply.
The main wireless technologies used in home automation are GSM, Internet, Cloud and
Bluetooth. Each technology has its own advantages and disadvantages. But Bluetooth based
home automation systems have way more advantages. Devices can be connected from a range of
10m to 100m and this range can be increased by using piconet architecture. Also the frequency
used for Bluetooth is 2.4GHz, which is globally available. The speed that can be fetched for
Bluetooth services is up to 3Mbps. It is these basic advantages that have driven us to the idea of
developing a Bluetooth based automation system.

The android interface required for sending commands can be sent through any android
based phone/tab or any device running on android OS. The system makes use of a waveform
zero crossing point that is detected by a comparator and the output of this is fed to the
comparator. The microcontroller is programmed to delay triggering control my making use of an
opto-isolator interface to a pair of SCR’s. The power through the SCR’s is then applied to the
load.

The project makes use of an 8051 microcontroller for the operation. The commands sent
via android device are received by a Bluetooth receiver mounted on the circuit. The receiver then
processes the commands and sends it to the microcontroller for further processing. A lamp is
used to demonstrate as an induction motor. The lamp intensity is varied as per the commands to
simulate as induction motor speed.
PROJECT OVERVIEW:

This project is aims to control the electrical appliances using simple GUI through the
smart phone so that user can control their household electrical appliances easily through their
mobile phones. This project is the renovation from the current system where the remote control
has been used to manage their electrical appliances. Besides that, by inventing this project it can
help the disable people like weak and old folk which are not able to handle their own self can
undergo their routine easier. This project has divided to two main part or categories which are
software development consist a recognition system and hardware development consist serial
port, voltage regulator circuit and interface circuit as a main component that control overall
electrical appliances. The interface circuit consists of a microcontroller, will be used to be a
central processing unit. Depending on various manufactures, microcontroller is divided into
several categories depend on their data bus size i.e. 8-bit, 16-bit, 32-bit etc. For this project it will
use 8-bit microcontroller 8051.

It also functions as switches where it will control the operation of household electrical
appliances. According to the usage of Android system nowadays, it make microelectronic and
integrated circuit technology have been more valuable and greater so that it become the most
needed or demanding technology around the world today. The microelectronic technology that
has be mentioned is refer to the controller which was invented to be the brain in the chips. By
using the controller, it also can simplify the complex circuit and other component connection and
then reduced the project cost.
OBJECTIVES:

As mentioned in the project overview, this project is aims to control the electrical
appliances using android phone so that user can control their electrical appliances easily through
their personal mobiles. For this project it will cover four main objectives as a target to be
achieves which are:-

To design a prototype circuit of the electrical appliances.

To design and built the interfacing circuit and understand its functionality and make it connected
to electrical appliances and android cell phones.

To create a simple Graphical User Interface (GUI) for user usage.

To monitor and analysis the project performance.

For this project application, it will use a prototype circuit of the electrical appliances to
consider as an output. Regarding to the project level as a final year project, the real wiring
system of the household electrical appliances will not be built but the prototype circuit will be
use to observe the output and its functionality. For the hardware development, as a project
progress the interface circuit will be design and built and it consist of three main components
which are controller, Bluetooth and voltage regulator. However, before proceed on build the
circuit we need to understand how it will be work and its specification to avoid any problem
occur in next procedure and stages. This project also consists of a simple GUI for user usage
where it will' be develop using visual basic programming. This project performance will be the
last objective to be achieve where it performance will be monitor and analyze for their
improvement and weaknesses so that it can be upgraded in the future.
Block Diagram:

POWER RELAY 1 DEVICE 1


SUPPLY

MICROCONTROLLER
RELAY 2 DEVICE 2
BLUETOOTH

RELAY 3 DEVICE 3

Block Diagram Description:

The above schematic diagram of Android Mobile Based Device Controlling Using
Bluetooth explains the interfacing section of each component with micro controller. The block
diagram in figure shows all the major components required for the system. The controlling
device for the whole system is a microcontroller. To control the complete circuit action of the
system 8051 microcontroller is used in this work. Microcontroller and other components
connected in this system require power supply for their function. To fulfill this requirement a
regulated power supply unit is designed as shown in the above diagram. Bluetooth module is
interfaced to the microcontroller. Crystal oscillator connected to 13th and 14th pins of
microcontroller and regulated power supply is also connected to micro controller and LED’s also
connected to micro controller through resistors.

The data received by the module from the phone is fed as input to the controller. The
controller acts accordingly on the relays to switch connected electrical appliances. In this
prototype 3 devices are connected to the controller as shown in block diagram above. These
devices will be connected and controlled with the aid of relays. To control these 3 devices 3
relays are used in the circuit.
To control these devices through an android device like android phone or tablet,
Bluetooth connectivity is used in this application. This Bluetooth module is used to receive data
sent by the android device. For this purpose a HC-05 Bluetooth module is used and connected
with the microcontroller unit.

CIRCUIT DIAGRAM:
1 2 3 4 5 6

D1
T1 1 3
Vin Vout
230V AC

D2 GND
D IC1 D
R1
2

C1 C2 D5 D6
D3

D4

S1
R2

IC2

Neutral
1 32

Phase
MCLR/Vpp/RE3 Vdd
11
Vdd
2
RA0/AN0
3
RA1/AN1
4 40
RA2/AN2/Vref- RB7/PGD
5 39
C RA3/AN3/Vref+ RB6/PGC RLY1 C
6 38 V+ NC Socket-1
RA4/T0CKI RB5
7 37 COM
RA5/AN4/SS RB4 K 1
36 NO
RB3/PGM V- 2
8 35
RE0/RD/AN5 RB2/INT2
9 34
RE1/WR/AN6 RB1/INT1
10 33 RLY2
RE2/CS/AN7 RB0/INT0/SDI/SDA V+
Q1 NC Socket-2
NPN COM
K 1
15 NO
RC0/T1OSO/T1CKI 1K V- 2
16 30
RC1/TIOSI/CCP2 RD7/SPP7
17 29
RC2/CCP1/P1A RD6/SPP6 1K
18 28 RLY3
RC3/SCK/SCL RD5/SPP5 V+
23 27 NC Socket-3
RC4/SDI/SDA RD4/SSP4 1K
24 22 COM
RC5/SDO RD3/SPP3 K 1
25 21 NO
RC6/TX/CK RD2/SPP2 V- 2
26 20 Q2
RC7/RX/DT RD1/SPP1
19 NPN
RD0/SPP0
13
OSC1/CKIN
Crystal 12
VSS
14 31
OSC2/CLKOUT VSS
C3 C4
B B
VCC
Q3
NPN

BL-1
1
VCC
2
RXD
3 BLUETOOTH
TXD
4 HC-05
GND
BLUETOOTH HC-05

A A

Title

Size Number Revision


B
Date: 12-Dec-2017 Sheet of
File: C:\Users\Lenovo\Downloads\Circuit 2018.Ddb Drawn By:
1 2 3 4 5 6

Circuit Description:

The above diagram represents the circuit diagram and interfacing of the devices of the
system. In this system a microcontroller is used as controlling device. 8051 microcontroller is
used in this work. The microcontroller and other circuit components require power for their
operation. This power is provided by the power supply unit designed as shown in the circuit
diagram. The microcontroller requires regulated 5V supply which is provided to the pin number
32 and 11 of the controller IC as shown in the circuit diagram. A reset switch is interfaced to the
pin number 1 of the microcontroller. This switch is used to reset the controller.
A crystal oscillator is connected to the pin number 13 and 14 of the controller IC. This
crystal oscillator is used to provide machine cycles to the controller for the execution of the
program in the memory of the controller. Three devices are connected to be controlled by the
system. These devices are controlled by relays. The relays are connected with the
microcontroller by means of transistor as shown in the circuit diagram.

To control the connected devices remotely through an android phone Bluetooth module is
interfaced with the microcontroller. HC-05 Bluetooth module is used in this work. This module
is interfaced with the microcontroller connected to the pin number 25 and 26 of the
microcontroller. This Bluetooth module is used to receive the data sent by the android phone.

Operation:

This project is designed to control device control using an Android application. The
concept of controlling devices using android device is an interesting. A Bluetooth device is
interfaced to the control unit for sensing signals transmitted by the Android application. This
data is conveyed to the control unit which switches on loads ON/OFF as desired. An 8051 series
microcontroller 89s51 is used in this project as a controlling device.

Remote operation is achieved by any smart-phone or Tablet with Android operating


system. The transmitting end uses an Android application for the commands that are transmitted
to digital bits. At the receiver end, these commands are used for controlling the electrical devices
on and off. At the receiving end, the appliances are driven by Relays that are interfaced to the
microcontroller.

Serial communication data sent from the Android application is received by a Bluetooth
receiver interfaced to the microcontroller. The program on the microcontroller refers to the serial
data to generate respective output based on the input data to operate the Relay.

This project has integration of Android mobile technology and embedded system.
Android mobile user has to install an application on his mobile handset to control the devices.
Then he/she can give command using that application. For this you have to turn on the Bluetooth
on mobile, so the main wireless controlling technique used in this project is Bluetooth
technology. Bluetooth receiver will be connected to the project. This Bluetooth device is
connected to the circuit which has a decoder. It sends out a code for respective command sent by
user. Then the respective device connected to the circuit will be turned on or off depending on
the command given. For example: Turn on motor, Turn off motor etc. Such that by giving
commands from mobile you can control electric devices.

The project Android based device control using Bluetooth project helps to control the
electrical loads based on Bluetooth input signal. The Bluetooth device receives this input signal
from android device. This system is especially beneficial in case of handicapped or aged people
who find it difficult to walk and operate the electrical switches to turn on or off the loads. This
system solves this issue as now the user just has to give voice commands to turn on or off the
loads. Here 4 loads are used to demonstrate light, fan, heater and AC. All these loads can be
individually turned ON/OFF or all loads at the same time. This system solves the issue by
interfacing a unit with home appliances that switches these loads based on the input received
from android device. The Android app also provides an effective GUI for providing this
functionality.

This system makes use of 8051 microcontroller. The Bluetooth receiver is interfaced with
microcontroller in order to accept the commands and then react accordingly. It operates the loads
through a set of relays using a relay driver IC. Relays are used between loads and the control
unit.

This system thus can be used in many domestic applications and in industrial setups. The
power supply setup of the system contains a step down transformer of 230/12V, used to step
down the voltage to 12VAC. To convert it to DC, a bridge rectifier is used. Capacitive filter is
used which makes use of 7805 voltage regulator to regulate it to +5V that will be needed for
microcontroller and other components operation, in order to remove ripples.
Hardware Components:

Microcontroller:

The 8051 Microcontroller was designed in 1980’s by Intel. Its foundation was on Harvard
Architecture and was developed principally for bringing into play in Embedded Systems. At first
it was created by means of NMOS technology but as NMOS technology needs more power to
function therefore Intel re-intended Microcontroller 8051 employing CMOS technology and a
new edition came into existence with a letter ‘C’ in the title name, for illustration: 80C51. These
most modern Microcontrollers need fewer amount of power to function in comparison to their
forerunners.

There are two buses in 8051 Microcontroller one for program and other for data. As a
result, it has two storage rooms for both program and data of 64K by 8 size. The microcontroller
comprise of 8 bit accumulator & 8 bit processing unit. It also consists of 8 bit B register as
majorly functioning blocks and 8051 microcontroller programming is done with embedded C
language using Keil software. It also has a number of other 8 bit and 16 bit registers.

For internal functioning & processing Microcontroller 8051 comes with integrated built-
in RAM. This is prime memory and is employed for storing temporary data. It is unpredictable
memory i.e. its data can get be lost when the power supply to the Microcontroller switched OFF.
8051 Microcontroller Architecture:

CPU (Central Processor Unit):

As you may be familiar that Central Processor Unit or CPU is the mind of any processing
machine. It scrutinizes and manages all processes that are carried out in the Microcontroller.
User has no power over the functioning of CPU. It interprets program printed in storage space
(ROM) and carries out all of them and do the projected duty. CPU manages different types of
registers in 8051 microcontroller.

Interrupts:

As the heading put forward, Interrupt is a sub-routine call that reads the Microcontroller’s
key function or job and helps it to perform some other program which is extra important at that
point of time. The characteristic of 8051 Interrupt is extremely constructive as it aids in
emergency cases. Interrupts provides us a method to postpone or delay the current process, carry
out a sub-routine task and then all over again restart standard program implementation.

The Micro-controller 8051 can be assembled in such a manner that it momentarily stops
or break the core program at the happening of interrupt. When sub-routine task is finished then
the implementation of core program initiates automatically as usual. There are 5 interrupt
supplies in 8051 Microcontroller, two out of five are peripheral interrupts, two are timer
interrupts and one is serial port interrupt.

Memory:

Micro-controller needs a program which is a set of commands. This program enlightens


Microcontroller to perform precise tasks. These programs need a storage space on which they
can be accumulated and interpret by Microcontroller to act upon any specific process. The
memory which is brought into play to accumulate the program of Microcontroller is recognized
as Program memory or code memory. In common language it’s also known as Read Only
Memory or ROM.

Microcontroller also needs a memory to amass data or operands for the short term. The
storage space which is employed to momentarily data storage for functioning is acknowledged as
Data Memory and we employ Random Access Memory or RAM for this principle reason.
Microcontroller 8051 contains code memory or program memory 4K so that is has 4KB Rom
and it also comprise of data memory (RAM) of 128 bytes.

Bus:

Fundamentally Bus is a group of wires which functions as a communication canal or


mean for the transfer Data. These buses comprise of 8, 16 or more cables. As a result, a bus can
bear 8 bits, 16 bits all together. There are two types of buses:

Address Bus: Microcontroller 8051 consists of 16 bit address bus. It is brought into play to
address memory positions. It is also utilized to transmit the address from Central Processing Unit
to Memory.

Data Bus: Microcontroller 8051 comprise of 8 bits data bus. It is employed to cart data.

Oscillator:

As we all make out that Microcontroller is a digital circuit piece of equipment, thus it
needs timer for its function. For this function, Microcontroller 8051 consists of an on-chip
oscillator which toils as a time source for CPU (Central Processing Unit). As the productivity
thumps of oscillator are steady as a result, it facilitates harmonized employment of all pieces of
8051 Microcontroller. Input/output Port: As we are acquainted with that Microcontroller is
employed in embedded systems to manage the functions of devices.

Thus to gather it to other machinery, gadgets or peripherals we need I/O (input/output)


interfacing ports in Micro-controller. For this function Micro-controller 8051 consists of 4
input/output ports to unite it to other peripherals. Timers/Counters: Micro-controller 8051 is
incorporated with two 16 bit counters & timers. The counters are separated into 8 bit registers.
The timers are utilized for measuring the intervals, to find out pulse width etc.

8051 Microcontroller Pin Diagram:

For explaining the pin diagram and pin configuration of microcontroller 8051, we are taking into
deliberation a 40 pin Dual inline package (DIP). Now let’s study through pin configuration in
brief:-

Pins 1 – 8:- recognized as Port 1. Different from other ports, this port doesn’t provide any other
purpose. Port 1 is a domestically pulled up, quasi bi directional Input/output port.
Pin 9:- As made clear previously RESET pin is utilized to set the micro-controller 8051 to its
primary values, whereas the micro-controller is functioning or at the early beginning of
application. The RESET pin has to be set elevated for two machine rotations.

Pins 10 – 17:- recognized as Port 3. This port also supplies a number of other functions such as
timer input, interrupts, serial communication indicators TxD & RxD, control indicators for
outside memory interfacing WR & RD, etc. This is a domestic pull up port with quasi bi
directional port within.

Pins 18 and 19:- These are employed for interfacing an outer crystal to give system clock.

Pin 20:- Titled as Vss – it symbolizes ground (0 V) association.

Pins- 21-28:- recognized as Port 2 (P 2.0 – P 2.7) – other than serving as Input/output port,
senior order address bus indicators are multiplexed with this quasi bi directional port.

Pin- 29:- Program Store Enable or PSEN is employed to interpret sign from outer program
memory.

Pin-30:- External Access or EA input is employed to permit or prohibit outer memory


interfacing. If there is no outer memory need, this pin is dragged high by linking it to Vcc.

Pin-31:- Aka Address Latch Enable or ALE is brought into play to de-multiplex the address data
indication of port 0 (for outer memory interfacing). Two ALE throbs are obtainable for every
machine rotation.

Pins 32-39: recognized as Port 0 (P0.0 to P0.7) – other than serving as Input/output port, low
order data & address bus signals are multiplexed with this port (to provide the use of outer
memory interfacing). This pin is a bi directional Input/output port (the single one in
microcontroller 8051) and outer pull up resistors are necessary to utilize this port as Input/output.

Pin-40: termed as Vcc is the chief power supply. By and large it is +5V DC.
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. The Bluetooth module being used here is the
HC‐05 module, shown in figure below. It is an easy to use Bluetooth SPP (Serial Port Protocol)
module, designed for transparent wireless serial connection setup. The Bluetooth module HC-05
is a master/slave module. By default the factory setting is slave. The Role of the module (Master
or Slave) can be configured only by at commands. The slave modules cannot initiate a
connection to another Bluetooth device, but can accept connections. Master module can initiate a
connection to other devices.

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). It has the footprint as small as 12.7mmx27mm.
Hope it will simplify your overall design/development cycle.

Fig: HC-05 Bluetooth Module

Specifications :
Hardware features:

Typical -80dBm sensitivity

Up to +4dBm RF transmit power

Low Power 1.8V Operation ,1.8 to 3.6V I/O

PIO control

UART interface with programmable baud rate

With integrated antenna

With edge connector


Android based phone:

Android is software stack for mobile devices that includes an O.S, middleware and key
applications. Android O.S is based on Linux and applications are made in java like a language
running on virtual machine called ‘Dalvik’ created by Google. For this automation system and
security we are using open source android platform. Our Android application consisting of
controlling device list as lights, fans according to rooms. First user has to start application if user
is authorized he will be asked for making Bluetooth ON. After that he will be having list of
available devices in range for serial connection. Once he connects to HC-05 he will be navigated
to main screen which is consisting of list of devices of that he wants to control as make it on or
off, display current temperature, set time for auto off devices at night time.
Relays:

A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contacts. The coil current
can be on or off so relays have two switch positions and most have double throw (changeover)
switch contacts as shown in the diagram.

Relay Circuit symbol

Relays allow one circuit to switch a second circuit which can be completely separate
from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC
mains circuit. There is no electrical connection inside the relay between the two circuits, the link
is magnetic and mechanical.

The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it
can be as much as 100mA for relays designed to operate from lower voltages. Most ICs cannot
provide this current and a transistor is usually used to amplify the small IC current to the larger
value required for the relay coil. The maximum output current for the popular 555 timer IC is
200mA, enough to supply a relay coil directly.

Working :

When an electric current is passed through the coil it generates a magnetic field that attracts the
armature, and the consequent movement of the movable contacts either makes or breaks
(depending upon construction) a connection with a fixed contact. If the set of contacts was closed
when the relay was de-energized, then the movement opens the contacts and breaks the
connection, and vice versa if the contacts were open.
When the current to the coil is switched off, the armature is returned by a force, approximately
half as strong as the magnetic force, to its relaxed position. Usually this force is provided by a
spring, but gravity is also used commonly in industrial motor starters.

Normally-open (NO) contacts connect the circuit when the relay is activated; the circuit is
disconnected when the relay is inactive. It is also called a Form A contact or "make" contact.

Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the circuit is
connected when the relay is inactive. It is also called a Form B contact or "break" contact.

The basis for relays, is the simple electromagnet

A nail, some wire, and a battery is all that is needed to make one, to demonstrate and amaze add
a switch, and presto! You're the talk of the town.

With no power applied to the coil, the nail is NOT magnetized

Connect this to a power source, and it will now grab and hold small pieces of metal.
So, here in lies the concept. If we take an electromagnet, it will interact with metals in its
vicinity. Now let’s take this one step further... If we were to place a piece of metal, near the
electromagnet, and connect some contacts, so that when the electromagnet is energized, the
contacts close, we have a working relay.
The simplest relay, is the Single Pole, Single Throw (spst) relay. It is nothing more than an
electrically controlled on-off switch. Its biggest property is the ability to use a very small current,
to control a much larger current. This is desirable because we can now use smaller diameter
wires, to control the current flow through a much larger wire, and also to limit the wear and tear
on the control switch.

Above is a simple relay control. Now, here is what is happening.....


The control circuit (GREEN) powers the coil inside the relay, using a small amount of current. It
flows from the battery, thru the fuse ( for protection) to a switch, (say, a light switch) then to the
coil in the relay, energizing it.

The coil, now energized becomes an electromagnet, and attracts the metal strip with the contacts,
which closes, providing a secondary heavy current path ( RED ) to the device ( say, the fog
lights)

Turning off the switch, opens the circuit to the coil, removes current flow, and the electromagnet
is no longer a magnet, the secondary path is opened, and the lights extinguish
DESIGN ASPECTS OF POWER SUPPLY:

Power supply is the first and the most important part of our project. For our project we
require +5V regulated power supply with maximum current rating 1A.

Following basic building blocks are required to generate regulated power supply.

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.

FIG: A TYPICAL TRANSFORMER

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

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:

Giving the ideal transformer equation

Transformers normally have high efficiency, so this formula is a reasonable approximation. 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.

4.2 VOLTAGE REGULATOR 7805

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.


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.
FIG: BLOCK DIAGRAM OF VOLTAGE REGULATOR

Absolute Maximum Ratings:


TABLE: RATINGS OF THE VOLTAGE REGULATOR

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 state diodes, 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 cycle only 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.
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.

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 charges and discharges.
CALCULATIONS FOR POWER SUPPLY DESIGNING:

Specifications of 7805 vtg regulator:

Polarity = +ve

Output vtg : +5v

Output current :1.5A

Output of bridge rectifier for rectification :

Output: 12Vdc = vrms

Vm=vrms x sq. rt of 2

= 12x sq.rt of 2

= 16.97

Vm= PIV =16.97

Value of Filter capacitor:

C= (IxT)/V
T=1/2πf

= 1/2 x3.14×50 hz

Output current of 7805 =1.5 A

C=(1.5 x 3.1847 x10-3 )/5

= 955.41×10-6

=1000 µf
PCB DESIGNING

For a certain number of projects, including first-prototype, surface mount 'bread-


boarding', layout experimentation, rapid multiple-revisions, and 1-hour deadlines doing your
own PCB etching can be quick, clean, and very inexpensive. The method set up in the Media Lab
basement is somewhat-similar to that of large pcb manufacture shops, except in scale and
automation. There is no system for through-hole plating, automated drilling/routing or multilayer
design. However, you can make precisely aligned double sided boards with simple registration
techniques.

When To Use

A tool is only good towards the application it was designed for. Using the etcher for
something other than what it is good for will frustrate you and waste time.

When using the spray etcher is a good idea:

 You need the boards quickly

 The substrate is 1/16" with 1oz or 2oz copper either FR4 or paper phenolic (preferred)

 The design is single sided

 There are many surface mount parts

 The design is double sided, with no hidden vias (vias underneath surface mount parts) or
through-hole part vias (vias that also serve as through-hole component holes) that you
cannot solder on both sides

 You can visually scan for shorts

 The design follows a 12/12 mil rule (this is probably not true, I'm sure 10/10 or even 8/8
is fine, but yield will drop) that is, 12mil minimum trace width, and 12mil minimum trace
distance.

 You only need a few boards, or are willing to live with a yield as low as 50%

 Drill hole locations can be imprecise (up to 10 mils off!)

Conversely, when using the spray etcher is a bad idea:

 You dislike wet chemistry/cleaning

 Are using exotic substrates

 There are many vias, or through whole parts, and you don’t want to drill holes/solder
vias.
 You want the boards to be perfect without checking for shorts or opens

 You need printed overlays, multiple layers, through hole plating or solder masks.

 You want many parts. Remember that for $200 you can just about get as many boards as
your heart desires, and from a reputable PCB manufacturer.

Getting the Layout Ready

In this step you will prepare your layout for etching. For this step you will need: a quality
laser printer, a sheet of translucent paper.

The photoresist method we use in PCB etching is a positive process, which means that
when UV light hits the resist, it softens, and then is washed away. What remains is a positive of
the PCB design. What this boils down to is that you will want a positive printout of your PCB
design (black where there will be copper) preferably mirrored. Most all PCB design tools let you
print out your layout mirrored. Or you can mirror your entire design in the software. Whichever
also, if possible, have it print white holes where you will drill, these will be your drill guides.
Because the drill holes will not be precise, make your annular rings (the copper around a drill
hole) larger than normal. Since you will lose as many as half of the design to
exposure/development/etching flaws, tile 2-3 times layouts as many as you want.

In Eagle: After your design is ready, go to the CAM Processor, and open the
"layout2.cam" job. As output select PS. Change the extension to ".ps" as well. Be sure
that Mirror is selected but that Fill Pads is not. Then open the ps with any free postscript viewer
and print it. (Also you could print it to "Gerber274x" and use a gerber viewer, or any other
format you can print.)

After you have verified the above, print your design to a high quality (600dpi at least)
laser printer, in monochrome mode, onto a white piece of paper. Double check that it is as you
want it, in the correct orientation, enough tiling, mirrored, dark ink, slightly smaller than the PCB
you have, etc. Now print it onto translucent paper, there is a box of it in the cabinet underneath
the etcher, in a thin cardboard sleeve.
This photo has notes. Move your mouse over the photo to see them.

Left, plain paper test. Right, translucent paper. Both are mirrored.

In this picture, I have two layouts I want to etch. I tiled one three times and one twice.
The one I tiled three times has a very fine pitch IC (TSSOP-16) so it is less likely to come out.
On the left is opaque laser print. On the right, translucent paper. Note that the design (notice-able
the text) is mirrored.

Exposing the Board

This step transfers your layout design to a positive-resist PCB by exposing UV light to
the sensitized PCB with the printout as a mask. For this step you will need: a presensitized
positive photoresist copper clad board, scissors, tape, a UV bulb and thin plate glass or exposure
unit. This step takes 5-10 minutes.

First cut out the layout leaving a few millimeters of space on the edges. If you are going
to perform the exposing and etching in the same session, go ahead and turn the etching machine
on now, since it takes 10 minutes to warm up.
Cut the translucent paper, leaving at least a few mm boarder

Next, locate an unused PCB. There is a bag of them in the cabinet underneath the etcher.
You may need to cut a larger board down using a metal shear. Using a larger PCB than necessary
is wasteful, and exhausts the chemicals faster than a board that is well-fit. You can also purchase
your own stash of PCB material in many different substrates, thicknesses, etc. and, of course,
that is encouraged. (See "Where to Purchase Supplies, at bottom")

The best PCBs are those that have a plastic sticky sheet protecting them (some are just
sold in a plastic bag) so that they can be handled, drilled and sheared without excess UV
exposure. The plastic is easy to peel off:
The underlying substrate should be a greenish color.

Place your design on top of the exposed resist, ink-side down, so that it appears not-
mirrored when you look through the paper at the board. Placing the ink closest to the resist
means less light can leak around and cut into thin traces. Next, tape down the design on two
edges, so that the tape does not overlap any of the layout, but holds the paper flat.
Use any plain tape to tape down two opposite sides without overlapping the layout

now take it to be exposed under a UV lamp. As an arbitrary measure, a 15W Sylvania


"350 Blacklight" UV 24" flourescent bulb, 3" above a FOTOBOARD2-brand board, with a 1/8"
clear glass plate (to keep the paper totally flat) over the board, 10 minutes will give good
exposure. [When a more permanent fixture is found, it will be calibrated.]

After it has been exposed, peel off one piece of tape and flip it open, to look at the
photoresist. Well exposed photoresist is a paler green, and you will be able to see the layout in
the original, yellower green, faintly. If you don't see anything, retape that side, and try a few
more minutes under the lamp.

The unexposed part is faintly visible, on the right side.

Once you think you're done exposing, lift off the design and put it away in case you want
to make another set of boards. You are ready to perform the chemical processing. If you need to
do this part later, or you have other boards to expose, place this board in an opaque container
(like in an envelope, face down, in a drawer or some such.)

Developing the Board

In this step, the exposed photoresist is removed chemically using developer, leaving a
positive of your layout in photoresist on copper. For this step you will need: gloves, apron, sink,
dev tray, developer, small soft sponge. This step takes 3 minutes.
Take the board over to your processing area. Put on the apron and a pair of 'rubber
gloves'. These wet chemicals can splash, some stain, and they are not good to drink. Find the dev
tray and the bottle of developer, (both marked DEV) and make sure the tray is clean. There is
one set of large trays (for > 5x7") and one small set, use the ones that fits best. Place the board
face up in the tray and pour developer in until there is about 1/4" (or enough to cover) in the tray.

Carefully pour into a tray. The developer is green from use, it starts out clear

Almost immediately the board will start to 'leak' resist as it is attacked by developer.
Agitate the board with your hand, and swirl the developer around to make sure there is a flow
around the board. It should be developed in 1/2 to 1 minute. If you leave it in too long, some of
the finer traces will not come out. Leaving it in too little means that there will be a very thin,
invisible, layer of resist left that will stop the etching process and force you to repeat this step.
Use a soft sponge to wipe the photoresist away.
Before rinsing, rub down the board with a soft cloth or sponge soaked in developer

Rinse the board in cold water to clean off the developer (stop bath), the parts that are to
be etched should look like completely clean copper, no residue. If you feel a slimy/slippery
coating, or see a bluish coating, you need to develop more. If none of the resist came off, you'll
need to realign your paper and re-expose the board. Pour the developer back into the bottle, and
rinse off the tray. The board is now ready to etch.

A well developed board has solid green traces and a clean copper background
First Rinse

In this step, the board is spray rinsed to prepare it for etching. This step takes 2 minutes.

First check to see that the machine is on. If not, turn the machine on.
The Rota-Spray machine, the wash tank is on the left, the etching tank on the right.
The on button is in the top left corner.

Once on, the left LED display should display "oC" and then something like "23" which
means the etchant is at 23degC. Now load the board into the board holding apparatus, placing it
near the center, and securing the plastic nuts. Make sure the board won’t fall out and into the
tank.
The board holder can hold many small boards, but make sure they cant fall out

Slide the board holder, with the copper facing right, into the wash tank. Attach the water
hose (black, with white plastic spring-end) to the sink faucent, and turn on the cold water.

The connector is a little difficult to use, requiring that you simultaneously push down on
the ring while pressing the brass fitting into the faucet head. Two handed might be easier at first.
Turn on the wash spray to clean off the board. You can move the holder up and down to
make sure the board is sprayed off.

Make sure the water drains cleanly into the sink. This is the older setup, in the current lab
there should be a PVC drainage pipe into the large sink so there shouldn’t be any drain problems

Etching the Board

In this step, the board is placed in an etcher, which is a machine that washes warm ferric
chloride (or another etchant) over the board, eating away any exposed copper. For this step you
will need to make sure the etchant is warm enough to use. This step takes 2minutes.

Move the holder into the etching tank, again facing to the right. Check that the
temperature monitor reports 42-45 degrees C, and that the fluid well feels warm. also make sure
the top is secured so that there is very little chance FeCl will spray out the top. By default the
timer is set for 1:30 minutes, which I've found satisfactory. You can also change the time if
necessary (for different weights of copper). Turn on the spray pump by pressing start. The entire
tank will turn reddish brown as the etchant removes the copper from your board. After the time is
up, remove the holder and quickly put it in the wash tank again. Be careful as there will be a lot
of FeCl dripping off the holder and you do not want it going anywhere but in the machine or the
sink.
The board is very messy at this point, so do the move quickly and carefully.

Second Rinse

Turn on the wash spray again, moving the holder around so that the entire board and
holder are completely cleaned off. After the water runs clean, remove the board and examine it.
There may be parts that didn't etch, or over etched. Depending on your patience and yield, you
may decide to re-etch a subset of your boards.
There are some traces of un-etched copper on the right. Since I only needed one PCB, I
just threw it away.

Examine all the boards carefully to determine which ones have shorts/opens/missing
traces/etc, and which ones are good for use. Shut off the water faucet, run the spray to clean out
the hose, turn off the machine and disconnect the hose from the faucet.

Strip

In this step, the remaining photoresist is stripped away, leaving only copper. For this step
you will need chemical stripper and/or a scrub pad. This step takes 2 minutes.

Place the board facing up in the STRIP tray, and coat it with resist stripper. This may be
in a bottle or in a 'shoe polish' dispenser. Rub in the chemical first with the soft sponge, then with
a plastic scrub pad. The green resist should come off, revealing copper underneath. Make sure -
all- of the resist is removed, as it smells very bad when it gets hot (when soldering.) If there is no
stripper, you can just scrub it off with a green scrub pad. If the stripper came from a bottle, pour
it back in. Rinse off the board and tray.
You can easily remove the resist with just a green scouring pad

Tinning

This step is optional but is very helpful for soldering to your board. For this step you will
need: tinning liquid mix. This step takes 2-10 minutes.

Find the bottle of tinning liquid, and the TIN tray. Place the board in the tray copper up,
and pour in enough tinning liquid to cover the board, the copper should immediately turn a
silvery color. If you intend to reflow solder, you may want to leave it for 15 minutes, otherwise,
3-5 is probably fine. Use this time to clean up the area around the etcher, rinse off surfaces and
clean and dry any trays. When the board is done, remove and rinse it. Pour the tinning liquid
back into the bottle and clean the tray. Throw away the gloves, and put the apron back. Make
sure the area looks better than it did when you got there.
The exposed copper will turn silver almost immediately, tin will aid soldering and stop
oxidation.

Drilling

In this step, any holes or vias in the PCB are drilled out. For this step you will need: a
drill press that can run at 2000+ RPM, high-speed carbide wire-gauge drill bits. This step takes
3-10 minutes, depending on number of holes in PCB.

If your PCB is FR4 laminate, you may want to find a dust mask for this step, since
fiberglass dust is carcinogenic. Chances are, you're using paper phenolic which is much safer.
There is a box of HSS carbide drill bits in a box underneath the etcher, they are packaged in
plastic boxes of 10. Find the boxes of closest size to your board holes. In general, .020"/75ga is
good for RF vias, .028"/70ga is good for signal vias, .035"/65ga is good for
DIP/LEDs/Resistors/Capacitors, etc., .042"/58ga is good for TO-220/heavier diodes/etc.,
.060"/53ga for heavier wires and power components, and .086"/44ga for mounting holes or
anything else. Other drill sizes are available for purchase, of course.
Left, these are inexpensive re-sharpened drill bits $7.50 a box. Right, 70 gauge is as small
as you'll need

Place the first drill bit in the chuck, and tighten it well. Find a piece of wood to place
underneath the board for support. While the drill is running, adjust the speed to 2000RPM or
higher.

The drill press in the media lab shop is more than sufficient, adjust it only while running

Drill all holes of one size at a time. Try to position the drill bit right in the center of the
hole, or at least, try not to drill through any copper traces. The drill bits might break, especially if
they sub-35mil. Holding the board steady while drilling through it helps. The bits only cost 75
cents so just throw them away when broken, but if you break more than 5, you should purchase a
replacement set.
You can drill a hole a second if you do not clamp down the board, but breakage is more
likely

After all the drilling, replace the bits in their boxes, and put the box back underneath the
etcher.

Shearing

In this step, the tiled layouts are separated. For this step you will need a metal shear (this
step could also be done with a band saw.) This step takes 2 minutes.

Shear or cut the good boards out, leaving a few mm on each edge. The edges may be filed
or sanded.
A metal shear, such as the one outside the shop, is good for this. Go slowly and use the
middle.
Advantages:

• This project is easy to operate.

• A reliable system.

• Simple system, less components requirement.

• Cost efficient system.

APPLICATIONS:

1. Home automation - This project can be used to control various devices in the Home

2. Can also be used for security purpose after modification (we can control gate system or we can
interface wireless camera and can control it using our mobile)

CONCLUSION:

The prototype of system which is used for controlling devices through human voice is
proposed and implemented and several changes can be done in this to suite different applications
and scenarios.

Following learning’s were provided by this project: Speech recognition module operation,
Interfacing Speech recognition module to Microcontroller and Relay working principle.

FUTURE SCOPE:

Further we are developing the system to integrate the existing wireless networks present
in the houses to transmit data from mobile to the microcontroller to be able to use it at a larger
scale. We propose to use voice recognition to provide security measures, so as to be able to
provide restricted access to particular persons. We are developing the system so that the user can
control the appliances remotely over Internet. We would increase the scale of the control of
appliances such as controlling speed of fan, temperature of AC, changing particular channel of
TV, choosing music tracks, etc., We are trying to develop an intuitive interface for the user so as
to ease the process of controlling and make it interesting.
REFERENCES:

[1] Population Division, DESA, United Nations. (2009). World Population Ageing: Annual
report 2009.

[29/07/2010]. Available:
http://www.un.org/esa/population/publications/WPA2009/WPA2009_WorkingPaper.pdf

[2] (2010) uControl Home security system website. [Cited 2010 14th Oct]. Available:

http://www.itechnews.net/2008/05/20/ucontrol-homesecurity- system/

[3] R. Gadalla, “Voice Recognition System for Massey University Smarthouse,” M. Eng thesis,
Massey University,

[4] (2010) Home Automated Living website. [Cited 2010 14th Oct]. Available:

http://www.homeautomatedliving.com/default.htm

[5] L. R. Rabiner and R. W. Schafer, Digital Processing of Speech Signals, New Jersey, US:
Prentice Hall Inc,1978.

[6] “XBee-2.5-Manual,” ZigBee RF communication protocol. (2008). Minnetonka: Digi


International Inc.

[7] B. Yukesekkaya, A. A. Kayalar, M. B. Tosun, M. K. Ozcan, and A. Z. Alkar, “A GSM,


Internet and Speech Controlled Wireless Interactive Home Automation System,” IEEE
Transactions on Consumer Electronics, vol.52, pp. 837-843, August 2006.

[8] F. J. Owens, Signal Processing of Speech, New York, US: McGraw-Hill Inc, 1993.

[9] D. Brunelli, M. Maggiorotti, L. Benini, and F. L. Bellifemine, “Analysis of Audio Streaming


Capapbility ofZigbee Networks,” in EWSN 2008, 2008, LNCS 4913, pp. 189-204.

Você também pode gostar