Академический Документы
Профессиональный Документы
Культура Документы
ON
ANDROID CONTROLLED
HOME APPLIANCES
INTRODUCTION:
Nowadays the life is totally based on technology, and human beings
(Engineers) are creating new technical devices and projects on daily
basis just to make our life easy and vast. We are also here to present a
device which will work on android application and Bluetooth. This
project is based on the Bluetooth module and the working of the project
is on the android software. In this project, the devices are operated with
the help of the Bluetooth. This is a sort of wireless device operation.
The Home Automation concept has existed for many years. The terms
Smart Home, Intelligent Home followed and has been used to
introduce the concept of networking appliances and devices in the house.
Home automation Systems (HASs) represents a great research
opportunity in creating new fields in engineering, architecture and
computing. HASs becoming popular nowadays and enter quickly in this
emerging market. However, end users, especially the disabled and
elderly due to their complexity and cost, do not always accept these
systems. Due to the advancement of wireless technology, there are
several different of connections are introduced such as GSM, WIFI,
ZIGBEE, and Bluetooth. Each of the connection has their own unique
specifications and applications. Among the four popular wireless
connections that often implemented in HAS project, Bluetooth is being
chosen with its suitable capability. Bluetooth with globally available
frequencies of 2400Hz is able to provide connectivity up to 100 meters
at speed of up to 3Mbps depending on the Bluetooth device class. In
addition, a Bluetooth master device is able to connect up to 7 devices.
The capabilities of Bluetooth are more than enough to be implemented
in the design. Also, most of the current laptop/notebook or cell phones
are come with built-in Bluetooth adapter. It will indirectly reduce the
cost of this system. Based on the study of HAS project done by
researchers and developers, implemented Microcontroller in wireless
HAS.
BLOCK DIAGRAM:
WORKING:
This project works on the Bluetooth module. In this project we will use
89S52 controller. In this Bluetooth module is used. The Bluetooth serial
module is connected to the 89S52 serially. The devices in the room can
be operated wirelessly. In this relay card are used to operate the
extensions. We can operate the devices in the extension plugs. The
Bluetooth module is operated by an android phone containing the
applications. With the help of the phone with the android applications
we can operate the devices.
HARDWARE DESIGN:
This section mainly discuss about the hardware construction of main
control board. Microcontroller, 89S52is chosen due to its capability to
perform the both serial and USB features to establish the Bluetooth and
USB connection to the GUIs. For the sensor, HSM-20G Sensor Module
is chosen because it is the low cost 2- in-1 combination of humidity and
temperature modules. For the Bluetooth module, low cost Cytron
Bluebee Bluetooth module is chosen to establish the Bluetooth
connection between main control board and the GUIs. The electrical
current is directly connect to the main control board whereby it separates
the regulator and relay circuit. The voltage regulator is constructed by
common reliable regulator circuit which consists of transformer, rectifier
and regulator. 5V and 3.3V DC output is regulated in order to fulfill the
voltage needs of the specific components in the main control board.
Moreover, the low voltage activating switches will replace the existing
switches The ease of installation is taken into account for this system.
The system is designed to directly install beside the electrical switches
on the wall. The installation of this system eliminates the complex
wiring reinstallation and overhead wiring on the wall. The existing
switch connection is connected and controlled by the relay circuit inside
main control board. Furthermore, multiple control boards can be
installed in home. With these simple and low cost components, the main
control board is constructed in pretty small size but still performs the
strong functions and features of the system.
TOOLS/SOFTWARES /COMPONENTS REQUIRED
KEIL Vision2 Software for programming of Microcontroller.
Soldering kit.
Android Application
COMPONENTS
SERIAL BLUETOOTH MODULE 1NO
MCU (AT89S52) 1NO
LCD WITH CONNETOR 1NO
TRANSFORMER230/12V 1NO
DIODES (1N4007) 2NO
CAPACITORS 4NO
RESISTORS 10NO
PCB 1NO
CRYSTAL OSCILLATOR12MHZ 1NO
LAMP HOLDERS 3NO
CONNECTING WIRES
RELAYS 12V 4NO
EXTENTION BOARD
TRANSISTORS 6NO
WORKING OF CIRCUIT:
Supply Section of this circuit consists of a 12 volts adaptor, and a
IC 7805 IC. The output of the second regulator(IC 7805) is +5 volts,
which is used for all other digital applications.
HARDWARE DESCRIPTION
3.1:MICROCONTROLLER- AT89C52:
The heart of 89C51 is the circuitry that generates the clock pulses
by which all internal operations are synchronized. Pins XTAL1 and
XTAL2 are provided for connecting a resonant network to form an
oscillator. The crystal frequency is the basic internal clock frequency of
the micro controller.
The 89C52 contains two 16 bit registers, the program counter and
the data counter. Each is used to hold the address of byte in memory.
Program instruction byte is fetched from location in memory that is
addressed by the PC. The PC is automatically incremented after every
instruction bytes fetched and may also be altered by certain instructions.
The program status word contains the math flag, user program flag
F0, and the register select bits identify which of the four general purpose
register banks is currently in use by the program.
Internal Memory:
The 89C52 have internal RAM for program code bytes and for
variable data that can be altered as the program runs. Additional memory
can be added externally using suitable circuits. Unlike micro-controller
with a Von Neumann architecture, which can use a single memory
address for either program code or data, but not for both, the 89C52 have
Harvard architecture, which uses the same address, in different
memories, for code and data. Internal security accesses the correct
memory based on the nature of operation in progress.
Internal RAM:
The 89C52 operations that do not use the internal ram address
from 00H to 7FH are done by a group of specific internal registers each
called special function registers, which may be addressed much like
internal ram, using addresses from 8011 to FFH. Some SFRs are also
bit addressable. This feature allows the programmer to change only what
needs to be altered, leaving the remaining bits in that SFR unchanged.
Each port has a D type output latch for each pin. The SFR of each
port are made up of these eight latches, which can be addressed at the
SFR address for that port. The port latch should not be confused with the
port pins. The data on the latch does not have to be the same as that on
the pins. The status of each latch may be read from a latch buffer; while
an input buffer is connected directly to each pin status may be read
independently of the latch state. Different op codes accesses the latch or
pin states as appropriate. Port operation is determined by manner in
which microcontroller is connected to the external circuitry.
The two data paths are shown in figure while circuits that read the
latch or pin data using two entirely separate buffers. The output buffer is
enabled when the latch data is read and the lower buffer when the pin
state is read.
The timers have been included on the chip to relieve the processor
of timing and counting chores. When the program wished to count a
certain number of internal pulses or external events, a number is placed
in one of the counters. The number represents the maximum count less
the decide count, plus 1.The counter increments from the initial number
to the maximum and then roles over to 0 on the final pulse and also set a
timer flag. The flag condition may be tested by an instruction to tell the
program that the count has been accomplished, or the flag may be used
to interrupt the program.
Timing:
The timers may be operated in one of the four modes that are
determined by the mode bits. M1 and M0 in the TMOD register.
Timer mode 0:
Timer mode 1:
Timer mode 2:
Setting the mode bits to 10b in the TMOD configures the timer to
use only the TLX counter as an eight bit counter. THX is used to hold a
value that is loaded into TLX every time TLX overflows from FFh to
00h. The timer flag is also set when TLX overflows. This mode exhibits
and auto reloaded feature: TLX will count up from the number in THX,
overflow, and be initialized again with the contents of THX.
Timer mode 3:
Counting:
Interrupts:
External Interrupts:
Pins INT0 and INT1 are used by external circuitry. Inputs on these
pins can set the interrupt flags IE0 and IE1 in the TCON register to 1 by
two different methods. The IEX flag may be set when the INTX pin
reached a low level or the flags may be set when a high to low transition
takes place on the INTX pin. Bits INT0 and INT1 in TCON program the
INTX pins for low level interrupt when set to 0 and program the INTX
pins for transition interrupt when set to 1. Flags IEX will be reset when
the processor accepts the transition generated interrupt and the interrupt
subroutine is accessed. The external circuits must remove the low level
before an RETI is executed.
Reset:
Interrupt Control:
Pin Description
VCC
Supply voltage.
GND
Ground.
Port 1
Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to P1.7
provide internal pullups. P1.0 and P1.1 require external pullups. P1.0
and P1.1 also serve as the positive input (AIN0) and the negative input
(AIN1), respectively, of the on-chip precision analog comparator. The
Port 1 output buffers can sink 20 mA and can drive LED displays
directly.
Port 3
Port 3 pins P3.0 to P3.5, P3.7 are seven bidirectional I/O pins with
internal pullups. P3.6 is hard-wired as an input to the output of the on-
chip comparator and is not accessible as a general purpose I/O pin. The
Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins
they are pulled high by the internal pullups and can be used as inputs. As
inputs, Port 3 pins that are externally being pulled low will source
current (IIL) because of the pullups.
RST
Reset input. All I/O pins are reset to 1s as soon as RST goes high.
Holding the RST pin high for two machine cycles while the oscillator is
running resets the device. Each machine cycle takes 12 oscillator or
clock cycles.
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 Fig. 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 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.
PIN FUNCTION OF IC 89C52.
1 Supply pin of this ic is pin no 40. Normally we apply a 5 volt
regulated dc power supply to this pin. For this purpose either we
use step down transformer power supply or we use 9 volt
battery with 7805 regulator.
2 Ground pin of this ic is pin no 20. Pin no 20 is normally
connected to the ground pin ( normally negative point of the
power supply.
3 XTAL is connected to the pin no 18 and pin no 19 of this ic.
The quartz crystal oscillator connected to XTAL1 and XTAL2
PIN. These pins also needs two capacitors of 30 pf value. One
side of each capacitor is connected to crystal and other pis is
connected to the ground point. Normally we connect a 12 MHz
or 11.0592 MHz crystal with this ic.. But we use crystal upto 20
MHz to this pins
4 RESET PIN.. Pin no 9 is the reset pin of this ic.. It is an active
high pin. On applying a high pulse to this pin, the micro
controller will reset and terminate all activities. This is often
referred to as a power on reset. The high pulse must
be high for a minimum of 2 machine cycles before it is allowed
to go low.
B B REGISTER 0F0H
P0 PORT0 80H
P1 PORT1 90H
P2 PORT2 0A0H
P3 PORT3 0B0H
INSTRUCTIONS
MOV instruction simply copy the data from one location to another
location
MOV D,S
ADD INSTRUCTIONS.
ADD instructions adds the source byte to the accumulator ( A) and place
the result in the Accumulator.
MOV A, #25H
ACALL,TARGET ADDRESS
ACALL is a limit for the 2 k byte program counter, but for upto 64k
byte we use LCALL instructions.. Note that LCALL is
a 3 byte instruction. ACALL is a two byte instruction.
Restrictions on Certain Instructions
The AT89C2052 and is an economical and cost-effective member
of Atmels growing family of microcontrollers. It contains 2 Kbytes of
flash program memory. It is fully compatible with the MCS-51
architecture, and can be programmed using the MCS-51 instruction set.
However, there are a few considerations one must keep in mind when
utilizing certain instructions to program this device.
1. Branching instructions:
LCALL, LJMP, ACALL, AJMP, SJMP, JMP @A+DPTR
CJNE [...], DJNZ [...], JB, JNB, JC, JNC, JBC, JZ, JNZ
Programming Algorithm:
To program the AT89C2052, the following sequence is
recommended.
1. Power-up sequence:
Apply power between VCC and GND pins Set RST and XTAL1 to
GND. With all other pins floating, wait for greater than 10
milliseconds
6. Pulse P3.2 once to program a byte in the PEROM array or the lock
bits. The byte-write cycle is self-timed and typically takes 1.2 ms.
COMPONENT DESCRIPTION
RESISTANCE
CAPACITOR
A capacitor is a device capable of storing an electric charge (static
electricity). It consists of two metal plates separated by dielectric
material. Capacitors are available in values ranging from less than one
picofarad to thousands of microfarad. While using a capacitor its ratings
must be carefully observed to make certain that the potential to be
applied across the capacitor is not greater than the rated value.
TYPES OF CAPACITORS :
CERAMIC CAPACITOR :
ELECTROLYTIC CAPACITOR :
In this project, 10f capacitor is an electrolytic capacitor. In this
type of capacitors, the dielectric consists of an extremely thin film of
aluminum oxide formed on one of its aluminum foil plates. Intimate
contact with the other plate is achieved by impregnating the paper
between the foils with an electrolyte in the form of viscous substance,
such as ammonium borate. The sandwich is then rolled into a cylindrical
element and housed in either metallic cardboard, plastic or ceramic
protective tube.
SOLDERING
1. Use always an iron plated copper core tip for soldering iron.
2. Slightly fore the tip with a cut file when it is cold.
3. Use a wet sponge to wipe out dirt from the tip before soldering
instead of asking the iron.
4. Tighten the tip screw if necessary before iron is connected to
power supply.
5. Clean component lead & copper pad before soldering.
6. Use proper tool for component handling instead of direct handling.
7. Apply solder between component leads, PCB pattern & tip of
soldering iron.
8. Iron should be kept in contact with the joint s for 2-3 second s only
instead of keeping for very long or very small time.
9. Use optimum quantity of solder.
10. Use multistoried wire instead of single strands solvent like
isopropyl alcohol.
11. Every time soldering is over, put a little clean solder on the tip.
IC 7805 :
DESCRIPTION
The 7805 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 shut down 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.
TRANSFORMER
Transformer works on the principle of mutual inductance. We know that
if two coils or windings are placed on the core of iron, and if we pass
alternating current in one winding, back emf or induced voltage is
produced in the second winding. We know that alternating current
always changes with the time. So if we apply AC voltage across one
winding, a voltage will be induced in the other winding. Transformer
works on this same principle. It is made of two windings wound around
the same core of iron. The winding to which AC voltage is applied is
called primary winding. The other winding is called as secondary
winding.
V1/V2 = N1/N2
I1/I2 = N2/N1
(Where N1 is no. of turns of coil in primary and N2 is number of turns in
secondary ).
Carbon Resistors:
Carbon resistors are divided into three types:
a. Carbon composition resistors are made by mixing carbon grains
with binding material (glue) and moduled in the form of rods. Wire
leads are inserted at the two ends. After this an insulating material
seals the resistor. Resistors are available in power ratings of 1/10,
1/8, 1/4 , 1/2 , 1.2 watts and values from 1 ohm to 20 ohms.
b. Carbon film resistors are made by deposition carbon film on a
ceramic rod. They are cheaper than carbon composition resistors.
c. Cement film resistors are made of thin carbon coating fired onto a
solid ceramic substrate. The main purpose is to have more precise
resistance values and greater stability with heat. They are made in
a small square with leads.
Metal Film Resistors:
They are also called thin film resistors. They are made of a thin metal
coating deposited on a cylindrical insulating support. The high resistance
values are not precise in value; however, such resistors are free of
inductance effect that is common in wire wound resistors at high
frequency.
Variable Resistors:
Potentiometer is a resistor where values can be set depending on the
requirement. Potentiometer is widely used in electronics systems.
Examples are volume control, tons control, brightness and contrast
control of radio or T.V. sets.
Fusible Resistors:
These resistors are wire wound type and are used in T.V. circuits for
protection. They have resistance of less than 15 ohms. Their function is
similar to a fuse made to blow off whenever current in the circuit
exceeds the limit.
Resistance of a wire is directly proportional to its length and inversely
proportional to its thickness.
R L
R 1/A
RESISTOR COLOR CODE
Example: 1k or 1000 ohms
1st 2nd 3rd 4th
Band1
Band 2
Band 3
Band 4
COLOUR CODES
CAPACITORS
A capacitor can store charge, and its capacity to store charge is called
capacitance. Capacitors consist of two conducting plates, separated by
an insulating material (known as dielectric). The two plates are joined
with two leads. The dielectric could be air, mica, paper, ceramic,
polyester, polystyrene, etc. This dielectric gives name to the capacitor.
Like paper capacitor, mica capacitor etc.
Types of capacitors:
Capacitor
Paper
Mica Ceramic
Ceramic Capacitor:
Such capacitors have disc or hollow tabular shaped dielectric made of
ceramic material such as titanium dioxide and barium titanate. Thin
coating of silver compounds is deposited on both sides of dielectric disc,
which acts as capacitor plates. Leads are attached to each sides of the
dielectric disc and whole unit is encapsulated in a moisture proof
coating. Disc type capacitors have very high value up to 0.001uf. Their
working voltages range from 3V to 60000V. These capacitors have very
low leakage current. Breakdown voltage is very high.
Paper Capacitor:
It consists of thin foils, which are separated by thin paper or waxed
paper. The sandwich of foil and paper is then rolled into a cylindrical
shape and enclosed in a paper tube or encased in a plastic capsules. The
lead at each end of the capacitor is internally attached to the metal foil.
Paper capacitors have capacitance ranging from 0.0001uf to 2.0uf and
working voltage rating as high as 2000V.
THE DIODE
Diodes are polarized, which means that they must be inserted into the
PCB the correct way round. This is because an electric current will only
flow through them in one direction (like air will only flow one way
trough a tyre valve). Diodes have two connections, an anode and a
cathode. The cathode is always identified by a dot, ring or some other
mark.
+
The PCB is often marked with a +sign for the cathode end. Diodes come
in all shapes and sizes. They are often marked with a type number.
Detailed characteristics of a diode can be found by looking up the type
number in a data book. If you know how to measure resistance with a
meter then test some diodes. A good one has low resistance in one
direction and high in other. They are specialized types of diode available
such as the zener and light emitting diode (LED).
Power Supply
For TTL circuits, the power supply pin is labeled Vcc and its nominal
value.
For CMOS ICs, the power supply pin is labeled as VDD & its nominal
value range from T3 to 18V.
Unconnected Inputs
The pull down resistor in the first circuit forces Vout to become LOW
except when the push button switch is operated. This circuit delivers a
HIGH voltage when the switch is pressed. A resistor value of 10 is
often used.
In the second circuit, the pull up resistor forces Vout to become HIGH
except when the switch is operated. Pressing the switch connects Vout
directly to 0 V. In other words, this circuit delivers a LOW voltage when
the switch is pressed.
In circuits which process logic signals, a LOW voltage is called 'logic 0'
or just '0', while a HIGH voltage is called 'logic1' or '1'. These voltage
divider circuits are perfect for providing input signals for logic systems.
What kinds of switches could you use. One variety of push button switch
is called a miniature tactile switch. These are small switches which
work well with prototype board:
As you can see, the switch has four pins which are linked in pairs by
internal metal strips. Pressing the button bridges the contacts and closes
the switch. The extra pins are useful in designing printed circuit boards
for keyboard input and also stop the switch from being moved about or
bent once soldered into position.
There are lots of other switches which you might want to use in a
voltage divider configuration. These include magnetically-operated reed
switches, tilt switches and pressure pads, all with burglar alarm
applications
Result
- we are giving advanced idea which can be implemented on large level.
ADVANTAGES
Low cost
Reliable
Portable
www.jammuprojects.com
www.suprema.com
www.8052.com
www.keil.com
Reference books: