Professional Documents
Culture Documents
Infrared Remote Switch Project Report PDF
Infrared Remote Switch Project Report PDF
com/fyp/
Project Report
On
INFRARED REMOTE
CONTROL ON/OFF SWITCH
Submitted in partial fulfillment of the requirements for the award
of the degree of Bachelor of Engineering in Electrical Engineering
of Guwahati University
Session 2010
by
ABSTRACT
This Project INFRARED REMOTE CONTROL ON/OFF SWITCH is used to switch on/off the
Home Appliances by using a standard Remote control. The system is used to switch on/off upto
six electrical devices. All the above processes are controlled by the 8 bit Microcontroller
AT89C2051. The system works on Phillips RC5 format.
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
This is to certify that the project entitled “INFRARED REMOTE CONTROL ON/OFF
SWITCH” has been carried out and presented by
Students of B.E. 7th Semeste (Electrical Engineering), Assam Engineering College, under my
supervision and guidance in a manner satisfactory to warrant its acceptance as prerequisite for
the award of Bachelor of Engineering in Electrical Engineering of the Gauhati University.
Further the report has not been submitted/ reproduced in any form for the award of any other
degree/ diploma.
Guwahati-781013
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
This is to certify that the project report enitled “ INFRARED REMOTE CONTROL ON/OFF
SWITCH” has been submitted by the following BE 7th semester students.
in the partial fulfillment of the requirements for the award of the degree of Bachelor of
Engineering in Electrical Engineering of Gauhati University.
Guwahati-781013
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
Acknowledgement
We are thankful to Dr. Aroop Bardalai and our respected Head of the Department Dr. Damodar
Agarwal who have given me a great opportunity and guided me to complete this project.
We have taken help from the internet from where I got important data and information.I have
also got hold of some information from a mazagine. I have enjoyed and learnt a lot during the
completion of this project.
We also envince thanks to Prof., Dr.Durlav Hazarika and Asstt.Prof., Dr. Dipankar Chanda for
their kind assistance and guidance.
We are also thankful to all Electrical Engineering Department personnel for their help and details
explanation on various systems.
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
CONTENTS
1. Introduction. 1-3
2.
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
CHAPTER 1
1.1 Introduction
1.2 Objectives
1. To switch on/off the Home Appliances by using a standard Remote control.
4. High power loads can also be connected by using relays of appropriate value.
5. The system should work on any remote supporting Phillips RC5 protocol.
1.3Background
also tend to have a more or less limited operating angle, which mainly depends on the optical
characteristics of the phototransistor.
INFRA-RED
Infrared (IR) light is electromagnetic radiation with a wavelength between 0.7 and 300
micrometres, which equates to a frequency range between approximately 1 and 430 THz.
IR wavelengths are longer than that of visible light, but shorter than that of terahertz radiation
microwaves. Infrared imaging is used extensively for military and civilian purposes. Military
applications include target acquisition, surveillance, night vision, homing and tracking. Non-
military uses include thermal efficiency analysis, remote temperature sensing, short-ranged
wireless communication, spectroscopy, and weather forecasting. Infrared astronomy uses sensor-
equipped telescopes to penetrate dusty regions of space, such as molecular clouds; detect objects
such as planets, and to view highly red-shifted objects from the early days of the universe.
RC-5 protocol
The RC-5 protocol was developed by Philips in the late 1980s as a semi-proprietary consumer IR
(infrared) remote control communication protocol for consumer electronics. he advantage of the
RC-5 protocol is that (when properly followed) any CD handset (for example) may be used to
control any brand of CD player using the RC-5 protocol. The handset contains a keypad and a
transmitter integrated circuit (IC) driving an IR LED. The command data is a Manchester coded
bitstream modulating a 36 kHz carrier The IR signal from the transmitter is detected by a
specialized IC with an integral photo-diode, and is amplified, filtered, and demodulated so that
the receiving device can act upon the received command. RC-5 only provides a one-way link,
with information traveling from the handset to the receiving unit.
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
CHAPTER 2
CIRCUIT DESCRIPTION
Here is a versatile remote controlled appliance switch that can ON or OFF any appliance
connected to it using a TV remote. IR remote sensor SM0038 is used for recieving the signal.
Normally when no signal is falling on pin3,the output of it will be high.When a signal of 38 KHz
from the TV remote falls on the pin3 its output goes low.This send a pulse at pin 6 of
AT89C2051 which is the microcontroller.The high output is amplified to drive the relay .For the
next signal the outputs of IC3(ULN2003) toggles state. Result, we get a relay toggling on each
press on the remote.Any appliance connected to this circuit can be switched ON or OFF.
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
CHAPTER 3
CIRCUIT COMPONENETS
analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 is
designed with static logic for operation down to zero frequency and supports two software
selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM,
timer/counters, serial port and interrupt system to continue functioning. The power-down mode
saves the RAM contents but freezes the oscillator disabling all other chip functions until the next
hardware reset.
PIN DESCRIPTION
VCC Supply Voltage
GND Ground
PORT 1 The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide
internal pull-ups. P1.0 and P1.1 require external pull-ups. 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. When 1s are written to Port 1 pins, they can be used as inputs. Port 1 also receives
code data during Flash programming and verification.
PORT 3 Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal
pull-ups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is not
accessible as a gen-eral-purpose I/O pin. When 1s are written to Port 3 pins they are pulled high
by the internal pull-ups and can be used as inputs.
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.
XTAL1 Input to the inverting oscillator amplifier and input to the internal clock
operating circuit .
OSCILLATOR CHARACTERISTICS The 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 5-1. Either a quartz crystal or ceramic resonator may be used.
The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays. It
consists of seven NPN Darlington pairs that features high-voltage outputs with common-cathode
clamp diode for switching inductive loads. The collector-current rating of a single Darlington
pair is 500mA. The Darlington pairs may be paralleled for higher current capability.
Applications include relay drivers, hammer drivers, lamp drivers, display drivers. The ULN2003
has a 2.7kW series base resistor for each Darlington pair for operation directly with TTL or 5V
CMOS devices.
Features
500mA rated collector current.
This device contains six independent gates each of which performs the logic
INVERT function.
FUNCTION TABLE
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
Fig8. LM7805 IC
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
3.7 TRANSFORMER(230/12V)
A transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled conductors—the transformer's coils. A varying current in the first or primary
winding creates a varying magnetic flux in the transformer's core and thus a varying magnetic
field through the secondary winding. This varying magnetic field induces a varying
electromotive force (EMF) or "voltage" in the secondary winding. This effect is called mutual
induction. If a load is connected to the secondary, an electric current will flow in the secondary
winding and electrical energy will be transferred from the primary circuit through the
transformer to the load. In an ideal transformer, the induced voltage in the secondary winding
(Vs) is in proportion to the primary voltage (Vp), and is given by the ratio of the number of turns
in the secondary (Ns) to the number of turns in the primary (Np) as follows:-
Fig9. A transformer
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
3.8 RELAY
A relay is an electrically operated switch. Many relays use an electromagnet to operate a
switching mechanism mechanically, but other operating principles are also used. 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.
Fig10. A Relay
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
The IR emitter outputs IR at D1. The output from sensor turns on sensor,Q1,when
there is nothing blocking it. The sensor is connected as an inverting transistor, so its
output is low when IR light is striking it. When something blocks IR beam, the output
of Q1 goes high. The output is connected to a Schmitt trigger input which converts
the slowly changing analog signal to a conventional TTL logic signal with fast rise
and fall time. It also provides noise immunity so the output gate does not make
multiple transisitions as the input signal slowly passes through the threshold.
CHAPTER 4
The AT89C2051 is shipped with the 2K bytes of on-chip PEROM code memory
array in the erased state (i.e., contents = FFH) and ready to be programmed. The
code memory array is programmed one byte at a time. Once the array is
programmed, to re-program any non-blank byte, the entire memory array needs to
be erased electrically.
1. Power-up sequence: Apply power between VCC and GND pins. Set RST and
XTAL1 to GND.
3.Apply the appropriate combination of “H” or “L” logic levels to pins P3.3, P3.4,
P3.5, P3.7 to select one of the programming operation.
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
CHAPTER 5
SOURCE CODE(PROGRAM)
INCLUDE reg_52.pdf
INPUT EQU P3.2 ; Port3, Bit2 is used as input. The demodulated signal
OUTPUT EQU P1
FLAGS: DS 1
NEW BIT FLAGS.1; Bit set when a new command has been received
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
ANS: DS 1 ;
ADDR: DS 1
JMP MAIN
JMP RECEIVE
[ Interrupt 0 routine]
RECEIVE:
cpl p3.7
clr a
mov r6,#07h
rlc a
Djnz 2,$
djnz r6,pol1
MOV SUBAD,A
mov r6,#06h
pol2:
mov c,Input
rlc a
Djnz 2,$
djnz r6,pol2
MOV A,SUBAD
MOV ADDR,A
ANL A,#0FH
MOV SUBAD,A
CJNE A,#03H,ZXC1
MOV A,COMMAND
CPL A
MOV COMMAND,A
AJMP ASZ
CJNE A,#00H,ANSS
AJMP ASZ
ANL A,#20H
MOV TOGGLE,A
CJNE A,ANS,ANSS
AJMP WAR
WAR:
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!
MOV A,COMMAND
;-------------------------------------------
MOV R0,A
JNZ CH1
AJMP GO
JNZ CH2
AJMP GO
JNZ CH3
AJMP GO
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
JNZ CH4
AJMP GO
JNZ CH5
AJMP GO
JNZ CH6
AJMP GO
JNZ go
MOV OUTPUT,#0FFH
AJMP GO
GO:
;***********************************************************
MOV ANS,TOGGLE
MOV A,ANS
CPL ACC.5
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
MOV ANS,A
;################################################################
ANS1:
RETI
MAIN:
MOV SP,#60H
SETB EA
CLR NEW
LOO:
JNB NEW,LOO
CLR NEW
AJMP LOO
END
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
CHAPTER 6
The 38khz infra-red(IR) rays energized by a remote control are received a infra-
red receiver module SM0038 of the circuit. Pin1 is connected to ground, pin2 is connected to
supply through a 47k resistor and the output is taken from pin3. The output is given to the pin6
of the microcontroller(AT89C2051) for processing. The IC ULN2003 amplifies the signal which
drives the relay. The appliance connected to the relay does operate due to signal from the remote
control.
The 12V to the relay circuit and the 5V to the microcontroller circuit is provided
by the rectifier circuit. This circuit consists of an IC LM7805 which constantly gives an output
of 5V for an input in the range of (9-12V). It has a transformer which steps down the 220V to
12V and a bridge rectifier which converts the ac to dc.
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
BIBLIOGRAPHY
2. www.8051projects.info
3. www.wikipedia.org
4. www.atmel.com
5. www.datasheetcatalog.org
6. www.electronics-tutorials.com