Thanks again sprinkmeier.
I think I understand. Using the voltage divider circuit (similar to the ultrasonic module image above), I simply can add a 3V zenner to provide some protection.. And to do that, I just need to jump it across the RasPi GPIO and RasPi GND?
Otherwise, I can use an optocoupler.. but I am not 100% clear on the wiring. Referring to the image attached, on the left would be the 9v and ground coming from the device, and on the right would be the RasPi. According to the image, I need both the +3.3V, GPIO and Ground to the Pi, is that correct? Would I replace the 2.4k with the 22k one I am using from the voltage divider circuit? Everything else would be the same I assume.

- optoin.jpg (8.58 KiB) Viewed 2708 times