I am building a circuit that will work in a car. The intent is to have something on the car (12V) trigger on the Arduino input pin. I'm using the below circuit and have it working, but I am confused about something. I expected that with no signal on the 12V side, the Arduino input pin (connected to #5 below) would be Low (or near 0V). However, I get 5V on #5 until the 12V input is applied (then it drops to near 0v). Also note that I did not connect the ground between #2 and #4 (but have tried with and without and the result is the same). D2 (diode) is also not being used as this is a DC circuit. I can work around this in code by simply reversing what I am looking for (LOW), but thought that optoisolators worked by triggering the output when input voltage is applied - in this case it is opposite this? What am I missing? I am using a NTE3041 optoisolator (NPN based).
