IrDA Transceiver - TX getting hot, and serial logic?

I am using the following HP1100 IrDA transceiver:

http://www.ti.com/lit/ds/symlink/tslm1100.pdf

in a similar circuit, the only change is that I have a parallel RC in series on the TX input pin of 560 ohm and 220 pF.

I'm using the SoftwareSerial example on the library page http://arduino.cc/en/Reference/SoftwareSerial

When I connect the Ir RX side to Arduino and use a TV remote, the data is repeated to the serial monitor as expected. When I plug in the TX side to Arduino, the Ir TX LED starts to get hot, seems too hot and I don't know what it would be transmitting, seems like it should not be transmitting unless I send a signal to Arduino via the serial monitor...is that right?

The serial logic is always high, and that is the way it should be I guess, but I do not readily understand that now. I would have intuitively expected the serial data pin to stay low and send high pulses for serial data. If I set the Arduino serial logic low <SoftwareSerial mySerial(10, 11, true);>, the steady state voltage is low and I assume it sends high pusles - it's too quick for me to measure any pulses, but my Ir TX LED does not get hot. In this state, I verified a transmit signal, or at least the presence of Ir using a night vision camera and sending a one second data stream interval to the Ir transceiver. I do not think that the Ir Transceiver will work correctly with logic low serial interface.

Any ideas what could be the problem?

Thanks

What resistor are you using on pin 10?

Serial data is normally sent with the mark state, that is the undriven state of the line as a logic one.

I forgot to mention that some of my components are off, more like around 20%.

Pin 10 is fed through a pair of 11 ohm resistors in parallel. I think the actual impedance was measured 5.65 ohms.

The data sheet shows this as 10R that is probbly why it is getting hot.

Thanks for the Help.

Pin 10 shows the use of R2, which is listed as 4R7. That is the transmit side supply (I think), and where I am using the pair of 11R. Could having this resistance a little high cause the problem? I can solder in a 32R resistor.

Pin 4 shows the use of R3, which is listed as 10R, and that is the receive side or general supply?

I measured some voltages and solved for the currents. I also added another resistor to the pin 10 input to bring the resistance to 4.7 ohm. But I keep thinking maybe I missed something and just can't see it.

        	~Vcc	~V	~I	~R
tx in Pin7	~4.36	~1.2	~0.002	~560
Vcc Pin10	~4.45	~2.38	~0.506	~4.7
Vcc Pin4	~4.45	~4.4	~0.400	~11

This is drawing near 1 amp from my USB port, only with the tx input connected. Last is maybe it's just a bad part...?

one other thing I'm looking for and just can't seem to find on google is a decent explination of serial logic, for example, I was expecting a resting state on my arduino serial pin to be low when it is normally high. I just recall always seeing 5V pulse trains when scoping serial lines. Maybe they just looked like 5V pulses were instead 0V pulses.

Read this on serial data

IrDA however is not the sort of data that is produced by the arduino, it is not the sort of data discribed in that link. It has the same data format as aysynchronous serial but it is not modulated in the same way. It is pulsed, and that is what allows you to use higher currents without overheating. If you are feeding this from a straight serial source then it will get hot, and you will have to increase that resistor value not reduce it.

http://www.palantirisystems.com/publications/IntroductiontoIrDA.pdf
On page 5 you see the differance between the UART data produced by the arduino and the pulsed data this device was designed to produce.

in that last article, page 5, figure 2, to me illustrates the UART serial data input to the device and the resulting Ir signal that gets transmitted through the air.

It looks that a logic high level on the TX pin will result in no Ir output and logic low results in a very quick Ir pulse. This is further puzzling then that when I set inverse serial on the arduino that the device does not get hot. I do not understand why the device would not just free run pulse with logic low, or no TX connection.

The arduino seems to read the RX side just fine.

I have four more of these devices, so I'll order the components I need to build up another couple and see if I still have problems. I'm stuck on this one.

in that last article, page 5, figure 2, to me illustrates the UART serial data input to the device and the resulting Ir signal that gets transmitted through the air.

No look at the data sheet there is no logic on the TX side, the block diagram just shows a buffer.

If you just feed normal serial data through it you will get normal serial data out of it. BUT you are over running the TX LED's current. Those values are designed for pulsed current. The data sheet says that 100mA is the maximum continuous current. With a 5V supply and 2.78V drop across the LED then this gives a minimum value of 22.2R for the resistor.

Thanks, Grumpy!

Looking at fig 7 block diagram, I see there is an encoder/decoder between the comm controller. I guess this requirement would be common knowledge amongst those in the field...? I guess I still don't understand logic level high, even if it must conform to the IrDA spec., it still seems to me that most of the time, the LED would be ON with very short low pulses.

So you are suggesting a voltage divider on the input to drop the supply voltage to around 2V. I think that will severely limit the output intensity and communication distance. I also wonder why setting arduino logic level low does not overheat the device, even when sending a continuous loop of data (serial write "hello world" in the loop)...I guess this solution will allow the tx LED to remain on 100%, or even use standard UART serial communication, so it could be used for a variety of applications. At least I hope I can use it for serial communication.

Now I was also considering using the PWM pin to initiate a fast pulse output, which was my initial application, just a continuous, short pulse, and these devices seemed to have a very fast response which is something else I was interested in. I may ask in a different thread about how to set the PWM pin for 4 MHz PRF and pulse width of 62 ns, which I think is the limit of the IrDA device.

So you are suggesting a voltage divider on the input to drop the supply voltage to around 2V.

NO!!!
What on earth leads you to that conclusion?

Looking at fig 7 block diagram, I see there is an encoder/decoder between the comm controller. I guess this requirement would be common knowledge amongst those in the field...?

Yes it would.

I guess I still don't understand logic level high, even if it must conform to the IrDA spec., it still seems to me that most of the time, the LED would be ON with very short low pulses.

Why do you not get it? I have said several times that the normal state of the logic level being high is NOT the way that IrDA works, that is the way asynchronous serial data works, not what you are trying to implement.

I also wonder why setting arduino logic level low does not overheat the device,

Because when it is low the LED is off, so no current is being drawn and it doesn't get hot.

By voltage divider, I mean dividing the voltage between the device load and resistor. It seems that increasing the resistor value will drop the 5V supply voltage at the input pin to around 2V.

The reason I don't get the serial operation is because, again looking at Figure 2 of the IR byte frame, bit 0 is produced by a small pulse. I assume a small pulse means the actual LED pulses on. So to send a single bit 0 would be one quick flash. This is represented in the UART byte frame just above as a low, so sending two bit 0 would be two consecutive lows, and finally an infinite number of bit 0 would be a continuous low.

But then I get the question, how would the data rate be established?

So I now conclude that the logic level high in IrDA world is a continuous pulse and not a DC voltage.

I also wonder about standard serial comms and my setup, continuously sending a character string, why inverting the logic level would make such a difference to the IrDA transceiver since I suspect the inverted logic still works out mostly as a 5V pulse with 50% duty cycle, and that should overdrive the device just about the same, but there was very little current draw in that state.

This might be easier if my scope had not burned out...

Oh yes, I also found an article describing how to manipulate the PWM timers and prescaler to get a 4 MHz PRF @ 33% duty cycle, so I'll likely look into that now.

By voltage divider, I mean dividing the voltage between the device load and resistor. It seems that increasing the resistor value will drop the 5V supply voltage at the input pin to around 2V.

Still don't see the reasoning but no that is not the way electronics work. Increasing the resistor value will reduce the current through the LED, the voltage remains constant because e LED is not a linear device.

This is represented in the UART byte frame just above as a low, so sending two bit 0 would be two consecutive lows, and finally an infinite number of bit 0 would be a continuous low.

No this does the start and stop bits are always pulses you never send continuous zeros.

Basically you haven't said what you want to acheave? Are you trying to implement IrDA or do you just want to use the transceiver?

Grumpy_Mike:

By voltage divider, I mean dividing the voltage between the device load and resistor. It seems that increasing the resistor value will drop the 5V supply voltage at the input pin to around 2V.

Still don't see the reasoning but no that is not the way electronics work. Increasing the resistor value will reduce the current through the LED, the voltage remains constant because e LED is not a linear device.

I looked at it like reducing the resistor from 4.7 ohm to zero ohm would increase the voltage up to the supply voltage, 5V if the supply could produce enough current, because the supply would then be connected directly to the pin.

Given that reasoning, I'd also expect if I increased 4.7 ohms to infinity, there would be zero volts on pin 10.

Right now, pin 10 has 2.38 V. I'll replace a 20 ohm resistor and see what the pin voltage is. I suspect it will be about 1 V, but I do not know what you mean by the device being non-linear - I just have an idea...

My original plan when I bought the devices was to connect it directly to my PC serial port and communicate with my cell phone as a modem, using IrDA protocol. That was years ago and no longer have that need. Recently, I wanted to use the leds as a simpler IR pulse generator and use the pulses for timing events, but in the process of just hooing the thing up I figured it would be nice to actually be able to communicate serial data between a couple of Arduinos. I don't have a specific application any longer as it seems both my ideas have fundamental logical flaws (you can see my other post in this forum about linear motion, if you're interested; basically I thought I could measure the phase delay of a reflected IR pulse over a 1 meter distance, and get sub-millimeter resolution, with an Arduino!)

Now, I'll probably try increasing the supply resistor and find an IR remote example and see if I can record some commands from my TV remote and then send them with Arduino. I suspect this will fail and I'll end up just putting this device in the bin and dream up some other projects. I did peruse a few electronic supply places and ebay and bought a huge pile of interesting devices and generic supplies, so I'll likely be back soon...thanks for bearing with me.

Right now, pin 10 has 2.38 V. I'll replace a 20 ohm resistor and see what the pin voltage is. I suspect it will be about 1 V, but I do not know what you mean by the device being non-linear

When you replace the resistor with 20R the voltage will still be the same. However the current will be less and it will not get so hot. Still at 20R you are still giving it more than the maximum current it should take.

A resistor does not change voltage it only changes the current. A non-linear device is one that does not obey ohms law. Look at this to see what an LED is like:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

I looked at it like reducing the resistor from 4.7 ohm to zero ohm would increase the voltage up to the supply voltage, 5V if the supply could produce enough current, because the supply would then be connected directly to the pin.

What would happen is that the LED would burn out.

Given that reasoning, I'd also expect if I increased 4.7 ohms to infinity, there would be zero volts on pin 10.

Yes it would because you would not be connecting it to anything.

Thanks Mike! I think not realizing the black box was a diode made it confusing. Of course it makes a little more sense now.

I installed a 33R and measured 3.1 V across, so about 90 mA, and 10 mA on the main Vcc line.

The most interesting thing now is that I send this in my loop:

void loop() // run over and over
{

  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

And when I place a mirror in front of the led, I get a fast scrolling line of characters in the monitor that slows down as I move the mirror away. This seduces me into a deranged believe that I might still be able to measure a pulse delay...I suspect the reality is the tx is broadcasting noise that is getting picked up by the rx, and when the mirror gets far enough away, the reflections are outside the beam width.

Thanks again for the help.

Yes you are deceiving yourself. The mirror has two reflecting surfaces, the glass and the metal, so you will be getting all sorts of interference.

Well, I think it is more that the time it would take a pulse to leave and then return is far too small for Arduino to measure. Ironically, I was using front reflecting mirrors from some sort of laser kit. If I just remove the IrDA transceiver from the mix, how can I send a very narrow pulse on a pin and have Arduino measure the time it takes for the pulse to be received on another pin?

edit: I did find this: http://arduino.cc/en/Tutorial/Ping?from=Tutorial.UltrasoundSensor
one more edit" I do not understand how the example works, it sends a 5 us pulse and then reads the duration of the return pulse, and converts that duration into distance. What I do not understand is that it seems the pulse duration would not change, only the time between when the pulse was sent and then received. The pulse duration would be affected by the speed of the object. ?

My algorithm is likely flawed:

t = micros()
write txpin high
write txpin low
while rxpin = high (not sure how to tell a pin to monitor a pin state and do something when it changes)
serial print (micros() - t)

Maybe I could look at the ultrasonic distance measuring examples for ideas?

I was not able to get the IRremote examples to work with this transceiver, so I kind of gave up playing with that for now, just because I don't know if I have a programming issue to resolve or if the hardware is just not compatible. I did order some 950 nm IR diodes, if those are even the right for the application; otherwise, I cannibalize some old remotes.

Is it possible in Arduino to send serial data (mySerial1) to another serial input (mySerial2) and have that echoed to the hardware serial port on the monitor? I'd just jump mySerial1 and 2 I/O pins direct with a wire. I was thinking it would not work because mySerial1 would be sending data and mySerial2 would not be triggered to listen until after the data was sent.