Electrical Building Code
All the things you need to know to wire your house to pass an electrical inspection.
These snippets come from the IRC 2009 rules (which come from NEC 2008 rules (National Electrical Code, but note that building codes vary in different local areas so you will need to do your own checking up on codes in your area. Also, this is just a few of the building codes that caught my eye and appeared relevant to my case. It is not a full set, so you should consult a full code book to make sure you meet all the codes. Also note that building codes get updated every few years.
You are required to have good access to both main panels and sub-panels. You need 3 clear feet in front of the front face of the panel (a bit extra if you have railings). You need the space in front to be at least 2'6" wide (evenly distributed either side of the panel, ie at least 6" either side). The working space in front must be at least 6'6" high with no plumbing pipes or any other wet stuff above or below. Code says "The service disconnect must be readily accessible and when installed inside the house must be near to where the service conductors enter the building".
In my case the main panel and the service disconnect main switch is in the yard.
When wiring for 240V, ie using two Live wires, the Neutral must be the same gauge as the Live wires. The Earth can be thinner, eg #4 for a 200A feed.
Personally I recommend making the Earth the same size as the other wires.
Electrical cable buried in the ground (eg in conduit) must be at least 18" below grade.
IRC 2009 requires you to use tamper proof power outlets everywhere.
The 2005 NEC states that AFCIs must be placed on bedroom power and lighting circuits. As of the 2014 version of the NEC, AFCI protection is required on all branch circuits supplying outlets or devices installed in dwelling unit kitchens, family rooms, dining rooms, living rooms, parlors, libraries, dens, bedrooms, sunrooms, recreation rooms, closets, hallways, laundry areas, or similar rooms or areas.
Breakers that are either 15A or 20A (except for the exemptions given below) must all be "AFCI" (Arc Fault Circuit Interrupter).
These special breakers have a test button and a separate neutral
wire. They detect if there is any unintended arcing occurring
that might cause a fire. As of January 2008 only "combination
type" AFCIs will meet the NEC requirement. The 2008 NEC
requires the installation of "combination type" AFCIs in all 15 and
20 amp residential circuits with the exception of laundries,
kitchens, bathrooms, garages and unfinished basements.
Combination AFCIs provide for series arc detection down to 5 amps. This series arc detection is beneficial to detect lower level arcing in both branch circuits and power supply cords. Combination AFCI protection is required by the NEC as of January 1, 2008.
An AFCI can be used in conjunction with GFCI protection to provide both arcing fault protection as well as 5mA ground fault (people) protection. A common way to provide both types of protection is to use an AFCI circuit breaker and a GFCI receptacle (as the first outlet in the chain). AFCI's can also incorporate 5mA GFCI protection into the same package, but this is currently not commonly available.
GFCI outlets are required in lots of places around the house.
I recommend that you use a GFCI outlet as the first outlet on all chains of power outlets and connect all the other outlets in the chain to the load terminal of that GFCI socket. This way all outlets in the house will be protected and therefore safer. They typically have a green LED that shows if they are working.
You can use GFCI breakers in your electrical panel but they are expensive compared with GFCI outlets and you will have to run back to the panel every time they trip. Also you will need AFCI breakers in your electrical panel.
The GFCIs should be tamper proof 20 amp. All the downstream power outlets should be 15 amps. The wiring must be 12-2 (ie 20 amps). Using 20 amps rather than 15 allows more outlets in a chain and may actually work out cheaper than using 15 amp (less runs back to the electrical panel).
Outside power outlets must also be weatherproof as well as tamper proof. It's also good to use weatherproof in wet rooms such as bathrooms.
In a residential house there is (currently) no limit on the number of power outlets or lights that can be in a chain, ie connected to one run back to the electrical panel. This great because I like to have lots of power outlets in convenient places and in practice only 10% get used at any one time.
Try to have a separate run to each room and then just provide plenty of convenient sockets in that room off that run. Larger rooms may need 2 runs in order to give you enough total power for the room.
In a kitchen by code you need at least 2 electrical chains of power outlets. They all need GFCI protection (can be shared using the load terminals on the GFCI outlet that is the first outlet in the chain). All places on the counter top must be within 2 feet of a power outlet. Separate feeds are required to permanently installed appliances (eg dishwasher, eg fridge)
It is worth having power outlets every 2 feet above all counter tops (ideally even more). Don't scrimp because kitchens have lots of plugin appliances and will have even more in the future.
Code requires one power outlet within 6 feet of a door and every 12 feet thereafter. Any wall that is 2 foot or wider needs an outlet. "A receptacle outlet must be installed in every kitchen, family room, dining room, living room, den, bedroom, or recreation room so no point along the wall space will be more than 6 ft from a receptacle outlet. ".
Power outlets that are in the same chain (ie same feed from the panel) are relatively inexpensive so it is worth exceeding the minimum code requirement significantly. Having lots of outlets is a much appreciated convenience.
Cable through studs must be at least 1.5 inches from the surface of the stud. That means that on a 2x4 stud the hole for the wire must be exactly in the center of the stud. If this is not possible due to some obstruction then metal protection plates must be installed.
In my case the 2x4s are installed flat faced, ie they are only 1.5" thick (rather than 3.5"), but they are installed over the polystyrene of the ICF, so the polystyrene can be cut away to route the wires.
Cable must be clamped (eg using an insulated staple) within 8" of an electrical box.
Even though not explicitly stated, my assumption is that the insulated staple should be at least 1.5" in from the inside face of the drywall. After the polystyrene is cut away it should be possible to nail into either the concrete or the ICF plastic webbing.
Cable must be secured (eg using an insulated staple or by routing through a hole) at least every 4.5 feet.
I try use staples sparingly because it makes wiring electrical boxes harder, so I tend to wait until the inspector insists on it in a particular situation.
All cable joins require boxes and the boxes need to be accessible. If a wire is not long enough then you need to pull it all out and replace it with a new wire.