Вы находитесь на странице: 1из 37

ccccccccccccc

A Project Report
On
Controlling PC using TV remote
c

m c c


c cc c


c  cc c
c

 !"c  c

Œr. HITESH PATELc


c

# 
!"c$%! c&'c

Electronics & Communication Engineeringc


c

ccccc( ) c*m   c)+c (*))c,( * c

cccccccccccc

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c

ACKNOWLEDGEŒENT

I take this opportunity to thank my respected H.O.D. Mr. JAYMIN BHALANI and Mr.
HITESH PATEL without whose support and encouragement, this project could not have been
completed.
I also take this opportunity to thank my other faculty members and friends who have
helped me in gathering and organizing the required information.

cccccccccccccccc

c
c
c
c 
c c
  c  c c c c c c c
c
ccccccccccccc
c

  c
c
cc
c c  c* - c)+c ( cm $ * mc&""c*&c
ccc
c
  c c   cc c
 c   c
 c
cc
c
  c)+c
).  c
c

 c  c   c
c  c    c 
c  c  c
c  c

  
c c ! !c
c  c
  c
c 
 c"c
  
c

 ! c
c#  c$  c
c  c c !c%&'(()c

c
c

m/ c m/ c
c c c
ccc cc c
!c"c#c$%c
&$&'c(c
$&$c
))c
c

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
ABSTRACT

This final report is established to fulfill the Final year Project/Thesis requirement for
Engineering for final semester student, a standard guideline is prepared to standardize various
documentations and this report is done mainly to list down all the important aspect of the project
or the electrical and electronic device that designed.
We introduce a method of how electronics devices and machines can be controlled remotely
from an operator/user. As a practical model we design a microcontroller 8051 based receiver
circuit may connected to Personal computer. This project is an implementation of RC5-remote
reception on an 8051 microcontroller. The received code is decoded and sent to the PC IR
remote software developed using high level graphical programming language (Visual Basic).
The cursor position is moved according to the keys pressed.
The project report focuses on the system which is designed by using the Microcontroller
AT89c2051. The infrared receiver have three pins in which two pins are for +5v supply and
ground while the third pin is for data output. The Infrared Receiver is designed for demodulating
the frequency of 30 kHz to 40 kHz, for example, TSOP1738 is designed for demodulating
frequency of 38 kHz which is used in our project.
The IR receiver module receives the data sent by remote handset, amplifies, demodulates and
converts it to MCU compatible voltage format and outputs it on its data output pin. The
microcontroller decodes the infrared signal data and the microcontroller will sent the infrared
Key code to the PC through the Serial port.
We use Microsoft Visual Basic 6.0 to receive the Key code through the Component called
MSCOMM which is a component for the Com port control. Through this component we get the
key code and do the appropriate functions.
After getting this key code of the Remote control the program compare the key code with the
code present in the program and if they are equal then the corresponding function was done.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
INDEX

1.c INTRODUTION«««««««««««««««««««««««««............1
Introduction to Project«««««««««««««««««««««««««....1
Possible Design««««««««««««««««««««««««««««...1
Application Of Project«««««««««««««««««««««««««....2
2.c HARDWARE««««««««««««««««««««««««««««....3
Block Diagram««««««««««««««««««««««««««««...3
Flow Chart««««««««««««««««««««««««««««««.4
Used Component and Description«««««««««««««««««««««.4
1.c List of Component Used«««««««««««««««««««««5
2.c Description««««.««««««««««««««««««««««7
Calculation«««««««««««.««««««««««««««««««..14
Circuit Diagram«««««««««.««««««««««««««««««..15
Circuit Operation«««««««««.«««««««««««««««««....16
Trouble shooting««««««.«««.««««««««««««««««««16
3.c SOETWARE«««««««««««««««««««««««««««««21
Flow Chart of Details«««««««««««««««««««««««««...21
Software Details«««««««««««««««««««««««««««...22
1.c Initialization«««««««««««««««««««««««««.22
2.c Defined Serial Interrupts«««««««««««««««««««......22
3.c Generating Delay«««««««««««««««««««««««..23
4.c Compare With RC-5 Protocol«««««««««««««««««......23
5.c Transmit«««««««««««««««««««««««««««24
Main Program«««««««««««««««««««««««««««««24

1.c ASSEMBLY CODE««««««««««««««««««««««24


2.c VB CODE««««««««««««««««««««««««««29

4.c USER GUIDE««.««««««««««««««««««««««««««45


Operating Manual«««««««.«««««««««««««««««««...45
Specification of Project««««.««««««««««««««««««««..45

5.c LIMITATIONS««««««««««««««««««««««««««««46

6.c COST OF PROJECT««««««««...««««««««««««««««.....47


Cost of Practical Work««««««««««««««««««««««««.....47
Miscellaneous Cost««««««««««««««««««««««««««..47
CONCLUSION«««««««««««««««««««««««««««...48
FUTURER SCOPE««««««««««««««««««««««««««49
APPENDIX-1««««««««««««««««««««««««««««50
APPENDIX-2««««««««««««««««««««««««««««63

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
LIST OF FIGURES
1.2 PIC Microcontroller 18f452«««««««««««««««««««««««1
2.1 Block Diagram
2.2 Flowchart
2.3 Block diagram of power supply
2.4 Resistor
2.5 Symbol of Capacitor
2.6 IR Sensor
2.7 MAX 232
2.8 RS 232 Connector
2.9 Serial Communication with Modem
2.10 DB9: View Looking Into Male Connector
2.11 DB9: View Looking Into Female Connector
2.12 Symbol of Crystal Oscillator
2.13 Circuit Diagram
2.14 TV Remote
2.15 RC-5 Protocols
2.16 IR sensor
2.17 Microcontroller
2.18 Pin diagram of RS232
3.1 Software Flowchart

LIST OF TABLE

Table 2.1 Resistor Color Code

LIST OF SYŒBOLS/ABBREVATION
1.c RAM-Random Access Memory
2.c ROM- Read Only Memory
3.c I/O- Input/output
4.c XTAL- CRYSTAL
5.c AM- Amplitude Modulation

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
CHAPTER 1-INTRODUCTION
1.1c-INTRODUCTION OF THE PROJECT

In this modern age, we are using different remote control for controlling different electronic
devices. But everyone in this world wants to operate the different devices with the help of
one remote control. For this purpose we use the microcontroller. One of them is the 8051
microcontroller family.

This project is an implementation of RC5 ± remote reception on an 8051 microcontroller.


The received code is decoded and sent it to the PC IR remote software written in Visual
Basics via serial communication. Then it will be processed in the pc remote software. The
cursor position is moved according to the keys pressed. There are to modes of operation one
is as mouse control and second is Windows media control. When using multimedia pc we
can perform volume control, stop, and play/pause type of different operations using TV
remote as a mouse. This project can be extended to control all function of pc by remote.

1.2c-POSSIBLE DESIGNS
The same device can also be developed in other manners also. Some possible ways are
mentioned below:

ùc PIC microcontroller 18f452

Fig 1.2 PIC Microcontrollers 18f452

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
1.3c± APPLICATION OF PROJECT
The following functions can be done with PC Remote control.
ac All Numerical Keys (0-9)

ac Arithmetic Keys (+,-,/,*)

ac Enter, Escape, Help , Refresh , Caps lock , Tab , Back space , delete , Left
,Right , up down arrows , Page up, Page down ,Windows keys.

ac Calculator , Notepad

ac CD drive Open/Close

ac Control panel

ac Computer log off, reboot or shutdown

ac Volume Up ,Down , Mute

ac 5 User defined Programs

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
CHAPTER 2- HARDWARE
2.1- BLOCK DIAGRAM:
Here is the basic block diagram of our project which illustrates the theme of our project.

Data Decoded
Data ' Transmitted value is sent Procss in the
' are decoded to pc through pc remote
through in 8051in serial control
remote microcontroll communicati software
er on

Fig 2.1 Block Diagram

The fig2.1 shows the block diagram of the controlling pc using TV remote. From this
fig we know that in this first the data are transmitted through the remote. After this data are
decoder with the help of 89c2051 microcontroller. After this the decoder value is sent through
the pc via serial communication port. Then according this the function is processed through the
software using pc remote control software.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.2 FLOW CHART:

Select the mode


of operation

Press remote key

Receive IR code

Decoded IR code

Generate proper
signal level

Receive in PC
common port

Execute using
software in PC

Fig 2.2 Flow chart of hardware working

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
From this flow chart we can say that first we have to select the mode with the help of the
TV. After this the key will be pressed. Then the infrared rays will be transmitted. These rays will
be detected by the infrared sensor which is the receiver circuit. Then this data will be passed to
the microcontroller. Microcontroller AT89c2051 decoded this data and transmit the data to the
serial communication port. Serial communication port RS232 will transmit the decoded data
which is received from the microcontroller. Then this data will perform the function which is
defined in the program. Now program will precede the data and perform the function. In this
manner we can control the pc using the TV remote.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.3 USED COMPONENTS AND DESCRIPTION:
2.3.1 LIST OF COMPONENT USED:

2.3.1.1 POWER SUPPLY:

ac CAPACITOR:
1.c 1000mF/16V electrolytic
2.c 100nF polyester (2 nos.)
3.c 100nF/16V electrolytic

ac DIODE:
1.c 1N4004 or bridge of passages 50V-1A (4 nos.)

ac VOLTAGE REGULATOR:
1.c LM7805

ac TRANSFORMER:
1. 220V/12V- 10V

2.3.1.2 CIRCUIT:

ac RESISTOR:
1.c 10K

ac CAPACITOR:
1.c 10 µf (5 Nos.)
2.c 33 pF (2 Nos.)
3.c 100 nF

ac IR SENSOR:
1.c TSOP 1736

ac MAX 232 RS 232 CONNECTOR

ac CRYSTAL OSCILLATOR (XTAL):


1.c 11.0592 MHz

ac AT89C2051 MICROCONTOLLER

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.3.1.1 POWER SUPPLY:

Description:

Above fig shows the block diagram of power supply. 230V power supply input is given to the
transformer. Transformer steps down this voltage to 9V. Now this step down ac voltage is given
to the rectifier to make it dc. Here bridge Rectifier is used to convert this ac voltage to the dc
voltage. The o/p of the bridge rectifier contains ripples so these ripples can be removed by
voltage using filter. Capacitor is used as a filter. Capacitor is connected at the rectifier o/p. and a
dc voltage is obtained across the capacitor. Now this filter o/p and a dc regulator voltage are
obtained across the capacitor . IC regulator regulates the dc voltage to the desired voltage. Here
fixed voltage regulator fixes the output voltage to the given value.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.2.1.2 DESCRIPTION OF THE CIRCUIT COMPONENTS

2.3.1.2.1 RESISTOR

Resistor is a component that resists the flow of direct or alternating electric circuit. Resistors
can limit or divide the current, reduce the voltage, protect an electric circuit, or provide large
amount of heat or light. An electric current is the movement of charged particles called electrons
from one region to another. Resistors are usually placed in electric circuits.

Physicists explain the flow of current through a material, such as a resistor, by comparing it to
water flowing through a pipe. Resistors are designed to have a specific value of resistance.
Resistors used in electric circuits are cylindrical. They are often color coded by three or four
color bands that indicate the specific value of resistance. Resistors obey the ohm¶s law, which
states that the current density is directly proportional to the electric field when the temperature is
constant.

How to identify the resistance value from color bands:

Hold the resistor as shown below:

Three bands that are close together are to the left.

Then colors of;

Band no.1 signifies the 1st digit

Band no.2 signifies the 2nd digit

Band no.3 the multiplier.

Band no.4 the tolerance.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c

Band Color Significant Digit Multiplier Tolerance


Black 0 1
Brown 1 10
Red 2 100
Orange 3 1k
Yellow 4 10k
Green 5 100k
Blue 6 1M
Violet 7 10M
Grey 8 -
White 9 -
Gold - 0.1 5%
Silver - 0.01 10%
No Band - - 20%

Table: 2.1 Resistor Color Code

2.3.1.2.2 CAPACITOR:

Capacitors store electric charge. They are used with resistors in the timing circuits because it
takes time for a capacitor to fill with charge. They are used to smooth varying DC supplies by
acting as a reservoir of charge. They are also used in filter circuits because capacitors easily pass
AC signals but they block DC signals.

Fig. 2.5 Symbol of Capacitor

Capacitance is a charge of a capacitor¶s ability to store charge. A large capacitance means that
more charge can be stored. Capacitance is measured in farads, symbol F. However 1F is very
large, so prefixes are used to show the smaller values.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
Three prefixes (multipliers) are used, µ (micro), n (nano) and p (pico):

ac µ means 10-6 (millionth), so 1000000µF = 1F


ac n means 10-9 (thousand-millionth), so 1000nF =1µF
ac p means 10-12 (million-millionth), so 1000pF =1 F

2.3.1.2.3 Infrared Sensor (IR sensor ± TSOP 1736):

An infrared sensor is a device that can detect infrared light which is below the optical spectrum
for use to a purpose. Most of the remote controls for TVs and other entertainment equipment use
infrared energy as the transmission medium to carry information between the controls and to be
operated. Infrared sensors also have important scientific, military, security and rescue whose
magnitude is 38 kHz, distance may be 10 meters.

Fig. 2.6 IR Sensor

2.3.1.2.4 MAX 232:

The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals
suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver
and typically converts the RX, TX, CTS and RTS signals.

Fig. 2.7 MAX 232

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.3.1.2.3 RS 232:

In telecommunications, RS-232 (Recommended Standard 232) is a standard for serial binary


data signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit
Terminating Equipment). It is a commonly used in computer serial ports. An RS-232 port can
supply only limited power to another device. The number of output lines, the type of interface
driver IC, and the state of the output lines are important considerations.

Fig. 2.8 RS 232 Connector

In serial communication the terminal end (PC) is called the Data Terminal Equipment (DTE) and
the modem is called the Data Communication Equipment (DCE) as shown in the diagram below.

Fig 2.9 Serial Communication with modem

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
RS-232 signals have a direction (in or out) depending on whether they are with respect to a DTE
or a DCE. In the entire pin out diagrams below the signal direction is with respect to the DTE
(PC).

Fig. 2.10 DB9: View looking into male connector

Fig 2.11 DB9: View looking into female connector

2.3.1.2.6 CRYSTAL OSCILLATOR (XTAL ± 11.0592 MHz):

A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating
crystal of piezoelectric material to create an electric signal with a very precise frequency. This
frequency is commonly used to keep track of time, to provide a stable clock signals for digital
integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most
common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed
around them were called ³crystal oscillator´. Quartz crystals are manufactured for frequencies
from tens of megahertz.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c

Fig 2.12 Symbol of Crystal Oscillator

The crystal used in the circuit is AB-11.0592MHz-B2 often called Oscillators, which have
mounting type is through hole. Its Oscillating Frequency is 11.059200MHz and its operating
temperature is + 20ppm. It has operating mode fundamentally and its operating temperature is -
200 C (minimum) to 700C (maximum).

Crystal 1: Input to inverting oscillator amplifier and input to the internal clock
generator circuits.

Crystal 2: Output from the inverting oscillator amplifier.

Oscillator characteristics: XTAL1 and XTAL2 are the input and output, respectively, of an
inverting amplifier. The pins can be configured of use an On-chip oscillator. To drive the device
from an external clock source, XTAL1 should be driven while XTAL2 is left unconnected
except that two PSEN activations are skipped during each access to external data memory.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.3.1.2.7 AT89C2051 MICROCONTROLLER:

The AT89C2051 is a low voltage, high performance CMOS 8-bit microcomputer with 2K bytes
of Flash programmable and high density nonvolatile memory (PEROM). The device is
manufactured using Atmel¶s high±density nonvolatile 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.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.4 CALCULATIONS:
This project is working on the RC-5 protocol. In this project, we are transmitting data via
serial communication. For this we have to define the BAUD RATE for the serial communication.
The Equation for this is given below.

When SMOD=0, 8051 divides 1/2 of the crystal frequency by 32 and uses that frequency for
timer1 to set the BAUD RATE. In our case CRYSTAL FREQUENCY=11.0592MHz,

Machine cycle frequency =11.0592MHz/12 = 92106 kHz

92106/32=28,000 Hz since SMOD=1.

This is the frequency used by the Timer 1 to set the baud rate.

In our case SMOD is 0 so baud rates for this 9600.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.5 CIRCUIT DIAGRAM:

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.6 CIRCUIT OPERATION
In this circuit mainly operation is divided into three different parts. The different parts are listed
below.

(1)cTransmitting data via remote


(2)cDecoding data
(3)cDecoder data transmit to the pc via serial communication port

2.6.1 TRANSMITTING DATA VIA TV REMOTE

In this circuit, for transmitting data we are using Phillips remote. Because Phillips remote are
working on the RC-5 protocol. In this project we are working on the rc-5 protocol.

Fig. 2.14 Phillips Remote (RC5 protocol)

This is one of the Phillips remote which is working on the RC-5 protocol. The function of the rc-
5 protocol is describe below First of all, Phillips adopted or created the RC5 standard that uses
fixed bit length and fixed quantity of bits. Each time you pass a button at the Phillips remote
control, it sends a train of 14 bits, 1.728ms per bit, the whole train is repeated every 130ms if you
keep the button pressed. Each bit is sliced in two halves. The left and right half opposed levels. If
the bit to be transmitted is one (1), its left side is zero while its right side is one. If the bit to be

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
transmitted is zero (0), its left side is one while the right side is zero. The left and right half has
opposed levels. If the bit to be transmitted is one (1), its left side is zero while its right side is
zero. It means that the second half of the bit is actually the same meaning of the bit to be
transmitted, as you can see at the shaded blue right side of the bit as on, means bit transmitted
=1. If you want to measure the

Correct logic level directly from the Receiver Output, you should measure at the first half of the
bit. The correct interpretation is that it changes level exactly at the middle of bit time. At the IR
Receiver output a bit Zero changes level from Up to Low. There are a minimum quantity of
incoming 27µs pulses to the demodulator understand it is at the right frequency and then drop its
output. The quantity of pulses used at a bit ³0´ to be transmitted it means 32 square pulses of
27µs each , then 32×27µs of silence. The bit ³1´ is the opposite, 32×27µs of silence followed by
32 square pulses of 27µs. Our job here will be to decode the receiving of the changing at the
middle of the bit, if going down, means bit 0, going up, means bit 1.RC5 is a standard infrared
data communication protocol used in remotes. This protocol was developed by Philips. It has
2048 different commands which are divided into 32 addresses each of 64 commands.

RC5 Bit Logic

RC5 standard uses fix bit length and fixed of bits. It uses bi phase modulation technique i.e. each
bit consists of two parts and has a level transition and a µ0¶ is defined by high to low transition.
The duration of each bit is equal to 1.778ms since the RC5 protocol consists of 14 bits so the
total duration is approximately 24.8ms. The carrier frequency used for transmitting is 36 KHz.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
As stated earlier this protocol consists of 14 bits as follows:

Fig 2.15 RC5 Protocol

The first two bits are the start bits used for Automatic Gain Calibration (AGC) of the receiver.
These bits are basically two HIGH bits. The third bit is TOGGLE BIT or CHECK BIT, this bit
toggles every time a new button is pressed. The next 5 bits ADDRESS BITS each device has a
specific address. This is used to identify which kind of device executes the command bits. The
next 6 bits are COMMAND BITS. These bits are used to give instruction to the address device
i.e. what action to perform. Since the carrier frequency of the RC5 code is 36 kHz we require a
receiver with a response frequency of 36 kHz. One such receiver is VISHAY¶S TSOP1836. It is
basically a 3 pin device and gives demodulated output signal which can directly be decoded by
the microcontroller.

2.6.2 DECODING DATA

With the help of TV remote we can send the data to the receiver circuit. The infrared sensor will
take the data circuit is working on the 36 kHz frequency. So the decoding process is done
through two different parts.

ùc Infrared Sensor
ùc Microcontroller AT89C2051
ùc Decode data transmitted via serial communication

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.6.2.1 INFRARED SENSOR

Fig. 2.16 Infrared sensor

In this circuit we are using the infrared sensor tsop1736. It has working on the 36 kHz carrier
frequency. The demodulated output signals can directly be decoded by a microprocessor.
TSOP1736 is the standard IR remote control receiver series, supporting all major transmission
codes. The receiver code is sent to the at89c2051 microcontroller. In this project we are using rc-
5 protocol in which we are using 36 kHz carrier frequency. So for this project tsop1736 is more
compatible than anything else.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
2.6.2.2 MICRO CONTROLLER AT89C2051:

Fig. 2.17 Microcontroller 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 AT89C2051 provides the
following standard features: 2K Bytes of Flash, 128bytes 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. When we are transmitting data from remote it will be sensed and
demodulated by the infrared sensor. After this the data will be transmitted to the microcontroller
AT89C2051. Now the data will be decoded with the help of the microcontroller. In this project
we are using port 3.3 which is used as an interrupt 1. Also we are using port 20 which is voltage
supply pin. The operating range of this microcontroller is 2.5v to 6v. So, we are giving voltage
supply of 5v. Clock pulses are given by the crystal. For this we are using 11.0592 MHz crystal.
We need a specific frequency so we have to use an 11.0592 MHz crystal. With the help of the
receiver and transmit pin we are using to received the data and transmit the data. Microcontroller
will decode data will be sent to the RS 232. In this manner data will be sent to the serial
communication port.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c

2.6.3 DECODE DATA TRANSMITTED VIA SERIAL COMMUNICATION:

The decoded data will be transmitter from the microcontroller and received by the serial
communication port. The data will be transmitted to the PC via communication port. For this
project we are using 9 pin R232 (db9).

This is the basic diagram of the RS232. With the help of this port can do a serial communication
port? In this we are doing universal asynchronous port (UART) mode.

2.7 TROUBLE SHOOTING OF CIRCUIT


2.7.1 POWER SUPPLY:

ac In power supply circuit make sure that your transformer gives exact output or not.
If you are using 220v/9v transformer then your transformer must give 9v output.
ac If you are using bridge rectifier then check the direction of all the diodes.
ac After bridge connection if you are using capacitor for filtering then make sure
about positive and negative terminal of the capacitor.
ac After filtering you have to consider the terminal of the voltage regulator. If you are
using LM7805 then you should clear which one is vcc, gnd and output.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
CHEPTER 3 SOFTWARE
3.1c FLOW CHART OF SOFTWARE:



*cc#c
$#c#$'

c c'c
#'

+c%$c,-./'c


c$c0

10$c$c
$'c$

$#c2 c
 34c#$$&$

'

Fig 3.1 Flow chart of software


c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
Fig 3.1 is a flow design of software which is used in the PC remote control project. In this type
first we initialize the variable. After than it was defined serial interrupt. After than we generating
the delay. After than we defined the serial mode. If mode bit is equal to 0 than it is mouse mode
and if mode bit 1equal than it is equal keyboard mode. Now we compare this with the RC-5
protocol. Than transmit this bit via serial communication port.

3.2 SOFTWARE DETAILS


3.2.1 INITILIZATION:

In this we are taking some variables for initialization. We are also initialization for the
mode. In this we know about that as it uses in the in the keyboard mode or mouse mode. We also
initialize for the flip bit and toggle bit. We also initialize for the IR receiver pin. With the help of
TCON and SCON we can also initialize in which mode it is going to be operated. Like 16 bit
timer or it is 8-bit UART.

3.2.2 DEFIINED SERIAL INTERRUPTS:


SCON

SM0 SM1 SM2 REN TB8 RB8 TI RI

SM0-Serial mode specified


SM1-Serial mode specified
SM2-Enables the multiprocessor communication feature in mode 2and3, if sm2 is set to set1 then
RI will not be activated I the received 9th data bit is 0.
REN-Set/Cleared by software to enable/disable reception.
TB8-The 9th bit that will be transmitted in modes 2and3.
RB8-In modes 2and3, is the 9th data bit that was received.
TI- Transmit interrupts flag. Set by hardware at the end of the 8th bit time in mode0.
RI-Receive interrupt flag. Set by hardware at the end of the 8th bit time in mode0.
SM0 SM1 MODE DESCRIPTON
0 0 0 Shift register
0 1 1 8-bit UART
1 0 2 9-bit UART
1 1 3 9-bit UART

For initializing purpose we have taken SCON is 50H. When we converting it in binary value
than we get the,

0 1 0 1 0 0 0 0

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
From this we get that SM0 is 0 and SM1 is 1. So it will be operated in the 8-bit UART. For this
we have taken9600 baud rate.

TCON

GATE C/T M1 M0 GATE C/T M1 M0

GATE- when tax is set and GATE=1, timer / counter will run only while Int pin is high
(hardware control), when trx is set and GATE=0, timer /counter will run only while Int pin is
high (software control). C/T- Timer or counter selector.

M0-mode selector bit.

M1-mode selector bit.

M1 M0 Operating mode
0 0 13-bit timer
0 1 16-bit timer
1 0 8-bit auto reloaded
1 1 TL0 is an 8-bit timer/counter
Controlled by the standard
timer 0 control bits, TH0 is an
8-bit timer/counter controlled
by the standard timer1 control
bits
1 1 Timer counter 1 stopped

For initializing purpose we have taken TCON as 20H. When we converting it to the binary
number we get the,

0 0 1 0 0 0 0 0

From this we get that M0 is 1 and M1 is 0. So it will be operated in the 16-bit timer or counter.
Also we know that it will be operated for the timer mode from the C/T bit. Also we know that it
will be hardware interrupt or the software interrupt. In this way we are initializing the stack
pointer and which mode is going to be operated.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c

3.2.3 GENERATING DELAY:

In this project we are using RC-5 protocol. In RC-5 protocol we know that first two bit is
automatic gain control bit and another one bit is toggle bit. So for that we have to generate the
delay. After than five bits are the address bits. So first we have to wait for 4.572ms. After than
we can generate the delay. For generating delay we are terminating the loop.

3.2.4c DEFINED MODE:

After generating delay we have to define the mode in which the computer will be
operated like keyboard mode or mouse mode. For that we have to define the mode bit. If mode
bit is equal to 1 than it will be operate in a mouse mode. If mode equal to 1 than it will be
operate in a mouse mode. Means TV remote will work like mouse. If mode bit equal to 1 than it
will be operated in a keyboard. Means TV remote will work like keyboard. If it is operated in the
mouse mode than in the program will jump to the mouse loop. After than it will compare with
the different addresses. If it is operated in the keyboard mode than in the program will jump to
the keyboard loop. After than it will compare with the different addresses of the RC-5 protocol.

3.2.5c COMPARE WITH RC-5 PROTOCOL:

RC-5 protocol is used widely in the Philips TV remote. Now with the different inputs are
given by the TV remote. So that all different inputs have different inputs have different
hexadecimal addresses. Now given by these different addresses are compared with the RC-5
protocol addresses value. If the given addresses are compared with RC-5 protocol addresses than
it will jump to another loop. Now it will compared with the another address. If the addresses
match than it will perform the function and it will return to the main loop. This process will
perform until the address will be compared.

3.2.6c TRANSMIT:

After comparison of the addresses pc will select the addresses which are given as an
input. Now this will be transmitted to the pc remote control software via serial port. For this we
use RS232 port. Now bit will be transmitted to the pc serial communication. Now transmitted bit
will be performed according to the pc remote software. In this manner the whole software were
designed. These are the basics steps of the flow designed of the software.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
CHAPTER-4 USER GUIDE
4.1 OPERATING MANUAL:
This is the user manual to operate the hardware portion of the PC remote control project.
First of all check the hardware layout that the pin connections are as given in schematic diagram
and also no schematic diagram and also no schematic connections were lost of layout. After than
check that I.C. is perfectly burnt. If software is not perfectly loaded in I.C. than the execution of
the hardware is not possible.

Now check the power supply that gives exact value to run the kit. Supply voltage given
to all components is shown in the data sheet of all components. DC and AC electrical
specifications do not apply when operating the device beyond its rated operating conditions.
Now give the power supply and check whether output is correct or not. If the output is not
correct than check the connections of the circuit. If the connections are perfect than watch out for
the component. Due to high temperature any components are damaged or not. For that
component see the operating range in data sheet. If operating range is above the given range of
the component.

User must follow the data sheets of components for avoiding limitations and damages
occur in testing of circuit. All the data sheets are given in appendix.

The interfacing of microcontroller and P.C. is necessary for controlling P.C. using TV
remote. For interfacing of microcontroller and P.C. we must have to load the assembly language
code into the I.C. with the help of this code we can connect the TV remote to the P.C. and we
can perform the function. Without loading this assembly language code into the I.C. we cannot
perform the function.

4.2 Specifications of the Project:


lc Power Supply : 4-6V DC
lc Range : 2.7-6V
lc Frequency : 0-24 MHz
lc Modulation : AM
lc Date Rate : 100kbps

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
CHAPTER-5 LIMITATION

5.1 LIMITATION:
ùc The Infrared Receiver is designed for demodulating the frequency of 30 kHz t o40 kHz.
Here used IR receiver TSOP1838/36 is designed for demodulating frequency of 38 kHz
or 36 kHz. If the particular frequency is not given than infrared sensor cannot sense the
signal and it cannot decode the signal. So a particular frequency is needed.
ùc Controlling PC can be done with TV Remote Control within the distance of 10m.
Because infrared signals range are u pt o01m. It cannot operate above 01m range.
ùc In this project, we have specific protocol for the Philips TV Remote. So, we have to use
particular coding protocol for specific remote, so change of remote will need
reprogramming of microcontroller.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
CHAPTER-6 COST OF PROJECT
6.1 COST OF PRACTICAL WORK:
COMPONENTS COST
At89c2051 60
Rs232 15
Max232 15
Crystal 20
Capacitor 20
Resistor 5
IC holder 20
PCB layout design 190
Infrared sensor(TSOP1736) 15
RS232 to USB converter 200
Phillips TV remote 90
Transformer 60
Connecting wires 40
Total 750

6.2 MISCELLENEOUS COST:


XEROX 100
BINDING 300

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
CONCLUSION
From this project we can perform various computer functions through TV remote. In
this age we can operate many digital devices through the remote control. We have to use
different types of remote control to operate the P.C. using the remote which we are using for the
TV. TV remote is working as a keyboard or the mouse for P.C.

With the help of this project we can overcome many complexities in daily life. We
don¶t need to learn different remote to operate different devices. Also, we can operate the
computer from the distance. But this distance should be equal to the infrared range.

From this project we can conclude that with the help of the 8051 microcontroller
family we can make a universal remote. With the help of this remote we can control both TV and
P.C.

c 
c c
  c  c c c c c c c
c
ccccccccccccc
c
FUTURE SCOPE
The future of remote controls is already happening and it is from a remote source via
fiber, satellite, and wireless to you and the devices in your home. The electrical company can
already control your household appliances, including your computers through the electrical
wiring. Remote brain interfaces that you have no choice over are next. The opportunities are
obvious with more intuitive interaction, but so are the dangers and they are not being presented
truthfully

c 
c c
  c  c c c c c c c
c

Вам также может понравиться