I have three signals coming in. The main line is 12V, the three signal lines complete the ground for the signals if that makes any since. I have attached a picture trying to explain what I have. Is this correct and I know you normally have grounds from one circuit connected to the other, with the signals actually being the grounds how do I connect this to my arudino?
The thick black lines just show that the 12V in is the common that goes with each signal. With each signal being a ground that is what has me confused on how to use it with the arduino. If I combine all the signal grounds with the arduino grounds, how will each individual signal be read? There is a 2.2k resistor on each of the signal lines. I need to add on on each line going to the arduino pins?
Your circuit with the 1k2 and 2k2 resistors is bad and would damage the Arduino.
And Geek_Emeritus' diagram is not going to help because you are using 12 V.
Before I (or anyone else does) give you a proper circuit, please explain what these inputs are, perhaps in the wiring of a motor car? And what else is connected to the switches that you are monitoring, pulling them up to the 12 V?
I always try to keep pin current well below 1mA (in case the Arduino is off),
which means a 12k (minimum) value between 12volt source and pin.
Then calculate the other resistor to suit (7:5 ratio).
Higher values are safer, and you don't have to be that close to 5volt (≥ 3.5volt will give a HIGH).
Leo..
Tom, i believe that if the switch wasn't closed above I would still have 12v going into the arduino, when the switch is closed it then goes to 5v.
The 12v inputs "use" to go into a smart motor that had limit sensors built in from a home built target system. I can no longer get those motors so I am having to use the 12v inputs for my own motor and added my own limit switches.
I am using a board of my own design using a 328p. I just trashed this circuit and just used relays for the 12v signals that turned on the 5v for the arduino inputs. Problems solved but had to use more parts than intended.
If you refer to the schematic in post #9, that's not the case. With a switch open, the correct voltage divider values will result in 5V on the inputs of the Arduino. With a switch closed, that input will drop to GND.