Proximity sensor DOA, or wrong wiring?

I bought a TL-W5MC1-5V proximity sensor online. The sticker says it is the NPN NO version, 5volt.

To wire the sensor to my Wemos D1 mini, I applied 5v to the Brown(+) and Blue (-) lead, added a 10k Ohm resistor between the Brown(+) and Black(signal) lead, and connected the signal to D2. The LED will turn on when I keep something metal close, but the Wemos doesn’t pick up a signal.

To test the sensor (without Wemos), I wired the sensor on a breadboard and measured the voltage between ground and signal. This is what I get in 3 different tests:

  • No resistor: 4.65v // 4.45v (without metal, with metal)
  • Resistor between Signal and 5v+: 4.66v // 4.55v (without metal, with metal)
  • Resistor between Signal and ground: 2.31v // 2.22v (without metal, with metal)

(when I measure the applied 5v, my multimeter measures 4.65v)

Am I doing something wrong, or is my sensor dead?
Thanks

Post a photo of the label on your sensor.

According data sheet, first setup should work, voltage should go from 5V to cca. 0.7V
If you wired sensor properly, brown to 5V, blue to gnd, load between 5v and black, then sensor is dead.

Ok.
Remove all resistors from your setup, disconnect from Esp, power it 5V to brown and Gnd to blue. Measure voltage between black and blue while no proximity/proximity.
Then measure voltage between black and brown no proximity/proximity. Use ferrous metal. Post results.

Thanks for the suggested tests. Please find the measurements below. I have also tested with a 10K resistor to get all measurements in. This is without the Wemos in the circuit.

image

If measurements are correct and proximity was tested with magnetic metal (iron, steel), your sensor is dead.