optoisolated serial ttl

Hi have a arduino controlling my power inverter by a relay and every time my the inverter is turned off or on my usb connection to arduino get lost until i unplug and plug the usb connector..
My pc is also connected to the ac part of the inverter and i thin i have here some kind of groundloop or something so i want to isolate arduino from the pc but keeping communication with something like:

usb to serial (fdti or other) ------>optoisolator ------> arduino RX
usb to serial (fdti or other) <------optoisolator <------ arduino TX

how can i do this what kind of components do i need ?

9600bps or 4800bps speeds are fine...

regards