I have a NPN proximity sensor with the rating voltage 6 - 36 DC (https://www.amazon.co.uk/gp/product/B07SD9VYDH/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1)and wanted to connect to the input PIN of Arduino Yun.
The proximity sensor has 3 wires: blue (ground), brown (vcc), black(signal). Since it is NPN NO type of proximity sensor, the signal voltage is equal to the vcc when it is normally open.
I read from the datasheet, the input PIN of Arduino YUn operates at 5 volts. Meanwhile,the ouput voltage (signal) from proximity sensor will be more than 5 volt. How can I read the signal from sensor that is more than 5 volts using Arduino?
What I've tried:
- hooking up signal wire to voltage divider and step it down -> the voltage that I read with multimeter is 0.3 -0.5 volts. But, when I hook up the output voltage from power supply directly, it gives the stepped down voltage as it should according to the formula.
Note that the point is why voltage divider does not work with voltage from signal and it works from power supply?
- hooking up signal from sensor to buck converter to step the voltage down -> same as in voltage divider case. The voltage reading works correctly from power supply but not from signal voltage from sensor.
I have a feeling that I might miss some underlying principle here. Can anybody tell me what I am missing here?