There isn't a whole lot of information resulting from searches I'm doing and I've never used an optocoupler before. Which circuit below (or neither) seem like the best choice and do I need a 10k resistor where the question mark is?