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 Anirban Lahon (07/169) Farooq Imran Khan(07/123) Indranuj Khound(07/143) Pallab Das(07/151) Under the guidance of DR. AROOP BARDALAI Assistant professor Department of Electrical Engineering Assam Engineering College Department of Electrical & Instrumentation Engineering Assam Engineering College, Jalukbari, Guwahati- 781013 www.final-yearprojects.co.cc | www.troubleshoot4free.com/fyp/
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Project Report
On
INFRARED REMOTECONTROL 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
Anirban Lahon (07/169)Farooq Imran Khan(07/123)
Indranuj Khound(07/143)Pallab Das(07/151)
Under the guidance of
DR. AROOP BARDALAIAssistant professor
Department of Electrical Engineering
Assam Engineering College
Department of Electrical & Instrumentation Engineering
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.
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.
Date: Dr. AROOP BARDALAI Deptt. Of Electrical & Instrumentaion Enginnering
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.
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.
The Project INFRA-RED REMOTE SWITCH USING MICROCONTROLLER 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 Microcontroller receives the Infrared Signal from the receiver and it decodes and switch on/off the appropriate Device. The Range of the system is upto 10 meters. The system works on Phillips RC5 format. High power loads can also be connected by changing the Relay. The Microcontroller is used to receive the Infrared signal from the Transmitter, the received signal is processed by the Microcontroller and according to the signal the corresponding device is switched ON/OFF.
1.2 Objectives
1. To switch on/off the Home Appliances by using a standard Remote control.
2. The system is used to switch on/off upto six electrical devices.
3. The system should work within a range of 10 meters.
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
INFRARED REMOTE CONTROL
An infra-red remote control is a component of an electronics device, most commonly a television set, used for operating the device wirelessly from a short line-of-sight distance. Since infrared (IR) remote controls use light, they require line of sight to operate the destination device. The signal can, however, be reflected by mirrors, just like any other light source..Infrared receivers
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.
In modern electronics, electronic remote control system is a well known system. Infrared remote control kit’s available in the market are quite expensive and it some one wishes to assemble one, their IC’s may not be easily available. More over for simple ON-OFF function such as controlling a lamp or fan we do not need very complex circuit. The IR remote control circuit using photodiode and phototransistor sensor suffer from major drawback of being affected by ambient light and a very low range. The advantage is that this circuit is absolutely free form ambient light interference.
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.
The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read-only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision
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.
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 .
XTAL2 Output from the inverting oscillator amplifier.
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.
3.2 ULN2003 (HIGH VOLTAGE AND CURRENT TRANSISTOR ARRAY
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.
Voltage Regulator (LM7805), having three legs, converts varying input voltage and produces a constant regulated output voltage. The LM7805 typically has the ability to drive current up to 1A The component has three legs: Input leg which can hold up to 36VDC Common leg (GND) and an output leg with the regulator's voltage. For maximum voltage regulation, adding a capacitor in parallel between the common leg and the output is usually recommended. This eliminates any high frequency AC voltage that could otherwise combine with the output voltage.
Most microprocessors, and microcontrollers have two oscillator pins labeled XTAL1 and XTAL2 to connect to an external quartz crystal, RC network or even a Ceramic resonator. In this application the Crystal Oscillator produces a train of continuous square wave pulses whose frequency is controlled by the crystal which in turn regulates the instructions that controls the device. For example, the master clock and system timing.
3.6 SIP RESISTOR
SIP stands for Serial In-line Package. single in-line package (or SIP) is an electronic device package which has one row of connecting pins. It is not as popular as the dual in-line package, but has been used for packaging RAM chips and multiple resistors with a common pin. In this project, it has been used as a pull-up resistor for port1 of the microcontroller (AT89C2051).
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:-
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.
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.
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.
Internal Address Counter: The AT89C2051 contains an internal PEROM address counter which is always reset to 000H on the rising edge of RST and is advanced by applying a positive going pulse to pin XTAL1.
To program the AT89C2051, the following sequence is recommended.
1. Power-up sequence: Apply power between VCC and GND pins. Set RST and XTAL1 to GND.
2. Set pin RST to “H”
Set pin P3.2 to “H”
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.
The Infra-Red Remote control circuit described here used here for any simple ON-OFF function. The circuit is free from ambient light interference and works upto a range of 10 meters.
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.