Industrologic IR232

Infrared to RS-232 Converter

Reference Manual

version 1/20/04



Industrologic, Inc.
3201 Highgate Lane
St. Charles, MO
63301
USA

Phone: (636) 723-4000
WWW: http://www.industrologic.com
Email: info@industrologic.com




Trademark and Copyright Information

IR232 is a Trademark of Industrologic, Inc. 2003

This document is Copyright (c) 2003 by Industrologic, Inc.
All rights reserved.

No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying or scanning, for any purpose other than the personal use by the purchaser of this product. Industrologic, Inc. reserves the right to revise this document at any time without obligation to notify any person of such revision. Industrologic, Inc. assumes no responsibility for any errors that may appear in this document.

The software distributed with and the firmware contained in this product is Copyright (c) 2003 by Industrologic, Inc.


Warning/Disclaimer

Whereas effort has been made to make the information in this document as useful and accurate as possible, Industrologic, Inc. assumes no responsibility for the application, usefulness, or completeness, of the information contained herein. Under no circumstance will Industrologic, Inc. be responsible or liable for any damages or losses including indirect or consequential damages or losses arising from either the use of any information contained within this manual or the use of any products or services referenced within this manual.

Industrologic, Inc. reserves the right to change any product's features, specifications, documentation, warranties, fee schedules, and conditions at any time and without notice.

Industrologic products are provided as printed circuit board level assemblies. Some Industrologic products may include mechanical packaging assessories which are provide for the purchaser's convenience, and are not intended to be final assembly enclosures.

Industrologic products are provided with the understanding that the purchaser will determine fitness for any particular application as well as achieve compliance with any particular specifications or regulations as required or desired for that application.


Warranty

Industrologic, Inc. products are warranted to be free from defects in workmanship or material under normal use and service for a period of one year from date of purchase. Industrologic's warranty is to the original purchaser only, but is extended to you by the Distributor or OEM from whom you purchased the product.

Industrologic's obligation under this Warranty is limited to replacement with a new or repaired unit to the original purchaser. The unit must be returned, and replacements obtained from Industrologic, Inc. or the Distributor or OEM from whom it was purchased.

This warranty will not apply if, in the judgment of Industrologic, Inc., damage or failure of the product has resulted from accident, alteration, misuse, abuse, connection to or operation with incompatible signals or power sources, or improper installation.

Under no circumstances shall Industrologic, Inc. be liable to purchaser or any third party for any loss of profits or other direct or indirect costs, expenses, losses, or consequential damages arising out of or as a result of any defects in or failure of Industrologic products or any part or parts thereof.

THIS WARRANTY IS IN LIEU OF ANY OTHER WARRANTY, EITHER EXPRESSED OR IMPLIED, AS TO DESCRIPTION, QUALITY, MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE OR USE, OR ANY OTHER MATTER.


Return and Repair Policy

Products purchased in single piece quantities may be returned, if in resellable condition, for a full refund of the purchase price only, to the original purchaser, within 30 days of purchase.

Products must be returned by original purchaser with a Return Materials Authorization (RMA) number issued by Industrologic, Inc. or the Distributor or OEM from whom it was purchased, authorizing its return. Current repair or replacement fees and procedures will be related during the issue of the RMA number.

Warranty or repair units must be returned with postage and insurance paid by purchaser. Industrologic, Inc. is not responsible for damages or loss during shipment.





Industrologic IR232

Infrared to RS-232 Converter

The Industrologic IR232 is an infrared to RS-232 converter that is based on the 12 bit Sony SIRCS protocol. In addition to being able to send and receive character codes to and from the infrared and RS-232 ports, it can also be configured to send specific character strings to the serial port when selected infrared codes are received. This will allow it to act as a host and controlling device to any slave device that can accept RS-232 commands.



picture of IR232


Summary of Features



Mechanical Specifications

Double-sided .062" FR-4 glass epoxy printed circuit board
P.C. Board assembly has holes available for mounting to enclosure or #4 standoffs
P.C. Board dimensions: 2.30 inches wide by 2.20 inches long by 0.6 inches tall
Enclosure dimensions: 2.60 inches wide by 2.60 inches long by 1.1 inches thick


IR232 dimensions and connections



Electrical Specifications

Operating environment:
Temperature: 0-50 degrees Celsius (32-122 Fahrenheit)
Humidity: 30 to 80 percent, non-condensing

Power supply requirements:
Power supply voltage: 7 to 18 volts AC, 8 to 18 volts DC, regulated or unregulated
Power supply current: 30 mA at 16VDC with no LED's activated
Visible LED current: approximately 20 mA
Infrared LED current: approximately 100 mA
Power supply connector: 5.5 mm outside diameter, 2.1 mm inside diameter

Infrared Interface:
Protocol: 12 bit Sony SIRCS
Modulation Frequency: 40 KHZ
Transmission and Reception Angle: +/- 20 degrees minimum
Transmission Distance: Up to 50 feet (requires precise alignment at longer distances)
Reception Distance: Unlimited (dependent on transmission strength and alignment)

RS-232 Interface:
Pinout: Matches devices that connect pin-to-pin with PC DB9 serial port
Drivers: MAX232 or equivalent RS-232 transceiver
Auxiliary Power: +5 volts available on pin 9



IR232 Serial Port

The IR232 serial port connector and its pinout matches the 9-pin serial port of PC compatible computers. It can be easily connected to a computer during the configuration process using a pin-to-pin male-to-female cable. The IR232 does not require hardware handshake signals and can be used with only the transmit, receive, and ground signals connected.

Some programs that run on a PC require that some of the input handshake signals be asserted going into the PC. In order to make this easier when the IR232 is used as an input device to a computer, the IR232 has the common PC handshake signals looped back on the board, so that when a 9-wire cable is used, the signals are asserted without requiring jumpers.

If the IR232 will be connected to another Industrologic product that has a similar pinout on its serial port connector, it will be necessary to use a male-to-male "null modem" cable or equivalent. Since the IR232 does not require handshake signals, this can be accomplished using only pins 2, 3, and 5, with pins 2 and 3 being reversed, plus pin if power is to be transferred to or from the IR232.

To facilitate the connection of devices requiring power to the IR232, the +5 volt signal from the on-board regulator has been connected to pin 9 of the serial port connector. This connection will not affect normal serial ports since +5 volts is within the range of allowable voltages on RS-232 input pins.

The following is a pin out of the serial port signals:

IR232 signal   TX   RX   -    -    GND  -    -    -    +5 OUT
pin            1    2    3    4    5    6    7    8    9
PC signal      DCD  RX   TX   DTR  GND  DSR  RTS  CTS  RI


Using the IR232

The IR232 is capable of sending and receiving Sony SIRCS 12 bit protocol infrared transmissions. This type of transmission is used extensively to control multiple consumer electronic devices with a handheld remote control unit. The protocol is based on a 12 bit packet that includes a 5 bit "Device" code and a 7 bit "Function" code. The Device code identifies a unit that will act on the command, and the Function code tells that unit which operation to perform. The IR232 converts this 12 bit infrared transmission to and from one or two 8 bit bytes for use by the RS-232 port and for other functions.

Most "universal" handheld remote control units can be configured to send the Sony 12 bit protocol, and many can send a number of different sets of Device and Function codes. If you will be using a remote control unit in the vicinity of other devices that use the Sony protocol it may be necessary to select a code set that does not interfere with the operation of these devices.

The IR232 can be used in several different modes of operation. These modes and their related options can be specified in a configuration menu that is accessed from the serial port.

Message mode (127 messages of up to 50 characters):

It can receive a 12 bit SIRCS infrared transmission and, based on the value of the Device and Function codes, send a specified character string to the serial port. This mode could be used to allow a handheld remote or other infrared transmission to send commands to an RS-232 slave device that requires specific commands, for example, a serial controlled relay.

One byte binary mode:

1. It can receive one 8 bit byte from the serial port, split it into the SIRCS 5 bit Device and 7 bit Function codes, and send them as a 12 bit SIRCS infrared transmission. 2. It can receive a 12 bit SIRCS infrared transmission, combine the Device and Function codes into an 8 bit byte, and send the byte to the serial port. This mode will allow it to communicate with another IR232 and act as a general purpose infrared transceiver for wireless data applications, (although the data transfer rate will be slow.) The 8 bit bytes are formed from bit zero of the Device code and the seven bits of the Function code so that the infrared transmission and reception in this mode will always be in a valid 12 bit SIRCS format.

Two byte binary mode:

1. It can receive two binary bytes from the serial port representing SIRCS Device and Function codes and send these bytes as a 12 bit SIRCS infrared transmission. (Infrared transmission will occur only after receiving the second of the two bytes.) This mode could be used to allow a computer or other RS-232 device to control electronic equipment much like a handheld remote control unit does.

2. It can receive a 12 bit SIRCS infrared transmission and send the Device and Function codes to the serial port as two 8 bit binary characters. This mode could be used to allow a handheld remote control to operate a computer by "remote control" if the software running on it could interpret the codes.


Important notes when sending or receiving data in either binary mode:

1. Data received by the IR232 serial port is unbuffered. This means that data must be sent to the IR232 no faster than the infrared transmissions can take place. 12 bit SIRCS infrared transmissions can take up to 25 milliseconds to complete and require additional time to be at an idle state. 2. Error correction techniques will be required for reliable communication. 3. The delay time between infrared transmissions should be set to zero in the configuration menu.

When power is applied to the IR232 it will begin operating in the mode that was last selected in the configuration menu. A visible red LED is present on the IR232 which will flash at the same rate as the infrared LED to help verify transmission, and will also flash briefly when a valid infrared transmission is received ((if the delay time is not set to zero). This LED will also stay on during the delay time specified. Refer to the "delay" command below.


Configuration Menu

To configure the IR232, connect the serial port to a computer serial port and apply power. Run a terminal emulation program provided by Industrologic (or Windows HyperTerminal). The factory default communication parameters are 9600 baud, 8 data bits, 1 stop bit, and no parity.

To access the configuration menu, press the ESCape key three times. (This is a combination of characters that is unlikely to be sent to the IR232 in normal operation.) A menu of commands will be displayed, along with the prompt CMD>. Pressing ESCape at the prompt will redisplay the menu of commands whenever desired.

Infrared transmissions received at the menu prompt are displayed as Device and Function codes in order to verify the operation of the infrared transmission.

Commands:

M - Set and erase messages

This command allows character string messages and their associated Device and Function codes to be entered. If either the Device code or Function code is entered as "X", that code will not be checked for a match. This will allow, for example, a match based only on the Function specified in a transmission, and allowing a match on all Devices. The character string message can be any of the displayable characters, numbers, and punctuation. Control characters that cannot be typed directly can be represented by a decimal value enclosed with "braces", for example, {13} is a carriage return (Enter key). The brace characters must be entered as {123} for the open brace and {125} for the closed brace. To erase a message only the "M" and the message number is entered, followed by the Enter key.

S - Serial port setup

This command allows the serial port parameters to be changed from the factory default setting of 9600 baud, 8 data bits, and no parity. Stop bits is always 1. This command will take place as soon as it is entered and will require that the terminal emulation program being used to be changed if further commands are to be entered! T - Transmit infrared immediately

This command sends an infrared transmission based on the Device and Function codes entered, and is provided as a way to easily test transmission and reception distances and angles. The number of Device and Function code pairs sent can be specified from 1 to 255, or zero for continuous. Pressing any key during multiple or continuous operation will stop the transmissions. Transmissions are sent with a 50 millisecond delay between each transmission.

O- Mode of operation

When in the message mode, the Device and Function codes are compared to the codes entered in the message commands. If the codes match, the character string specified in the message command is sent to the RS-232 port. When in the two byte binary mode, the 5 bit Device and 7 bit Function codes in infrared transmissions are converted to and from 8 bit bytes at the serial port. When in the one byte binary mode, the Device and Function codes in infrared transmissions are converted to and from a single 8 bit byte at the serial port, where bits 0-6 are the 7 bit Function code and bit 7 is bit 0 from the Device code.

D - Set the delay time between transmissions

Some devices that send infrared transmissions repeat these transmissions a number of times. For example, some handheld remote control units send transmissions as long as a button remains pressed. To prevent multiple transmissions from causing multiple messages to be sent in the message mode, a delay can be specified, which will be the amount of time that the IR232 will wait after receiving an infrared transmission before recognizing another one. This delay is specified in tenths of a second, from 0 to 50. If the delay is not set to zero, the visible LED will flash briefly to indicate that a valid infrared transmission has been received, and will also stay on during the entire delay time to indicate that it is not yet ready to respond to another transmission.

V- View the messages and options

This command displays the messages and their associated codes that have been entered, as well as the other configuration options.

X- Exit to normal operation

This command is used to go back to normal operation of the IR232 after configuration is complete. (Cycling the power to the IR232 will also place it back into normal operation.)


Example Menu Displays

The following is an example of what the menu will look like when using a terminal emulation program to communicate with the IR232 to set up the message commands and options.

(You must press the ESCape key 3 times after applying power to see this menu.)


Industrologic, Inc. IR232, infrared to RS-232 converter, version 1.0

Uses 12 bit Sony SIRCS protocol (5 bit Device code and 7 bit Function code).
Messages entered can be sent to serial port when specified IR codes are
received, or binary codes can be sent and received from IR to serial port.

Commands: (End commands with Enter key or abort/display menu with Escape key)
Mnnn=ddd,fff,[message]  Set message, nnn=message number 1-127, ddd=Device code,
fff=Function Code 0-255. If either code is entered as "X", that code need not
match. [message] can be up to 60 upper and lower case characters including
control characters, which are represented by a decimal value enclosed with
braces, e.g., {13} for carriage return.
Mnnn     Erase message, nnn=message number 1-127.
S=B,D,P  Serial port setup, (B)aud rate is 0=19200, 1=9600, 2=4800, 3=2400,
4=1200, 5=600, 6=300, (D)ata bits, 8 or 7, (P)arity is 0=none,
1=odd, 2=even. D,P must be 8,0, 8,1, 8,2, 7,1, or 7,2.
O=M      Operation, (M)ode is 0=messages, 1=one byte binary, 2=two byte binary.
D=ttt    Delay required between IR receptions, ttt is 10th seconds, 0-50.
V        View messages, mode, and delay.
X        Exit back to normal operation.
T=ddd,fff,nnn   Transmit IR code pair, ddd=Device Code, fff=Function Code,
nnn=number of pairs 1-255, or 0 for continuous.
(IR transmissions received at this menu are displayed as decimal codes.)

Cmd>

The following is what the screen will look like after using the View command when sample messages have been entered. (Messages you enter will look different.)

Cmd>v
Operation=Message, Delay=2
M1=1,0,SIRCS Button #1 (carriage return, line feed){13}{10}
M2=1,1,SIRCS Button #2 (carriage return, line feed){13}{10}
M3=1,2,SIRCS Button #3 (carriage return, line feed){13}{10}

Cmd>

SIRCS Codes

The following is an abbreviated list of SIRCS codes that may be sent by a Sony remote control unit (or "universal" unit when set up to act like a Sony.) For example, a remote control unit designed to control a TV and VCR may send these codes, plus a number of others. To determine what codes a particular remote control unit is sending, it can be operated with the IR232 connected to a computer running a terminal emulation program. The codes from a valid SIRCS infrared transmission will be displayed when the IR232 is at the configuration menu.

Device Codes (This is first of two codes that will be sent until a different device is selected.)

Code     Device (equipment responding)

1        TV
2        VCR 1
4        VCR 2
6        Laser disk
7        VCR 2
11       VCR 3
12       Surround Sound processor
16       Cassette deck and tuner
17       CD player
18       Equalizer
Function Codes (This is the second of two codes that will represent the button pushed.)

         TV specific                       VCR specific
Code     Function (button)        Code     Function (button)

0-8      1-9                      0-8      1-9

9        0/10                     9        0/10
10                                10       11/*
11       enter                    11       12/enter
12                                12       13
13                                13       14

16       channel up               16       channel up
17       channel down             17       channel down
18       volume up                18       volume up
19       volume down              19       volume down
20       mute                     20       x2
21       power                    21       power
22       reset                    22       eject
23       audio mode               23       audio mode
24       picture up               24       stop
25       picture down             25       pause
26       color up                 26       play
27       color down               27       rewind
28                                28       fast forward
29                                29       record


end of manual
log file