40
Page | 1 CHAPTER-1 INTRODUCTION TO PROJECT (A)Block Diagram TV Remote IR MicroContro Relay Rel Rel Rel Rel Rel Rel

Ir Remote Control Switch Report Print

Embed Size (px)

Citation preview

Page 1: Ir Remote Control Switch Report Print

P a g e | 1

CHAPTER-1 INTRODUCTION TO PROJECT

(A)Block Diagram

TV Remote

IR MicroController Relay Driver

Relay Relay RelayRelayRelayRelay

Page 2: Ir Remote Control Switch Report Print

P a g e | 2

(B)Introduction

IR remote controls are everywhere. Just about every piece of electronic equipment you can think of has one – TVs, VCRs, DVDs, hi-fi systems. Even the lastest cameras have them!

Why are they so popular? The answer is simple –convenience. You can change TV channels without leaving your chair. Or adjust the volume on your stereo system.

In this project we can control 6 different relays by one remote controller. Here we can use TV remote control also. Here IR sensor detects the appropriate signal from remote and gives voltage signal according to it to microcontoller.

Microcontroller gives signal to relay driver IC, so that IC on and off the relay. So the load connected with that perticular relay, switch on or off. We have one master key to switch off all the relay.

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.

Page 3: Ir Remote Control Switch Report Print

P a g e | 3

CHAPTER-2 CIRCUIT DIAGRAM & DESCRIPTION

(A)Circuit Digram

Page 4: Ir Remote Control Switch Report Print

P a g e | 4

(B)Circuit Description & Working

Remote control used here, generates 36 KHz frequency according to whatever switch is pressed. So at the receiver side the IR sensor TSOP1736 when detects IR light of 36KHz it will give low o/p otherwise it will give high o/p. So the modulated o/p generated by IR remote control will be demodulated by this sensor and the pulses will be given to micro-controller.

When the o/p of pin no. 3 is given to micro-controller, micro-controller generates pulses according to different voltages received from TSOP1736 IC on pin no.7 of micro-controller.

Here µC has been programmed that it sense the different voltages form pin no,7 and generates pulse according to it, and those different pulses are taken as o/p from pin no. 12,13,14,15,16,17,18 and 19 respectively. Actually in this project we have taken only six o/p, so only six relays can be controlled.

A 11.0592 MHz Crystal is connected between pin no.4 and 5 to generate clock pulse required for micro-controller’s operation. Reset circuit is connected to generate reset pulse whenever requred by micro-controller.

In this circuit 12 V and 5 V supply is required. Capacitor C6 is used for filtereing purpose. It doesnot allow a.c. to flow. An IC 7805 is used here. It is a voltage regulator ic. It regulates the voltage taken from transformer. Here 12 v transformer is used. A Full-wave Rectifier circuit using four 1N4007 diodes is created to convert a.c to d.c.

The different output pulses of µC are given to IC ULN2803. Its a relay driver ic. It is required because voltage taken from µC are not enough to drive a relay. So IC is used. A 12V supply is used to provide proper voltage to drive IC.

Relay driver IC chech the output of micro-controller and according to it, it drives either on or off the relay. All relay can be on and off simultaneously. It is also possible to make all the relay on at same time. There is a master switch to switch off all the relays at once. Power button on remote control is set as master key.

Page 5: Ir Remote Control Switch Report Print

P a g e | 5

CHAPTER-3 COMPNENTS DESCRIPTION

1. AT89C2051 :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 power-ful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.

2. IC 7805: 7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not give the fixed voltage output. The voltage regulator IC maintains the output voltage at a constant value. The xx in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated power supply. Capacitors of suitable values can be connected at input and output pins depending upon the respective.

Page 6: Ir Remote Control Switch Report Print

P a g e | 6

3. TSOP1736: The TSOP16 series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output signal can directly bedecoded by a microprocessor. TSOP16 is the standard IR remote control receiver series, supportingall major transmission codes.

4. ULN2803: The UTC ULN2803 is high-voltage, high-current Darlington drivers comprised of eight NPN Darlington pairs. It used as Relay, hammer, lamp and display (LED) drivers

Page 7: Ir Remote Control Switch Report Print

P a g e | 7

5. 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 or where several circuits must be controlled by one signal.

6. Crystal: A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers.

Page 8: Ir Remote Control Switch Report Print

P a g e | 8

7. Transformer: A transformer is a static 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.

8. Resistor : A resistor is a two-terminal passive electronic component which implements electrical resistance as a circuit element. When a voltage V is applied across the terminals of a resistor, a current I will flow through the resistor in direct proportion to that voltage. This constant of proportionality is called conductance, G. The reciprocal of the conductance is known as the resistance R, since, with a given voltage V, a larger value of R further "resists" the flow of current I as given by Ohm's law

Page 9: Ir Remote Control Switch Report Print

P a g e | 9

9. Capacitor: A capacitor is a passive electronic component consisting of a pair of conductors separated by a dielectric (insulator). When there is a potential difference (voltage) across the conductors, a static electric field develops across the dielectric, causing positive charge to collect on one plate and negative charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them.

10.DIODE: In electronics, a diode is a two-terminal electronic component that conducts electric current in only one direction. The term usually refers to a semiconductor diode, the most common type today. This is a crystalline piece of semiconductor material connected to two electrical terminals.

Page 10: Ir Remote Control Switch Report Print

P a g e | 10

CHAPTER-4 SOFTWARE(A)Program(in assembly language)

VAR1 equ r7 ;Temporary VariableTEMP equ 10H ;Temp variableCOUNT equ 11H ;CountADDR equ 12H ;Device addressCMD equ 13H ;CommandFLIP bit 00H ;Flip bitTOG bit 01H ;Temp bit for flipIR equ P3.3 ;IR Receiver connected to this pinSW1 equ P1.0 ;Switch 1 connected hereSW2 equ P1.1 ;Switch 2 connected hereSW3 equ P1.2 ;Switch 3 connected hereSW4 equ P1.3 ;Switch 4 connected hereSW5 equ P1.4 ;Switch 5 connected hereSW6 equ P1.5 ;Switch 6 connected hereSW7 equ P1.6 ;Switch 7 connected hereSW8 equ P1.7 ;Switch 8 connected hereSWport equ P1 ;Port at which switches are connected

org 00H ;Start of progmov SWport,#00H ;switch all relays off!mov sp,#50H ;Stack pointer initializationclr TOG ;Clear temp bit

main:jb IR,$ ;Wait for first bitmov VAR1,#255 ;3.024mS delaydjnz VAR1,$mov VAR1,#255djnz VAR1,$

Page 11: Ir Remote Control Switch Report Print

P a g e | 11

mov VAR1,#255djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#100djnz VAR1,$mov c,IR ;Read Flip bitmov FLIP,cclr Amov COUNT,#5 ;Count for address

fadd:mov VAR1,#255 ;1.728mS delay for each bitdjnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#4djnz VAR1,$mov c,IRrlc adjnz COUNT,faddmov ADDR,A ;Save the addressclr amov COUNT,#6 ;Count for Command

fcmd:mov VAR1,#255 ;1.728mS Delay for each bitdjnz VAR1,$mov VAR1,#255djnz VAR1,$mov VAR1,#255

Page 12: Ir Remote Control Switch Report Print

P a g e | 12

djnz VAR1,$mov VAR1,#4djnz VAR1,$mov c,IRrlc adjnz COUNT,fcmdmov TEMP,CMD ;Save the old commandmov CMD,a ;Save the new commandmov a,ADDR ;Cheack for valid addresscjne a,#00,nvalidmov a,TEMPcjne a,CMD,valid ;Check for valid command

nvalid:ljmp main

valid: ;Key press checkclr amov c,FLIPrlc amov TEMP,aclr amov c,TOGrlc acjne a,TEMP,valid1sjmp nvalid

valid1:mov c,FLIPmov TOG,cmov a,CMDclr ccjne a,#1,skip1 ;Check for SW1jb SW1,isset1setb SW1ljmp main

Page 13: Ir Remote Control Switch Report Print

P a g e | 13

isset1:clr SW1ljmp main

skip1:cjne a,#2,skip2 ;Check for SW2jb SW2,isset2setb SW2ljmp main

isset2:clr SW2ljmp main

skip2:cjne a,#3,skip3 ;Check for SW3jb SW3,isset3setb SW3ljmp main

isset3:clr SW3ljmp main

skip3:cjne a,#4,skip4 ;Check for SW4jb SW4,isset4setb SW4ljmp main

isset4:clr SW4ljmp main

skip4:cjne a,#5,skip5 ;Check for SW5jb SW5,isset5setb SW5ljmp main

isset5:

Page 14: Ir Remote Control Switch Report Print

P a g e | 14

clr SW5ljmp main

skip5:cjne a,#6,skip6 ;Check for SW6jb SW6,isset6setb SW6ljmp main

isset6:clr SW6ljmp main

skip6:cjne a,#7,skip7 ;Check for SW7jb SW7,isset7setb SW7ljmp main

isset7:clr SW7ljmp main

skip7:cjne a,#8,skip8 ;Check for SW8jb SW8,isset8setb SW8ljmp main

isset8:clr SW8ljmp main

skip8:cjne a,#0CH,exit ;Check for all switchesmov SWport,#00Hljmp main

exit:ljmp main

END ;End of program

Page 15: Ir Remote Control Switch Report Print

P a g e | 15

CHAPTER-5 TROUBLE-SHOOTING

Poor soldering ("dry joints") is the most common reason for the circuit not working.

After soldering carefully again, problem was solved.

An IC was burnt while soldering due to very much heat. By replacing that IC, problem was solved.

Itching process of PCB was not done well due to inappropriate concentration of CuSO4.

By doing itching process again with proper liquid we got better result.

Page 16: Ir Remote Control Switch Report Print

P a g e | 16

CHAPTER-6 APPLICATIONS & FURTHER ENHANCEMENTS

(A)Applications

i) The IR remote control circuit here can be used for any simple ON-OFF switching function.

ii) This circuit can be operated from a range of 30 foots or 10 meters using any T.V remote.

iii) For simple ON-OFF function such as controlling a lamp or fan we can use this circuit.

iv) Can be used by a bed-ridden or handi-caped person to control the fans and lights.

(B)FURTHER ENHANCEMENTS

By increasing number of relay we can operate up to 8 switch. If we use more powerfull transmitter and receiver’s sensor, we

can increased the range of operating distance. We can use power relays to control industrial appliencies. By making only required channel transmitter, we can reduce the

size of remote control.

Page 17: Ir Remote Control Switch Report Print

P a g e | 17

CHAPTER-7 COMPONENTS LIST & COST

Sr.No.

Components Quantity(pcs.)

Cost

1. PCB 1 12

2. Transformer 12-0-12 1 45

3. AT89C2051 1

4. ULN2803 1

5. IC 7805 1

6. IC TSOP1736 1

7. Crystal 1

8. Capacitor 33pF 2

9. Capacitor 10µF 1

10. Capacitor 100nF 3

11. 1N4007 4

12 TV Remote 1

Page 18: Ir Remote Control Switch Report Print

P a g e | 18

CHAPTER-8 BIBLIOGRAPHY

1. Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin d. Mckinlay,

THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEMS

2. www.8051projects.net

3. www.wikipedia.org

4. www.atmel.com

5. www.datasheetcatalog.org

6. www.google.com

Page 19: Ir Remote Control Switch Report Print

P a g e | 19

CHAPTER-9 DATASHEETS (A)1N4005 :

Page 20: Ir Remote Control Switch Report Print

P a g e | 20

Page 21: Ir Remote Control Switch Report Print

P a g e | 21

Page 22: Ir Remote Control Switch Report Print

P a g e | 22

(B) ATMEL T89C2051:

Page 23: Ir Remote Control Switch Report Print

P a g e | 23

Page 24: Ir Remote Control Switch Report Print

P a g e | 24

Page 25: Ir Remote Control Switch Report Print

P a g e | 25

Page 26: Ir Remote Control Switch Report Print

P a g e | 26

(C)TSOP1736:

Page 27: Ir Remote Control Switch Report Print

P a g e | 27

Page 28: Ir Remote Control Switch Report Print

P a g e | 28

Page 29: Ir Remote Control Switch Report Print

P a g e | 29

(D) ULN2803:

Page 30: Ir Remote Control Switch Report Print

P a g e | 30

Page 31: Ir Remote Control Switch Report Print

P a g e | 31

Page 32: Ir Remote Control Switch Report Print

P a g e | 32

(E) LM7805:

Page 33: Ir Remote Control Switch Report Print

P a g e | 33

Page 34: Ir Remote Control Switch Report Print

P a g e | 34