Introduction: TV Remote Controlled Home Appliance Using 8051

Picture of TV Remote Controlled Home Appliance Using 8051

This project is used to switch the electrical appliances remotely using TV remote. It uses philips RC5 protocol based remote. The micro controller used is of Atmel i.e. at89c2051 of 8051 type. I have used triacs instead of relays to switch the AC appliance due to the reason of switching speed of circuit.

Step 1: Parts Needed

Picture of Parts Needed

  • Dotted PCB
  • 12-0-12 step down transformer
  • 1N4007 diode
  • LM7805 5V voltage regulator
  • 1000uf electrolytic capacitor
  • at89c2051 microcontroller
  • 20dip IC base
  • 11.0592 MHz crystal
  • debounce switch
  • 10uf electrolytic capacitor
  • 33pf ceramic capacitor
  • 8.2k resistor
  • red leds
  • 1738/1838T/2238 IR receiver modules ( Use any of these, just check the pins carefully )
  • BC547 NPN transistor
  • BT136 triacs
  • soldering iron
  • soldering wire
  • 1K resistors
  • RC5 protocol TV remote
  • 8051 programmer
  • some wires and jumpers

Step 2: Circuit Diagram

Picture of Circuit Diagram

Here is the complete circuit diagram for project. I have also added eagle schematic file.

Step 3: Working on Dotted PCB

Picture of Working on Dotted PCB

Place all the components on dotted PCB according to circuit diagram. Steps shown in images.

Step 4: Assembly Code for 8051 Microcontroller

Compile this asm file using any 8051 assembler program. I have used this ASEM-51 assebler. It creates .hex file, which we need to upload to the microcontroller using 8051 programmer. I have used "Top win Universal Programmer" . Check it here Top win Products. It can be interfaced with so many microcontrollers,eeproms etc.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ; ; TV Remote based home appliance switching system. ; ; Jaspal Singh ; ; 05/06/2015 ; ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $mod51

VAR1 equ r7 ;Temporary Variable TEMP equ 10H ;Temp variable COUNT equ 11H ;Count ADDR equ 12H ;Device address CMD equ 13H ;Command FLIP bit 00H ;Flip bit TOG bit 01H ;Temp bit for flip IR equ P3.3 ;IR Receiver connected to this pin SW1 equ P1.0 ;Switch 1 connected here SW2 equ P1.1 ;Switch 2 connected here SW3 equ P1.2 ;Switch 3 connected here SW4 equ P1.3 ;Switch 4 connected here SW5 equ P1.4 ;Switch 5 connected here SW6 equ P1.5 ;Switch 6 connected here SW7 equ P1.6 ;Switch 7 connected here SW8 equ P1.7 ;Switch 8 connected here SWport equ P1 ;Port at which switches are connected org 00H ;Start of prog mov SWport,#00H ;switch all relays off! mov sp,#50H ;Stack pointer initialization clr TOG ;Clear temp bit main: jb IR,$ ;Wait for first bit mov VAR1,#255 ;3.024mS delay djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#100 djnz VAR1,$ mov c,IR ;Read Flip bit mov FLIP,c clr A mov COUNT,#5 ;Count for address fadd: mov VAR1,#255 ;1.728mS delay for each bit djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#4 djnz VAR1,$ mov c,IR rlc a djnz COUNT,fadd mov ADDR,A ;Save the address clr a mov COUNT,#6 ;Count for Command fcmd: mov VAR1,#255 ;1.728mS Delay for each bit djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#255 djnz VAR1,$ mov VAR1,#4 djnz VAR1,$ mov c,IR rlc a djnz COUNT,fcmd mov TEMP,CMD ;Save the old command mov CMD,a ;Save the new command mov a,ADDR ;Cheack for valid address cjne a,#00,nvalid mov a,TEMP cjne a,CMD,valid ;Check for valid command nvalid: ljmp main valid: ;Key press check clr a mov c,FLIP rlc a mov TEMP,a clr a mov c,TOG rlc a cjne a,TEMP,valid1 sjmp nvalid valid1: mov c,FLIP mov TOG,c mov a,CMD clr c cjne a,#1,skip1 ;Check for SW1 jb SW1,isset1 setb SW1 ljmp main isset1: clr SW1 ljmp main skip1: cjne a,#2,skip2 ;Check for SW2 jb SW2,isset2 setb SW2 ljmp main isset2: clr SW2 ljmp main skip2: cjne a,#3,skip3 ;Check for SW3 jb SW3,isset3 setb SW3 ljmp main isset3: clr SW3 ljmp main skip3: cjne a,#4,skip4 ;Check for SW4 jb SW4,isset4 setb SW4 ljmp main isset4: clr SW4 ljmp main skip4: cjne a,#5,skip5 ;Check for SW5 jb SW5,isset5 setb SW5 ljmp main isset5: clr SW5 ljmp main skip5: cjne a,#6,skip6 ;Check for SW6 jb SW6,isset6 setb SW6 ljmp main isset6: clr SW6 ljmp main skip6: cjne a,#7,skip7 ;Check for SW7 jb SW7,isset7 setb SW7 ljmp main isset7: clr SW7 ljmp main skip7: cjne a,#8,skip8 ;Check for SW8 jb SW8,isset8 setb SW8 ljmp main isset8: clr SW8 ljmp main skip8: cjne a,#0CH,exit ;Check for all switches mov SWport,#00H ljmp main exit: ljmp main

END ;End of program

Step 5: Final Touch

Picture of Final Touch

I have given some final touch to the project using some chart paper and marker.

Comments

KeshavT3 (author)2017-04-14

sir, the program is not working. I know the the program is the problem because i am getting the output manually. Please help

mail id - kr2252@gmail.com

arjunkp456 (author)2017-03-28

sir , can u send me the complete program code

mail id =arjunsureshvengeri@gmail.com

ShubhamK180 (author)2017-01-22

I would request to you sir, please share me the correct program to my email shubhamkoli1996@gmail.com

ASHISHG77 (author)2016-12-19

Sir can you please share the correct program to my mail

goraiashish6@gmail.com

thanking you

NiluS1 (author)2016-12-13

Hey would kindly tell me the connection of the transformer? I am not getting it.
And Is 1 edge of the bridge rectifier free or connected to that wire in front of it?

KetanS12 (author)2016-10-22

I tried it for engineering mini project but didn't get the output... :(

YogeshD20 (author)2016-07-28

Hey bro how much money will reqired for this project ?

DGV (author)2016-06-07

Hey bro,

Can you make the program for fan regulator ?

If you made a program for it please upload it or mail me

d.v.381995@gmail.com

Mohibullah Khan (author)2016-05-31

please! can you send me circuit daigram and programing code of the project

email address: mukhan95@gmail.com

JunezRiyaz made it! (author)2016-04-29

I made it...with Arduino

Any interested can go through the following link.

https://www.instructables.com/id/Switching-Applianc...

DGV (author)2016-04-23

For compiling any C or ASM we use keil softwere

tomatoskins (author)2015-06-12

This is awesome! I love this idea! Any plan on making a nice project enclosure? Possibly integrating it into a power strip?

vignesh_95 (author)tomatoskins2016-04-15

sir what software you have used for creating the hex file and to transmit the source cide to ic???

MilindD3 (author)vignesh_952016-04-18

Hello.,

You can use AVR studio 4.0 to create appropriate HEX file.

vignesh_95 (author)2016-04-15

sir what software did you used for creating the hex file and to transmit the source code to atmel ic ?????

that is i need to know the software for implementation.....

DGV (author)2016-04-04

Mybe rc5 based remote use 36kHz and in this project you tell to use 38khz or receiver

It can work with the trip 1738 ???

And also which remote should you use for this project ??? Means that series no. ???

PinkyG (author)2016-03-16

sir can you please suggest how did you burn that program on the mcu......coz the programmer charges 3500/- which is too expensive

chandrutce07 (author)2016-03-13

Can i use aurdino insted of controller?

kundurahul (author)2016-03-08

Maintaining and customizing assembly code is very difficult. But for 8051 I could not get good tutorial written in C. For this reason I wrote logic to decode NEC, RC6, RC5 for 8051 in C language.

I also have created similar project using 8051 microcontroller.

http://www.snrelectronicsblog.com/8051/8051-based-remote-for-home-appliance/

To get my all exiting IR related project Click Here

kundurahul (author)2016-03-08

Maintaining and customizing assembly code is very difficult. But for 8051 I could not get good tutorial written in C. For this reason I wrote logic to decode NEC, RC6, RC5 for 8051 in C language.

I also have created similar project using 8051 microcontroller.

http://www.snrelectronicsblog.com/8051/8051-based-remote-for-home-appliance/

To get my all exiting IR related project Click Here

mthummar1 (author)2016-03-06

may I connect TSOP directly to controller any pin?
How controller do decode the receive signal from remote?

mthummar1 (author)2016-03-06

may I connect directly to controller?
How controller decode the receive signal from remote?

Ashish Karena (author)2016-03-03

What is the value of Capacitor which you connect after 7805?

Which is in sky blue color?

Ashish Karena (author)2016-03-03

And sir can you please mail me correct program on mail id - ashish30495@gmail.com

Ashish Karena (author)2016-03-03

Where to connect 20k resistor which you didn't mention in circuit diagram?

Please Reply me as soon as possible....

Ashish Karena (author)2016-03-03

Where to connect 20k resistor?

saurabhpathare (author)2016-02-26

please mail me the program

saurabhpathare34@gmail.com

Abhi909 (author)2016-01-31

great project

can i place your project on my website.

i'm working on a website which is related to electrical projects.

i also mention your name.

plz reply

jaspalsgnr (author)Abhi9092016-02-26

hi abhi,

please send the address of your website. Best regards for your website.

bibinrajvn made it! (author)2015-10-31

Hi,

I completed the work. Some slight problems are there. I included 8 relays and tested all relays with load.(Pblm. No. 1) The relays connecting to 12th & 13th pin are working but not the loads connected to it, I couldn't figure out why it is.(Pblm. No. 2) All the LEDs are ON state (dim only), I think it's becoz the output of MC is active high, If we program it in such a way that the output will be active low it can be solved. (Then we need to connect AC mains to ground instead of +Vcc, PNP txr instead of NPN txr.)(Pblm. No. 3)During power ON all the loads will blink or work for a single second.(I think solving the 2nd problem will solve this also).

Hoping a valuable reply

Can you please mail me the program and circuit diagram

vishaldarak879@gmail.com

please download code

UtkarshS32 (author)bibinrajvn2015-12-09

mail me the program

shah.tkrsh@gmail.com

please send me the source code

emailid:sonalipatkar30@gmail.com

AB32 (author)bibinrajvn2015-12-08

Hello Sir, would you please share with us the correct program!

I'd really appreciate it..

Respect!

bibinrajvn (author)AB322015-12-28

pls provide the mail id

mpachpor (author)bibinrajvn2015-11-21

hello sir I need the correct program will you mail me on my mail id

Mail - mayuresh_pachpor@yahoo.in

thanks sir

hsandhale (author)2016-02-06

nice project

the source code is not working in keil it contains error i think

plz give me the correct source code

plz mail me at hsandhale@gmail.com

jaspalsgnr (author)hsandhale2016-02-26

please download code

SohailM4 (author)2016-02-17

can i get the correct

source code please am unable to compile it in

jaspalsgnr (author)SohailM42016-02-26

please download code

SohailM4 (author)2016-02-17

can i get the correct

source code please am unable to compile it

jaspalsgnr (author)SohailM42016-02-26

please use download code

darakvishal879 (author)2016-02-06

Can u plss mail me the source code and the circuit diagram of the project

my email id is vishaldarak879@gmail.com

nanthu1490 (author)2016-02-04

i want a program code or source code of this project ...can u plz sent me..

nanthininanthu1490@gmail.com

SohailM4 (author)2016-02-02

hey greât project but could u pls mail me the source code or the program to my mail

sohailmisbah1998@gmail.com

Saiyam (author)2015-06-12

Nice project. Ac mains running through an open pcb especially when you have kids roaming around is a dangerous thing. To make it safer you should mount everything to an insulated project enclosure.

jaspalsgnr (author)Saiyam2015-06-12

thanks buddy!,

This project is just for illustration of the circuit, so I left it open.

aswinragpkv (author)jaspalsgnr2016-01-05

please give the correct source code to my email id "aswinragpkvfc@gmail.com"

aswinragpkv (author)jaspalsgnr2016-01-05

please give the correct source code to my email id "aswinragpkvfc@gmail.com"

About This Instructable

46,221views

159favorites

License:

More by jaspalsgnr:Decorate Your Home With Balloons Floating in AirBe Lazy With TV RemoteAutomatic water tap using 555 timer
Add instructable to: