Using an M12 connector pin with arduino.

Hello,

I am using the pico+15/WK/I ultra sonic sensor for this project I am working on. Essentially I want to know distance using this very tiny sensor however the connector on the sensor is a 5 pin M12 connector. The arduino has no apparent plug that I can see (however I am often wrong). Please help.

I have tried looking for some sort of adapter that would allow me to use both the sensor and arduino but I am stuck. Does anyone know whether this is possible or am I out of luck.

pico+15/WK/I SENSOR: https://www.microsonic.de/en/distance-sensors/cylindrical/picoplus/standard-sensors/standard-sensors-/picoplus15wki.htm

Thanks,

The wiring diagram is shown in the 4th image.
You need a 10-30v supply.
Use a 250 ohm load resistor and measure the voltage across it.

Consult the datasheet for programming

The mfg specifies it as a "5-pin M12 initiator plug". I'll venture a guess that you will not find a "cable" to use this with an Arduino.

You will have to purchase a connector and make a cable. The link below looks like the one you need.

M12

Or here: https://www.microsonic.de/en/accessories/cables/cables.htm https://www.microsonic.de/en/accessories/cables/cables/cables/kst5g-2m12.htm

Which Arduino? What supply voltage will you be using for the sensor (10 ~ 30)? You may need a voltage divider to lower the output voltage to suit your Arduino, you cannot apply more than Vcc + 0.5 volts to an Arduino pin.

JohnRob: The mfg specifies it as a "5-pin M12 initiator plug". I'll venture a guess that you will not find a "cable" to use this with an Arduino.

You will have to purchase a connector and make a cable. The link below looks like the one you need.

M12

I see, but then how would I be able to code the sensor and have it used with the arduino? I have only ever used the HC-SR04 ultrasonic sensor and that requires two pins, one for echo and one for trig, so how would I be able to use this one.

Thanks a lot for helping me with this question, means a lot.