Can someone suggest me a circuit to detect the earth to neutral voltage? I would like to trip a relay coil using a microcontroller if the earth to neutral voltage exceeds 3 V.

There are RCB and RCBO devices which serve for overcurrent protection in these cases. If I would like to achieve this using a PIC or Arduino microcontroller, how can it be done? Please show me a simple circuit or application to get started.

  • 1
    \$\begingroup\$ Why do you want to use a microcontroller? Is it DC or AC voltage detection? RMS or peak? Ever heard of a comparator? \$\endgroup\$
    – Andy aka
    May 11, 2018 at 15:29
  • 4
    \$\begingroup\$ Whatever you do, don't forget to consider that you can't assume neutral is near earth potential. Isolate your measurement from your system and make sure there's protection circuitry. \$\endgroup\$
    – Hearth
    May 11, 2018 at 15:31
  • 2
    \$\begingroup\$ @Andyaka nah it's all about DSP these days, he needs an FPGA in there (/s) \$\endgroup\$
    – BeB00
    May 11, 2018 at 15:47
  • \$\begingroup\$ There used to be a device called a VOELCB (voltage operated earth leakage circuit breaker), to perform this function. They were normally set to trip at no more than 48V AC. Inside the device was an electromagnet and a switch. They were used before microcontrollers even existed. \$\endgroup\$
    – Simon B
    Aug 11, 2021 at 10:34

3 Answers 3


Firstly make sure you understand exactly what you are trying to sense and why. This Megger document may help you.

Earth and Neutral would normally be bonded at the mains distribution box (power entry) on a building. At this point there obviously should never be a potential difference between Neutral and Earth wires.
Further into the building the N-E potential WILL vary because Neutral carries a current for all loads, and Earth does not.
It's common practice to test the N-E voltage in hospitals, where grounding a patient could be deadly. For this reason medical equipment AC wiring is locally bonded to reduce risk.

Your idea to produce a monitor that triggers a relay trip coil may not be a great idea, unless the unit is separately battery powered (a poor idea in general).
You need to write some specs for what you want to do.

Ask yourself some questions about your functionality:

  1. What are you protecting against?
  2. Is this transient or permanent protection?
  3. What values represent a trip point? (3V is already a dangerous difference if humans are involved)
  4. How will the system be reset after a detection/fault?
  • \$\begingroup\$ I would like to detect this 3V. Yes its to indicate human being its being danger ,thats reason i wanted to use buzzer for indication purpose, its permanent protection, Like wise in RCD where if phase is balance relay will not trip , if phase unbalance relay will trip. In this case if potential difference is 3v or more trip the relay( Basic Idea) . so is there way can be done through electronic ti.com/lit/an/sboa199/sboa199.pdf \$\endgroup\$
    – user50949
    May 12, 2018 at 1:12
  • 1
    \$\begingroup\$ You need power to trip the relay. That's why the earth leakage detectors use current control. You can't guarantee you have any power to trip the relay unless you can draw power from the N-E voltage source. \$\endgroup\$ May 12, 2018 at 2:42
  • \$\begingroup\$ Is there any way to detect it?? is there any isolated sensor available?? RCB & RCBO are more protective , if any Ic detect like mentioned in my previous comment \$\endgroup\$
    – user50949
    May 13, 2018 at 2:30
  • \$\begingroup\$ what would be difference between ground fault and neutral fault .why cant use GFCI?? weather these relay reliable for sort these kind of issue> \$\endgroup\$
    – user50949
    May 16, 2018 at 7:11
  • 1
    \$\begingroup\$ Earth being locally bonded to neutral is only true in North America. In Europe it's much worse. youtube.com/watch?v=JRHyqouJPzE \$\endgroup\$ Jun 23, 2023 at 23:35

Neutral and earth are most often (but not always) bonded at the panel.

The neutral vs. earth shift seen at a plug is caused by IR drop in the wiring, and will vary with load. The limits on drop are determined by electrical codes. Short answer from NEC: 3% or less for branches off feeders, 5% or less for worst-case drop at max current.

For a 120V line then, you are allowed as much as 3.6V for a branch, 6V total.

If your drop is exceeding these limits, and your breaker isn't tripping, then one or both of these two things is going on:

  • The breaker is faulty
  • The wire is faulty (has bad connection causing additional IR drop)

Both are dangerous conditions, something an electrician can check.

Related answer: https://diy.stackexchange.com/questions/10909/acceptable-ground-to-neutral-voltage

RCDs and RCBOs (GFCI's and GFCI breakers in the US) monitor the neutral and hot current going to a circuit, and sense any imbalance between them: the imbalance is directly proportional to fault current, and is what trips the device.

RCDs and RCBO's (breakers) don't need to look at voltage at all, and thus don't care about the neutral-to-earth voltage. They don't even need a ground to to their job - this is the case for panel-mounted RCBO breakers.

It's certainly possible to measure neutral-to-earth and monitor this voltage and use this to initiate a disconnect. But... why? What are you protecting against? Again, if excess neutral-to-ground voltage is a problem, it's time to call an electrician.

One more thing: on some feeders, newer codes call for an AFCI (Arc Fault Current Interrupter), which detects current variations characteristic of arcing.

More about those here: https://www.afcisafety.org/afci/what-is-afci/


I would like to trip a relay coil using a microcontroller if the earth to neutral voltage exceeds 3 V

Use a 3V-rated-coil relay. Such relays trip at a bit lower voltage, but the coil is for DC operation and will buzz with AC. So, with a rectifier bridge and a rudimentary voltage regulator, the relay will trip close to 3V. No need for even a comparator. The circuit will be fairly robust, and won't need a separate power supply.


simulate this circuit – Schematic created using CircuitLab

Q1 should be a 450V-rated PNP transistor in TO-220 package. It is a pass transistor in a basic low dropout voltage (LDO) voltage regulator. The relay will trigger around 3Vrms between N and PE. To change the trigger point, adjust R5 to set the output voltage equal to rated coil voltage, and use a slightly higher coil voltage relay.

The LDO is there only to protect the relay coil from overload. If the trip condition is expected to last a long time, Q1 will be dissipating a fair bit of power. An NTC could sense its temperature and shut the regulator down. Unfortunately, protection then would be lost.

Since mains is available, a better circuit would use the mains supply to generate a supply voltage for the relay, so that the LDO would not be needed. Instead, a simple 4-transistor comparator could trip the relay, or just a jellybean comparator chip.


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.