IrDA is a standard defined by the IrDA consortium (Infrared Data Association). It specifies a way to wirelessly transfer data via infrared radiation. The IrDA specifications include standards for both the physical devices and the protocols they use to communicate with each other. The IrDA standards have arised from the need to connect various mobile devices together. (Primary use for IrDA is to link notebooks or various personal communicators; however, even video cameras are sometimes equipped with an IrDA interface.)
IrDA devices communicate using infrared LED's. Wavelength used is 875 nm +- production tolerance (around 30 nm). Many CCD cameras are sensitive to this wawelength too. Receivers utilize PIN photodiodes in generation mode (incoming light "kicks out" electrons. Signal continues into a filter. Only allowed frequencies for a particular IrDA modulation can pass through.) There is a direct relationship between the energy of the incoming radiation, and the charge that the optics part of the receiver generates.
Range and speed of IrDAIrDA devices conforming to standards IrDA 1.0 and 1.1 work over distances up to 1.0m with BER (Bit Error Ratio - number of incorrectly transferred bits over number of correctly transferred bits) 10-9 and maximum level of surrounding illumination 10klux (daylight). Values are defined for a 15 degree deflection (off-alignment) of the receiver and the transmitter; output power for individual optical components is measured at up to 30 degrees. Directional transmitters (IR LEDs) for higher distances exist; however, they don't comply with the required 30 degree radiation angle.
Speeds for IrDA v. 1.0 range from 2400 to 115200 kbps. Pulse modulation with 3/16 of the length of the original duration of a bit is used. Data format is the same as for a serial port - asynchronously transmitted word, with a startbit at the beginning.
Transmitter can use either 3/16 mark-to-space ratio for one bit, or a fixed length 1.63 us of each optical pulse, which would correspond to 115kbps. With fixed length and speed of 38400 bps, each bit would take 3 pulses.
In addition, IrDA v. 1.1 defines speeds 0.576 and 1.152 Mbps, with 1/4 mark-to-space ratio. At these speeds, the basic unit (packet) is transmitted synchronously, with a starting sequence at the beginning. The NRZ signal in the figure is the original data signal without modulation.
A packet consists of two start words followed by target addres (IrDA devices are assigned numbers by the means of IrDA protocol, so they are able to unambiguously identify themselves), data, CRC-16 and a stop word. The whole packet (frame) including CRC-16 is generated by IrDA compatible chipset. Start and stop words cannot appear anywhere else in the data stream - start and stop words last 1.5times the bit duration (6 times longer flash than usual).
For 4Mbps speed, so-called 4PPM modulation with 1/4 mark-to-space ratio is used. Two bits are encoded in a pulse within one of the four possible positions in time. So, information is carried by the pulse position, instead of pulse existence as in previous modulations. For example, bits 00 would be transmitted as a sequence 1000 (flash-nothing-nothing-nothing), bits 01 would be 0100, bits 11 would be send as 0001.
Main reason for the 4PPM modulation is the fact, that only half of the LED flashes are needed than in previous modulations; so, data can be transferred two times faster. Besides, it is easier for the receiver to maintain the level of surrounding illumination - with the 4PPM modulation, a constant number of pulses is received within a given time.
With bit speed of 4Mbps, the transmitter flashes at 2MHz rate. However, unlike 0.576 and 1.152 Mbps, 4Mbps packets use CRC-32 correction code. Most chipsets which can use this modulation can also generate CRC-32 by themselves, and check it when receiving - some chipsets (the ones I have studied) throw away incorrectly received frames.
More, IrDA defines so-called low-power IrDA device, with range up to 20 cm and max. speed 115kbps (a.k.a. IrDA 1.0). Limiting factor for the range is the radiation intensity at the receiver in mW/cm2. This value is higher for faster bit speeds, for slower bit speeds (long pulses) the possible range increases. (This is not explicitly mentioned in the IrDA standards, but it correlates to the amount of incoming radiation - receiver thinks that short low-energy pulses are noise. For its filter to let them through, they need to be either longer, or their energy must be higher.)
Why a pulse modulation is used?The receiver needs a way to distinguish between the surrounding illumination, noise, and received signal. For this purpose, it is useful to use the highest possible output power: higher power -> higher current in the receiver -> better signal-to-noise ratio. However, IR-LED's can't transmit at full power continuously over 100% of time. So, a pulse width of only 3/16 or 1/4 (mark-to-space ratio) of the total time for one bit is used. Now, the power can be up to 4 or 5 times the possible maximum power for LED's shining continuously. In addition, the transmission path does not carry the dc component (since the receiver continuously adapts itself to the surrounding illumination, and detects changes only.), thus it is necessary to use pulse modulation. Integrated IrDA transceivers (combined transmitting IR-LED and the receiving PIN photodiode) do have filters that eliminate noise other than the IrDA frequency range 2400-115200 bps and 0.576-4Mbps (2M flashes/s).
Protocols used by IrDA devices
- IrDA Infrared Link Access Protocol (IrLAP)
- IrDA Infrared Link Management Protocol (IrLMP)
- IrDA Transport Protocols (Tiny TP)
- IrDA Object Exchange Protocol (IrOBEX)
- Extensions to IrOBEX for Ir Mobile Communications
- IrTran-P (Infrared Transfer Picture) Specification
is a modification of the HDLC protocol reflecting the needs of IrDA communication. In general, it encapsulates the frames and makes sure the IrDA devices don't fight among themselves - in multi-device communication, there is only one primary device, others are secondary. Note that the communication is always half-duplex. Also, IrLAP describes how the devices establish connection, close it, and how are they going to be internally numbered. Connection starts at 9600 Bd; as soon as information about supported speeds is exchanged, logical channels (each controlled by a single primary device) are created.
Since configuration of IrDA devices changes (you turn on your IrDA camera and put it next to your notebook), every device lets the others know about itself via the IrLMP protocol, which runs above IrLAP (IrLAP is a link protocol; I would compare it to the IP protocol, although address resolution is different). IrLMP's goal is to detect presence of devices offering a service, to check data flow, and to act as a multiplexer for configurations with more devices with different capabilities involved (compare to sockets in TCP/IP communication). Then, applications use the IrLMP layer to ask if a required device is within range, etc. However, this layer does not define a reliable way to create a channel (like in TCP); this is defined by IrDA Transport Protocols (Tiny TP).
This layer manages virtual channels between devices, performs error corrections (lost packets, etc.), divides data into packets, and reassembles original data from packets. It is most similary to TCP.
is a simple protocol, which defines PUT and GET commands, thus allowing binary data transfer between devices. It is built on top of TinyTP. The standard defines what a packet must contain in order for the devices to recognize each other and communicate.
This extension of IrOBEX for mobile devices - handhelds, PDA, cellular phones - defines how to transfer informations pertaining to GSM network (address books, SMS, calendar, dialing control, digital voice transfer over IR, ...)
This definition was made up by big companies manufacturing digital cameras and specifies how to transfer pictures over the infrared interface. It is built on top of TinyIP, too.
IrDA componentsHere, I can describe my own experience with several components made by Hewlett Packard. They manufacture stand-alone IrDA transmitters (IR LED), receivers, as well as transceivers (a receiver with a transmitter in a single package). For speeds up to 115kbps (IrDA 1.0), HSDL-1000 transceiver is available. It works in half-duplex mode. It is very easy to use. Besides the transceiver itself, only several capacitors to filter the signal and to reduce noise are used. The capacitors need to be placed as close to the transceiver as possible, preferably within 0.7 cm (0.3 in). Since the HSDL-1000 is in a SMD package, it is a good idea to place it on a two-layer PCB, with ground copper area on the other side for shielding.
A faster version of the transceiver is labelled HSDL-1100. It supports FIR speeds (up to 4Mbit/s). However, I had problems with this one. In improper design, the FIR output easily becomes an oscillator. This part is also more sensitive to noise and unwanted feedbacks than the HSDL-1000 (FIR output only).
Other HP components available include IR LEDs HSDL-4230 and HSDL-4220. These LEDs withstand modulation speed up to 10Mbits, maximum current 0.5A (mark-to-space ratio 0.2) or 100mA (continuously). The only difference of the two versions in the HSDL-4200 family is their radiation angle (30 degrees for HSDL-4220, only 17 degrees for HSDL-4230).
Also, Hewlett-Packard manufactures standalone PIN receivers as well as IrDA modulation encoders/decoders. Integrated encoder/decoder of IrDA 115kbps modulation can be ordered under part No. HSDL-7000. It is an integrated circuits with 8 pins. In addition to power, serial port transmit/receive, a 16-times the bit frequency oscillator needs to be connected to it (for 115kbps, required frequency is 115200*16=1.8432 MHz). I had a chance to try out encoder/decoder HSDL-7001; however, it offers only a few additional functions (e.g. integrated frequency divider, or a possibility to connect a passive XTAL directly to its inputs). In addition, the integrated frequency divider works for IR input only, not for the output.
|Schematics of the 3/16 modulator HSDL-7000|
Of course, Hewlett-Packard is not the only manufacturer of IrDA components. For example, Texas Instruments manufactures UART's labeled TIR1000 and TIR2000. The TIR2000 incorporates a driver for the 4Mbps modulation (uses DMA mode). National Semiconductors produce their own versions. And so on. In the Czech Republic, UARTs by TI and NS circuits are probably the most commmon ones.
Download & Links:
Here are links to WWW pages of different IrDA devices manufacturers
Linux support for IrDA
I don't have to mention IrDA protocol support at Micro$oft. However, here is a link to The Linux/IR Project, whose objective is to incorporate IrDA protocols into Linux kernel. Source codes are tested on development Linux kernels (2.1.xxx), (2.1.xxx)
When playing with the IrDA data transfer, our goal was far beyond the 1 meter range specified by the IrDA standard. Using IR LED's with half the radiation angle (17 degrees, instead of 30), we could go up to 4 meters without additional optics at 115 kpbs bit rate. Beyond a certain distance, the receiver tends to loose individual pulses, or decrease their amplitude and duration (after all, it is an analog circuit although its output is supposed to be "digital"). For greater distances (our requirement was to transfer data over a 200m distance), additional optics is needed. We have found that, if speed is decreased 4 times, distance can be increased two times. This confirms the thesis about pulse detection via certain amount of energy passing through the filter in the receiver.
Since our goal was to connect two Linux boxes and run ppp protocol over a serial line, we have created additional logic (1 gate ;). It would continuously send pulses while DTR signal remained inactive, and thus signal a 'hang-up' to the other side. A side effect is that if the serial cable from the computer to the IrDA link is pulled out, the circuit starts sending pulses - as if the computer had hanged up via the DTR signal. This can be used in debugging process - finding signal. More, transmitter can be connected to the receiver on one side, creating a several hundred meters long loopback - ideal for checking connection quality in both directions, without the need to run there and back.
With the additional optics, we have found after some time that for distances less than about 80 meters (115 kBd speed), full-duplex mode cannot be used since the transmitted beam reflects back and creates echos. The same applies whenever there is a reflective object in the signal path - a window, for instance.
Alignment of the link is critical. The mount has to be very firm, and able to fine-point the components, so they are co-axial. Reasonable bit errors can be achieved if the link is aligned within about one meter (distance 200m - corresponds to approx. one half of a degree angle). Alignment is critical for the transmitter, not the receiver. Our best result was about 0.0006% faulty packets (MTU=296 bytes, ping packet length 64 bytes), in other words, about one packet out of 170000 packets is bad. The statistics for the other direction were about four times worse - bad alignment. Normal rain is obviously not an issue (it has been raining for two days already), problems arise with heavy rain or direct sunshine to the optics.
ppp0 Link encap:Point-to-Point Protocol inet addr:10.1.2.4 P-t-P:10.1.1.4 Mask:255.255.255.0 UP POINTOPOINT RUNNING MTU:296 Metric:1 RX packets:49724542 errors:233 dropped:233 overruns:0 frame:0 TX packets:49625500 errors:0 dropped:0 overruns:0 carrier:0 coll:0This is our ppp line statistics, 115kbps, full duplex, rain, 200m
ppp0 Link encap:Point-to-Point Protocol inet addr:10.1.2.4 P-t-P:10.1.1.4 Mask:255.255.255.0 UP POINTOPOINT RUNNING MTU:296 Metric:1 RX packets:25255596 errors:18 dropped:18 overruns:0 frame:0 TX packets:25276229 errors:0 dropped:0 overruns:0 carrier:0 coll:0and this one with good weather and a different setting (again 200m)
Pictures in the text are from WWW pages of Hewlett Packard, Texas Instruments, and bitmap version of pdf documents by IrDA consortium.
For pricing information of IrDA components, please contact your local electronics components dealer.
Revised by:Jan Rehak
English translation by:Joe Hlavac