Detection of connected large cable with device at one end

Hello,

We buy several devices wich have a large cable extension, 4 mts. The cable should come mounted by the manufacturer but sometimes, the cable is not connected properly, so we have to unmount everything in order to connect the cable to the device.

To avoid this, I thought I could develop a simple arduino board to check if the wires of the cable are connected to the device or not.

By reading the resistance of the two cables of the motor device, I get 2MOhm, so I imagined that connecting it to an input of the arduino, with a pull up resistor of 10MOhm I could get a 0 or 1 depending on the cable if it is connected or not.

When the cable is connected to the device, the arduino should read GND and when not, it would read VCC so, in theory, I know when the cable is connected and when it is not.

The problem I face is that I get false readings because it seems the cables get noise and the arduino reads a zero ( cable connected ) even though there is nothing connected in the other side. I readed in another post of the forum that a 10MOhm is too much, so I changed to a lower value, but, now I can't read properly as the pull up is too small.

Can you help me? Thanks in advance

Why not simply use the multimeter ?

UKHeliBob: Why not simply use the multimeter ?

I only explained the part with problems, but the board does more things and it is connected to a PLC. I need a microcontroller.

10Megas.png

colomer:
By reading the resistance of the two cables of the motor, I get 2MOhm,

That makes no sense. Any sort of motor would have a much lower resistance, measured in simple Ohms. And if it is switched off in the assembly, it should simply be unreadable.

Paul__B: That makes no sense. Any sort of motor would have a much lower resistance, measured in simple Ohms. And if it is switched off in the assembly, it should simply be unreadable.

Sorry, forgot to change. It is an electronic motor. The cable is connected to some electronics wich I do not know exactly what it does.

colomer: The cable should come mounted by the manufacturer but sometimes, the cable is not connected properly, so we have to unmount everything in order to connect the cable to the device.

You're attacking the problem from the wrong direction.

IMO

dougp: You're attacking the problem from the wrong direction.

IMO

Do you suggest anything?

colomer: Do you suggest anything?

Get with the supplier and have them fix their quality control issue.

dougp: Get with the supplier and have them fix their quality control issue.

We already tried that way...

Since you don't know what is in there and we don't know what is in there it becomes impossible to suggest a test method and the fact that it reads 1.5 Meg Ohm means nothing really. What happens if you reverse the meter leads? Still read 1.5 Meg?

A good quality measures resistance doing the following:

"The meter measures resistance by passing the same current through a precision reference resistor and the external circuit or component, then ratios and measures the voltage drop across each (Ω = Vunknown/ Vreference). Remember, the resistance displayed by the meter is the total resistance through all possible paths between the probes. This explains why in-circuit measurement of resistors does not often yield the ohms value indicated by the resistor’s color code".

Unless you have a bunch more data there is no simple way to do this with an Arduino or any uC. Now if you can't get a supplier to send you stuff meeting or exceeding your specifications it's time to get another supplier.

Ron

Why not connect the top lead to an analog pin and replace the "pullup" resistor with a 1.5M ohm resistor. Then you should read 2.5V (approx 512 analog counts) if it is connected at the other end. (simple voltage divider using two equal resistance values)

raschemmel:
Why not connect the top lead to an analog pin and replace the “pullup” resistor with a 1.5M ohm resistor.
Then you should read 2.5V (approx 512 analog counts) if it is connected at the other end.
(simple voltage divider using two equal resistance values)

I thought about that but discounted it because the Atmega 328P (Arduino Uno) for example suggest a source impedance of < 10K. While this is not cast in stone I thought that 1.5 Meg would be pushing things a little. While the actual input impedance reflects about 100 Meg Ohm. The < 10K I believe is so the input capacitor (sample and hold) has time to charge up before the multiplexing moves to the next channel. Then too I doubt accuracy matters much but I would still be curious if that same 1.5 Meg was the same when the meter leads are reversed? Finally not that it matters much but using a 1.5 Meg pull up and an input impedance of 1.5 Meg the current would be about 1.7 uA leaving plenty of room for noise.

Ron

Actually it would be half that because it is on the middle if the voltage divider. It might still be too little current. I don't know what the minimum input bias current is.

Ron_Blain:
I thought about that but discounted it because the Atmega 328P (Arduino Uno) for example suggest a source impedance of < 10K.

This is often poorly understood.

The analog inputs are extremely high resistance, perhaps 10^10 ohms or more.

No problem (other than noise pickup) reading a 1M source.

However the settling time is long for such a high impedance, and the bandwidth low - the ADC has some
capacitance that has to be allowed to charge.

If and only if you switch between different analog pins does this bite you, and then the source impedance has to be <= 10k for full accuracy (crosstalk negligible between analog pins). Switching to a different pin and reading it only allows 4µs for the capacitor to charge. If you don’t switch pins, then the ADC continuously tracks the source at the bandwidth set by the source and capacitor.