Close
0%
0%

Battery Ground Fault Detector

This design provides an alternative cost-effective method for protecting a grounded DC battery in a PV power system from ground faults.

Similar projects worth following
0 followers
The Battery Ground Fault Detector (BGFD) uses a current transformer to sense a fault current in the grounding conductor of battery systems used with solar installations. When a fault occurs it initiates a rapid shutdown of the system by opening the rapid shutdown circuits of the battery BMS and charger. This can reduce system cost & implementation by eliminating bulky ground cabling & bus bars prescribed by the National Electrical Code (NEC).

I designed the BGFD based on my personal experience of designing & installing a permitted off-grid solar system:

  • 7kW PV array (2 strings of 3.5kW each),
  • MidNite Barcelona charger,
  • Schneider Conext XW Pro 7kW inverter,
  • 30kW of Discover Energy AES LiFePo4 battery storage.

Disclaimer: I am not a licensed Electrician or PE and my experience is limited to working on the above. What I am presenting here is not recognized by UL or the NFPA (National Fire Protection Association - author of the NEC).

I'll start here by covering the BGFD and use the logs to in an attempt to explain the NEC requirements, the concerns with meeting them, and the alternatives (which led me to the BGFD).

So, what problem does the BGFD solve? Simply put, it provides ground fault detection for the battery system that could lead to equipment failure & fire; but unlike the NEC solution it allows the use of conventional gauge grounding conductors (typically 6 AWG) which in turn allows the use of the grounding bus bars found in AC distribution panels (the 'star' grounding point). All of this results in a simpler, safer, and lower cost system.

BGFD Specifications

  • Supply operating voltage:  20-80V DC
  • Supply maximum continuous current:  35mA @ 20V DC
  • Sensor operating frequency:  24kHz
  • Trip (fault) current:  Approximately 3A
  • Response time:  7mS
  • Number of shutdown circuits:  2 (isolated)
  • Shutdown circuit max voltage:  30V DC
  • Shutdown circuit max current:  500mA
  • Shutdown circuit max power:  15W
  • Operating temperature:  -25C - +70C
  • Enclosure rating:  NEMA 1, indoor

Description & Operation

The system consists of the magnetic sensor (toroid) and control unit. The control unit is designed to be powered directly from 24~48V battery systems. The control unit contains a normally open (NO) 2-pole relay to accommodate two rapid shutdown circuits. During normal operation the relay is energized to close the rapid shutdown circuits. When a fault occurs the relay opens to initiate rapid shutdown. 

The response time, from start of the fault event to relay opening, is 7mS. The relay remains open until the Reset button is pushed or the unit is power-cycled (and the fault has cleared). When powered by the battery system it is protecting, the unit will power down when a fault occurs. There is no advantage to powering the unit from an alternate source since operator intervention is required to restart the system.

For safety, when the unit loses power/is off the relay’s shutdown circuits are open to prevent the system from starting. The Bypass switch is used to bypass the relay (e.g., close the rapid shutdown circuits) to allow system startup.

LEDs provide operating status:

  • Status is on when the unit is powered and there is no active fault.
  • Trip illuminates when a fault has been detected (the relay is open).
  • Bypass indicates that the bypass switch is active. Detected faults will not initiate a rapid shutdown (but the Trip LED will illuminate).

There isn’t a built-in test function since there is no way to properly include the sensor in the test.

Recommended test procedure

  1. Place the unit in bypass.
  2. Pass a section of wire (2~3ft) thru the toroid.
  3. Short the ends together.
  4. If the unit is operating properly the Status LED will turn off and the Trip LED illuminates & remains on.
  5. Remove the wire & confirm the status LED turns back on.
  6. Press the reset button to clear the trip (Trip LED turns off).
  7. Switch off bypass.

Note that this system is a detector and not an interruptor: it initiates the interrupt by opening the rapid shutdown circuits but relies on the source equipment to complete the interrupt operation.

Installation

  1. Shut down the battery & connected equipment.
  2. Connect the ground fault detector V-/+ terminals to the battery bus via 20 AWG wire and a 2A fast acting fuse.
  3. Route the battery grounding conductor thru the sensor and connect its leads to the sense terminals (polarity doesn’t matter).
  4. Connect the shutdown circuits to the SD1 &...
Read more »

bgf-kicad-260829.zip

KiCad 9 PCB project.

Zip Archive - 492.06 kB - 09/10/2026 at 20:42

Download

bgf-schematic-260829.pdf

Project schematic.

Adobe Portable Document Format - 139.41 kB - 09/10/2026 at 20:42

Preview

bgf-enclosure-hwr_260829-polycase-sl_42f-.pdf

Dimensional drawing for enclosure machining.

Adobe Portable Document Format - 27.36 kB - 09/10/2026 at 20:42

Preview

  • NEC Requirements Analysis

    Brian Cornell25 minutes ago 0 comments

    The National Electrical Code is comprehensive, constantly evolving, sometimes difficult to understand, and often hotly debated. In my limited experience of reading it & the message boards of professionals, grounding of battery systems is one such area.

    Article 690 specifically deals with residential & light industrial PV implementations but ignores batteries. I suspect this is because until recently most installations were grid-tied only. You have to go to Article 250 to divine requirements for battery-derived DC systems under 1.5kV. For my analysis, the most relevant sections are:

    • 250.6 Objectionable Current (defined qualitatively; no quantitative limit),
    • 200.7 Means of Identifying Grounded Conductors,
    • 250.28 Main Bonding Jumper and System Bonding Jumper,
    • 250.102 Grounded Conductor, Bonding Conductors, and Jumpers,
    • 250.162 Direct-Current (dc) Circuits and Systems to Be Grounded,
    • 250.164 Point of Connection for dc Systems,
    • 250.166 Size of the dc Grounding Electrode Conductor,
    • 250.167 Direct-Current (dc) Ground-Fault Detection,
    • 250.168 Direct-Current (dc) System Bonding Jumper.

    250.162 specifies that DC systems between 60 & 300 volts must be grounded, and 250.164 & 250.166 go on to specify the location & size of the grounding conductor. This implies that 48V battery systems are excluded. However, these systems are typically operating at 53~56 volts with the ability to instantaneously source >1kA, and the safety risks of allowing them to float merit strong consideration for grounding (these voltages can be lethal).

    250.167 indicates that ground fault detection is permitted for DC grounded systems, and Article 1 defines Ground-Fault Detector-Interrupter, dc (GFDI) as “A device that provides protection for PV system dc circuits by detecting a ground fault and could interrupt the fault path in the dc circuit”.

    The methods prescribed in the details above rely on the equipment circuit breakers (CB) to open in the event of a ground fault short, and since these CBs are sized for system capacity - typically 100's of amps - the grounding conductors must be sized to that of the ungrounded conductors - typically 2/0 AWG or larger depending on the system's capacity (a 2/0 wire is 0.364" without insulation). This further implies that the Equipment Grounding Conductors (EGCs) on all associated equipment - inverters, chargers, etc. - should be sized accordingly since it's expected that the grounding system be capable of supporting the full system load.

    That's a lot of copper that will easily double the size of required conduit and mandate a grounding bus bar outside of the usual AC CB enclosure grounding block (termination lugs use 3/8" bolts). This adds bulk & cost (3/0 AWG welding or MTW is ~ $6/foot right now), and most importantly does not address what I believe is the most likely fault scenario: a moderate impedance short.

    I define this as a short that conducts enough current to go unnoticed for some time (e.g., no immediate equipment failure, no CB trip), but risks fire thru arcing & heat generation.

    Alternative Methods

    Many BMS & chargers implement a rapid shutdown circuit that operates when a low voltage circuit is opened (the term “Rapid Shutdown” as used here addresses one aspect of the shutdown requirements specified in NEC Article 690.12, “Rapid Shutdown of PV Systems on Buildings”). These methods may permit the safe use of a 6 AWG stranded conductor to be used as the grounding conductor along with conventional bus bar grounding methods.

    This is the gauge typically used for equipment grounding conductors. From the Wikipedia wire gauge chart the 10s fusing current is 668A per Preece’s measurements, and Onderdonk’s 1s fusing current is 4kA. You will need to evaluate if a sufficient safety margin exists based on the total time to stop current flow in your equipment and what its maximum current sourcing capabilities are.

    A safe rapid shutdown requires disconnecting the DC energy sources, typically...

    Read more »

  • Design Considerations

    Brian Cornell2 hours ago 0 comments

    A Current Transformer (CT) was chosen for the simplicity of the design and ease of construction. It does, however, introduce some problems.

    1. A CT is an ampere-turn device, and fault transients will induce a current on the secondary proportionate to the number of turns and the voltage determined by the reset impedance. D105 & D106 clamp the voltage to ~ 9V which U101 can safely handle with support from R112 & D107. This arrangement also eliminates CT polarity requirements. The zener diodes must be able to absorb the current: with a 22 turn secondary, 250A on the CT primary is ~ 12A on the secondary.
      1. Note that a TVS is a better candidate for handling this much power, but they are many times more expensive than a pair of zeners. Be sure to evaluate that maximum fault current your system is capable of and adjust as needed.
      2. MOVs are not viable because of the spread between their rated & clamping voltages.
    2. A CT can also function as a transformer and impress a voltage on the secondary proportionate to the number of turns. This occurs with AC noise on the open primary, and is usually sourced from the inverter or charger (in that order). The resulting RMS value on the Sense(+) node can be substantial and will materially reduce the sensitivity of the integrator. C108 functions as a simple low-pass filter to reduce the noise profile to a level that maintains an adequate noise margin.
      1. The above trace shows the amplitude of the noise pickup on the unconnected secondary of the CT installed on my system's grounding conductor. The peaks are clamped by the zener diodes embeded with the CT.
      2. This trace shows the injected 24kHz signal with low-pass filter C108. This image was taken in the operating system with the inverter supporting a 3kW load.
    3. C108, D105, and D106 are deliberately embedded at the current transformer to minimize the current loop & noise footprint.
    4. Adjusting the number of turns on the CT’s secondary can be used to adjust sensitivity & current handling capability.
      1. Reducing the number of turns reduces the initial impedance and may require a higher drive. But, it also improves the signal to noise ratio and could improve sensitivity for lower power applications. The reset current will also be higher.
      2. Increasing the number of turns offers little advantage aside from reducing the reset current. Sensitivity will be reduced by a poor S/N ratio and a reduced impedance drop for a given fault current.
      3. Any changes to the number of turns will require adjustments to R112, R113, and R114. If R112 is changed make sure that the current thru it doesn’t exceed ~ 15mA at the 9V reset voltage.

    Electromagnetic Interference
    During normal operation, the unit impresses a 100mV, 24kHz, signal on the ground bus. If the ground bus is shorted (e.g., to create a conducting loop per the prescribed test procedure), a 100mA AC current will flow. The wavelength of a 24kHz signal is ~ 12,500 meters, so it is unlikely that the grounding system could function as an unintentional emitter. This said, be sure to evaluate your system for spurious operation.

    Component Tolerances
    Since the design is based on the integration of a fixed frequency halversine signal, it’s performance is susceptible to power supply accuracy and component tolerances. For these reasons precision resistors (0.05% tolerances) & C0G/NP0 MLCCs are used throughout much of the design. Prototype testing with X7R MLCCs demonstrated that the thermal drift from operating at higher temperatures (>35~40C) increased the integrator’s ‘normal’ (no fault) output which, at the extreme could cause a false trip

  • Theory of Operation

    Brian Cornell2 hours ago 0 comments

    Reference the schematic in the files section while reading this.

    The BGFD detector works on the principle of magnetic saturation in Current Transformer (CT) T101. Whereas a CT is normally used to sense alternating (or a pulsing DC) current, this application primarily relies on a DC current saturating the core and reducing its impedance to an injected AC signal on the secondary.

    U101A and its constituent components form a phase shift oscillator to generate a 24kHz AC signal centered on an offset voltage of 6V. This signal is amplified by U101B to provide the drive for the sense circuit. R112 provides current limiting so that a drop in the CT impedance results in a sufficient voltage drop, and C109 blocks the DC component from the CT.

    The CT’s secondary is connected across Sense(+) & ground. In the absence of a fault current or shorted primary, the impedance of the CT is high and there is little voltage drop in the injected signal.

    Since the design doesn’t use a bipolar supply, D107 blocks the negative component and U101C provides drive for the integrator, U101D. The integrator provides a DC signal that is an analog of the AC signal across the CT: a decrease in the CT’s impedance reduces the RMS value of the AC halversine at U101C’s output, thus increasing the integrator’s output at Sense_out.

    Comparator U102 compares the Sense_out value to that set by voltage divider R113 & R114 and goes high when exceeded. This reverse biases the Status LED, D102, and turns it off. Gate driver U103’s input is biased high, via D108, setting its output high. This reverse biases relay K101, which turns it off and opens the shutdown circuits. It also drives the Trip LED on.

    The combination of D108 & D109 ensure that U103’s positive feedback locks it on even if the fault clears. Reset button S102 can clear the Trip provided the fault has cleared (R115 shunts the charge at the Relay node). The Bypass switch SW101 is wired in parallel with relay K101 and is used during system startup or to bypass a trip. A third pole on SW101 activates LED D104 to indicate when bypass is active.

    The unit is powered by a non-isolated buck using the TI LM5017 that uses a fixed on-time heuristic switching algorithm. The supply comes out of UVLO at approximately 18V and provides a regulated 12V DC with input voltages up to 80V. Output ripple is minimized using current ramp injection to the feedback loop via R204, C207, and C206. The 6V offset reference is provided by the TI TLV766 LDO regulator.

    For safety, it is expected that the implementer will connect the unit to the system’s battery thru a dedicated & fuse (2A, fast acting) protected circuit.

View all 3 project logs

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates