Sunteți pe pagina 1din 31

T.

C
DOKUZ EYLUL UNIVERSITY
ENGINEERING FACULTY
ELECTRICAL & ELECTRONICS
ENGINEERING DEPARTMENT

IR REMOTE CONTROLLER for HOME


APPLIANCES via WI-FI
(HARDWARE PART)

FINAL YEAR PROJECT

VOLKAN DENİZ

Adviser

Asst. Prof. Dr. Olcay Akay

JUNE 2009
İZMİR
PROJECT EXAMINATION RESULT FORM

We certify that we have read this project and that in our opinion it is fully
adequate, in scope and in quality, as a senior project.

………………………………………….

Asst. Prof. Dr. Olcay Akay


(Adviser)

………………………………………….

Assist. Prof. Dr. Ahmet Özkurt


(Committee Member)

………………………………………….
Assist. Prof. Dr. Özge Şahin
(Committee Member)

………………………………………….

Prof. Dr. Mustafa GÜNDÜZALP

2
(Chairman)

ACKNOWLEDGEMENTS

I would like to thank my advisor, Asst. Prof. Dr. Olcay Akay for his help in
guidance and supervision during this project.

I would like to specifically thank Asst. Prof. Dr. Nalan Özkurt for her
valuable advice and help during the project.

I also would like to thank GRUNDIG A.Ş. for their guidance and advice.

I would like to thank my friend Ahmet Tekin for being with me during
realization of this final year project.

I also would like to thank Mert Özuysal, Nejdet Tayyar Irgaç, Arif Ataman
and Osman Tayfun Bişkin for helps in critical situations.

3
ABSTRACT

The aim of this project is to control the VCD player and heater by using a PC
interface. PC sends the data to microcontroller via Wi-Fi and the microcontroller
controlls the VCD player with infrared (IR) communication.

While all IR remote controls share the basic concept of communicating from
the remote control to the home entertainment device via IR signal, there is no
universal standard for the encoding method. All IR remote control systems use IR
light-emitting diodes (LEDs) to send out an IR signal in response to button pushes.
The pattern of pulses indicates the particular button pushed. To allow control of
multiple appliances such as a TV, DVD Player, air conditioner and cable box without
interference, systems generally have a preamble and address to synchronize the
receiver and identify the source (and destination) of the infrared signal. Some of the
earliest remote controls (and to this day a few cable box remote controls) use a
simple system in which the IR LED is simply turned on and off. However, to avoid
interference by other light sources, especially flourescent bulbs, and keep the signal
from being swamped out by ambient light, most systems digitally modulate a carrier
frequency of between 36 kHz and 40 kHz. A bandpass filter in the receiving unit
eliminates all but the desired frequency.

4
ÖZET

Bu projede vcd çalar ve ısıtıcıların bilgisayardan kontrolü amaçlanmıştır.


Bilgisayardan wireless module aracılığıyla yollanan bilgiler mikroişlemciye gider ve
mikroişlemci de vcd çalar ve ısıtıcıyı infared ile kontrol eder.

Infrared ile çalışan diğer ev aletleri de aynı iletişim konseptine sahiptirler ve


bu şekilde kontrol edilebilirler. Infrared iletişim IR ledler kullanılmaktadır, tuşa her
basışta bu ledler elimizdeki bilgiyi kontrol edeceğimiz alete iletir ve bu işlemde
herhangi bir uluslar arası standart yoktur, her firmanın ayrı kodlama ve kod çözme
tekniği vardır. TV, klima gibi ev aletleri de bu işlemle çalıştırılabilir. Infrared ilk
kullanılmaya başlandığında aletler sadece aç kapa yapabiliyorlardı,daha sonra bütün
tuşlar kullanılmaya başlandı ve evimizdeki çoğu alet infrared iletişime geçti.

IR ledler güneş ışığından etkilenebilmektedir ve elimizdeki bilginin üzerine


gürültü biner, bu yüzden bu ledleri güneş ışığından uzak tutmak gerekir.

Modulasyon işlemi kullanacağımız aletlere göre 36 kHz ile 40 kHz arasında


değişmektedir ve her firma kendine uygun bir frekans seçer.Cihazımızın alıcı ünitesi
bölümü gönderdiğimiz bilgiyi anlayabilme kabiliyetine sahiptir, bir band geçirici
filtre ile gelen bilgi okunabilir. Her firma kullanım kolaylığı sağlayacak bir kodlama
ve kod çözme işlemi uygular. Genel olarak RC5 ve NEC kodlama türleri
kullanılmaktadır.

5
CONTENTS

CONTENTS.............................................................................................6
LIST OF FIGURES………………………...……………………….....8
Chapter 1. INTRODUCTION….....................................................9
Chapter 2. THEORETICAL FOUNDATIONS INFRARED (IR)
RADIATION…………...………………….…………………………..10
2.1.Infrared Lights……………..................................................10
2.2.IR Remote Controllers.…………....……………………….10
Chapter 3. HARDWARE DESIGN……………………………...13
3.1.Proteus Design………...……………………………………13
3.2.Receiver……...………...……………………………………14
3.3.PIC16F877..……………………………………...…………15
3.3.1 Features…………………………………………………...15
3.4.Transmitter and Timer ……….……………………...……17
3.5.Linear Regulator (7805)…………………………………...19
Chapter 4. SOFTWARE DESIGN…..……………………..…...20
4.1 Software Design of VCD Player …………………………..21
4.1.1 Features…..………………………………………...21
4.2. Software Design of Heater………………………...………22
4.2.1 Features…...………………………………………..22
4.3 PC INTERFACE……………………………………...……24

6
Chapter 5. WIRELESS MODULE………………………………25
5.1.Features……………………………………………………..25
5.2.General Description ……………………………………….25
5.3.Hardware …………………………………………………..26
5.4.Performance Specifications………………………………..27
5.5.Configuration……………………………………………….27
Chapter 6. RESULTS and CONCLUSION…................................29
REFERENCES .....................................................................................31

7
LIST OF FIGURES

Figure 2.1: Transmitting data signal by driving an IR LED with a transistor.


Figure 2.2: Received data signal at the output of the receiver.
Figure 3.1:Circuit diagram of our design using PIC16F877.
Figure 3.2: Receiver circuit.
Figure 3.3: Received signals.
Figure 3.4: General view of PIC16F877.
Figure 3.5: General information about PIC16F877 pins.
Figure 3.6: The transmitter circuit.
Figure 3.7: Carrier signal (38 Khz).
Figure 3.8: Internal Block Diagram of NE555 Timer.
Figure 3.9: A linear regulator (LM7805).
Figure 4.1: Flowchart of software of remote controller.
Figure 4.2: NEC protocol.
Figure 4.3: A typical pulse train of the NEC protocol.
Figure 4.4: Bits of the VCD Player’s buttons.
Figure 4.5: Bit length of logic 0.
Figure 4.6 : Bit length of logic 1.
Figure 4.7: Bits of the Heater’s buttons
Figure 4.8 PC Interface
Figure 5.1. The wireless module

8
Chapter 1
INTRODUCTION

In this project we study infrared (IR) receiver and transmitter and also
protocols of remote controllers. The remote controller is controlled with PIC16F877.
With most pieces of consumer electronics, from camcorders to stereo equipment, an
infrared remote control is usually always included.Video and audio apparatus,
computers and also lighting installations nowadays often operate on IR remote
control.The carrier frequency of such IR signals is typically in the order of around 36
kHz. The control codes are sent in serial format modulated to 36 kHz carrier
frequecy (usally by turning the carrier on and off).There are many different coding
systems in use, and generally different manufacturers use different codes and
different datarates for transmission. Infrared light is invisible since its frequency is
below that of visible red. Otherwise, it is like any other light source, operating under
the same laws of physics. In most cases, the IR signals are produced by a LED
source. TV remotes send commands only one way, in a low-speed burst for distances
of up to 30 feet. They use directed IR with LEDs that have a moderate cone angle to
improve ease-of-use characteristics. The IR signal sent out by those devices is
generally modulated to around 38 kHz carrier using amplitude shift keying (carrier
on or off). The data rate send is generally in the range of 100-2000 bps.

9
Chapter 2
THEORETICAL FOUNDATIONS INFRARED (IR)
RADIATION

2.1 Infrared (IR)Ligths

Infrared (IR) radiation is a particular kind of light. If we combine infrared


radiation with radio waves, microwaves, visible light, ultraviolet radiation, X rays,
and gamma rays, we'll end up with a broad band of radiation frequencies called the
electromagnetic spectrum. All of these types of electromagnetic radiation transfer
energy through space via waves of oscillating electromagnetic fields. What
distinguishes them from each other are the frequency of the oscillation and,
consequently, the wavelength.

An object's molecules and electrons are always in motion, vibrating and


radiating electromagnetic waves. When the object heats up and its temperature
increases, the motion will increase and so will the average wave frequency and the
intensity of the radiation. We can see this at work in a toaster oven. When we turn
the toaster on, we can feel some heat, but see no light. As more electric energy is
supplied and the wires get hotter, they begin to glow red. If we could really turn up
the power so that the temperature reached about 3,000 C, the wires, like the filament
in a light bulb, would glow white. The only problem is that they would probably burn
up before they reached that temperature.

2.2. IR Remote Controllers

10
IR is interesting, because it is easily generated and does not suffer
electromagnetic interference, so it is nicely used for communication and control,
however it is not perfect, some other light emissions could contain IR as well, and
that can interfere in this communication. The sun is an example, since it emits a wide
spectrum of radiation. Lots of things can generate IR, anything that radiate heat do it,
including our body, lamp, stove, oven, car's engine, car's tires, hot asphalt and rocks,
plants, even the hot water at the faucet. The massive use of IR LEDs at TV/VCR
remote controls and other applications, brought IR diodes and transistors (emitter and
receivers) at very low cost at the market. To allow a good communication using IR,
and avoid those "fake" signals, it is imperative to use a "key" that can tell the
receiver what is the real data transmitted and what is generated by the surrounding
environment. As an analogy, looking eye naked to the night sky we can see hundreds
of stars, but we can spot easily a far away airplane just by its flashing strobe light,
even if that blinking light is dimmer than the stars’ lights. That strobe light is the
"key", the "coding" element that alerts us.

Similar to the airplane at the night sky, the room where the TV is installed
may have hundreds of tiny IR sources, our body, the lamps around, even the hot cup
of tea. A way to avoid all those other sources, is generating a key, like the flashing
airplane. Thus, remote controls use to pulsate its infrared in a certain frequency. The
IR receiver module at the TV, VCR or stereo "tunes" to this certain frequency and
ignores all other IR signals received. The best frequency for the job is between 30
and 60 kHz, the most used is around 36 kHz. It works exactly as a radio tuning to a
specific station. In this case, the receiver tunes to the IR "radio" at 36 kHz, and
ignores the rest. Your cup of hot tea generates IR, but not at 36 kHz, it is flat and
plain IR emission, and then, ignored by the TV IR receiver. Therefore, remote
controls use the 36 kHz (or around) to transmit information. IR light emitted by IR
diodes is pulsated at 36 thousand times per second, when transmitting logic level "1"
and silence for "0". To generate a 36 kHz pulsating IR is quite easy, more difficult is
to receive and identify this frequency. This is why some companies produce IR
receivers, that contains the filters, decoding circuits and the output shaper, that
delivers a square wave, meaning the existence or not of the 36kHz incoming

11
pulsating infrared. It means that those 3 dollars small units, have an output pin that
goes high (+5V) when there is a pulsating 36 kHz IR in front of it, and zero volts
when there is not this radiation. A square wave of approximately 27 uS
(microseconds) injected at the base of a transistor, can drive an IR LED to transmit
this pulsating light wave. Upon its presence, the commercial receiver will switch its
output to high level (+5V).

Figure 2.1: Transmitting data signal by driving an IR LED with a transistor.

If we can turn on and off this frequency at the transmitter, our receiver's
output will indicate when the transmitter is on or off.

Figure 2.2: Received data signal at the output of the receiver.

IR demodulators have inverted logic at their outputs. When a burst of IR is


sensed they drive their outputs to low level, meaning logic level = 1. To avoid a
Philips remote control to change channels in a Panasonic TV, they use different
codification at the IR, even that all of them use basically the same transmitted
frequency, from 36 to 40 kHz. Thus, all of them use a different combination of bits to
avoid interference.

12
Chapter 3
HARDWARE DESIGN

3.1. Proteus Design

In the schematic(Figure 3.1), MAX232 is used as a wireless module. It has


nearly the same pin configuration. Receiver pin (RX) of the wireless module is
connected to microprocessor’s transmitter pin 25 (TX) and TX of the wireless
module is connected to pin 26 (RX) of the microprocessor. 4 MHz crystal is used for
microprocessor (PIC16F877). LM555 Timer is used for getting 38 kHz carrier
frequency.

+5V

C5
R2
100R
22p U3
R R1
V1
8

X1
4 3 POT
+5V CR YSTAL R Q
VCC

C6 C4 1k D4
13 33 7 DIOD E -LED
OSC 1/CLK IN R B0/IN T DC
14 34
OSC 2/CLK OUT RB1
1 35 5
MC LR /V pp/THV RB2 CV
22p
R B3/PGM
36 100n Q1
2 37 B C337
10k RA 0/AN0 RB4 R V2
3 38
RA 1/AN1 RB5
G ND

4 39 2 6 POT
RA 2/AN 2/VREF- RB 6/PGC TR TH
5 40
RA 3/AN 3/VREF+ RB 7/PGD
6
RA 4/T0C KI
7 15
1

N E 555
RA 5/AN 4/SS R C 0/T1OS O/T1C K I
16
R C 1/T1O S I/CC P2
8
RE 0/AN 5/RD R C 2/C CP1
17 C9
9 18 100n
RE 1/AN6/W R R C 3/S C K/SCL
10 23
RE 2/AN 7/CS R C 4/SDI/SDA
24
R C 5/S DO
25
R C6/TX /CK
26
R C 7/R X /DT
19 C 10
R D 0/PSP0
20
R D 1/PSP1
21 J1
R D 2/PSP2
22 1u 1
R D 3/PSP3
27 6
R D 4/PSP4
28 2
R D 5/PSP5
29 7
R D 6/PSP6
30 3
R D 7/PSP7
1 3 U2 8
P IC 16F877 4
9
C1+ C1- +5V
5
11 14
12
T1IN T1OUT
13 C1 C ONN -D 9F
R 1OU T R 1IN
10 7
T2IN T2OUT
9 8
R 2OU T R 2IN
1u
2 C2
VS+
6
V S-
1u
C2+ C2-

4 C9 5 MA X232

1u

13
Figure 3.1:Circuit diagram of our design using PIC16F877.

3.2 Receiver

When we start to the project, we did not know what we would send to VCD
player and heater. To solve this problem, we set a receiver circuit and learned all
necessary informations (command code, data codes etc.) Protocols are not important
for receiver circuit because timing of the data can be found with this circuit.
We found the protocol types and received data for the appliances. VCD player works
with NEC protocol and heater works with another protocol which has 13 bits.

Figure 3.2: Receiver circuit.

14
Figure 3.3: Received signals.

3.3. PIC16F877

A PIC16F877 Microcontroller includes 8 kb of internal flash Program


Memory, together with a large RAM area and an internal EEPROM. An 8-channel
10-bit A/D converter is also included within the microcontroller, making it ideal for
real-time systems and monitoring applications. All port connectors are brought out to
standard headers for easy connect and disconnect. In-Circuit program download is
also provided, enabling the board to be easily updated with new code and modified
as required, without the need to remove the microcontroller.

All the necessary support components are included, together with a Power
and Programming LED for easy status indication. Plus a reset switch for program
execution and a RS232 connection for data transfer to and from a standard RS232
port, available on most computers.

The new PIC16F877 Controller is the ideal solution for use as a standard
controller in many applications. The small compact size combined with easy
program updates and modifications, make it ideal for use in machinery and control
systems, such as alarms, card readers, real-time monitoring applications and much
more. This board is ideal as the brains of your robot or at the center of your home-
monitoring system. Save time and money, by simply building your ancillary boards
and monitoring circuits around this inexpensive and easy to use controller.

3.3.1 Features

• Includes Powerful Microchip PIC16F877 Microcontroller with 8kb Internal


Flash Program Memory
• Operating Speed at 10MHz
• Direct In-Circuit Programming for Easy Program Updates

15
• Up to 28 I/O points with easy to connect standard headers
• RS232 Connection with MAX232
• Internal EEPROM
• 8 Channel 10-bit A/D Convertor
• One 16-bit Timer with Two 8-bit Timers
• Power and Programming LED
• Reset Button
• Ideal as an Interchangeable Controller for Real-Time Systems

Figure 3.4: General view of PIC16F877.

16
RA0-5 : Input/Output port A MCLR : Master Clear ( Active low Reset )
RB0-7 : Input/Output port B Vpp : Programming voltage input
RC0-7 : Input/Output port C THV : High voltage test mode control
RD0-7 : Input/Output port D VREF+/- : Reference voltage
RE0-2 : Input/Output port E SS : Slave select for the synchronous
AN0-7 : Analog input port serial port
RX : USART Asynchronous Receive T0CKI : Clock input to Timer0
TX : USART Asynchronous T1OSO : Timer1 oscillator output
Transmit T1OSI : Timer1 oscillator input
SCK : Synchronous serial clock input T1CKI : Clock input to Timer1
SCL : Output for both SPI and I2C PGD : Serial programming data
modes PGC : Serial programming clock
DT : Synchronous Data PGM : Low voltage programinng input
CK : Synchronous Clock INT : External interrupt
SDO : SPI Data Out ( SPI mode ) RD : Read control for the parallel slave
SDI : SPI Data In ( SPI mode ) port
SDA : Data I/O ( I2C mode ) WR : Write control for the parallel slave
CCP1,2 : Capture In/Compare Out/PWM port
Out CS : Select control for the parallel slave
OSC1/CLKIN : Oscillator In/Ecternal Clock In PSP0-7 : Parallel slave port
OSC2/CLKOUT : Oscillator Out/Clock Out VDD : Positive supply for logic and I/O pins
Vss : Ground reference for logic and I/O
pins

Figure 3.5: General information about PIC16F877 pins.

3.4. Transmitter and Timer

To transmit the stored signal, we should generate a 38-40 KHz square wave
carrier signal to protect from other IR interferances. We used 555 Timer to generate
the carrier wave and modulation. We built the circuit in Figure 3.7. With
potentiometer, we are able to control the duty cycle and frequency of the carrier
wave. The 555 Timer modulates any signal which is applied from its 4th pin and
outputs the modulated signal from its 3rd pin.

17
Figure 3.6: The transmitter circuit. Figure 3.7: Carrier signal (38 Khz).

Figure 3.8: Internal Block Diagram of NE555 Timer.

3.5 Linear Regulator

18
In electronics, a linear regulator is a voltage regulator based on an active
device operating in its ’linear region.’ All linear regulators require an input voltage at
least some minimum amount higher than the desired output voltage. That minimum
amount is called the drop-out voltage. For example, a common regultor such as 7805
(Figure 3.10) has an output voltage of 5V. Its drop-out voltage is 2V. Its minimum
input voltage will be 7V.

Common solid-state series voltage regulators are the LM78XX(for positive


voltages) and LM79XX(for negative voltages) and common fixed voltages are 5V
and 12V. In this project we use LM7805 for 5V common voltage.

Figure 3.9: A linear regulator (LM7805).

Chapter 4

19
SOFTWARE DESIGN

Not all the IR remote controls have similar characteristics; in fact most of
them have different frequency carriers depending of the factory, or the model or the
protocol. Another point to consider is that depending on the trademark or model, it
can be seen a considerable difference in the total amount of bits which is transmitted
after switch is pressed. We could say that RC5 and NEC codes are important for the
system, which are generally employed in most of IR remote controls.

For an IR remote controller for a VCD player and heater, we developed a


software algorithm. This project can be made using either PIC16F877 or AT89C52.
@PIC creating 889 us is easy by the help of delay command but creating 889 us is a
bit harder than that if AT89C52 is chosen.

Three functions are created for the system. They are one,zero and toggle to
give microprocessor 1, 0 and toogle bits.
-‘This part is explained detailly Ahmet Tekin’s final year project’.

Figure 4.1: Flowchart of software of remote controller.

20
4.1 Software Design of VCD Player

4.1.1 Features:

• 8 bit address and 8 bit command length.


• Address and command are transmitted twice for reliability.
• Pulse distance modulation.
• Carrier frequency of 38kHz
• Bit time of 1.125ms or 2.25ms

Figure 4.2: NEC protocol.

The NEC protocol uses pulse distance encoding of the bits. Each pulse is a
560µs long 38kHz carrier burst (about 21 cycles). A logical "1" takes 2.25ms to
transmit, while a logical "0" is only half of that, being 1.125ms. The recommended
carrier duty-cycle is 1/4 or 1/3.

Figure 4.3: A typical pulse train of the NEC protocol.

The buttons for the VCD player is shown in Figure 4.4

21
Inv.Command
Button Address bits Inv. Address bits Command bit
bits
STOP 00000000 11111111 00101000 11010111
PAUSE 00000000 11111111 11001000 00110111
OPEN/CLOSE 00000000 11111111 00001000 11110111
PLAY 00000000 11111111 10001010 01110101
FORWARD 00000000 11111111 01111000 10000111
BACK 00000000 11111111 01010000 10101111
ZOOM 00000000 11111111 11100000 00011111
VOLUME UP 00000000 11111111 11000000 00111111
VOLUME
00000000 11111111 01000000 10111111
DOWN

Figure 4.4: Bits of the VCD Player’s buttons.

4.2. Software Design of Heater

4.2.1 Features

• Protocol has only logic 1 and logic 0.

• Bit lengths of logic 1 and logic 0 are 1600 us.

• 5 address bits and 7 command bits.

• Carrier frequency 38 kHz

It is more basic according to NEC protocol.

22
Figure 4.5: Bit length of logic 0.

Figure 4.6 : Bit length of logic 1.

The buttons for the heater is shown in Figure 4.7.

Button Address bits Command bits


Power 00100 1011111
2 00100 1111110
3 00100 1111101
4 00100 1110111
5 00100 1111011

6 00100 1101111

Figure 4.7: Bits of the Heater’s buttons

4.3 PC INTERFACE

23
We designed a PC interface for communicating with VCD player and heater.

Figure 4.8 PC Interface

--‘These parts are explained detailly Ahmet Tekin’s final year project’.

Chapter 5
WIRELESS MODULE

24
5.1.Features

Figure 5.1. The wireless module

5.2 General Description

Nano WiReach™ is a secure serial-to-Wireless LAN device server module


that also acts as a bridge to connect serial devices to 802.11b/g Wireless LANs. It
includes the iChip™ CO2144 IP Communication Controller™ chip and Marvell
88W8686 WiFi chipset. It is packaged in RoHS-compliant ultra-slim form factor
and uses an industry standard pin-out.

Nano WiReach offers much more than many other device servers on the
market. It acts as a security gap between the application and the network; supports
up to 10 simultaneous TCP/UDP sockets; two listening sockets; a web server with
two websites; SMTP and POP3 clients; MIME attachments; FTP and TELNET
clients, and SerialNET™ mode for serial-to-IP bridging.

25
Nano WiReach supports the SSL3/TLS1 protocol for secure sockets, HTTPS
and FTPS, WEP, WPA and WPA2 WiFi encryption.

Nano WiReach minimizes the need to redesign the host device hardware. It
easily inserts into headers on the host PCB and connects to an external antenna.
Minimal or no software configuration is needed for Nano WiReach to access the
Wireless LAN.

Connect One’s high-level AT+i™ API eliminates the need to add WiFi
drivers, security and networking protocols and tasks to the host application. The
AT+i SerialNET operating mode offers a true plug-and-play mode that eliminates
any changes to the host application.

Nano WiReach firmware – the IP stack and Internet configuration


parameters – are stored in an external flash memory. The module is power-efficient:
the core operates at 1.2V, while I/Os operate at 3.3V. Power Save mode further
reduces power consumption.

The II-EVB-363NW evaluation board provides an easy environment for


testing the Nano WiReach prior to designing it into your product.

5.3 Hardware

• Size: 33.76 x 18.0 x 5.5 mm

• Core CPU: 32-bit RISC ARM7TDMI, low-leakage, 0.13 micron, running at


48MHz

• Operating Voltage: +3.3V+/-10%

• Operating Humidity: 90% maximum (non-condensing)

• Operating Temperature Range: -40° to 85°C (-40° to 185°F)

26
• Power Consumption: Transmit – 250mA @16dbm 235mA @12dbm (typical)
Receive – 190mA (typical) Power Save mode – 8mA

• RF Connector: U.FL of Hirose

• Connector: Low profile 30 pin


• Host Interface: TTL Serial, SPI and USB device.
• RMII Interface

• RoHS-compliant; lead-free

5.4 Performance Specifications

• Host Data Rate: up to 3Mbps in serial mode

• Serial Data Format (AT+i mode): Asynchronous character; binary; 8 data


bits; no parity; 1 stop bit

• SerialNET mode: Asynchronous character; binary; 7 or 8 data bits; odd,


even, or no parity; 1 stop bit

• Flow Control: Hardware (-RTS, -CTS) and software flow control.

Wireless module is working with 3.3 volt and it has receiver pin (RX) to
receive data from PC and transmitter pin (TX) for transmitting data to
microprocessor. It has reset pin for starting the module again. When the data come to
data ready pin, it can choose the next operation to do.

5.5 Configuration

Wireless module is needed to configure for serial communication,getting IP


and some instructions below.

-AT+iWLSI=speedtouch

27
The primary parameter governing the identity of the Access Point to which the
iChip will associate and connect to is the Service Set IDentifier (SSID). Each Access
point has its own SSID value. Speedtouch is the SSID of our system.

-AT+iIPA=169.254.111.17

This command is used temporarily set the current IP address.

-AT+iLPRT=10017

Permanently sets the port number on which iChip will listen for client
connections in SerialNET mode. It could be such a number between 0 and 65536.

-AT+iHIF=1

Specifies the interface to be used for communication between the host


processor and iChip in subsequent sessions. If it is 1, USART0 can be used in the
system.

-AT+iMTTF=250
Sets max inactivity timeout before flushing the SerialNET socket.

-AT+iSNMD=3
Activates SerialNET mode. When this flag is specified, iChip automatically
goes online.

However, if the HSRV parameter is defined, a socket is not opened until data
arrive on the local serial port.

Chapter 6

28
RESULTS and CONCLUSIONS

IR signals are used to carry data, and the most popular application area is
remote controller which is used on TV, DVD player, air conditioner etc. Some
remote controllers use RF signals like car and garage remote controller. This is one
of the advantages of the IR signals because IR signals are effective at short distance
and transmitter and receiver must see each other.

IR communication is done by using protocol like SONY, NEC, RC5.


Protocols determine the length of the pulses. We use NEC protocol for VCD player
and another protocol which is looking like RC5 in our design. Software and making
timer was designed according to protocols. In this project, IR pulses are sent through
the device. We send data from PC to microcontroller and then microcontroller send
them to controlled device via IR LED. This was done by the original algorithm
which was explained in previous chapters.

One of the important problems is the noise. IR transmitter module can get a
signal from daylight which consist a lot of frequency components. This problem was
encountered and system works successfully.

IR remote controller was designed for 38 KHz signals. But we change that
value a little to be near 37.5 KHz. At that point it can be asked “if the transmitted
signal is not modulated at 38 KHz, would this circuit still work?” To answer this
question the effect of the carrier frequency of the IR signal must be known. Of
course if a circuit is designed for a special carrier frequency, it does not respond to
another signal which is modulated with a different frequency. But if the transmitted
signal is modulated with a closer frequency band of the carrier frequency, the circuit
responds. For example, if message signal is modulated with 37 KHz, circuit will
work again but there will be a difference of two signals on the circuit. It can
communicate with the remote controller with 38 KHz modulation at a longer
distance than 37 KHz modulation. Hence the effect of the carrier frequency on

29
distance can be seen with different devices which have different modulation
frequencies.

Finally, IR technologies make the daily life with remote controller. All
remote controllers work with a special protocol. In this project, IR remote controller
gets the 32 bit data values from PC and sends them to VCD player and 12 bit data
values from PC and sends them to heater . It uses 2 protools while achieving this.
If we want, we can use SONY, RC5 and another protocol for another device. Our
designed circuit would be useful if you are far from our controlled device. For
example, if we forget closing our device, we can close or get it work in sleep mode.
This circuit designed in this project can be employed in futuristic smart home
projects.

30
REFERENCES

1. I. Scott MacKenzie , “The 8051 Microcontroller”, Second Edition, Prentice Hall,


Inc., 1995

2. http://www.sbprojects.com/knowledge/ir/ir.htm

3. http://www.ustr.net/infrared/index.shtml

4. http://www.datasheetcatalog.com
5. http://www.rentron.com/Infrared_Remote_Control.htm

31

S-ar putea să vă placă și