[SOLVED] sending serial data via optocoupler

Status
Not open for further replies.
TX output high should give RX input high and vice versa. Check in your circuit.

I'm a little bit confused... Can you send me a schematic ?
this is what datasheet says ...
 

That's what the datasheet shows about signal polarity. Please check with your circuit.



The correct circuit has been already shown above.
 
@Easyrider

No, I was not kidding. You are right. It works. I had made a mistake. I had connected opto cathode to Rx line instead of Tx line.

But what is the use of using opto on UART ?

it finally worked ... thank you milan.rajik.
you really helped me. thank you.
Good luck.
 

See datasheet of opto. If Opto input diode needs 1.6V and 30mA then (5V - 1.6V) / 30 mA = 113E. Power dessipated in resistor = P = VI = IIR = (5 - 1.6) * 30 mA = 102 mW. You can use 1/4W.

I think he asked about R1 and R3.
 

It's R2 and R3. To calculate resistor value for R3 it is like this. Lets say CE voltage is 0.4V and VDD is 3.3V and required current through opto output circuit is 5 mA then (3.3V - 0.4V) / 5 mA = R3.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…