# Can I use this IR Transceiver for communication and obstacle avoidance?

I am building two robots. For communication and obstacle avoidance I am using Infrared. I bought this IR transceiver TFDU4101-TR3 (http://www.farnell.com/datasheets/1675739.pdf)which I thought I could use both for communication and sensing obstacle. I took for granted that it could do both. I now looked 'closely' at the datasheet and saw that it is a module that interfaces to microcontroller serially.

I believe I cannot use this for obstacle avoidance. Can someone please cross check if this can/cannot be used for sensing obstacles and perhaps suggest something.

Also found this on a datasheet of a part very similar to the part above. It says under notes that TX signal echos on RX. If this is the case how can TFDU4101-TR3 be used as proximity sensor?

Thanks

-
Just on the second part if you don't have any luck because the receiver is shutdown while transmitting here's a question that shows a few other parts you can look at: electronics.stackexchange.com/questions/97764/… –  PeterJ Jun 15 '14 at 7:14

IrDA uses a short transmit pulse (2uS from memory) which is the main way it varies to normal serial data at the physical level. For example you can see the following in the datasheet:

This Schmitt-Trigger input is used to transmit serial data when SD is low. An on-chip protection circuit disables the LED driver if the TXD pin is asserted for longer than 50 μs (max. 300 μs).

Other than being able to send and receive data that roughly conforms to that they aren't particular about the protocol and I've used a similar part from a different manufacturer in the past with a non-standard protocol. It doesn't seem to be documented in the datasheet but something to be aware of is that because IrDA is half-duplex some modules disable the receiver while transmitting to avoid getting a reflected signal back, so that may put an end to being able to use one for proximity detection.

I'm not sure if the Vishay modules do that but if you don't get an answer from someone that knows for sure you could do a pretty simple test by feeding in say a 10 kHz signal into the TXD and check with a scope or microcontroller interrupt if you get anything on RXD when pointed at a reflective surface. Ideally the signal should have the short pulse duration although for a quick test you can probably rely on the in-built protection. Also make sure to take notice of the information on capacitor selection and component placement, they can be pretty fussy in that regard.

As you've confirmed that you can receive back reflected data you may be able to use it for proximity detection by limiting the current through the VCC2 pin to reduce the range. The datasheet mentions using an external resistor when less than 300 mA is required, so a simple way might be to include a resistor and then use say a reed relay to short it out to go back to full power while transmitting data. If you wanted something programmable you could probably take a look at some programmable constant current LED drivers.

Because the data output is strictly digital and you don't any other access to the photodiode output the only method I can think of for proximity detection is to vary the output power to control the range and use the fact that you're receiving back the same signal to indicate there's an object in front. That's assuming the reflected data is the result of the light being reflected back from another object, if not you may need to add a physical barrier between the LED and photodiode to try and isolate them. They also tend to have fairly wide angle lenses so you may want to add something to narrow the beam regardless so you're not detecting the floor etc.

-
Thanks for your answer. The transmitter echos on the receiver as it says on the datasheet from which I'm guessing that the transmitter leaks into the receiver. But my question was is there any way I can use this part as obstacle avoidance? –  David Norman Jun 15 '14 at 7:19
@David just added an idea I think should work so you can use it for both data and proximity. I guess that was the main issue how to change the range? –  PeterJ Jun 15 '14 at 7:31
Hehe not the range. All I wanted to know if I can use this as proximity sensor. I know I can use this for data but I'm not sure how to use it as proximity? –  David Norman Jun 15 '14 at 7:34
@David, just clarified what I had in mind, just using if you get the same same data back as an indication of something being in front of it. –  PeterJ Jun 15 '14 at 7:43
I'm not sure if that will work. I too thought of that. Let's see when I implement it. Will have to run a few tests. But I wanted some feedback, if TX echos on RX then the whole point of proximity is defeated isn't it? –  David Norman Jun 15 '14 at 7:50

You are almost correct that you cannot use this device for proximity detection. When you drive the LED, the receive line will repeat (echo) the transmission waveform.

The reason I said almost, though, is that I don't see any particular reason why you can't use two of these, one to transmit, and the other to receive. They're small enough and cheap enough.

-
Thanks for your answer. I was thinking of using two but that wouldn't be cost effective. I was evaluating other ways to use this transceiver and I thought why not use a receiver that runs on 36 KHz or 38 KHz. But to transmit a 36 KHz wave from the transceiver is not going to be possible because the serial port is not fast enough to do so. What do you reckon? –  David Norman Jun 16 '14 at 1:02
IR communications (such as a remote control) do not use a single pulse per bit. They use bursts of pulses per bit. See, for instance, vishay.com/docs/80071/dataform.pdf So a remote typically runs at a bit rate of ~ 300 bps. And why wouldn't 2 units be cost-effective? They're only like \$2.50 apiece. –  WhatRoughBeast Jun 16 '14 at 5:27
I live in australia man and its expensive here &8.55 per piece –  David Norman Jun 16 '14 at 5:29