PDA

View Full Version : IrDA communicator



ER-Dr
07-30-2005, 01:52 AM
Hi all;
Has anyone build an IrDA communicator before using the stamp?

There's a circuit in STAMP2 Communications Projects Book that i have built but it does not work at all !!!
I placed my toshiba PDA near the LED, and it doesn't seem to pick it up.

If anyone built one and was successful PLEASE let me know. Thanks!

MIKE

SPENCE
07-30-2005, 02:23 AM
Can you identify that book any further. I did a google search on several variations of the name with no results.

73
spence
k4kep

Bruce Bates
07-30-2005, 02:40 AM
SPENCE -

I suspect this may be the book in question:
http://www.parallax.com/detail.asp?product_id=70004

Regards,

Bruce Bates

Chris Savage
07-30-2005, 04:17 AM
Bruce,

·· That is the correct book.

Mike,

·· Have you verified the output of the device you built to ensure it's transmitting?· Also have you verified that putting another IrDa device near your PDA is detected?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

ER-Dr
07-30-2005, 05:37 AM
The Book SPENCE pointed out is the book i used.

Chris,

how can i verify that the device it transmitting? Its acting like the book is describing (i.e. LED is being lit when button is pressed, etc.) but i have no visible proof since my PDA is not responding at all!

Thanks!

Paul Baker
07-30-2005, 05:45 AM
Do you have a digital camera, camcorder or webcam? All these devices detect IR which appears as a white light in the picture.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10

Tracy Allen
07-30-2005, 06:16 AM
I just wonder how you are looking for a response on your PDA? You will need to be using a programming language or a telecom program that allows you to receive raw IrDA data. There are several layers in the IRdA protocol, but the circuit only implements the hardware layer, not the higher logical layers.

I originally built that circuit to communicate with an HP200 PDA (now discontinued), and it worked fine at short range, using the built-in telecom program with the Infrared serial port selected. {That is published at www.emesystems.com/BS2IrDA.htm (http://www.emesystems.com/BS2IrDA.htm). The author of the "Communications Projects" book you refered to lifted the text for his chapter on this topic almost verbatim off my web site.}

There are variations at the hardware level, in terms of allowable pulse shortening, as described in the article. You would expect to encounter that probelm when sending data from the PDA to the Stamp, not the other way around from the Stamp to the PDA. The PalmOS devices in particular use pulse shortening more than the MAX3100 will accept--A pulse stretcher on the Stamp input side can work around that.

But the first question is, what program are you using to receive on the PDA side, and is it set to receive raw IrDA?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

ER-Dr
07-31-2005, 02:16 AM
Paul,
I took pictures when the device was supposed to be transmitting but i don't see any white light in the picture as these pictures show...
http://www.geocities.com/gotomike
http://www.geocities.com/gotomike/irda_communicator

Tracy,
I build the circuit from that book using all the correct parts. Even the program was attached to the CD that came with the book and all i had to do was to download it to the STAMP. I'm very frustrated! This should work but doesn't.

In my toshiba e800 i go to settings->Connections->Beam ..at this point it searches for a sending device which later follows by a "no sending device detected"

Do you know of a program to download on my pocket pc that would be better?

Thanks !

Post Edited (ER-Dr) : 7/31/2005 6:21:37 PM GMT

Tracy Allen
08-01-2005, 12:52 PM
If you Google "terminal emulator for pocket pc" you will get hits. Zterm has been around for a long time.

I don't know enough about the pocket PC to know if it supports raw serial via the IrDA port. When you ask it to search for a beam connection, it may be operating on a high protocol level. The Stamp does not support that. What you want is the lowest level IrDA protocol to transfer ascii data to a terminal window, just as if you had the Stamp connected via a serial cable.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

Chris Savage
08-01-2005, 11:05 PM
·· It's Monday, so I could be just having one of those days, but at first glance I see two possible problems.· First of all, you are using a BS2sx, so I have to wonder if you changed the baud rate parameters for the BS2sx?· The code in the book was written for a BS2 and therefore has different parameters for the baud rate.

·· Second, at first glance of the parts list, it appears that you may have the wrong resistor on the IR LED, possibly having burned it out with such a small value.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Yanroy
08-01-2005, 11:12 PM
Just a thought - don't take pictures with the digital camera (at least not with the flash).· Also, make sure you're looking DIRECTLY at the end of the IR LED.· I did a project not long ago where I thought my camera wasn't capable of detecting IR, but it turns out that the LED just had an incredibly small beam angle.

ER-Dr
08-02-2005, 12:07 AM
Hi;
Tracy,
my problem is that the IR LED is not transmitting altogether eventhough the circuit is correctly connected!
actually on the MAX3100 datasheet, they show that pins 4,10, and 11 are inverted but the diagram in the "STAMP 2.." book shows that the stamp is supposed to be connected to these pins non-inverted.
http://pdfserv.maxim-ic.com/en/ds/MAX3100.pdf

do you think that could be a problem or am i looking too hard?

however, i'll probably use Pocket DAQ 1.6.0379
it seems to be the right software to use, once the LED works anyway.

Bruce Bates
08-02-2005, 01:26 AM
ER-Dr -

Just for the sake of a common point of reference, since many of us may not have the book from which you've taken this sample IrDA information, the following area of Dr. Tracy Allen's web site has an applications note about the MAX3100 and its use with IrDA:
http://www.emesystems.com/BS2IrDA.htm

I hope that's helpful and not more confusing.

Regards,

Bruce Bates

Chris Savage
08-02-2005, 02:15 AM
Hello All,

·· A slight update...After looking at the circuit in question, the baud rate is generated by the device, not the Stamp Module, so that part may not be an issue...On the other hand, there is a PULSOUT command that may need to be adjusted for timing.· Something simple like that could affect the operation.· Please see the Help File for the timing differences between the BS2 and the BS2sx, and adjust your PULSOUT accordingly and see if that makes a difference.· Also, did you verify that resistor?· My book shows a value of 240 ohms, and you had something like 47 ohms.· You might want to connect the IR LED through the correct resistor directly to 5V and verify that it even works at all.· One last question, please confirm, what is the other device next to the IR LED?· 8-pin DIP, clear package?


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)


Post Edited (Chris Savage (Parallax)) : 8/1/2005 6:20:41 PM GMT

Chris Savage
08-02-2005, 02:23 AM
Oh yeah,

·· Also wanted to ask, you have a Hex Inverter in there...It's not in either schematic...What's it there for?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

ER-Dr
08-02-2005, 03:04 AM
Hi all;

to remove any conflicting issues i have posted pictures of the circuit that has been built. the second picture shows a close up of the OPT101 (U4) and the third shows a close up of the IR LED(D2).

http://www.geocities.com/gotomike/irda_circuit

Tracy,

I will change the PULSOUT to 5 instead of 2 and see what happens. Also, according to the book R3 is 49ohm resistor. That was a value that i could not find in electronic stores so i got the 47ohm instead with 5% tolerance. Unless the book contains mistakes regarding parts, i have followed it verbatim.

The hex inverter is needed after the OPT101(IR photodetector)·in pin5 as shown in the picture since the max3100 (U2)operates in non-inverting mode.

Mike

ER-Dr
08-02-2005, 03:19 AM
Tried the PULSOUT to 5 and didn't make a difference...the IR LED still does not work!

Any ideas? thanks.

Chris Savage
08-02-2005, 03:56 AM
Okay,

·· Now I see from your pics you're using the second schematic, which is the High-Power version.· That might explain some differences.· Have you tested the IR LED as I suggested directly to power to see if it works?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

ER-Dr
08-02-2005, 04:21 AM
Yep, works fine...

im using the irf9510 MOSFET (or sometimes the spf9540) instead of the irf9530 as suggested in the book...but i doubt thats a problem (they're both p-channel).

Mike

Tracy Allen
08-02-2005, 02:19 PM
Okay, does the LED turn off and on when you connect the MOSFET gate directly to Vdd (off) and Vss (on). I'm not sure the IRF9510 will turn on on at 5 volts Vgs, as it is not really a "logic level" type. I thing in my original circuit, I was using a Supertex LP0701 which is a lateral p-channel device and has a gate threshold of 0.8 volt and turns on full at 4 volts Vgs.

It might help to include a pullup resistor from the MOSFET gate to Vdd. The MAX3100 txd pin can only source 25 microamps, although it can sink 25 milliamps. I don't think that has anything to do with the problem you are having though.

Have you tried it with the led cathode hooked up directly to pin13 on the MAX3100 through a resistor (without the MOSFET, the simpler circuit)?

Try it with a visible light led just to see if the circuit is working.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

ER-Dr
08-03-2005, 12:15 AM
Hi;
Tracy,
The LED does turn on when i connect the mosfet gate to vss and off when conncectted to vdd.

when i hook up the led cathode to pin13 as it is in the simpler circuit it turns off forever, no blinking or anything.

Do you think its because i'm using the BS2sx not the BS2?

Mike

Post Edited (ER-Dr) : 8/2/2005 9:18:22 PM GMT

Tracy Allen
08-03-2005, 01:03 PM
I'm still not sure how you are detecting that the IR led is lit or not. The pulses of IR are very short and only occur for "0" bits.

I recall you said in an earlier message that the visible led on RTS output pin 11 is lit when you press the pushbutton, which means that there is an exchange of data going on between the Stamp and the MAX3100.

Can you measure the voltage on the MAX3100 output pin 13 directly with a voltmeter, or better yet a 'scope?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

ER-Dr
08-04-2005, 01:35 AM
Hello Tracy,

You are·correct the pulses are too short to detect with the naked eye. I thought they would be obvious.

Anyhow, i measured the voltage between pin 13 and ground w/ voltmeter and i got 4.92V.

Also, to confirm the visible led on pin11·does go·ON as long as·the pushbutton is pressed. This morning i tried to see if my PDA can pick up anything and all i got was one letter which looked like this,

Ÿ

I only got this whenever i press the·RESET button but i get nothing when i press the pushbutton which is weird because that's when it should transmit the data!
I have my PDA set to recieve RAWIr data at 2400bps (baud rate), Databits=8, Parity=none and stop bits=1

under control options, should i check any of these?XON/XOFF, RTS ON or DTR ON ...i'm not quite sure what they do so i keep them unchecked always!

Thanks ! Mikehttp://forums.parallax.com/images/smilies/smile.gif

ER-Dr
08-05-2005, 09:29 AM
i was wondering what the main objective is for the OPT101 ? any ideas ..
Thanks,
Mike

Chris Savage
08-05-2005, 10:37 AM
Mike,

·· Presumably to receive the IR from the PDA...There is supposed to be two-way communication here.· I still think there's quite a bit of weight to Tracy's initial assessment...You have only low-level code here.· I don't think there's anything there to initiate any kind of communication.· Think about it, what do you expect to happen?· Without really examining the code I wouldn't be able to guess, but without knowing you can't figure it will just do something on the PDA end...I think perhaps you'll need to invest more work into this to get it to do anything useful.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Tracy Allen
08-05-2005, 02:17 PM
The OPT101 is a photodiode combined in one clear package with an amplifier. It amplifies the incoming light pulses and into logic level voltages. It needs a light filter or a good shield to keep out ambient light. With your voltmeter, you should be able to detect the voltage change on the output (pin 5) of the OPT101 when the light level changes.

The demo PBASIC program is supposed to transmit the phrase, "the quick brown fox jumps over the lazy dog" at 2400 baud when you press the pushbutton, and then, when the pushbutton is released, the demo program listens for incoming IrDA data and prints it on the debug screen.

Can you receive anything transmitted by your PDA on the Stamp?

If you set your voltmeter on AC on a sensitive range, instead of DC, you should be able to detect AC activity on the MAX3100 output and input as it transmits and receives. Even if the baud rates are mismatched or something of the sort.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

Bruce Bates
08-05-2005, 03:14 PM
Mike, Tracy and Chris -

I fear the baud rates may be gravely mismatched from what I can gather. I did some Google "snooping" using variations on "toshiba" + "e800" + "pocket pc" + "irda", and the latest Microsoft technical term "beaming" <ahem>. Based on what I found, I note the following results:

FIR (IrDA 1.1) is supported, baud rate is 115K BPS, opsys is MS Mobile 2003, as well as the following tidbits.

A Microsoft help document entitled "informationbeaming_PPC.PDF" for MS Windows Mobile 2003 is unavailable due to a bad hyperlink link on the MS web site. Also, a company named "Conduits" [ http://www.conduits.com ] produces a program for the Pocket PC which may be helpful. The name of the program is "Peacemaker" which was originally intended to permit IrDA communication between a Palm Pilot and a Pocket PC. Today it supports a much wider array of devices.

I hope that's of some help.

Regards,

Bruce Bates

Chris Savage
08-05-2005, 10:05 PM
Bruce,

·· I am certainly stepping outside the realm of my experience here, as I've never had a use for IrDa and usually disabled it if available just to prevent COM problems, however, I thought the default transmission rate was 2400bps?!?· I wouldn't think an IR link such as those on existing computers could support 115K, but again I could be wrong.



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

ER-Dr
08-06-2005, 12:58 AM
Bruce,
I went to the webpage of that company and the program apparently is used for beaming contacts, appointments, tasks only. I'm looking for a program that would recieve just Raw infrared (RawIr) to be able to see if the circuit is functioning.

Tracy,
It seems that the Tx and Rx of the MAX3100 is fixed at 0.800V at times of transmitting and recieving. it appears to be unchanging!
It also does not recieve anything from the PDA and therefore nothing gets displayed in the debug screen.
i'm going to try to change my MOSFET (irf9510)
it might not be switching correctly, besides i don't know what else to do.
did your circuit work perfectly as was outlined in the book or did you change the program ?
Thanks,
Mike

Tracy Allen
08-07-2005, 12:29 AM
ER-Dr,

The 0.8 volts, is that AC? hmmmm? On both input and output? Did you say earlier that the output was 4.8 DC. On the receiver side, the voltage should fluctuate to the rails if you wave a flashlight in a darkened room across the photodiode (OTP101).

I've not tried the program in the book (which I have only seen in the bookstore), and I don't know if the author of the book made any changes. I know the program on my web site worked, and other people have told me they have had success with it. The fact that you are getting response on RTS and CTS indicates to me that the Stamp and the MAX3100 are talking.

You might modify the program so that the the receiver half listens to the transmitter half. That is, loop-back through IrDA.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

ER-Dr
08-09-2005, 12:42 AM
Tracy,
The 0.8V im getting is AC. I get 4.92V in DC mode across pin 13 (Tx) and GND. Both remain unchanged as i press the pushbutton!

I checked the program you have on your website and the one im using from the book and they are the same.http://forums.parallax.com/images/smilies/confused.gif

The AC voltage across the gate and drain is 0.525V unchanged.
The AC voltage across the gate and gnd is 0.813V unchanged.
The AC voltage across the drain and gnd is 0.280V unchanged regardless whether the pushbutton is pressed.
I also measured the current across the IR LED and no current is going through it at all times.

Do you thing the MOSFET is not switching properly?
http://forums.parallax.com/images/smilies/confused.gif·http://forums.parallax.com/images/smilies/confused.gif http://forums.parallax.com/images/smilies/confused.gif

Mike

ER-Dr
08-10-2005, 09:39 AM
hello,
i changed my mosfet to a J270 and it work better now... the voltage in the drain is 1.5V.

However when i press the pushbutton it sends data but that data is just plain garbage (symbols like the letter Y with two dots on top like posted earlier) not the 'fox....' sentence it supposed to send.

Any ideas as to why this is happening?

Thanks,
Mike