Hey folks. I wanted some guidance in making sure I setup (wire/connect) my commercial ultrasonic sensor correctly, they are a bit different than the kit ones. I have the following:
-
Arduino Mega R3
-
SRD-05VDC-SL-C 12V Relay with OPTO-Isolated
https://www.amazon.com/gp/product/B00LW2GM84/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 -
UK1C-G6-1E Ultrasonic 5 pole sensor 10-30 VDC - 4-20mA analog output, PNP, N.O./N.C. selectable M12 quick-disconnecthttps://www.automationdirect.com/adc/shopping/catalog/sensors_-z-encoders/ultrasonic_proximity_sensors/diffuse_600-900mm_sensing_ranges/discrete-z-_analog_outputs/uk1c-g6-1e
Pins:
Brown = +1--30 VDC
Gray = Sync
White = Analog
Black = PNP
Blue = IL 100mA

- Adjustable Power Supply. ( I will set on 12V DC Out to 12V relay).
My goal is to get this to feed me analog data to the Arduino. I believe I have all of the correct components. Mainly, how would the 12V ultrasonic sensor hook to the Relay, as I have 5 wires? Arduino wise, I believe I would go from VCC to 5V on Arduino, GND to Arduino Ground, IN1 to an analog pin on the Arduino.
The white wire on the ultrasonic sensor is the analog out, so how do I connect this to the Arduino safely?