I am trying monitor a door pin at +12v. I have a program that does something when there is a jumper between +5v pin and pin 11 on the Arduino Uno. I currently plan to wire a 12v relay in to isolate the 12v from the arduino etc...
I was thinking, could I use a transistor instead? Connect the collector to +5v pin on arduino, connect the emitter to pin 11 and the base to the trigger 12v wire. The arduino will share common ground with the car, and [for now] be powered through the regulated external power jack at around 12-14v.
It should work, I would wire it like below. In the pinMode() call, turn the pullup resistor on for the input pin (INPUT_PULLUP). This circuit will invert the logic: When 12V is applied to the transistor, the MCU pin will be pulled LOW. When no voltage is applied, the MCU pin will read HIGH. The transistor can be any general-purpose small-signal NPN type, e.g. 2N3904, 2N2222, 2N4401, etc.
Use a transistor instead of relay, yeah no problem... then I get lost due to a resistor between arduino's pins.... maybe it's the lack of provided circuit throwing me..
So are you sensing the 12v voltage? Then acting on it? Do you wish to provide 12v from a transistor (a switch?)