Arduino tx drops voltage on optocoupler

Hi,
I am having a weird problem i cant figure out. I am trying to optically isolate a computer from arduino. So i got an arduino nano and a usb2serial for arduino. However when i connect the tx pin form any of those to an optocoupler the voltage of the tx pin drops from 5v down to 1.25, 1.33, depending on the value of R1 (see image). The optocoupler does not open at that point given that the forward voltage for the diode is not reached.

I am quite baffled,
the optocoupler is HCPL 2201, it is working properly I tested it.
In a test connection like the one from the image, the current passed through the input stage is about 20uA, where it should be around 3mA.

hcpl2201.png

Look up ohm's law

Mark

holmes4:
Look up ohm's law

Mark

WOW. This was helpful.

Maybe tx is not properly initialized as OUTPUT? If it would be INPUT with enabled pull-ups then You create a voltage divider. And because the led in the opto coupler has an unknown resistance every voltage at the tx pin is valid.

Graubart

These pins are the default serial pins of nano and usb2serial, As I understand they do not need initialization. This happens while idle.

I might be wrong but I think they are initialized with Serial.begin. Try to use tx as a simple output (pinMode(1, OUTPUT):wink: and set the pin high. tx should measure 5V and feed the led.

Graubart

AFAIK in the TTL world, idle is a "HIGH".
Try to connect your R/LED between TX pin and 5volt.
Leo..

Hey Holchr - did you solve the issue?
I had this same problem when connecting Tx to a voltage divider. It would drop from 4.74V to 1.75V, yet kick out 3.26V when connected to the Arduino's 5V (4.95V to be exact) source.
I stumbled across a thread explaining that Tx has a non-linear variable internal resistance. Basically the Tx Vout changes with the resistance of the load being applied. Maybe you are experiencing the same problem. I'm not offering a solution, some sort of V stabiliser i think has already been suggested, but this might shed some light as to why your seeing the voltage drop.
As a noobie on a pretty steep learning curve I'd really like to hear how you got on.
Good Luck