Okay, I have a project for a switch in my car. The problem is the input to the microprocessor in the car has to be a ground signal(low). The switch I am using is normally grounded and opens when activated. So I designed part of this circuit to invert the signal using a transistor. I don't know one thing though. Will the normally grounded switch make the entire circuit grounded once the switch is shut, essentially making the circuit always grounded. I don't know the resistance of the processor's input, so I'm not really sure how to calculate the voltage drop across the resistor. Any help?
That circuit will have a “low” of the drop across the diode, and across the transistor, so ~1.5V. May not be low enough for the arduino (which I think needs <0.8 for a low)
When the switch is closed, it will go up to 5V.
Ditch the 2 diodes, the 2.2K resistor can be 10K also. Then your low will be 1 transistor drop only, which would be enough.
Why not connect the switch directly to the Arduino and invert it in software?
Transistor provides some isolation?
or use an optocoupler for total isolation and do the inversion in software
or use an optocoupler for total isolation
Yes but the OP said:-
the input to the microprocessor in the car has to be a ground signal(low).
So you have no power to power the LED in the opto.
And anyway the opto isolator does the inversion for you.