# 3 12V signals in to adrunio

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?

I just cant seem to get this to work.

What are the thick black lines?
Your idea looks sound, but we need to see your code to be more specific.

EDIT: as pointed out later by @Paul_B , the divider isn’t balanced very well. Try 47K / 22K with 2K2 at the pick off point.

I’d add a 2k2 resistor on each input to limit current to the input pins.

Remember, the Arduino ground must be common within the source ground.

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?

If gndSignalX is open, you still have 12V on the Arduino input.

I would use optocouplers.

learn to love this picture:

Nope!

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?

Sorry, you’re right…
I misread the resistor values…
For the divider, OP needS to scale the 12V down to 5V max.

4K7 / 2K2 would be a start, with 2K2 picked off to the input.

No real need for low R values… 47K / 22K + 2K2 pick off might be better…
Less current through the divider.

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..

What is the device that has the outputs that are switched to gnd?

I think this is how your device should be connected.
You need to connect the gnd of both the device and the Arduino.
What model Arduino are you using?

Tom...

Hi,
The part number/type of device you are interfacing with will help immensely.

I am thinking you may have outputs with open NPN collector outputs, in which case the diagram can be even most simplified.

Tom.....

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.

Generally a bad approach. Easier and more reliable to mount a Pro Mini as a daughterboard.

Hi,
Can you please post an image(s) of the device you are getting the 12V and 5V levels from,

Thanks Tom....

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.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.