loading

I am too lazy to do a walk just to switch on/off any electrical appliance. So, here is my Genie, a TV remote.

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

  • Dotted PCB
  • 12-0-12 step down transformer
  • 1N4007 diode
  • LM7805 5V voltage regulator
  • 1000uf electrolytic capacitorat
  • 89c2051 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

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

Step 3: 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

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ; ; 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

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.

Step 5: Final Touch

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

Hey is that 4 diodes bridge is connected to to mb1 point?
Bhai koi is ki pdf mail karo or circuit diagram ....dgkumar007.dp@Gmail. Com
<p>You programmed the &mu;controller in assembly, wow! Great work! Justvout of curiosity, did you measure the power consumption?</p>
Your project is really awesome!!!<br>but can we do the same thing using arduino and can u please explain the code u know in a little easier language because I want to implement it on arduino as well ;)
<p>Yeah of course we can program this type of code in arduino too but as I don't have any arduino device so don't know about any program. But it must be very easy. I'll surely post an instructable when I get an arduino device.</p>
<p>I like your idea of illustrating circuitry using a poster background with the functions identified, nice work!</p>
<p>thanks! #beachsidehank</p>

About This Instructable

4,008views

94favorites

License:

More by jaspalsgnr:Decorate Your Home With Balloons Floating in Air Be Lazy With TV Remote Automatic water tap using 555 timer 
Add instructable to: