I re-tested and re-build the circuit. I use the USB-mini to test the signal output with the help of my scope. I test at low baud rate : 300 baud to 115200 baud. I did visit this site : http://saturn.uni-mb.si/~bojan/pdf/app45.pdf
It show design formulas to use a opto-coupler. Very informative.
In my new circuit, I still use a inverter buffer for input signal and output signal. I use a simple switching transistor circuit to drive the opto-coupler LED and keep the If lower than 10 mA. At the output of the opto-coupler, Rc is a bit higher, 220 instead of 150, I did use 10 K first, but the output signal at collector was bad at high baud rate. So I lower until I have a proper output signal. The signal was ridding above 2 V ( 2 V to 5 V switching ), and I was thinking...hum... a comparator will clean that signal, and I did place a comparator - LM339, set the Vref about 3 V, and I got a NICE output signal ...
Now, I am in the game... and place the signal to an inverter buffer, so it is 1 in , 1 out, 0 in , 0 out.
Here the Processing code I use to display a "square wave". I use the character 85.
println("Connecting to "+Serial.list()[portindex]);
myport = new Serial(this,Serial.list()[portindex],myspeed,'N',8,1);
void draw ()
Here the schematic of the com link channel.