Setup 12V Commercial 5 pole Ultrasonic Sensor for Analog Read

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:

Pins:
Brown = +1--30 VDC
Gray = Sync
White = Analog
Black = PNP
Blue = IL 100mA

diagram

  • 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?

That will require a resistor in series with the current loop. Your Arduino can measure the voltage across the resistor. Why are you choosing this rather than the time of the corresponding pulse?

Thank you Paul. Well, maybe you can educate me here. Let me give you the use case. The sensor is part of a bottle filling machine and will help determine the timing of when the conveyor belt stops. I want to be able to monitor analog inputs from the sensor so I can adjust the timing. I suppose I am trying to have more appropriate control vs just tossing it HIGH or LOW with a delay. I wanted the process to be a bit more logical. Would I be able to do this with the pulse timing you suggested? Thanks

Identical to the way the hobby sensor operates! There are many, many examples in the forum if you search to them

Got ya, ok so I can use the digital PWM pin. Any help on how to hook this up correctly to the 12V relay? Thank you.

You can use any digital pin to trigger the sensor and any other digital pin to get the echo. Looking at the user response for your relay, I would not use it for anything but testing.