How to connect a 10-30V, 2-wire proximity sensor to a 3.3V logic

Thread Starter

tomerbr

Joined Oct 16, 2017
4
Hi,
I have a project that needs a proximity sensor.
The proximity sensor is a 2 wire 10 to 30 colts type.
I feed it with 12V via a 1K resistor.
My problem is how to connect it to the 3.3V MCU logic of the board.

The simple solution is a voltage divider as seen below.
1591357711666.png
This seems to work, however I don't like this solution and would like a more elegant one like a Zener diode or opthocoupler.

Any suggestions as to how to make it work?

Thanks,
Tomer
 
Top