Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Communicating with a mobile phone via IrDA

Status
Not open for further replies.

Hero.sl

New Member
A part of my final year project is to create a communication channel between a mobile phone and an embedded system using IrDA.
A J2ME application running on the mobile(Nokia N73) will send some data using its IR port and the microcontroller should be able to read it using the IR transceiver circuit. J2ME application is functioning properly and the IR port is active,(IR indicator is active) so I can assume that there is no problem at the mobile end.

The circuit I assembled to receive IrDA is attached below. It uses TFDU4300 as the IrDA transceiver and the MCP2155 as the Encoder/Decoder. According to the data sheet of MCP2155, the CTS signal will go high once the IC is working. And the DSR will indicate a working IR link. (Operation section of the datasheet, page 18)

RS232 Tx and Rx is connected to a PC serial port via MAX232 converter and hyper terminal is running on the PC.
When I power up the circuit and align the IR port of the mobile to TFDU4300, there was no response at the terminal. Then I connected 2 LEDs to CTS and DSR and found out that they are always on. Even when I disconnect the TFDU4300 or the crystal, those two signals are high :O. Is there something wrong with the IC? Is there any way to check whether the transceiver is working properly? I have no clue what has gone wrong here.

Data sheets of TFDU4300 and MCP2155 is attached.
Please help me if you can spend few minutes of your valuable time.. :)
Thanks in advance...
 

Attachments

  • circuit.JPG
    circuit.JPG
    35.2 KB · Views: 1,071
  • TFDU4300.pdf
    190.7 KB · Views: 613
  • MCP2155.pdf
    628.2 KB · Views: 423
Last edited:
I wish I could help, but I spent volumes of time with the MCP2140A (it had the voltage range that I needed), but I never got it to work. I looked for help on the forums here, at Microchip, and from the Microchip tech support, but not many people use these chips, so there wasn't a lot of help to be found.

The only thing I can suggest is to try to copy the design from the demo boards - I copied the design for the board with the MCP2140 (old version of the MCP2140A), and you might have more luck since there are demo boards that use the MCP2155. Also, you should be able to check the J2ME app with a PC that has an IrDA port (or if you get a USB-IrDA adapter). If you get the IrCOMM2k virtual com port driver, you could send and receive data it from hyperterminal on the PC.

Right now I'm trying to implement the IrDA protocol with the MSP430 MCUs, although I considered using the PIC24s. Both support IrDA without an additional chip between the MCU and the IrDA transceiver, and you can debug them since the stack is implemented in code. The PIC24 stack is a bit larger (if I remember correctly) - I think they implemented the full stack, so it might not fit on all PIC24 chips. The TI stack is IrDA lite, and written in assembly (close to 1000 lines of assembly, so no cakewalk...).

Wish I could be of more help - good luck!
 
Thanks a lot for the reply.. was waiting till someone responed to this thread..
Ya I'm too unlucky here.. :( I though you got it working. Could only find two circuits in the net using MCPs. One is urs and the other I found at How to Build a Robot Tutorial - Society of Robots. Neither one worked for me. I doubt whether my IC is working or not. Im gonna order new one but it will take another week leaving me to finish my project within a weeks time. I found a bluetooth serial module in the net, also thinking of going for a bluetooth link rather than waiting for IR. As usual,TIME is the problem..
Thanks BuffaloEngineer.. wish you too good luck with ur projects
 
Good luck to you too - I'll mention a few more resources that I've come across - do you have an oscilloscope? If so, make sure to probe the RX line from the IR transceiver to be sure the device you're using is broadcasting.

Also, it might be easier to debug on a computer, then moving to a handheld device - you can use Wireshark in combination with WinPcap and IrComm2k to monitor IrDA packets to and from the computer. If you're using the IrDA protocol, it should communicate with the computer the same as with a handheld device.

Also, some additional websites to check out:
**broken link removed** (using MCP2150)
**broken link removed**
AlanJMcF

Also, a website for both bluetooth and IrDA, this guy wrote a stack to interface a computer with both bluetooth and IrDA devices for the .NET environment (C#):
32feet.NET - In The Hand

As for your time problem, I recommend this site:
How to Build a Time Machine | eHow.com
 
I'll test the transceiver with an oscilloscope. Then I can think of rebuilding the circuitry. This time I'll order MCP2140A and MCP2120. If I cannot get this done with 2140A, I'll try to implement a part of the stack IRComm(If that's possible). Any how I just need my PIC to receive an integer from the phone. So if I can extract the data I need from the stream of bytes I get from 2120, that will be enough for me.
Meanwhile I'm ordering the following bluetooth-serial module so I can try bluetooth instead of IR.
Serial port bluetooth module (slave) [WLS117A2M] - $19.50 : Seeed Studio Depot, Arsenal for interaction engineering

And that last link obviously is very important for me right now. Sad that black-holes aren't available at the local market. I'll contact Farnell :D

Thanks a lot buffaloEngineer.. :)
 
I got it working!!! :D MCP2155 ENDEC is working perfectly with some little adjustments I made. Now I can communicate with a Nokia 5300 phone.

I'm hoping to compose a note on adding IrDA to your embedded application. :)
 
IRDA is pretty simple, the basic negotiating baud rate is only 9600 baud, so you can interface a micro controllers UART directly to a IR transmitter and receiver for low speed communication, although you may need to use an inverter, don't remember. Once you're connected at 9600 you can negotiate between the devices to switch to a higher baud rate, but higher baud rates use pulse shaping rather than a 50% duty cycle RS232 style clock so it becomes a bit more complicated.
 
yes but things aren't that simple when you communicate with a device like mobile phone. Either you have to implement the IrDA stack up to IrComm in your microcontroller or you have to use a protocol handler like MCP2155.
 
True, but the IRDA specs are fully public, implementing them would be a nice project in and of itself I think.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top