ELM ELM622P

ELM622
Infrared Remote Interpreter
Description
Features
The ELM622 is an interface circuit for converting
infrared control codes to an eight bit serial format.
This device is well suited to applications that only
require occasional input from humans, or where a
hidden interface is desired.
When connected to a standard infrared receiver
module, the ELM622 continually scans the data
stream for Sony™ television control codes. If
detected, the codes are retransmitted serially, with
hardware handshaking. This data can then be used
directly by logic circuits, or suitably buffered and
transmitted on a standard RS232 connection.
For convenience, some of the control codes are
translated to their ASCII equivalents before
retransmission, allowing direct display of the
common control signals on an ASCII terminal.
Many products that currently rely on a keyboard
for input can benefit from the small size and
simplicity that an ELM622 provides, and several
others are likely to benefit from the at-a-distance
control that this circuit offers.
• Low power CMOS design - typically 1mA at 5V
• RS232 formatted output at 9600 baud
• Hardware handshaking provided
• Signal received output for visual feedback
• Simple interface to standard receiver modules
• Works with universal TV remote transmitters
• Reset output on command
• High current drive outputs - up to 25 mA
Connection Diagram
PDIP and SOIC
(top view)
Applications
• Alternative to keyboard interface
VDD
1
8
VSS
Tx
2
7
Reset
RTS
3
6
LED
CTS
4
5
IRRx
• Hidden security system control
• Non-contact device control for safety
• Home automation receiver
Block Diagram
IRRx
Data
Decoder
5
LED
Code
Translator
2
Tx
3
RTS
4
CTS
7
Reset
6
99999
Detector
ELM622DSA
RS232
Encoder
100ms
Pulse
Generator
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
1 of 5
ELM622
Pin Descriptions
VDD (pin 1)
This pin is the positive supply pin, and should
always be the most positive point in the circuit.
Internal circuitry connected to this pin is used to
provide power on reset of the microprocessor, so
an external reset signal is not required. Refer to
the Electrical Characteristics section for further
information.
Tx (pin 2)
The transmit data output. When a valid byte is
received it is retransmitted from this pin at 9600
baud, least significant bit first, with one start bit,
no parity bit, and one stop bit. The pin is normally
held at a logic high level when in the idle state,
and goes to true logic levels when transmitting
data. The output is compatible with standard
RS232 data transmission, when coupled through
appropriate buffers (transistors or interface ICs
such as the MAX232).
high level forces the ELM622 to wait. The system
waits no longer than about 2 seconds, however,
before discarding the byte and reverting to the
idle condition. The state of the pin is tested just
prior to sending data, and is not monitored once
data transmission begins.
IRRx (pin 5)
The output of a standard 40KHz infrared receiver
module is connected to this pin, through a series
resistor of about 5KΩ value. The output of such a
module is normally at a high level, and switches
to a logic low when modulated carrier is received.
LED (pin 6)
This pin provides a logic high level output when a
valid code has been received and remains at that
level until the data has been sent by the ELM622.
The output is suitable for driving an LED through
a current limiting resistor.
RTS (pin 3)
RTS is the request to send handshaking output.
When a valid byte is ready to be sent, this pin will
be brought low and will remain at that level until
the stop bit has been sent, or the send is aborted
due to a time-out.
Reset (pin 7)
A high level 100msec wide pulse is output on this
pin when the sequence 99999 is received. This
can be used for special functions such as
resetting the system, or momentarily triggering a
control point.
CTS (pin 4)
This input pin is used to control the transmission
of data. A logic low level allows sending, and a
VSS (pin 8)
Circuit common is connected to this pin. This is
the most negative point in the circuit.
Ordering Information
These integrated circuits are available in either the 300 mil plastic DIP format, or in the 200 mil SOIC surface
mount type of package. To order, add the appropriate suffix to the part number:
300 mil Plastic DIP............................... ELM622P
200 mil SOIC..................................... ELM622SM
All rights reserved. Copyright ©1998 Elm Electronics.
Every effort is made to verify the accuracy of information provided in this document, but no representation or warranty can be
given and no liability assumed by Elm Electronics with respect to the accuracy and/or use of any products or information
described in this document. Elm Electronics will not be responsible for any patent infringements arising from the use of these
products or information, and does not authorize or warrant the use of any Elm Electronics product in life support devices and/or
systems. Elm Electronics reserves the right to make changes to the device(s) described in this document in order to improve
reliability, function, or design.
ELM622DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
2 of 5
ELM622
Absolute Maximum Ratings
Storage Temperature....................... -65°C to +150°C
Note:
Stresses beyond those listed here will likely damage
the device. These values are given as a design
guideline only. The ability to operate to these levels
is neither inferred nor recommended.
Ambient Temperature with
Power Applied....................................-40°C to +85°C
Voltage on VDD with respect to VSS............ 0 to +7.5V
Voltage on any other pin with
respect to VSS........................... -0.6V to (VDD + 0.6V)
Electrical Characteristics
All values are for operation at 25°C and a 5V supply, unless otherwise noted. For further information, refer to note 1 below.
Characteristic
Minimum
Typical
Supply Voltage, VDD
4.5
5.0
VDD rate of rise
0.05
Average Supply Current, IDD
Maximum Units
5.5
1.0
Conditions
V
V/ms
see note 2
2.4
mA
see note 3
Input low voltage
VSS
0.15 VDD
V
Input high voltage
0.85 VDD
VDD
V
0.6
V
Current (sink) = 8.7mA
V
Current (source) = 5.4mA
Output low voltage
Output high voltage
Reset Output Pulse Width
Transmit Baud Rate
VDD - 0.7
90
100
110
msec
see note 4
9300
9600
9900
baud
see notes 4 and 5
Notes:
1. This integrated circuit is produced with a Microchip Technology Inc.’s PIC12C5XX as the core embedded
microcontroller. For further device specifications, and possibly clarification of those given, please refer to the
appropriate Microchip documentation.
2. This spec must be met in order to ensure that a correct power on reset occurs. It is quite easily achieved
using most common types of supplies, but may be violated if one uses a slowly varying supply voltage, as
may be obtained through direct connection to solar cells, or some charge pump circuits.
3. Device only. Does not include any LED or drive currents.
4. Pulse timing is internally generated, and affected by both temperature and supply voltage. Times shown are
the widest variation that can normally be expected.
5. Data is sent at this rate with eight data bits, no parity bit, and one stop bit. Process and temperature
variatons could typically result in as much as 3% error in this rate, but most UARTs would be tolerant of this.
In high reliability applications, one might use the fact that the eighth data bit is always ‘0’ to calibrate a timing
loop to the ELM622’s speed. The receiver could then compensate for variations in the data rate.
ELM622DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
3 of 5
ELM622
Data Translation Table
To allow easier interfacing with computer
equipment, some of the Sony™ control codes that
are received by the ELM622 are replaced with
their ASCII equivalents. Conversely, when keys
representing these ASCII characters are received,
the original number codes are sent.
Received Codes
Table 1 below summarizes the code values that
are exchanged. All other codes received are retransmitted without modification.
Are Transmitted As…
Also, the Codes…
Value
Key Pressed
Value
ASCII Char
Received
Are Sent As
0
1
49
1
49
0
1
2
50
2
50
1
2
3
51
3
51
2
3
4
52
4
52
3
4
5
53
5
53
4
5
6
54
6
54
5
6
7
55
7
55
6
7
8
56
8
56
7
8
9
57
9
57
59
9
0
48
0
48
9
11
Enter
13
13
11
21
Power
46
46
21
59
Jump or
Prev
8
Carriage
Return
Decimal
Point
Back
Space
Table 1. Data Translation Values
ELM622DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
4 of 5
ELM622
Example Application
Figure 1 shows an example circuit using the
ELM622. Keypresses on a television remote control
transmitter are received by this circuit, interpreted, and
retransmitted to a monitoring computer.
The television remote control used is one of the low
cost universal types, set to generate Sony™ codes. This
is often the default power-up mode for most of these
remotes. Output is by way of a simple one transistor
RS232 connection, with no handshaking. The auxiliary
reset output is not used in this case, and power for the
entire circuit is provided by a 5 volt regulated supply.
Operation is straight-forward. When a button on the
remote is pressed, the serial data stream is detected by
the infrared module and passed onto the ELM622 as a
series of negative-going pulses. The data is then
decoded, and if found to contain a Sony™ control code,
is retransmitted. The type of receiver modules required
are commonly available on the market, and are
manufactured by companies such as Sharp™ or
LiteOn™. A 40KHz module is required for a Sony™
infrared remote, although 38KHz ones have been used
successfully.
In operation, ambient light can occasionally cause
an infrared receiver’s bias level to drift towards VSS,
possibly tripping the ELM622’s Schmitt trigger input. As
the receiver output drifts high again, the Schmitt trigger
may not always reset, so that it might appear that there
is carrier present when it is not. This condition is
accounted for within the integrated circuit by
momentarily changing pin 5 to a high level output before
taking any measurements, thus reseting the trigger. The
series resistor must be used on pin 5 to protect both
circuits during this momentary high level pulse. Typically
a value of 4.7KΩ is sufficient.
The output of the ELM622 is shown coupled to a
monitoring computer through a simple one transistor
buffer circuit. The circuit uses the computer’s idle
transmit line as a source of negative voltage, and
includes a diode for protection from backfeeds. Output
connections are made through a standard DB25 female
modem type connector with the pin numbers as shown.
This is all that is required to receive control codes
from a standard infrared remote control, and to transmit
them to a computer. At the computer, the data can be
displayed using a terminal program, used to control the
computer, or possibly used to control other devices.
Alternatively, the ELM622 could simply be connected
directly to a microcontroller, providing a very low parts
count alternative to the use of keyboards...
+5V
2N3906
3
10KΩ
+12V
4.7KΩ
7
+5V
78L05
0.1µF
0.1µF
1
8
2
7
3
6
4
5
DB25F
Connector
1N4001
2
560Ω
40 KHz IR
Receiver
4.7KΩ
LED
Figure 1. Infrared to RS232 Circuit
ELM622DSA
Elm Electronics – Circuits for the Hobbyist
< http://www.elmelectronics.com/ >
5 of 5