I’m thinking about designing a device/tool for UTP cable related testing/tracing using an MCU. I just would like to experiment with some ideas involving wire measurements, tone measurements etc. (so not using a PHY, just using my own signaling). But in a live environment (not just having a single cable for yourself) where you could plug-in to a connection that is connected to the network (by accident) I wonder how to protect against voltages present on a live network connection.

So, under normal conditions I would have a cable all to myself (measuring from one side and having some supporting satellite device or resistor network on the other side). But choosing the wrong port by accident in the field is what I’m afraid of (or want to protect against).

As far as I understand the data signals are in the range of -1 to +1 V (2V common mode per pair). And there could be a PoE voltage offset (48V) present.

If a possible PoE power source (PSE) on the line doesn’t detect a magic resistor value (which I will not provide), will it not switch on PoE? So, will I be safe and not have 48V on the line to my device?

Is there also a similar mechanism for the data signal (i.e. if it does not detect a valid communication partner will it not try to put a data signal onto the line)? Or do I have to be prepared to get a signal with an amplitude of 2V?

In other words, do I have to worry about voltages/signals on the wires that could damage my device/MCU and also (!) could I damage other equipment when putting low current, low voltages (or AC signals) on wires when accidentally (not intended) connected to other equipment?

Should I have precautions in place to avoid either of these cases? And if so, is there a simple way to detect that I connected my device to a harmless unconnected cable to do my thing?

  • \$\begingroup\$ This question currently includes multiple questions in one. It should focus on one problem only. \$\endgroup\$
    – Andy aka
    Mar 13, 2021 at 18:05
  • \$\begingroup\$ @Andyaka don’t be so pedantic \$\endgroup\$ Mar 13, 2021 at 19:02
  • \$\begingroup\$ I have many more questions ;) This was my effort to keep it short. \$\endgroup\$ Mar 13, 2021 at 19:12
  • \$\begingroup\$ I tried to analyze any wire pairs for testing unknown V,R relationships before assuming anything from one end or in the middle before attaching a PHY. Some Ethernet adapters can also report cable lengths from TDR like measurements. But monika didn’t like this approach and made some assumptions to standards and ignored attachment cable test loading affects, which I did not. \$\endgroup\$ Mar 15, 2021 at 14:17

3 Answers 3


It's not in general possible to "sniff" a twisted-pair Ethernet link without disrupting it, or at the very least it adds lots of unnecessary complication. All you want to is to test cables, so let's focus on that. But we can definitely add some bonus features: link discovery is not hard to implement and could be done without using an actual Ethernet PHY.

The scenario where you connect the tester to an unused/disconnect cable run is the baseline. At the minimum you'll want to protect the tester from electrostatic discharges and transients induced into the cable from neighboring mains circuits, or potentially even lightning. And you'll definitely want galvanic isolation at least matching that of the typical network equipment, and for that the best bet is to use what Ethernet nodes use: a 10/100BASE-TX transformer, also called "10/100BASE-TX magnetics".

The magnetics can be attached the RJ-45 jack on your board. Or you can get those two integrated together - transformer inside the jack - called, aptly, a magjack. The transformer isolation provides a potential (galvanic) barrier, but you still need ESD protection, and for that you'll want to look up Ethernet-specific ESD protection solutions, or design one yourself. An existing application circuit (from a datasheet/appnote for an Ethernet PHY) may be a good starting point, and you might end up using it as-is. This would be one example - ESD312 suppressors are used on the secondary side of the transformer, and LC03-3.3BTG suppressors are used on the primary side.

At this point, your device is isolated from DC potentials, so even if there was any PoE voltage present, nothing much will happen. Of course, you could detect PoE PSE (power sourcing equipment) if you wanted to. But that's optional.

The secondary sides of the magnetics (transformers), where a PHY would ordinarily attach, are center-tapped, so you can produce pulses of either polarity using a unipolar supply. That's enough to implement cable-testing functionality: you can transmit a waveform, and receive it, and you can also use an analog input on an MCU to measure the amplitude of that waveform. Since the Ethernet signals are DC-free, there's a minimum allowed frequency to use here in order not to saturate the magnetics. Typically, the magnetics specify the insertion loss from 100kHz up, and also specify their inductance at that frequency, so using a test frequency of 0.1MHz and up would be a good idea, although less may work too (e.g. 64kHz) with higher loss and at a lower maximum current. Of course you'd be terminating both the transmit and receive pairs, so you need to keep that in mind when looking at amplitudes: your driver won't be an ideal voltage source, and most MCU pins are inherently current-limited CMOS drivers and act like current sources.

Now, if you want to detect a link partner, look up the details about so-called link pulses in the various IEEE802 specs - those for 10BASE-TX, 100BASE-TX and 1000BASE-T, you can get an idea of the link partner detection and negotiation of capabilities. Your cable tester could, with probably nothing more than Arduino Mega or Zero, do link negotiation using the relatively slow link pulses, and provide information about the capabilities of the link partner. You could also detect a twin cable tester on the other end of the link, and provide extra capabilities that way - for one, you'd already use an established communications protocol (link autonegotation) that's designed specifically to allow extensibility. You could also detect modern PoE PSE (IEEE 802.3at), since it can be detected over that same digital channel.

To recap: you likely would want to implement a "bog standard" 100BASE-TX circuit up to where an Ethernet PHY would attach (be it a dedicated chip or one integrated in an MCU), and then decide on what to use for the PHY. With a bit of creativity you could probably make the cable testing and link detection/setup work using just the "raw" pins on an MCU, with no active external components, given that modern MCUs have reasonably strong pin drivers, analog inputs, and have timer functions plenty able to receive or transmit link pulses.

You could also use an MCU with a built-in Ethernet PHY, and just do normal link negotiation using that - then your cable tester could not only detect link partners, but could also do actual data transmission tests and detect error rates and such. Since you'd be likely limited to 100BASE-TX speeds that only use 2 out of the 4 pairs, to test all pairs you'd need to detect a twin cable tester of yours (they can be identical), re-negotiate the connection after two pairs are tested, and settle on using the other two pairs. For that, you could use a digital signal switch chip and effectively connect the PHY to the other two pairs. Note here that gigabit (1000BASE-T) magnetics support all 4 pairs for data transmission, while fast ethernet (100BASE-TX) magnetics support usually only two pairs and you would need two of them to use all 4 pairs.

On that note, to test all 4 pairs, you need either:

  1. An RJ-45 jack and two discrete 100BASE-TX magnetics (transformers), or

  2. A 1000BASE-T magjack, or

  3. An RJ-45 jack and 1000BASE-T discrete magnetics.

Speaking of PoE, it wouldn't be a concern unless you wanted to detect the presence of a PSE (power sourcing equipment), or unless you were connecting to powered switch ports that use "legacy" or "dumb" power injection, i.e. not according to the IEEE802 standards. This is sometimes used for security cameras and other devices where due to cost considerations a compliant PD (powered device) implementation would not be feasible. For many such schemes, it's sufficient to use a simple "DVM front-end" without galvanic isolation (DVM stands for Digital VoltMeter). I.e. you'd use a resistor network and some protection components similar to those in digital multimeters to scale the differential voltage between any two center taps on the primary side of the magnetics and feed them to either a stand-alone differential ADC, or to the MCU, while taking care to ensure that the common-mode range on the A/D side is not exceeded. The easiest way to do it may be with reed relays or opto-mos switches, where GND (0V) and ADC-IN (scaled) would be attached to any two pair center-taps.

You'd want to use PoE magnetics or magjacks then, since those are designed to allow terminating all the signal pairs while allowing there to be a DC potential between pairs, and they also provide connections to the center taps of the transformer primaries - since PoE is "sent" down the wire as common-mode potential differences between pairs.

Conformant (i.e. standard) PoE is "inert" until the PSE detects a suitable PD, so if you detect no incoming power but a link partner is present, that would mean that if they are PSE then they are conformant, and then you could look for modern PSE through the autonegotiation channel, and perhaps fall-back to the 802.3af "simple resistor" PD indication. I don't recall offhand whether an 802.3af PSE needs to inform the link partner digitally about its capabilities - if it does, then you could basically forget about it until you get autonegotiation working and determine PSE only at that level. It also depends on how featureful you want your cable tester to be. It's not hard to have some resistors plugged into the circuit using opto-mos switches or similar, so pretending to be a simple PD is not hard.

  • \$\begingroup\$ Sniffing is certainly possible with a low capacitance stub to circuit detector \$\endgroup\$ Mar 14, 2021 at 3:19
  • \$\begingroup\$ Thnx for the extensive answer! That really helps a lot. Many things to investigate. I think I'll try to work towards a test setup and do some experimenting. I planned to do so already but wasn't sure about where I would get myself into. \$\endgroup\$ Mar 15, 2021 at 10:15
  • \$\begingroup\$ @TonyStewartSunnyskyguyEE75 It probably could use an answer of its own - lots to cover there. It's not trivial when the drop has to be kept in compliance with standard requirements. \$\endgroup\$ Mar 15, 2021 at 12:53

There is the part related to the protection against i) overvoltages, ii) large permanent or semi permanent voltages. Whereas i) may be solved by using some kind of surge arrester, ii) there is not much to do if someone applies some hundreds V differentially or towards ground.

  • Ethernet cable is rated up to about 75-80V, so would not a good idea to plug it onto 230Vac.
  • Insulation vs ground may be ensured only if you put galvanic insulation at input: transformer (hard if you have DC bias!) or, better, optocouplers. In reality digital isolators are based on magnetic coupling (integrated transformers), capacitive coupling (no real galvanic insulation, but electrical insulation yes), optocoupling.

(This was partially considered in past discussion: Designing an ethernet isolator )

Now, there are solutions at component level and full products to purchase.

  • At component level there are "digital isolators" with various insulation levels, from some hundreds V up to 5 kVrms (and more)**. For example: Silicon Labs SI8660-8663 delivers traffic at 150 Mbps; for 1 Gbps traffic there is e.g. Analog Devices ADN4655-4656. The vast majority is for I2C and SPI applications, so the number of channels; the available channels are e.g. 3 forward and 1 backward, due to the typical traffic pattern, but you can find some with 2 forward + 2 backward channels. They need an isolated DC/DC converter to separate your board from the outer side (the "dirty side"): some ICs come with an integrated Low-Drop Out voltage regulator for the two sides. **if you deliver a product electrical safety and insulation must be rated taking into account reinforced and double insulation, pollution degree, etc., so "5 kVrms" does not tell you all, and you need also information on clearance and creepage distance (and possibly coating your board). Take a look at thee old IEC 60950-1, that is still a good reference.
  • Full products for an already built system can be found googling "Ethernet galvanic isolator" (results are e.g. https://www.ttl-network.de/news-details/new-rj45-network-galvanic-isolator.html, https://www.pepperl-fuchs.com/global/en/classid_1942.htm, https://www.meilhaus.de/en/med-mi-1005.htm). Pretty sure quite expensive.
  • \$\begingroup\$ Thank you for the tips and the links, I will have look. \$\endgroup\$ Mar 15, 2021 at 10:19

That’s a good question(s)

So your design must be able to detect:

  • 48V of any polarity, unless you know for sure.
  • 1V RF signal
  • End to end pair Resistance by injecting V rise with low current source (diode tester like cct)

And not inject:

  • significant cable capacitance
  • Load impedance
  • Noise
  • ESD from cable charge voltage and triboelectric motion

Then you want to test if the line is :

  • open circuit
  • Low Impedance
  • Have a certain length from wire pair capacitance of ~ 100 pF/m (?)
  • By injecting a low voltage high R for voltage drop relative to pair and/or earth ground.
  • Inject a magic R at low voltage with high resistance at end and find the V/2 voltage at the other end with matched magic R values.

I leave the solutions to you.

E.g. Using back to back LEDs with 45k Ohm series you can see 1mA glow on a 10 Cd white LED, more current is possible but cable capacitance may be a lower impedance at 1Gbps Ethernet rates, so it must be short and near the plug.

Notice how I answer any design question with assumptions on good specs.you must learn to do the same then modify your specs before leaping over the cliff with hardware.

  • \$\begingroup\$ P.s. you don’t need a uC to do this. Ask about specific problems in design separately. Users here have a narrow tolerance to multiple questions, \$\endgroup\$ Mar 13, 2021 at 19:04
  • \$\begingroup\$ "So your design must be able to detect 48V of any polarity" - So my assumption that any PoE source will not switch on in absence of the right resistance is false? \$\endgroup\$ Mar 13, 2021 at 19:20
  • \$\begingroup\$ I haven’t read the standards on this \$\endgroup\$ Mar 13, 2021 at 19:28
  • \$\begingroup\$ PoE will detect if device supports PoE or not, and will not turn on. Unless it is injected with a passive injector. Or it is a telephone line with 48V. \$\endgroup\$
    – Justme
    Mar 13, 2021 at 20:55
  • \$\begingroup\$ @TonyStewartSunnyskyguyEE75 I highly suggest you connect a scope to the TX pair a network card on your PC, or on a network switch on your desk, to actually see for yourself what's going on. The only thing you'll see is the link pulses used to detect presence of the link and negotiate the capabilities with a partner, once a suitable partner is present. The "1V RF", 48V PoE etc. simply does not enter the picture without a valid link partner, except for legacy/non-standard PoE (like fixed 24V between TX/RX pairs). See: en.wikipedia.org/wiki/Autonegotiation \$\endgroup\$ Mar 14, 2021 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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