I am trying to use Sharp proximity sensor for detecting trains on a model train layout (G Scale). My feedback modules expect to get dry-contact input. However the Sharp digital sensor product voltage output. For testing, I have connected it to a mechanical relay. Is there a smarter way for doing this (for example a suitable opto-isolator?).