Sheds, Barns and Detached Garages
Why this matters
A detached garage, a workshop, a barn or a backyard shed looks like a small job: run power out, maybe a water line, hang a heater. It is a separate building in the eyes of the electrical code (NFPA 70, the National Electrical Code), which changes how it is grounded and disconnected. The line to it runs underground, where burial depth and frost decide whether it lasts. It may or may not need a permit depending on its size and use. And it is where animals live: rodents in the walls, wasps under the eaves, birds and bats in the loft, livestock that feel voltages a person never notices. Most callbacks and failed inspections on outbuildings trace to one of those four, not to the trade work itself.
The electrical question: feeder or branch circuit
Power reaches a separate structure one of two ways, and the choice sets everything else.
A single branch circuit (one 20-amp circuit, say, or one multiwire branch circuit) for a few lights and receptacles. Under NEC 250.32 (in the edition your jurisdiction adopted), a building supplied by a single branch circuit that carries an equipment grounding conductor does not need its own grounding electrode. The building still needs a disconnecting means, which for a single circuit can be a switch or the circuit's own arrangement as the code allows.
A feeder to a subpanel when the building needs several circuits, a welder, a compressor or heat. Then three rules apply together:
- Four wires. Two ungrounded conductors, a neutral, and an equipment grounding conductor (EGC) run with the feeder. Since the 2008 NEC, new installations must carry the EGC; the old three-wire method, where the neutral was bonded to ground at the outbuilding, survives only for existing installations that met the earlier code and have no continuous metallic path (water pipe, metal conduit, phone shield) between the buildings.
- Neutral isolated at the outbuilding panel. The neutral bar floats; the bonding screw or strap is removed. Bonding neutral to ground at a second building puts neutral current on every metal path between the two, including the EGC, the water line and anything a person touches.
- A grounding electrode at the outbuilding, bonded to the subpanel's ground bar. A single ground rod must be supplemented by a second unless it is shown to have 25 ohms or less resistance to earth (NEC 250.53), which is why most electricians just drive two, spaced at least 6 feet apart.
And under NEC 225.32 the building needs a disconnect at the nearest point of entrance, inside or outside. A main breaker in the subpanel commonly serves.
HOUSE PANEL GARAGE SUBPANEL
N and G bonded here N bar floats, G bar
(the only bond) bonded to rods
| | |
====|====== grade ====================|========|======
| | rod--rod
+-- L1, L2, N, G in conduit ------+ (6 ft min
at the cover Table 300.5 apart)
sets for that method
How deep the line goes
Electrical burial depth depends on the wiring method, not the soil. NEC Table 300.5 sets minimum cover; the common residential cases:
| Wiring method | Minimum cover |
|---|---|
| Direct-burial cable (such as UF) | 24 inches |
| PVC conduit listed for direct burial | 18 inches |
| Rigid metal conduit | 6 inches |
| 120-volt, 20-amp-or-less residential branch circuit, GFCI protected | 12 inches |
Cover is measured from the top of the cable or conduit to finished grade. Under a residential driveway, the table requires more cover for most methods. A run that comes up out of the trench needs protection from damage where it emerges, usually conduit to the panel or the building.
Water lines go below the frost line, which is a different number entirely and is set locally. Frost depth ranges from about a foot in the Deep South to five feet or more in the northern tier, and your building department publishes the local figure. A barn hydrant needs a frost-free design with its drain valve below frost and a gravel bed for the drain water, or it splits the first hard winter.
Gas lines to a garage heater or a barn: buried polyethylene with a tracer wire and a riser at each end, at the depth your adopted fuel gas code sets (commonly 12 inches under the International Fuel Gas Code). Metallic pipe underground needs corrosion protection.
Before any trench: call your state's one-call (811) center, which most states require a few business days before digging. Private lines a homeowner installed (a well line, an existing UF run, an invisible dog fence) are not marked by the utilities; ask the owner and expect surprises.
Permits: the building and the trades are separate questions
Building codes based on the International Residential Code exempt small one-story detached accessory buildings from a building permit: IRC R105.2 sets the exemption at 200 square feet of floor area for tool and storage sheds, playhouses and similar uses, though jurisdictions amend it and some set a lower figure. That exemption does not cover the electrical, plumbing, gas or mechanical work inside the building. A permit-exempt shed with a new feeder still needs an electrical permit.
Agricultural buildings are a second wrinkle. Many states exempt farm buildings from the building code, sometimes from inspection entirely; whether the exemption reaches the electrical work, and what counts as agricultural, varies by state and sometimes by county. A horse barn on a hobby farm may not qualify. Ask the building department rather than the owner.
The animals
Livestock and stray voltage. Cattle, horses and pigs react to voltages between a waterer and the floor far smaller than a person would notice, and a dairy herd that stops drinking is a production loss. NEC Article 547 governs wiring in agricultural buildings, including equipotential planes (bonded reinforcing mesh in the floor around waterers and feeders, so the animal stands at the same potential as what it touches) in livestock confinement areas. A three-wire feeder with the neutral bonded at the barn is a classic stray-voltage source.
Rodents. Mice and rats chew cable insulation. In barns and sheds, run cable in conduit where it is exposed. Mouse droppings and nests carry a hantavirus inhalation risk: the CDC's cleanup guidance is to air the space out for at least 30 minutes, spray droppings with a disinfectant or a 1-to-10 bleach solution, let it soak 5 minutes, wipe up with paper towels wearing gloves, and never sweep or vacuum dry droppings.
Birds and bats. Accumulated droppings in lofts and on beams can carry the fungus behind histoplasmosis, another inhalation route. NIOSH guidance is to wet down accumulations before disturbing them and to wear respiratory protection matched to the amount; a heavy accumulation is a job for a cleanup contractor before your work starts.
Stinging insects. Wasp and hornet nests in panel enclosures, eaves and unused boxes are routine. Open any outdoor enclosure slowly, with the door between you and it.
Worked example: power and water to a detached garage workshop
An owner wants a 60-amp subpanel in a detached garage 90 feet from the house panel, for a table saw, lights, receptacles and a small heater, plus a frost-free hydrant beside the garage door. Local frost depth, from the building department, is 42 inches.
Electrical choices. Several circuits means a feeder, not a branch circuit. The electrician runs PVC conduit at 18 inches of cover, because direct-burial cable would need 24 inches and the owner's soil is rocky. Four conductors in the conduit. At the garage: a subpanel with a main breaker as the building disconnect, neutral bar isolated, two ground rods 6 feet apart bonded to the ground bar. At 90 feet the electrician runs the voltage-drop calculation for the saw's starting load rather than guessing, and upsizes the conductors one size when it comes back marginal.
Water. The hydrant line has to sit below 42 inches. The electrical conduit only needs 18. The plumber digs to 42 inches and beds the line, and the electrician's conduit goes in a separate shallower trench, because the two trades' codes and the inspector's preference on separation decide whether a shared trench is acceptable, and the owner did not want to find out at inspection.
Permits. The garage is 480 square feet and already permitted; the feeder and the water line each need their own permit. The one-call center was notified before either trench.
What would have changed it. A garage on a single 20-amp circuit for lights and two receptacles would have needed no ground rods, and GFCI protection could have allowed 12 inches of cover, a much smaller job. An existing three-wire feeder with a metal water line now running between the buildings would have a continuous metallic path, so the old-installation allowance no longer fits and the feeder should be upgraded to four wires.
The failure mode: the subpanel installed with the neutral bonded because "that's how panels come." It works, passes a casual test, and puts neutral current on the new water line and every metal path back to the house.
References
- NFPA 70 (National Electrical Code), in the edition your jurisdiction adopted: 225.32 (disconnect), 250.32 (grounding at separate buildings), 250.53 (rod supplementation), Table 300.5 (burial depth), Article 547 (agricultural buildings).
- International Residential Code R105.2, as adopted and amended locally: permit exemptions for accessory structures.
- CDC guidance on cleaning up after rodents; NIOSH guidance on histoplasmosis.
- See related: Rural Properties and the Self-Reliant Homestead.
- See related: Private Wells and Septic for Non-Specialists.