|
SW Iowa | If proximity sensor is a binary device (either 0v or 12v output) and you're going into a digital input on the pi, an optocoupler could probably work.
Would probably need to know more specifics to say if that is the best or simplest way to solve the problem, though. If you just need to scale 12v to 3v you can do that with a couple resistors, though that may not be desirable in something like a vehicle application (where 12v can vary widely) if the pi input doesn't have adequate overvoltage protection built in.
If proximity sensor is outputting an analog voltage or serial digital data instead of just 0v or 12v on/off, that potentially changes things, also. | |
|