Beruflich Dokumente
Kultur Dokumente
Submitted by
AJU M.T.
GOPIKRISHNAN K.
NITHIN P.
RANJITHA P.V.
SARANYA M.
Submitted by
AJU M.T.
GOPIKRISHNAN K.
NITHIN P.
RANJITHA P.V.
SARANYA M.
Certificate
This is to certify that this is a bonafide record of the project work entitled
“PC CONTROLLED WITH TV REMOTE”
done by the following students
AJU M.T.
GOPIKRISHNAN K.
NITHIN P.
RANJITHA P.V.
SARANYA M.
Of the sixth semester, Electrical and Electronics Engineering in the year 2010
in partial fulfillment of the requirements to the award of Degree Bachelor of
Technology , in Electrical and Electronics Engineering of Cochin University of
Science and Technology.
We take this occasion to thank GOD ALMIGHTY for giving us the favour
to complete this project to the extent of our knowledge and capabilities.
We would like to thank the other faculty members also, at this occasion.
Last but not the least, we would like to thank friends for the support and
encouragement they have given us during the course of our work.
AJU M.T.
GOPIKRISHNAN K.
NITHIN P.
RANJITHA P.V.
SARANYA M.
ABSTRACT
As the name specifies “PC CONTROLLED WITH TV REMOTE” is a
circuit developed for controlling the computer with a TV remote. Mouse is an
integral part of computer which provides an easy interface with system. Both
corded and cordless or Bluetooth mouse are available in the market. But their
range of operation has always been a major constraint for users. Through our
project we have tried to increase the range to a comfortable level. For the TV
remote to work you need a device that decodes IR remote control data signals
and a PC application that communicates to this device connected to PC.
Here we used a remote control for PHILIPS TV as the PC REMOTE
since it is cheaply available. The Philips TV remote uses the IR signal within an
encoded protocol known as RC5 protocol.
The circuit can realized using digital ICs and discrete components. But
our design involves a microcontroller because it greatly simplifies the job at the
same time gives the designer great flexibility and plenty of features- all can be
accessed through the software. We selected AT89C2051 Microcontroller of
ATMEL to start our journey to the fascinating world of embedded controllers.
The AT89C2051 is a 20 pin, low-voltage, high-performance CMOS 8-bit
microcomputer with 2K bytes of Flash programmable and erasable read-only
memory (PEROM).It uses the interrupt of the microcontroller to receive the
encoded data from the Infrared receiver. Microcontroller decodes the RC5
encoded data into simple BCD and converts it to serial data which can be
taken out from the serial out pin of the Microcontroller. To interface the
microcontroller TTL logic to the RST232 logic of the computer we use a driver
IC. The output of the driver IC is connected to the PC COM port. In the
computer an application receives the serial data and a predefined action is
done according to it.
CONTENTS
PAGE NO.
1. INTRODUCTION 1
2. BLOCK DIAGRAM 2
3. WORKING PRINCIPLE 3
4. CIRCUIT DIAGRAM 4
5. COMPONENTS LIST 5
6. FLOW CHART 6
7. DESCRIPTION OF COMPONENTS 10
8. PROGRAMME 21
9. EVALUATION 29
12. CONCLUSIONS 36
13. REFERENCE 37
14. DATASHEETS 38
Project Report -2010 Control Of PC With TV Remote
1. INTRODUCTION
The invention of microcontrollers is the cutting edge of
futuristic technology. Microcontrollers have made a deep impact
in various fields of science, engineering and technology. The
main perspective of this project is to study various functions of
AT89C2051 as a controlling device. AT89C2051 is a powerful
microcomputer which provides a highly-flexible and cost-effective
solution to many embedded control applications. This powerful
yet easy to program CMOS 8-bit microcomputer with 2K bytes of
flash programmable and erasable read-only memory (PEROM).
This device easily adaptable for automotive, industrial,
appliances and consumer entry level product applications that
require field re-programmability. In our project we use this chip
as the main component of the system. It receives the RC5
encoded IR signal from the receiver and produces equivalent
serial 8bit binary output in serial out pin. The major part of this
project is the decoding of the RC5 signal. All those function of
decoding is done by the microcontroller.
Visual Basic is a tool that allows you to develop Windows
(Graphic User Interface - GUI) applications. The applications
have a familiar appearance to the user. In the PC the installed
software PC REMOTE.exe is created in visual basic. In this
programme we have written that what to do when different serial
data appears in the serial port of the PC. All the actions were
predefined in this application. Actually this software is doing all
the actions like mouse control, media player control etc
according to remote control operation.
2. BLOCK DIAGRAM
3. WORKING THEORY
A 230/12v transformer is used to step down 230v to 12v
which is fed to the bridge rectifier. The output is fed to the input
of regulator IC (LM7805). Thus a constant voltage of 5V is
obtained. Capacitors of value 1000µF are used to remove high
frequency ripples.
Thus 5V is fed to the IR receiver, AT89C2051-
Microcontroller and driver IC MAX-232.
There is IR receiver which receives the 14Bit RC5 encoded
IR signal from the TV remote which is connected to the
microcontroller. The IR receiver converts the IR signal to 14 bit
5V peak pulse train. Microcontroller decodes the 14Bit pulse
train. Since we just need the 6 command bits, one toggle bit and
one start bit the program is written to out only 8Bit from the 14Bit
input. Microcontroller outs the 8Bit data as serial data through the
serial data out pin of the microcontroller. The microcontroller is of
CMOS logic and the PC COM port of the PC is of RST232 logic
therefore a TTL/CMOS-RST232 driver/receiver IC is used. Thus
the 8Bit BCD data corresponding to a specific button in the
remote appears in the PC-COM port of the computer.
The software PCREMOTE.exe installed in the computer is
started. Then it starts to read the 8Bit BCD data in the RST port.
Corresponding to the 8Bit data a predefined action will be done
by the software like mouse up, mouse down, right mouse click,
launching windows media player, volume up, volume down etc.
When the application PCREMOTE.exe is closed the control on
the PC with TV remote ends.
4. CIRCUIT DIAGRAM
5. COMPONENTS LIST
COMPONENTS SPECIFICATION
µC AT89C2051
IC1 MAX232
Resistors
R5 10kΩ
Capacitors
C2,C3 33pF
C6 10OnF
C4,C7,C8,C9,C10 10µF,60V
Miscellaneous
IRX1 TSOP 1738
LED1 RED
S1 MICROSWITCH
XTAL1 11.0592MHz
6.FLOW CHART
START
INITIALISE VARIABLES
TEMP,ADDR, CMD, COUNT
CLEAR RAM
IS NO
BIT A
HIGH
YES
DELAY 3.024mS
INITIALISE COUNT=5
DELAY 1.728mS
DECREMENT COUNT
NO IS
B COUNT
=0
YES
STORE ADDR
INITIALISE COUNT=6
DELAY 1.728mS
DECREMENT COUNT
NO IS
COUNT
=0
YES
STORE IN ACCUMULATOR
STORE IN CMD
IS NO
ADDR A
=00H
YES
SET MODE=0
NO IS YES
MODE=
0
KEYBOARD MOUSE
SERIAL TRANSMIT
MODE, TOGGLE, CMD
KEYBOARD
IS
TEMP=CMD
COMPLEMENT TOGGLE
RETURN
MOUSE
IS
TEMP=CMD
COMPLEMENT TOGGLE
RETURN
7. DESCRIPTION OF COMPONENTS
7.1.POWER SUPPLY
CIRCUIT DIAGRAM
Output Current up to 1A
Output Voltage of 5V
Thermal Overload Protection
Short Circuit Protection
Output Transistor Safe Operating Area
Protection
7.3. TV REMOTE
The TV remote here we used is the remote PHILIPS
RC7812.It uses a protocol invented by PHILIPS known as RC5
protocol.
Features
7.4. IR RECEIVER
Features
7.5. MICROCONTROLLER
PORT 1
PORT 3
7.6 DRIVER IC
The maximum current that can be delivered by a
AT89C2051 microcontroller is 25mA. Thus the serial output
taken from the microcontroller is of TTL/CMOS logic. In
TTL/CMOS logic the logic levels are +5V and 0V.Where the PC
COM port works in a different communication standard known as
Serial RS-232. Thus the RS-232 signal levels are far too
high TTL electronics, and the negative RS-232 voltage for high
can’t be handled at all by computer logic. This communication
works with voltages -15V to +15V for high and low. To receive
serial data from an TTL/CMOS interface the voltage has to be
up. When communicating with PC COM port we need to convert
7.6.1 Features
Most PC's have one or two serial ports. Each has a 9pin
connector (sometimes 25pin) on the back of the computer.
Computer programs can send data (bytes) to the transmit pin
(output) and receive bytes from the receive pin (input). The other
pins are for control purposes and ground.
The serial port is much more than just a connector. It converts
the data from parallel to serial and changes the electrical
representation of the data. Inside the computer, data bits flow in
parallel (using many wires at the same time). Serial flow is a
stream of bits over a single wire (such as on the transmit or
receive pin of the serial connector).
7.8. PC REMOTE.exe
8. PROGRAM
VAR1 equ r7 ;Temporary Variable
TEMP equ 10H ;Temp variable
COUNT equ 11H ;Count
ADDR equ 12H ;Device address
CMD equ 13H ;Command
TEMP1 equ 14H ;Temporary Variable 1
FLIP bit 00H ;Flip bit
TOG bit 01H ;Temp bit for flip
MODE bit 02H ;Mouse mode/Keyboard mode
default:mouse
VALID bit 03H ;Valid bit
IR equ P3.3 ;IR Receiver connected to this pin
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
jb MODE,key ;Use mouse mode if Mode bit is 0
acall mouse
ljmp main
key: ;or keyboard mode if Mode bit is 1
acall keyboard
nvalid:
ljmp main
mskip:
cjne a,#01H,mskip1
acall chk_valid
jb VALID,ok1
ret
ok1:
mov a,#31H
acall tx
ret
mskip1:
cjne a,#02H,mskip2
mov a,#32H
acall tx
ret
mskip2:
cjne a,#03H,mskip3
acall chk_valid
jb VALID,ok2
ret
ok2:
mov a,#33H
acall tx
ret
mskip3:
cjne a,#04H,mskip4
mov a,#34H
acall tx
ret
mskip4:
cjne a,#05H,mskip5
mov a,#35H
acall tx
ret
mskip5:
cjne a,#06H,mskip6
mov a,#36H
acall tx
ret
mskip6:
cjne a,#26H,mskip7
mov a,#37H
acall tx
ret
mskip7:
cjne a,#38H,mskip8
mov a,#38H
acall tx
ret
mskip8:
cjne a,#10H,mskip9
mov a,#37H
acall tx
ret
mskip9:
cjne a,#11H,mskip10
mov a,#38H
acall tx
mskip10:
ret
chk_valid:
mov a,TEMP
cjne a,CMD,ms_valid1
ret
ms_valid1:
clr a
mov c,FLIP
rlc a
mov TEMP1,a
clr a
mov c,TOG
rlc a
cjne a,TEMP1,ms_valid
clr VALID
ret
ms_valid:
mov c,FLIP
mov TOG,c
setb VALID
ret
keymode1:
setb MODE
ret
next:
cjne a,#26H,next1
mov a,#37H
acall tx
ret
next1:
cjne a,#38H,next2
mov a,#38H
acall tx
ret
next2:
cjne a,#10H,next3
mov a,#37H
acall tx
ret
next3:
cjne a,#11H,next4
mov a,#38H
acall tx
ret
next4:
cjne a,#20H,next5
mov a,#36H
acall tx
ret
next5:
cjne a,#21H,next6
mov a,#35H
acall tx
ret
next6:
cjne a,#0DH,next7
mov a,#39H
acall tx
next7:
ret
END
9. EVALUATION
APPLICATION
PC remote control is used to control the computer as a
wireless mouse. This remote can all multimedia operation in a
computer like movie, music playing, volume control, forwarding,
reverse, etc. It simply converts your PC into a multimedia PC. It
can be further modified into do greater jobs in the computer like
log off, stand by, restart, shut down etc.
ADVANTAGE
This circuit is simple to use and efficient. It can be
assembled with ease. It is cheap and hence and very economic.
It is small in size and can be fixed just as a peripheral device.
It gives a range of operation other than any PC remote available
in the market.
DISADVANTAGE
The one and only one disadvantage is that less or more
line of sight operation should be maintained to get easy
functionality of this circuit.
Components layout
PCB FABRICATION
PCB Layout
TOTAL COST=361.25
12. CONCLUSION
13. REFERENCE
WWW.KEIL.COM
PROGRAMMING WITH VISUAL BASIC 6.0
: MOHAMMED AZAM
WWW.8051PROJECTS.COM
WWW.DATASHEETCATALOG.COM
WWW. SODOITYOURSELF.COM
WWW.ELECTRO-TECH-ONLINE.COM
14. DATASHEETS
www.fairchildsemi.com
MC78XX/LM78XX/MC78XXA
3-Terminal 1A Positive Voltage Regulator
Features Description
• Output Current up to 1A The MC78XX/LM78XX/MC78XXA series of three
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V terminal positive regulators are available in the
• Thermal Overload Protection TO-220/D-PAK package and with several fixed output
• Short Circuit Protection voltages, making them useful in a wide range of
• Output Transistor Safe Operating Area Protection applications. Each type employs internal current limiting,
thermal shut down and safe operating area protection,
making it essentially indestructible. If adequate heat sinking
is provided, they can deliver over 1A output current.
Although designed primarily as fixed voltage regulators,
these devices can be used with external components to
obtain adjustable voltages and currents.
TO-220
1
D-PAK
1
1. Input 2. GND 3. Output
Rev. 1.0.1
©2001 Fairchild Semiconductor Corporation
MC78XX/LM78XX/MC78XXA
o
Operating Temperature Range TOPR 0 ~ +125 C
o
Storage Temperature Range TSTG -65 ~ +150 C
MC7805/LM7805
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 4.8 5.0 5.2
Output Voltage VO 5.0mA Io 1.0A, PO 15W
V
VI = 7V to 20V 4.75 5.0 5.25
VO = 7V to 25V - 4.0 100
Line Regulation (Note1) Regline TJ=+25 oC mV
VI = 8V to 12V - 1.6 50
IO = 5.0mA to1.5A - 9 100
Load Regulation (Note1) Regload TJ=+25 oC IO =250mA to mV
- 4 50
750mA
Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA
IO = 5mA to 1.0A - 0.03 0.5
Quiescent Current Change IQ mA
VI= 7V to 25V - 0.3 1.3
Output Voltage Drift VO/ T IO= 5mA - -0.8 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA=+25 oC - 42 - V/Vo
f = 120Hz
RippleRejection RR 62 73 - dB
VO = 8V to 18V
Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - V
Output Resistance rO f = 1KHz - 15 - m
Short Circuit Current ISC VI = 35V, TA =+25 oC - 230 - mA
o
Peak Current IPK TJ =+25 C - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in Vo due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
2
MC78XX/LM78XX/MC78XXA
Mechanical Dimensions
Package
TO-220
25