IrDA transceiver - level confusion - santity check me please??  - Page 1
Forum section: electronics / projects

author: max_torque
author_rank: Super Contributor
timestamp: March 29, 2020, 02:54:30 pm
content: Hi all,Ok i'm going to use a pair of MAX3120https://datasheets.maximintegrated.com/en/ds/MAX3120.pdfto convert TTL to IR light, and back from IR light to TTL again on the other side. The TTL data is from a boggo UART, coming from a basic 8bitter (AVR ATmega) so is 0-5v TTL, with HIGH = MARK(1) and LOW = SPACE (0), and line IDLE = HIGH(1).From the MAX3120 datasheet Page 5 in the table of pin allocations"IR Transmitter TTL/CMOS Data Input. High = IR LED on"and"IR Receiver TTL/CMOS Data Output. Pulses low for IR input pulse"This therefore to me suggests the MAX3120 transciever INVERTS the signal as it passes through ie TTL HIGH -> IR LED ON -> IR LIGHT FALLS ON RECIVER DIODE -> RX OUTPUT TTL LOWAnd to avoid running the IR led all the time when just idling the line (which is most of the time), i want a logic level inversion between the AVR TX output and the MAX3120 TX input.With an inverter in the line:at IDLE or MARK:TTL HIGH -> TTL LOW (inversion) -> IR LED OFF -> NO IR on reciever -> TTL HIGH outputat SPACETTL LOW -> TTL HIGH(inversion) -> IR LED ON -> IR on reciever -> TTL LOW outputSO far so good i think??For data coming back the other way, it the reverse that's required, ie the thing sending the data to the MAX3120 needs to have an inverter in between them to achieve the same result as the data comes back (in fact, because the thing sending the UART at the other end is an FTDI USB->UART device, and they have a software pin inversion, i don't need h/w to achieve this)That, was, in my head, all fine, and looked correct! But then i looked at the "typical operating circuit" on Page 1 of the MAX3120 datasheet and it also shows an inverter in the RX line between the MAX3120 and the UART device (in that case, a MAX3100 SPI UART expander)why? This doesn't look right to me, as that would cause a double inversion (because the MAX3120 inverts itself)??Can someone check my working and see who you think is right??

author: Renate
author_rank: Super Contributor
timestamp: March 29, 2020, 04:18:40 pm
content: IRDA SIR is RZI 3/16That means you can't just connect a standard UART to a transceiver like the MAX3120The datasheet for the MAX3120 shows it being used with a MAX3100.The MAX3100 chops up the signal with 3/16 ratio on transmit and can decode the same signal on receive.You can take a standard UART, when the output is high you do nothing, when the output is low you shoot out a light pulse with a duration of 3/16 of a bit.Sure, you could "chop" the output of the standard UART, but then you need the 3/16 generator synchronized to the bit clock of the UART.Also, receiving takes more brains than a normal UART.As a hack, you could try stretching the zero light pulses until they are bit sized.

author: max_torque
author_rank: Super Contributor
timestamp: March 29, 2020, 06:57:41 pm
content: ah, right! I had missed that rather important bit! I supidly assumed that the transciever did all the necessary encoding / decoding to the IR bit.......

author: max_torque
author_rank: Super Contributor
timestamp: March 29, 2020, 07:14:50 pm
content: ok, assume i slip a TIR1000http://www.ti.com/lit/ds/symlink/tir1000.pdfIrDA encoder / decoder in between the UART and the MAX3120?Look likes a straight pass through, with the TX_U to TX_IR automatically inverting to account for the RX inversiobn inherent and to prevent excessive LED current from it being continuously on?

author: Renate
author_rank: Super Contributor
timestamp: March 30, 2020, 12:38:05 am
content: Yes, that looks like it should work. The polarity checks out.