In the figure we present a circuit that has an insulation voltage of 2,500 V at 60 Hz and rejection in high common mode. The maximum data transfer speed allowed for this circuit is 40 kB / s with cables whose length can reach up to 1500 meters. A hysteresis feature increases the circuit's immunity to noise. The recommended transistor is 2N3904, but general-purpose equivalents can be used.