Separate-Ground voltage measurement

Just prototyped the thing. It did not work at first, when there was a pulldown resistor. I changed it to the pullup variant as here:

it worked. I tried both PC817 and EL357, they went fine. AFH610 refused to make link.

I set it to 300 baud, hardware serial.

As for the resistor, I had a 100x bag of 1.3k and they worked well for input, and 10k for pullup.