|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Did you know...
|
Interfacing the Serial Wombat via IRDA using the MCP2150 and an NEC G8UAP physical IR interface.IRDA is a standard which encompasses many types of communication over an Infrared light connection. One of these communication types is a simulated Serial connection. While IRDA has been largely surpassed and overshadowed by Bluetooth, it still has one major advantage for the Hobbiest developer: Cost. Hobbiest Bluetooth solutions typically cost in excess of $40. The IRDA solution presented below costs less than $10, and is available through the Serial Wombat web store.
Check
out the video for a demo of this part. (encoded in xvid)
There are two major parts necessary to implement IRDA with the Serial Wombat: first - a converter which understands the complexities of the IRDA protocol and simplifies it to a simple UART interface, and second - a physical interface which actually sends and detects infrared light. The Microchip MCP2150 will be used for the protocol converter. This 18 pin DIP operates at 5 volts, and requires a few external components, including a crystal. The physical interface requires an infrared LED, as well as an infrared sensor. The sensor includes on-board hardware which demodulates incoming IRDA signals to an unmodulated logic-level signal. There are many of these tranceiver modules available, but nearly all are packaged in very small surface mount packages, which are unfriendly to hobbiests. The Electronic Goldmine has recently featured an NEC part which mounts all necessary IRDA physical components to a flexible ribbon-based PCB. This device fits my personal criteria for a "Perfect Device"; It has 4 connections: Power, Ground, Infrared TX, and Infrared RX, and requires no additional components to achieve its purpose. There's no data available for this part (that I've been able to find, anyway), but it appears to be designed to work good at 5 volts. I ran my sample for a couple of days straight at 5 volts, and had no problems. Note that you might be tempted to test this part by powering it, and attaching the TX control pin to +5, enabling the LED. This should only be done momentarily, as the powerful IRDA led pulls hundreds of mA when enabled, and will heat up quickly. Under normal IRDA operation the LED duty cycle is much lower. The light emitted by the IR LED can often be viewed with a Web or Video camera, which translates it into the visual spectrum. I carefully soldered wires to the ribbon so I could plug them into a breadboard. The MCP2150 provides a bridge between the Serial Wombat and the IRDA transciever. The 18 pins of the MCD2150 should be connected as follows: 1: Baud Selector 0. The MCP2150 uses hardware flow control. The RTR (Ready to Recieve) pin on the MCP2150 allows the Wombat to tell the MCP2150 when the Wombat is ready to receive data. Since the Wombat normally needs no flow control, we simply ground this line, indicating that the Wombat is always ready to receive data. The Baud Rate between the Wombat and the MCP2150 is determined
by Baud Selector pins 1 and 18:
The MCP2150's CTS line tells the Wombat when the MCP2150 is ready to receive data to send out over IRDA. The MCP2150 spends most of its time managing the IRDA connection, and only pays attention to the serial TX input periodically. The MPC2150 sets the CTS line low while it's listening to the TX input. The Wombat can only send out data during this time. The CTS pin must be attached to the Wombat, and the Wombat must be configured to pay attention to it. If this is not done, then the Wombat will send data whenever it wants; most of this data will not be transferred over the IRDA interface. Fortunately, the data coming from the host to the Wombat requires no special initialization. This means that all configuration necessary to use this IRDA interface can be sent at powerup. However, the first fiew messages may not get a response until the CTS pin setup is properly configured. Note that the MCP2150 can only connect to a relatively smart master device such as a computer or Palm or WinCE handheld. Two MCP2150's cannot be used to establish an IRDA serial link. This interface has been tested with a Palm IIIxe running Palm OS 4.1, a Dell X51v running Windows Mobile 5, a Toshiba Libretto 100CT running Win98 SE, and a Dell Latitude D620 running Win XP Pro. The two windows systems were tested using an internally mounted IR port, and the WombatPanel application. The Palm and Windows Mobile tests were performed using sample applications which will be provided at a future time. I bought two different USB to IRDA converters, one from Amazon, another generic one on Ebay. Both could transfer files to/from my Axim using OBEX, but neither could connect to the IRDA circuit. I don't know why. If you find a working USB-IRDA adapter, please let me know. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright Wombat Interface Products, 2005-2008. All Rights Reserved.