Академический Документы
Профессиональный Документы
Культура Документы
Do-it-yourself
Nid ria
hu
Kat
P
resented here is a project that bits represent the address of the de- After transmitting the data, only
turns your Arduino into a vice to be controlled. Six command the leader code and a single bit are
remote control. Infrared (IR) bits contain the information to be transmitted repeatedly for as long as
remotes have been very promi- transmitted. a key is pressed. A special prop-
nent since 1980s. In todays world Each bit in the data consists of erty of this code is a constant word
almost everything is controlled by half a bit period with no transmis- length in combination with pulse
a remote. This project allows you sion and half a bit period with a distance modulation.
to control the master volume of a burst of 32 pulses at 36kHz. The Address and data bits are trans-
Windows PC, a television set, set- most suitable IR receivers for receiv- mitted twice, first as a normal byte,
top box, home theatre system and ing RC5 code are those with AGC2 followed by an inverted byte. The
the like. setting and a band-pass frequency half period burst portion of each
of 36kHz. Some examples are bit contains 22 pulses, each with
Standard data formats TSOP1236, TSOP4836, TSOP34836, a width of 8.77s and a period of
There are two common data formats TSOP39236 and TSOP36236. 26.3s. 0 is represented by a pulse
for IR control: RC5 coding and NEC NEC code. NEC code uses bursts distance of 1.125ms, and 1 by a
coding. at a carrier frequency of 38kHz. It pulse distance of 2.25ms.
RC5 code. RC5 code uses a starts transmission using a leader Eight address bits are used to
bi-phase coding, and the carrier code, a burst with a length of 9ms, identify the device to be controlled.
frequency is fixed at 36kHz. Trans- followed by a pause of 4.5ms and Further eight bits are used for
mission of the data begins with two then the data (Fig. 2). The original transmission of command data. As
start bits followed by a toggle bit purpose of this leader code was to mentioned above, the words are
(Fig. 1). Toggle bit changes its value let the internal control loops in the always followed, without a pause,
at each new key press. Five address receiver modules to settle. by inverted words. For example,
114ms
The data word
is repeated as
long as a key is
Data
pressed
24.9ms
Bit length 1.78ms
Example
of a data word
2 1 5 6
start bits toggle bit address bits data bits
27.8s
Burst
(half bit)
Leader code
Data
67.5ms
108ms 108ms
17053
ARDUINO
3.3V
Software
12
5V 11
GND 10 NEC code are those with
GND
Vin
9
8
AGC4 setting as these The source codes (IR_Key_Test.
have the best noise sup- ino and IR_Final.ino) are written in
ATMEGA328
A2 3
A3 2 TSOP4438, TSOP58438 and downloaded free of cost from www.
A4 TX 1
A5 RX 0 TSOP75438. Receiver mod- arduino.cc/en/Main/Software
ules for different carrier Arduino, which is an open source
BOARD1
frequencies are given in the software, makes it easy to write and
Fig. 3: Circuit diagram of Arduino based Windows PC
Table above. upload the code to the board. It runs
volume remote control on Windows, Mac OS X and Linux.
Circuit and working The environment is written in Java
transmission of address 00110111 and Circuit diagram of Arduino PC and based on Processing and other
command data 00011010 is per- volume control is shown in Fig. 3. open source software.
formed by sending bits as: Hardware components required are The library used in this project is
00110111110010000001101011100101 Arduino Uno, TSOP1738 IR receiver, IRremote library. It allows Arduino
In a special version of NEC code, breadboard and some jumper wires. Uno to decode IR signals coming from
the pre-burst, including all address Working of the project is fairly the remote. To install the library, copy
and data bits, is repeated in each simple. Arduino Uno decodes the IRremote folder and paste it in the
Fig. 6: Screenshot of IR_Final.ino no Uno and PC, mode of communi- Testing the project
cation used is serial communication. After uploading IR_Final.ino code to
You need to install Remote Volume Arduino Uno, connect it to your PC
Control software on the targeted PC, and open Device Manager. Note the
which communicates with Arduino COM port assigned to Arduino Uno.
Uno and accordingly performs the Here, Arduino Uno is assigned
task. This software runs in the COM3 (Fig. 7). Install Remote Vol-
background and automatically starts ume Control software and start it.
when the PC boots. Select COM3 in COM Ports menu and
select 9600 baud rate from Baud Rate
Initial setup menu. Click on Connect, and if all
Step 1. To configure your desired goes well, volume of the PC will be
remote control device, install IR- controlled by your desired remote.
remote library and open IR_Key_Test. The authors prototype of Arduino
ino code from Arduino IDE. Select based Windows PC volume remote
Fig. 7: Device Manager window the correct board from ToolsBoard control is shown in Fig. 8.
menu in Arduino IDE, and burn the
following location: program (sketch) through the stand-
Documents>Arduino>libraries ard USB port in your computer. Arnav Bansal is an electronics
hobbyist and loves to tinker
folder Step 2. After uploading the code, with circuit designs
To communicate between Ardui- open Serial Monitor in Arduino IDE.