I'd like to measure voltage and current for a mains circuit using a microcontroller, and connect this to ethernet. Since I want to have 8 independent outputs, using an isolation transformer to measure the current for each port quickly becomes expensive. So I thought of just using shunt resistors to measure both voltage and current. This is not a problem for the microcontroller, but it is when interfacing with the external world.

Then I remembered that Ethernet already has isolation. Specifications say ethernet connections are coupled with isolation transformers rated for 1500V .

I was wondering if this isolation is safe enough for a mains circuit? If so, I could build my circuit completely non-isolated and rely on the ethernet transformer for isolation. The device won't have any other means to interface with people (maybe just LEDs, but no buttons or knobs)


2 Answers 2


While technically Ethernet provides (barely) enough isolation, I would not rely on it to provide for your safety. You also have other issues to consider.

One issue is that the Ethernet transformer has a parasitic capacitor between the primary and secondary. If your MCU circuit jumps up 100-ish volts when you connect it to the AC line, a pulse will be sent out the Ethernet cable. Many devices have protection on their ports to prevent damage, but many devices don't. I have blown up many devices in this way.

Then there is your personal safety while debugging this type of circuit. One tiny slipped probe while debugging could make for a very bad day.

Of course your real problem is in doing current sensing without requiring expensive isolation transformers. I suggest that you look for hall effect current sensors. Here's a link to some.

  • \$\begingroup\$ Thanks. I didn't think about the capacitance, you're right. The hall sensors look pretty good, unfortunately the only readily available one is 5V supply (damn arduinos!). I've moved to 3.3V long ago. \$\endgroup\$
    – hjf
    Commented Jun 1, 2013 at 4:17
  • \$\begingroup\$ @hjf Don't discount the hall effect sensors too quickly. There are many types and manufacturers. But even if you can't find a 3.3v one, odds are that a 3.3v to 5.0v converter is still cheaper and smaller than most other solutions. \$\endgroup\$
    – user3624
    Commented Jun 1, 2013 at 4:26

In theory what you propose is fine. Truly complient ethernet transformers need to be rated to high enough voltage. Of course to make proper use of that you have to consider spacing and creapage distance when designing the PCB.

The problem may be getting others to accept this. If you are going to sell this device, then others will probably want to see NRTL approval. I don't know if ethernet transformers are available with a UL or similar rating or not. Maybe they are and this is no problem, but I have never had to look for that before.


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