-1
\$\begingroup\$

I want to detect if an ethernet cable has become disconnected using an Arduino. The Arduino will be plugged into a wall, not battery powered.

Using a LM358 seemed like the correct fit. I hooked up orange & orange stripe to one side of the op amp and green & green stripe to the other side. Looking at the output on my scope, it never goes below ~3.5 volts. If I measure the difference with my volt meter, the difference goes to 0 when the cable is disconnected.

Looking around online, it seems as though I would need some kind of feedback loop. But if I do that, I believe that would tie one of the ethernet wires to the ground or power rail of the Arduino.

Assuming the LM358 would work, what would the circuit look like?

I don't need or want network capabilities on the Arduino itself. I'm looking to build a passive device that can detect the connection state between two other devices.

\$\endgroup\$
  • \$\begingroup\$ Copied from arduino.stackexchange.com/questions/45673/… \$\endgroup\$ – Chris Cartwright Oct 24 '17 at 1:17
  • \$\begingroup\$ You keep naming the Arduino everywhere, but why do you insist on having it a part of your circuit? What do you plan to do once you know something is disconnected / connected? Do you need the Arduino to light up an LED? - Also, the LM358 output voltage swings is from negative voltage supply to positive voltage supply -1.5V, so that you see 3.5V => the lm358 probably hit its roof and you were feeding it 5V. If I am misunderstanding your text, then it's your fault for not supplying a circuit diagram, which you should always do when talking about a circuit that is not familiar to anyone. \$\endgroup\$ – Harry Svensson Oct 24 '17 at 1:55
  • 1
    \$\begingroup\$ An ethernet cable that does what? carries power? data? both? What is the other end connected to \$\endgroup\$ – Voltage Spike Oct 24 '17 at 3:20
  • \$\begingroup\$ The ethernet cable is between any two devices. I simply want to detect if it has become unplugged and record that fact on an Arduino so I can perform other logic. \$\endgroup\$ – Chris Cartwright Oct 28 '17 at 20:09
3
\$\begingroup\$

What are you trying to accomplish? If this "Ethernet" is actually plugged into an Ethernet device then what you're looking for is the framing data coming down the line. An Ethernet link is constantly active and detecting the idle signal is just as difficult as detecting data. It's also going to change depending on whether you're looking at 10/100 vs. Gigabit signalling. The "best" way to do this is to tap into the Phy chip and looking for a carrier active pin. Trying to impose a transparent tap is asking for trouble as you're suddenly generating all sorts of signal integrity issues.

If this is simply a a Cat-5/6/6e cable that's not actually carrying Ethernet frames then you're on your own as there's not enough info in your original question to answer that.

\$\endgroup\$
  • \$\begingroup\$ What would be easier than trying to figure out an invariably SMD PHY chip is to buy a cheap switch and hook into the link LED. This may also work if you're willing to modify the end devices and they have LEDs too. \$\endgroup\$ – user71659 Oct 24 '17 at 4:52
  • \$\begingroup\$ I don't care about being able to read the frames. I want to detect a physical disconnection of the cable. 10/100 is fine for my purposes; the two devices would not need gigabit speeds. \$\endgroup\$ – Chris Cartwright Oct 28 '17 at 20:10
  • \$\begingroup\$ I understand, but that doesn't really change the problem. It seems like you want to implement a network tap and then just check that for electrical activity. My point was that this is very difficult without causing all sorts of signal integrity issues. You seem determined to do this, so go ahead and try it. Worst case you sacrifice a cable. The signals are differential per pair and should be around 3.5V. Add a high-pass filter with a -3dB cutoff in the low MHz range. As I recall, 10Base-T runs at 16MHz and 100Base-TX at 160MHz. \$\endgroup\$ – Chris Ryding Oct 29 '17 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.