laser distance measurement connected to arduino coaxial cable

Hi,
I´m making a project where i would need a wagon to go back and forth using a laser (micro-epsilon optoNCDT ILR) to measure the distance to the wagon. The laser output consist of a coaxial cable (RG 58) that i have connected directly into an analog input on the arduino. This doesn´t seem to work very well, any suggestions?
The idea is that the laser measures the distance to the wagon, when close enough, the wagon should change direction away from the laser, and at a certain distance it should go back again.

Thank you!!

Images from Original Post so we don't have to download them. See this Simple Image Guide

...R

Those 2 images seem to be the same and I don't see anything that looks like a wagon.

Make a simple pencil drawing of the circuit and post a photo of that. And post links to the datasheets for the external products you are using.

And post your program.

What distances do your need to measure and with what resolution?

I don't think a 16MHz Arduino is capable of measuring distances using light. Have you considered an ultrasonic sensor?

...R

What kind of signal comes out of the coax cable?

From what i can see, and guess...
The laser talks to its own controller in the grey box.
The coax output is (possibly/probably) an open collector analog output that is being sent to the ‘duino.

First things first - the coax shield isn’t connected to anything...?! IMPORTANT
It should be bonded to the Arduino ground/0V rail.

Second, if the output is open collector - you (may) need a pull up or divider on the arduino input (depends what levels the sensor puts out).

Alternately, it’s vaguely possible the sensor sends a one-legged serial output, but it doesn’t look like that in the setup. I didn’t read the spec/datasheet.

Hi,
Looking at the manual for the laser device, it has digital comms and an analog output.
The analog output is 4 -20mA output, so you cannot just connect it to an analog input of an Arduino and expect any decent reading, as the input is a voltage input.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please tell us your electronics, programming, Arduino, hardware experience?

Attached is the specs/manual for your laser.

Tom... :slight_smile:

man--optoNCDT-ILR-1181-1182--en.pdf (537 KB)

The good thing is a circuit for 4-20mA conditioning can be extremely simple.
If you look around on google, there are hundreds of examples

Then your problem is simply reading the analog input and doing what needs to be done with the value.

TomGeorge:
The analog output is 4 -20mA output, so you cannot just connect it to an analog input of an Arduino and expect any decent reading, as the input is a voltage input.

Until you figure out how to interface to the 4-20mA output...

DISCONNECT THE COAX FROM YOUR ARDUINO !


...you could easily blow it up.

(luckily, it looks like you didn't connect the coax shield to anything, which might have saved the Arduino) 

Yours,
TonyWilk

Good point - the 4-20mA loop may be idle at 12 or 24V... Which is way over the safe input voltage for any Arduino pin.

If the pin is damaged - it's (probably) only that single pin - but it could be worse..!

Check the 4-20mA input 'interfaces' on Google to connect the 4-20mA loop to the (nominally 5V) inputs.