How about an bidirectional opto isolator and a resisror?

Dave Purola,