Você está na página 1de 38

DATA EXCHANGING BETWEEN TWO PC’S

USING IR
COMMUNICATION
INTRODUCTION TO EMBEDDED SYSTEMS

• Embedded systems are designed to do some


specific task, rather than be a general-purpose
computer for multiple tasks.

• Some also have real time performance


constraints that must be met, for reason such as
safety and usability.

• others may have low or no performance


requirements, allowing the system hardware to be
simplified to reduce costs.
• An embedded system is not always a separate
block - very often it is physically built-in to the device it is
controlling.

•The software written for embedded systems is often


called firmware, and is stored in read-only memory or
flash convector chips rather than a disk drive.

•It often runs with limited computer hardware


resources: small or no keyboard, screen, and little
memory.
• Wireless communication has become an important
feature for commercial products and a popular research
topic within the last ten years.

• There are now more mobile phone subscriptions than


wired-line subscriptions.

• Lately, one area of commercial interest has been low-


cost, low-power, and short-distance wireless
communication used for personal wireless networks.
• Technology advancements are providing smaller and
more cost effective devices for integrating computational
processing, wireless communication, and a host of other
functionalities.
•These embedded communications devices will be
integrated into applications ranging from homeland
security to industry automation and monitoring.

• With new technologies and devices come new


business activities, and the need for employees in these
technological areas.

• Engineers who have knowledge of embedded


systems and wireless communications will be in high
demand.

•The communication mediums were twisted pair,


optical fiber, infrared, and generally wireless radio.
1.2. OBJECTIVE OF THE PROJECT

•The main aim of the project is to transfer the data


between the two PC’s using the IR wireless
communication.

•The system consists of two modules, module1 and


module2.

• Both the modules consists of IR transmitter and IR


receivers.

•The module1 is connected to the PC1 and the


module2 is connected to the PC2. Both the modules act
as the transceivers.
• The two micro controller units are connected to the
two computers using RS232 cable.

• It operate in synchronous mode that means, when


one unit sends the data the other unit will be in ready
mode to receive the transferred data in short half duplex
serial communication is possible between the two
controllers.

• With the help of this system we can transfer data


between from one PC (PC1) to another PC (PC2) using
IR communication. IR communication consumes low
power
2. PROJECT DESCRIPTION

2.1 BLOCK DIAGRAM:


E
N

TRANSCEVER - 1: MICRO
C
O
IR TX
CONTROLLER D
UNIT E
R

POWER
SUPPLY
D
E
C
O IR RX
D
E
R

D
B MAX 232
9

PC-1
TRANSCEVER-2:

E
N
C
MICRO O
CONTROLLER D IR TX
UNIT E
R

POWER
SUPPLY
D
E
C
O IR RX
D
E
R

D
B MAX 232
9
2.2 BLOCK DIAGRAM EXPLANATION

 The brief description of the block diagram of our


project is discussed in this section.

Microcontroller:

 In this project the microcontroller plays a major role


in receiving the data from the PC-1 using RS-232 serial
communication and to transmitting the same to the
Encoder (HT640), after which the data is transmitted
using IR communication.

 In the same way the microcontroller receives the


data from the decoder, and is transmitted to the PC-1.
 The data is transmitted to the controller from PC using
the HYPER TERMINAL or any serial communication
terminal.

 The data which we are entering in to the hyper


terminal editor is available at the COM1 port.

 Then the data enters in to the MAX232 voltage


converter via the RS232 cable.

 The MAX232 converts the voltage levels of the RS232


to the TTL level and then sends to the UART of the
microcontroller.
 The data received from the IR receiver module is
decoded by the decoder and is given to the
microcontroller.
 The microcontroller transmits the same to the PC-1
through the MAX232 and the RS232.

 The microcontroller plays the same role in the case of


the PC-2 also.
The above all functions are monitored by the
microcontroller.

 When ever a character is received from the PC to the


UART of the controller, that character is immediately
transmitted to the PORT-2 to which the Encoders data
lines are connected.

 This data is encoded by the encoder and is


transmitted serially to the RF transmitter module.
RF Transmitter:

 The encoded signal is given to the IR


transmitters data pin.

Then the signal is modulated (ASK) by the IR


transmitter module and transmitted through the
antenna.

This section is fully described in the IR


communication section.
Encoder:

 We are using IC HT12E Encoder which is


an 18 pin IC. This encoder circuit will encode the
data send by the microcontroller and then transmits
the data serially to the IR transmitter module.

IR module (RECIEVER):

The transmitted signal is received by this receiver


module. The received data is transmitted to the decoder
to decode the data as we encoded the data while
transmitting.
DECODER:

We are using IC HT12D Decoder which is


an 18 pin IC. This Decoder circuit will decode the
data from the receiver and then send the decoded
data to the microcontroller.

POWER SUPPLY:

In this system we are using 5V power supply for


Transmitter section as well as receiver section. The full
description of the Power supply section is given in this
documentation in the following sections.
2.3. SCHEMATIC
SCHEMATIC EXPLANATION:

•Firstly, the required operating voltage for Microcontroller 89C51 is


5V. Hence the 5V D.C. power supply is needed by the same.

• This regulated 5V is generated by first stepping down the 230V to


9V by the step down transformer.

•In the Power supply the step downed a.c. voltage is being rectified
by the Bridge Rectifier.
Current Flow in the Bridge Rectifier

Current in Bridge Rectifier for +ve half cycle

Current in Bridge Rectifier for -ve half cycle


•The diodes used are 1N4007. The rectified a.c voltage
is now filtered using a ‘C’ filter.
•Now the rectified, filtered D.C. voltage is fed to the
Voltage Regulator.

•This voltage regulator allows us to have a Regulated


Voltage.

•In Power supply given to Microcontroller 5V is


generated using 7805.

•The rectified; filtered and regulated voltage is again


filtered for ripples using an electrolytic capacitor 100μF.
BLOCK DIAGRAM:

Now the output from the first section is fed to 40th pin of
89c51 microcontroller to supply operating voltage and
from other power supply to circuitry.
MAX-232 connections to microcontroller:
Pins connections

12 This pin is connected to P3.1 (TXD) of the Micro controller

13 This pin is connected to P3.0 (RXD) of the Micro controller

15 Ground

16 vcc (+5v)

PORT 2:
Data pins of HT12D encoder are connected to port2.0, 2.1, 2.2, 2.3.

PORT 1:
Data pins of HT12E decoder are connected to port1.0, 1.1, 1.2, 1.3
.
PORT3:
TE PIN IS CONNECTED TO THE PORT P3.7.
VT PIN IS CONNECTED TO THE PORT P3.2.
Components Used For Hardware Design:

• MICROCONTROLLER
• RF TRANSMITTER
• RF RECEIVER
• ENCODER
• DECODER
• POWER SUPPLY
IR MODULE:

•Infrared (IR) radiation is part of the electromagnetic spectrum,


which includes radio waves, microwaves, visible light, and
ultraviolet light, as well as gamma rays and X-rays.

•The IR range falls between the visible portion of the spectrum


and radio waves. IR wavelengths are usually expressed in
microns, with the lR spectrum extending from 0.7 to 1000
microns.
•Using advanced optic systems and detectors, non-contact IR
thermometers can focus on nearly any portion or portions
of the0.7-14 micron band. Because every object (with the
exception of a blackbody) emits an optimum amount of IR
energy at a specific point along the IR band, each process
may require unique sensor models with specific optics and
detector types.
Pin description:
The figure 1 shows the pin diagram of the 8051 microcontroller.

Fig 1: 8051 pin diagram.


VCC: Supply voltage (all packages except 42-PDIP).

GND: Ground (all packages except 42-PDIP; for 42-PDIP GND connects only the
logic core and the embedded program memory).

VDD: Supply voltage for the 42-PDIP which connects only the logic core and the
embedded program memory.

PWRVDD: Supply voltage for the 42-PDIP which connects only the I/O Pad Drivers.
The application board MUST connect both VDD and PWRVDD to the board supply
voltage.

PWRGND: Ground for the 42-PDIP which connects only the I/O Pad Drivers.
PWRGND and GND are weakly connected through the common silicon substrate,
but not through any metal link. The application board MUST connect both GND
and PWRGND to the board ground.
Port 0: Port 0 is an 8-bit open drain bi-directional I/O port. As an output port,
each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins
can be used as high-impedance inputs. Port 0 can also be configured to be the
multiplexed low-order address/data bus during accesses to external program
and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives
the code bytes during Flash programming and outputs the code bytes during
program verification. External pull-ups are required during program verification.

Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to Port 1
pins, they are pulled high by the internal pull-ups and can be used as inputs. As
inputs, Port 1 pins that are externally being pulled low will source current (IIL)
because of the internal pull-ups. Port 1 also receives the low-order address
bytes during Flash programming and verification.
Port 2:
 Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2
output buffers can sink/source four TTL inputs.

When 1s are written to Port 2 pins, they are pulled high by the internal pull-
ups and can be used as inputs.

As inputs, Port 2 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups.

 Port 2 emits the high-order address byte during fetches from external
program memory and during accesses to external data memory that uses 16-
bit addresses (MOVX @ DPTR).

In this application, Port 2 uses strong internal pull-ups when emitting 1s.
During accesses to external data memory that uses 8-bit addresses (MOVX
@ RI), Port 2 emits the contents of the P2 Special Function Register.

 Port 2 also receives the high-order address bits and some control signals
during Flash programming and verification.
Port 3:
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output
buffers can sink/source four TTL inputs.
When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups
and can be used as inputs.
As inputs, Port 3 pins that are externally being pulled low will source current (IIL)
because of the pull-ups.
Port 3 receives some control signals for Flash programming and verification. Port
3 also serves the functions of various special features of the IC, as shown in the
following table.
RST: Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.
.
ALE/PROG:

Address Latch Enable (ALE) is an output pulse for latching the low byte of
the address during accesses to external memory.

 In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator


frequency and may be used for external timing or clocking purposes.
 If desired, ALE operation can be disabled by setting bit 0 of SFR location
8EH.

 With the bit set, ALE is active only during a MOVX or MOVC instruction.
Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no
effect if the microcontroller is in external execution mode.
PSEN: Program Store Enable (PSEN) is the read strobe to external program
memory. When the 8051 is executing code from external program memory, PSEN is
activated twice each machine cycle, except that two PSEN activations are skipped
during each access to external data memory.

EA: External Access Enable. EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000H up
to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally
latched on reset.

XTAL1: Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.

XTAL2: Output from the inverting oscillator amplifier.


IR MODULE:
•Infrared (IR) radiation is part of the electromagnetic spectrum,
which includes radio waves, microwaves, visible light, and
ultraviolet light, as well as gamma rays and X-rays.

•The IR range falls between the visible portion of the spectrum


and radio waves. IR wavelengths are usually expressed in
microns, with the lR spectrum extending from 0.7 to 1000
microns.

•Using advanced optic systems and detectors, non-contact IR


thermometers can focus on nearly any portion or portions of the0.7-14
micron band.

• Because every object (with the exception of a blackbody) emits an


optimum amount of IR energy at a specific point along the IR band, each
process may require unique sensor models with specific optics and detector
types
For example, a sensor with a narrow spectral range centered
at 3.43 microns is optimized for measuring the surface
temperature of polyethylene and related materials. A sensor
set up for 5 microns is used to measure glass surfaces. A 1
micron sensor is used for metals and foils. The broader
spectral ranges are used to measure lower temperature
surfaces, such as paper, board, poly, and foil composites.

An object reflects,
transmits, and emits
energy, as shown in the
diagram.
LIGHT EMITING DIODES

• It is a semiconductor diode having radioactive recombination. It requires a


definite amount of energy to generate an electron-hole pair.

• The same energy is released when an electron recombines with a hole


.
• This released energy may result in the emission of photon and such a recombination

•Hear the amount of energy released when the electro reverts from the conduction
band to the valence band appears in the form of radiation.

•Finally the released energy may be transferred to another electron. The


recombination radiation may be lie in the infra-red and visible light
spectrum.

•Diodes having radioactive recombination are termed as Light


Emitting Diode, abbreviated as LEDs.
• The following are the merits of LEDs over conventional incandescent
and other types of lamps

•Low working voltages and currents

•Less power consumption

•Very fast action

•Emission of monochromatic light

•small size and weight

•No effect of mechanical vibrations

•Extremely long life

 Typical LED uses a forward voltage of about 2V and current of 5 to 10mA.


GaAs LED produces infra-red light
Light Emitting Diodes (LEDs)

Example:    Circuit symbol:   

Function

LEDs emit light when an electric current passes through them.

Connecting and soldering

LEDs must be connected the correct way round, the diagram may be
labelled a or + for anode and k or - for cathode (yes, it really is k, not c, for
cathode!). The cathode is the short lead and there may be a slight flat on
the body of round LEDs. If you can see inside the LED the cathode is the
larger
ENCODER and DECODER Sections

•The Encoders are the devices which are used to encode the data where the
Decoder is the device which is quite opposite to the Encoder. The Encoder used in the
project are HT12E and Decoder is HT 12D.

HT12A/HT12E/212Series of Encoders

General Description:

•The 2^12 encoders are a series of CMOS LSIs for remote control system
applications. They are capable of encoding information which consists of N address bits
and 12-N data bits. Each ad- dress/data input can be set to one of the two logic states.

•The programmed addresses/data are transmitted together with the header


bits via an RF or an infrared transmission medium upon receipt of a trigger
signal.
•The capability to select a TE trigger on the HT12E or a DATA
trigger on the HT12A further enhances the application flexibility of
the 212 series of encoders. The HT12A additionally provides a 38
kHz carrier for infrared systems.

•Minimum transmission word


•Four words for the HT12E
•One word for the HT12A
•Built-in oscillator needs only 5% resistor
•Data code has positive polarity
•Minimal external components
•HT12A/E: 18-pin DIP/20-pin SOP package
Features

Operating voltage
•2.4V~5V for the HT12A
•2.4V~12V for the HT12E
•Low power and high noise immunity CMOS
•technology
•Low standby current: 0.1mA (type.) at
•VDD=5V
•HT12A with a 38kHz carrier for infrared
transmission medium

Você também pode gostar