Document Sample
problem Powered By Docstoc
					                   Preliminary Design Document for

                    Infrared Null Modem Emulator

                            submitted to:

                       Professor Joseph Picone
                     ECE 4512: Senior Design I
          Department of Electrical and Computer Engineering
                     Mississippi State University
                 Mississippi State, Mississippi 39762

                          October 22, 2001

                             Submitted by:
     Shaun McFarland, Stephen Porter, Hiu-Yang Sim, Peter Trenkle
                  Faculty Advisor: Dr. Robert Reese
           Department of Electrical and Computer Engineering
                      Mississippi State University
                               Box 9571
                     Mississippi State, MS 39762
Email: {;;;
                              EXECUTIVE SUMMARY

The null modem connection is a very important communication link between two
devices‟ serial ports. It is used in test equipment, telecommunications, and low transfer
rate data communication. The versatility and the simplicity of the RS-232 interface
makes it the best choice for serial communication between devices. A common problem
with this setup is the physical makeup of the data link. At the very best, the link is a
cumbersome null modem cable between a laptop and a piece of test equipment or a
personal computer. We propose eliminating that bulky setup with a small module that
communicates via the IrComm standard with a hand held computing device. This could
potentially save companies money by allowing them to buy Palm Pilots instead of more
expensive laptops. In today‟s world of wireless communication, COM ports are made
wireless easily by implementing common Infrared Data transmission protocols.

There are several design constraints in developing an Infrared Null Modem Emulator.
First and foremost, we must make the technology transparent to the products which we
are interfacing. This means that the RS-232 port that we are talking to will not know the
difference between our product and a null modem cable. Our product will also be able to
transmit and receive at all serial rates up to 115.2 kbps. Low cost will be an important
factor in our design. A minimum amount of parts will be used: the main components
include a programmable interrupt controller, UART, oscillator, and Infrared transceiver.
Our design will have a low power constraint due to the need for portability. This means
that our components will have to run at a relatively low clock speed and consume the
current available from a single 9V battery. Due to the inexpensive parts and the
widespread availability of Infrared technology, production costs should be under $30.

To develop this project, a universal standard for IR data transmission must be used. The
Infrared Data Association‟s website,, outlines the accepted standards that
all Infrared products use to communicate with each other. We decided to implement the
IrComm standard because of its ability to replace the RS-232 interface with a wireless
data link. Our hardware design also required tough decision-making. We decided to use
PIC C Code to develop the IrComm standard on the PIC16F877. Its on-board UART will
control the serial input from the RS-232 interface that we will encode into Infrared
pulses. The interrupt controller will then packetize the data. The PIC will send the
packetized data to an external UART, which will control the IR transceiver‟s
transmission to the Palm Pilot. The IR Transceiver will also take packets of data from
the Palm Pilot and send them to the PIC for de-packetizing. By using this setup to
implement the IrDA technology, we allow our project to be completely transparent to
devices interfacing to our module.

There will be an opportunity to use this Infrared serial transmission technology for
numerous other applications. Due to the availability of IR ports in desktop computers and
laptops, wireless networking is another large market that could use this technology. Our
project will cost-effectively replace the bulky setup currently required to set up a null
modem connection.
2. Problem
Recently, due to extensive marketing by the wireless industry, more low speed data links
are becoming wireless. This marketing push has been taking place in the wireless phone
industry where digital technology has made more services available to the public. These
wireless surges have driven consumer demand for wireless networks and point to point
data communication in modern hand-held PDAs and laptop computers. This sudden
ability to communicate with devices via wireless links with inexpensive PDAs has given
our group the ability to solve a problem that plagues the telecommunications industry.

With today‟s need for higher speed connections, the telecommunications industry has
grown rapidly. Since even the home user now has a need for high-speed data
communication, the telephone companies have a more diverse customer base. With this
distribution all over the service area, telephone technicians must be highly mobile and
have quick and easy access to the diagnostic tools available from the faceplate of most
modern telecom equipment. Current telephone equipment uses RS-232 interfaces to talk
to the outside world about how it is provisioned, what problems it is experiencing, and
what its circuit ID is. It communicates via the null modem port of a laptop computer at
data rates of no more than 19.2 kbps. There is also a set maximum distance of cable that
it can effectively communicate over, usually six to twelve feet. Due to the maximum
distance requirement and low data speed, this makes the physical connection a perfect
candidate for replacing with a wireless link. Infrared communications are perfect for
implementing this “wire replacement” on the RS-232 interface. Infrared data links
transmit data at 115.2 kbps and work over a distance of one to two meters.

The Infrared Data Association was created in 1993 and created a standard that allows for
low speed (<115.2kbps) data transmission over short distances. Infrared data links allow
us to move around and establish links without always plugging something in. Printing
while visiting another office, sharing files, and other applications are only natural,
especially in an age of Handheld PCs and other smarter, useful portable information tools
[15]. Several products have been developed that use the legacy components of PC COM
ports; from these products, the IrComm standard was born. The protocol requirements
are outlined in the IrComm standard available at Because the
standard uses layered data transmission, the control of the data stream is handled by the
Infrared Link Application Protocol (IrLAP) layer after the serial/physical layer is
implemented. The Infrared Link Management Protocol (IrLMP) layer controls multiple
links if needed. After these three layers are completed, the IrComm protocol layer is the
fourth layer and allows for reliable serial port emulation. Since these four layers can be
implemented on a PIC, UART, line driver, and IR transceiver, such would be a small and
inexpensive way to transmit data to a PDA or laptop.

Given the growing business trend of using Palm Pilots as organizers, address books, and
business tools, we assume that they are well distributed around the telephone industry.
The competition in the handheld PDA market has also driven prices down, making it an
inexpensive means to communicate with IrComm compatible devices. This has given us
an opportunity to build a product that can plug into any RS-232 interface and transmit
data to a Palm Pilot, which then would display the ASCII characters that make up the
menu interface.

Today, technicians use a laptop and cumbersome null modem connection cables to
establish a link to the faceplate. Since the need for mobility is even greater, we propose
to make the connection wireless and use handheld PDAs to view the information. In the
end, this will save the telephone companies time and money. It will allow them to buy
Palm Pilots instead of laptops, saving thousands of dollars. This also allows the
technicians to carry only a PDA into the field, drastically reducing the amount of
equipment they must carry.

The goal of our project is to design a low powered null modem emulator using the
IrComm standard. This standard will allow our small IR module to communicate with a
Palm Pilot, thus eliminating the need for DB-9 cables. This module will run on one 9V
battery and any available voltage from the RS-232 port. To make this technology more
transparent we are developing the software for the Palm Pilot, allowing the user turn on
the console and Palm Pilot and have a quick and easy data link. The PIC will implement
the IrComm standard via software. The UART will control data communications from
the processor to the IR transceiver and the data rate from the IR transceiver to the PIC.
The significance of this project is that it could find a niche market in the
telecommunications or data communications industry due to the versatility of the
technology used.

The tight power constraint of this project is the biggest problem that we must overcome.
The IR transceiver needs approximately 100 milliamps to transmit effectively over one
meter. Since portability is a requirement for this project, wall power or larger batteries
are not options. Also needed are a “sleep” mode, capacitors, and an ON/OFF switch to
prolong the battery life as much as possible. Once the basic software is written, features
will be added that turn off unused components when they are not receiving signals. The
Palm Pilot will help take the load off the battery by actively querying the console for a
request to connect. This will allow the transmitter to be idle as long as possible, thus
keeping the battery from supplying current to the transceiver while it is dormant.

To make this product practical for the telephone companies, the size of the console must
be small for maximum portability. The size must be close to that of a Palm Pilot, and the
console‟s weight must be supported by the DB-9 plug in the RS-232 port. This careful
balance between size and weight will make printed circuit board design very important.

The future applications of this project are numerous because of its low cost and
portability. The Null Modem Emulator will have an impact on several remote controlled
processes. One could use the Palm Pilot as a wireless remote control to toggle slides in a
presentation. A program could be developed to allow for a PC and laptop to be
networked together.
3. Objectives

The Design Constraints for this Project are as follows:

   1.     Encode/Decode Bi-Directional Serial Data at a Rate of 19.2kbps: Our
          device will be interfaced to an RS-232 port. This means that in a half second
          it will have to take in 19200 bits, encode and packetize the data, and send it
          out via an infrared stream. Another half second will be spent taking in 19200
          bits from the infrared stream, decoding and depacketizing the data, and
          sending it to the RS-232 port. A bit error rate of 10E-9 on these transmissions
          will also be a goal strived for.

   2.     Transparent Data Link Between IR Console and Palm Pilot: Our device
          will be able to sense an impending connection to a Palm Pilot as the user
          walks up to the device. It will also complete all handshaking as the
          connection is being established between the Palm Pilot and the IR console.
          After handshaking, the IR console will act as a null modem cable and send
          data to the Palm Pilot, which in turn will act as the terminal device in the RS-
          232 interaction.

   3.     Completely Implement the IrComm Standard Between Two Devices: By
          using this standard, our device will allow complete RS-232 functionality
          between itself and a Palm Pilot and completely substitute for a null modem
          cable. When the IR console is plugged in, the RS-232 interface will think a
          null modem connection is in place because all control pins and functionality
          will be the same.

   4.     Establish a 1 Meter Infrared Link Between the Palm Pilot and Console:
          After carefully weighing distance versus power consumption, the distance of
          one meter was chosen because of the availability of components, power
          constraints, and everyday use. This should increase battery life, reliability,
          and resilience in direct sunlight.

   5.     Design an Infrared Dumb Terminal Program for the Palm Pilot: To
          make a possibly complex data link easy for a user to create, the Palm Pilot
          must be able to automatically pick up the data link and use available input
          methods (graffiti and keypad) to input data into the Infrared stream.

   6.     Accuracy: Our design must have the ability to remember what was
          previously sent. If a packet is not properly sent, the console or palm pilot must
          be asked to send it again. This means that controls must be in place to make
          sure that every packet is valid. The control data provides this information.
          This data is located at the ends of the serial packet, which must be queried. If
          the packet is proven to be invalid, the proper controls for packet re-send must
          be implemented.
   7.      Power: The device will operate using one 9V battery because of the small
           packaging of our design. The device will consume 100 mA to transmit the
           data via infrared at distances of up to 1 meter. The battery will last one week
           in the device under continuous use.

   8.      Durability: The device will be designed to operate in a standard temperature
           environment of –30 degrees Celsius to 80 degrees Celsius. A metal enclosure
           will house it and have vents to guard against overheating of the components.
           The metal will also allow any noise from the components to be minimized
           because of the attenuation factor of the metal. The metal has structural
           strength and makes the components shock proof.

   9.      Physical Packaging (Size):       The final packaged dimensions shall be no
           larger than a 2” x 1.5” x 2.25” (H x W x D). This small packaging will be
           achieved by taking advantage of the small footprint of current
           microcontrollers, UARTs, and transceivers.

   10.     Cost: Cost will be kept to a minimum to maintain a competitive edge with
           currently available products. The cost of parts and packaging will be under
           $30.00. A maximum estimate for production at this point is $120.00. This
           cost will be achieved through the unique design approach and component
           selection that we will employ.

The purpose of this project is to plan, develop, and build an Infrared console that will
replace a laptop and null modem emulator. The most important aspect of this design is
transparency. The RS-232 plug will not think there is anything missing when our IR
console is plugged into it. This will keep any software from changing inside the products
that are originating the RS-232 signal. The price of this transparency is an increase in the
complexity of the Palm Pilot code and embedded system we are creating.

Due to the thoroughness of the telephone companies‟ standards, this design will have to
pass many different tests. It will have to accept excessive radiation, run over a range of
temperature, and not give off excessive radiation. The packaging we intend to use will
address all of these problems.

Our project will have to be flexible enough to handle changes that result from added
features. The main telephone companies will want specific features added to the products
they buy. This could be as simple as adding light emitting diodes or as difficult as adding
product identification to our IR console.

Next, the ability for our device to be easily carried is very important. The infrared
console will be carried everywhere in the field and it is important that we make it
convenient enough for a field technician to carry. The console must be able to fit into
someone‟s pocket. This will allow for coverage everywhere as long as the console is not
used in direct sunlight. Along with its small size, the console must be very durable. We
will install a metal shell around the components and PCB. This will act as a buffer
between the outside world‟s elements and will not allow any electrical interference into
internal circuitry.

Once these design points are addressed, the physical design must be completed. The
components must be small, cheap, flexible and easy to program. Since a low power
constraint is important for our design, we must be able to power the main components
from a 9V battery. This means that there will have to be onboard circuitry that will step
down a +9V signal to a +5V, 100 mA signal.

Finally, the software must be used to make all the components complete the IrComm
standard. Since we have found the template for the IRDA code for another processor, all
that is left to be done is to translate that code into PIC compatible C.

3.1    Encode/Decode Bi-Directional Serial Data at a rate of 19.2kbps

When simulating an Infrared Link between two COM ports, there are several protocol
stacks that must be implemented to make sure that no functionality is lost between the
two devices. Since there has been a standard established for COM port transactions by, we have decided to use said standard (IrComm) to implement the
encoding and decoding of packets for our project. Although IrComm is not as functional
as the IrDA standard, it serves this project well.

IrComm is designed to provide legacy support for applications that already run between
two COM ports. To allow synchronization directly between the computer and the PDA,
the PDA could be enabled with IrComm. Then, by selecting a virtual COM port, the
synchronization could take place via infrared without introducing any changes to the
computer‟s software. This is one possible legacy application for IrComm. While it works
in legacy situations, IrComm is strongly discouraged as a platform for developing new
use models. This is because it reduces IrDA‟s rich feature set to a virtual nine wires,
requiring sophisticated applications to recreate many of the capabilities that are already
present in the IrDA stack [7].

3.2    Transparent Data Link Between IR Console and Palm Pilot

Due to the power constraints within the IR console, we have to make the Palm Pilot the
master of the IR sync up process. It will continuously poll for the presence of an IrDA
compatible device. Once our IR console picks up the Palm Pilot, it will send a reply
asking the Palm Pilot for the proper handshaking commands. After a half second delay,
it should begin sending data bi-directionally and the terminal program on the Palm Pilot
should display the RS-232 signal.

3.3    Completely Implement the IrComm Standard between the two devices

The IrComm standard will allow for all flow control and handshaking that is normally
present in an RS-232 connection. Automatic baud rate detection is possible, but
unneeded because most ports connect at 19.2 kbps. These facts should keep the
complexity of the transfer software manageable, but, depending on customer demand, we
should be able to change baud rates by automatic baud rate detection or hardware
switches. Transparency is the most important feature of our project because we don‟t
want the Palm Pilot user to lose any performance in the serial data transfer; in addition,
the RS-232 port must think a wire connection is present. With IrComm, there should be
no performance lost in the link up of the devices and the transfer of data.

3.4    Establish a 1 meter Infrared Link between the Palm Pilot and Console

This could be the most challenging part of our project due to our need for low power
parts and constraints. The digital parts we have chosen use under 2 milliamps at 4 MHz
clock frequency. The problem is the IR Transceiver. The amount of current needed to
drive an IR LED for communication over a certain distance is rather large. This is the
reason for the 9V battery to provide the current needed to drive the IR transmitting LED.
One thing that will help us drive this transceiver is the fact that the transmitter is only on
for a half-second. This fact cuts milliamp hours down by a factor of 2. With some added
capacitance to help the storage effect of the battery, 100 milliamps should give us enough
power for IR communication up to 1 meter in any environment except direct sunlight.

3.5    Design an Infrared Dumb Terminal Program for the Palm Pilot

The next step of our project deals with software development for the Palm Pilot. A
simple terminal program for the Palm Pilot must be developed. It will have to accept
user input from Graffiti and the keyboards so that it can actually talk to the RS-232
interface in our console on the other side of the infrared link. Serial data communication,
user input, and protocol stack development on the Palm OS system must be mastered to
get the program working.

3.6    Accuracy

The infrared data link will have to run at 19.2 kbps with a bit error rate of 10E-9. Due to
ASCII displays, with the position and data values in the IR Stream, error free data is very
important. Because of this, there must be error correction implemented in the code;
specifically, error-checking in the IrComm standard and the ability to resend packets if an
error is detected. With these two considerations and a reliable IR link established, any
erroneous packets should be eliminated.
3.7    Power

Low power is the biggest design constraint of this project. Since size is also a major
issue, our options of batteries are limited. One 9V battery will be used to supply power
to the IR transceiver and the digital components. The other components draw about 2
mA when operating at 4 MHz, but the transceiver draws 100 mA or more depending on
how long it is active. With this in mind, we will limit the duty cycle and transmission rate
of the transceiver in the software design of our project; this feature will prolong the life of
a battery in our device a great deal. Battery life should be measured in days; therefore, in
the prototype we intend to draw power from the battery for a week before it fails.

3.8    Durability

This product should be able to stand up to any compliance issues in telephone equipment
slated to be installed in the field. The first design consideration is temperature. This
product should be able to run from the -40 degrees Celsius to 85 degrees Celsius without
error. By carefully selecting parts for this product, we can alleviate temperature issues.

3.9    Physical Packaging (Size)

The final packaged dimensions shall be no larger than a 2” x 1.5” x 2.25” (H x W x D).
This small packaging will be made possible by the small footprint of current
microcontrollers, UARTs, and transceivers. If our product is small, it will be more
convenient to take into the field. This will be the true benefit of this system, because our
design goal is to replace null modem cables and laptops in RS-232 communication.

3.10   Cost

In order to stay competitive with the other infrared null modem emulators currently on
the market and entice potential customers to buy our system, our units must have a
relatively low cost. The parts and packaging costs will be under $30. The desired cost for
the infrared console will remain slightly less than $120. This price does not include a
Palm Pilot.
4.0    References

[1]    "About IrDA Software Protocol,”,
       Infrared Data Association, Walnut Creek, California, 1996.

[2]    P. Barker and A. C. Boucouvalas, “Effect of Random Alignment Sway on the
       Performance of IrDA Handheld Devices,”, Infrared Data Association, Walnut
       Creek, California, 1996.

[3]    M. Cremer, “An Introduction to the IrDA Protocols,” PDA Developers 2.6,
       pp. 35-39, Nov/Dec, 1994.

[4]    T. Engdahl, "Get Power Out of PC RS-232 port,”, Electronic
       Circuit Design, August 25, 2001.

[5]    L. Goldberg, “Infrared Data Transmission: The Missing Link?” Electronic
       Design, pp. 47-64, April 17, 1995.

[6]    "„IrCOMM‟: Serial and Parallel Port Emulation over IR (Wire Replacement),”, Infrared Data Association, Walnut
       Creek, California, 1995.

[7]    "IrDA Data Link Design Guide,", Hewlett Packard, Palo
       Alto, California, 2000.

[8]    C. Knutson, “Infrared Data Communications with IrDA,” presented at IrDA
       Conference, 1998.

[9]    P. Langley, “Leading Alternative for Serial Ports: IRDA,” Electronic
       Engineering Times, p. 54, August 17, 1998.

[10]   P. Megowan, “IrDA Infrared Communications: An Overview,”, Infrared Data Association, Walnut
       Creek, California, 1996.

[11]   T. Salazar, “UART test mode provides clock for RS-232-to-IrDA translator,”
       Electronic Design, pp. 124-125, February 21, 2000.

[12]   "Serial Infrared Link Access Protocol (IrLAP) Version 1.1,”, Infrared Data Association, Walnut
       Creek, California, 1996.
[13]   C. Small, “IR Communications Set to Replace More Wired Links,” Computer
       Design’s: Electronic Systems Technology & Design, pp. 27-35, February 1998.

[14]   R. Stuart, "An Introduction to IrDA Control,” Presented at Portable Design East,
       August 31, 1998.

[15]   R. Stuart, "Cutting the Mouse Tail,” presented at IrDA Conference, 1998.

[16]   B. Warneke, “Palm to Cots Dust IrDA Link,”
       http://www-bsac.EECS.Berkeley.Edu/~warneke/post-pc, University of California
       Berkeley, CS294-11, August 25, 2001.

[17]   S. Williams, "Signal IrDA: Past, Present, and Future," IEEE Personal
       Communications, Vol. 7, No. 1, pp. 11-19, February 2000.

[18]   S. Williams and I. Millar, “The IrDA Platform,”, Infrared Data Association, Walnut
       Creek, California, 1996.