I have an inductance sensor on a CNC machine that goes 12V high when triggered (open collector when not) . I want to read that input on my arduino who uses 5V logic.
I was thinking I could just use a simple NPN transistor to do the logic level shifting. Would this work? I dont want to test it incase it could fry the arduino.