I test fit a few panels before doing the wiring in order to be certain about where things would be placed and routed, but most of those were removed and replaced before the job was done. Just pretend you don’t see any panels in these photos.
Wires
Section 690 of the 2008 National Electric Code (NEC) deals entirely with photovoltaic systems. Read it before you do any planning, then read it a few more times to make sure you understand what is required. Each of my panels came fitted with a 30″ positive lead, and a 72″ negative lead. These leads are made from #12 USE-2 wire and terminated with MC4 connectors.

It is perfectly fine to leave these wires and connectors exposed on the roof, but once you leave the vicinity of the array, it’s a good idea to transition to THWN-2 in some type of conduit. USE-2 is more expensive than THWN-2, so it may also be cheaper to do this. Some people go into their roof at the transition point, but I wanted to keep the wires outside of the house until I could route them through a disconnect switch. It is legal to route them directly into the house, but they must be in metallic conduit until they reach a disconnect switch.
Schematic
It might be helpful to look at the schematic I posted earlier while reading this post:

Panels
The array consists of 26 185W panels arranged as two parallel strings of panels. Each string has 13 panels connected in series. This means that the positive terminal of one panel is connected to the negative of the next, and so on for 13 panels. This leaves an open negative terminal at one end of the string and an open positive at the other. As you can see in the photo at the top of the post, one wire has a socket, and the other a plug. Connecting panels to each other is as easy as plugging one into the next. The connectors are watertight and lock together once connected. A special tool (or a flat head screwdriver and some wiggling) is required to disconnect them.
The inverter used in my design requires at least 235VDC to operate efficiently. When panels are placed in series, their voltages add up. The resulting voltage is dependent on many things like temperature and solar irradiation, but for the sake of simplicity assume that each of the panels produces 24V. 13 panels x 24V per panel = 312V for each string. I could run the inverter off of a single string of panels, though it would only produce 2405W of power. When two strings are combined in parallel, the voltage stays the same, but the current doubles, doubling the power. Even though the strings are combined in parallel, the wires from each string are kept separate until they reach the inverter.
Grounding
The frames of the panels and the exposed metal racking all need to be tied to ground. I used bare 7 strand #6 wire for the exposed portion on the roof and by the ground rod, and #6 THHN for the wire in the conduit.
Panels
The panels have a frame made out of black anodized aluminum. Think of it as a coat of paint. In order to make a good ground connection, you must get past this layer to the bare aluminum below. To do this, I bolted a grounding lug to the frame of each panel with a star washer between the two.

Bolt, Lug, Washer and Grease
Here’s the whole assembly:

The bolt goes through the lug, then the star washer, then the panel, then the flat and lock washers, then finally the nut
The star washer cuts into the lug and panel frame when it is squished between them as the bolt is tightened, creating a solid ground path between the two. The fastening hardware is all stainless steel, and dielectric grease is used around the star washer to help maintain a good connection. Here’s one installed on a panel:

The bare ground wire passes through the “U” channel in the lug. The set screw is used to securely bond the wire to the lug electrically.

This ground wire is bonded to the solar racking as well.
Racking
The racking is also made out of aluminum, which is a great electrical conductor until it oxidizes. The oxide layer actually protects the underlying metal by preventing further oxidation, but it strongly resists the flow of electricity. Because of this, each section of rail has to be electrically bonded within a row, and each row has to be bonded to ground. To bond each rail segment, as well as add strength to the splice points, I used short jumpers made of #4 THHN with ring lugs crimped on each end. These were attached to each side of the splice using a self tapping screw, with a stainless steel star washer placed between the ring lug and aluminum rail.

Each rail was grounded to the next using a grounding lug. At places that 3 wires came together I had to solder a clamping lug to the top of the ground lug and bolt both to the rail together. A set screw is used to clamp the wire in place.

With the rail segments connected, and the end of each rail grounded, I checked the other end to see if the connections were good.

0.000 means no resistance, or good to go.
Earth
All of the grounded components are connected to a single #6 THHN ground wire that travels in the conduit with the other conductors down to the side of the house.

I’ll get to the disconnect in a bit, so ignore it for now. Inside the disconnect box the ground wire from the roof gets connected to another section of bare 7 strand #6 wire. The other end of this wire gets attached to an 8′ copper coated rod driven into the ground.

Lots of pounding later
I recommend putting the clamp on before you start driving in the ground rod. I had to cut the top off of mine to get the clamp on because it had flattened out so much.
Wiring
Conduit & Pulling Wire
Here’s the pile of wire and conduit:

120′ of bare 7 strand #6 copper, 90′ of #6 THHN,
65′ of 3/4″ liquidtight flexible metallic conduit (LFMC),
and the spool in the middle is 500′ of #10 THWN-2.
I was originally planning on using 3/4″ EMT conduit, which is about $3-4/10 ft. section. The LFMC was $1.34/ft but has several advantages over EMT.
LFMC is a plastic coated, coiled self-interlocked ribbed strip of metal (usually aluminum or steel) that forms a tube. EMT is sections of galvanized rigid steel pipe. In order to route EMT, it must be bent, either by hand (hard to make it look good) or with a $40 tool. Connectors (liquidtight for this application) can also be used to change the direction of the EMT, and must be used to join two sections of piping. Each of these liquidtight connectors cost more than the EMT itself, and are still prone to letting water into the conduit. EMT is galvanized to prevent rust, but it is doubtful that this coating would last the expected lifetime of the solar panels. Pulling wires through EMT can also be challenging.
LFMC is UV resistant plastic coated, making it sun, rust and water resistant. It can be bought in very long lengths, eliminating the need for joining connectors, and since it is flexible, it requires no special tools or connectors to bend. Having one continuous length drastically cuts down on the number of places water can get in. Since LFMC can be installed as a continuous run, it’s possible to pull wires through it before installing it, which is what we did. You can also route it as you go, rather than having to measure, cut, and attach each piece of EMT.

My anaconda don’t want none unless you got liquidtight compression fittings hun.
As I mentioned, we pulled the wires through the conduit before installing it. For my system the conduit contains 5 wires – 4 x #10 THWN-2 (2 for each string of panels) and a single #6 THHN ground wire. I cut the wires to length leaving plenty of extra, then gathered up one end of each of them, and taped them all together. I then tied a bit of plastic bag to a string, put it in one end of the conduit, and had Mariah turn on a shop vac attached to the other end to suck it through the whole length. Once the string was through, I tied and taped it to the end of the wires. We laid the conduit out as a long straight line, and ran the wire through it with one of us pulling on the free end of the string while the other fed the wire into the conduit and pushed it along. After the wire was through, I coiled the conduit/wire back up and took it up onto the roof.
Down the Roof
The conduit needed to run from the termination point of the strings (the top middle of the array), across the roof, and down the side of the house. It also needed to be elevated above the surface of the roof to keep it cool and prevent it from acting like a dam when rainwater is running down the roof. Luckily, the solar panel racking worked perfectly as a place to mount the conduit:

Standard PVC clamps were used with stainless steel fasteners to attach the conduit to the rails as it ran down the roof.

Across the Roof
After running the conduit down to the lowest rail, I ran it across the roof toward the chimney side.

The conduit fit perfectly on the rail. It is just low enough to not interfere with the panels sitting flush to the rail, and the lip of the rail is wide enough to easily hold the conduit. All I had to do for this portion of the run was cable tie the conduit to the rail to keep it secure.
The rail did not go all the way to the edge of the roof, so I had a gap of 7 feet or so to cover before the conduit could run down the wall. The conduit still needed to be elevated above the roof, and after some head scratching I came up with this solution made largely out of extra racking parts:

This consists of a 3/4″ metal conduit clamp screwed into the underside of a panel mid clamp. I cut 2/3 of the sides off of a splice piece to make it flat, and screwed the mid clamp to the other 1/3. I then drilled a couple holes into the flat part. The flat part is designed to slip under a shingle and attach to the roof via screws through the drilled holes. This way the shingle protects the screw holes from water. The conduit then sits in the clamp on top. Here they are installed:

Disconnect Switch
After running the conduit to the edge of the roof, I lowered it over the side and down the outside wall near the service entrance. I trimmed the considerable extra conduit and wire, still leaving plenty to work with.

The conduit coming off the roof will eventually be connected to a disconnect switch mounted on the outside wall of the house. From here, another section of conduit will take the wires through the wall and into the corner of the basement to connect with the inverter. Starting in the basement, I drilled a hole through the wall to the outside, then went outside and widened it to fit the conduit. The spare chunk of conduit that I cut off earlier was pulled through the wall, with only a small portion left outside.

I attached a 90° liquidtight compression connector to the end of the conduit, then pulled the rest of the conduit inside so that the connector was flush with the wall. Before doing so, I filled the opening in the wall with caulk so that it sealed the connector-wall gap after the conduit was pulled tight. The other end of the 90° connector enters the bottom of the disconnect switch box via a knockout. The box is then attached to the wall.

Here you can better see it coming into the box. You can also see the bare ground wire leaving through a small hole in the bottom.

I trimmed more conduit off of the length hanging from the roof and fitted a straight through liquidtight connector to it, which was used to attach it to the disconnect switch box through a side knockout.

I ran the extra ends of the wire trimmed from the section coming off the roof through the conduit section going into the basement. I left them loose in the basement for now, then went back outside and wired up everything in the disconnect switch box.

The white wires from the roof (String 1-, and String 2-) are the grounded conductors in my system, and are simply joined to the white wires going into the basement with wire nuts. Similarly the ground from the roof, ground to the outdoor rod, and ground to the basement are all joined together and to the metal box with grounding lugs. The black wires are the ungrounded conductors . They come down from the roof with each one going to a separate Line side pole of the disconnect switch. The Load side pole is then connected to a black wire going into the house. This allows me to easily disconnect the dangerous the array from the rest of the system in case I need to work on it or there is an emergency. The inverter uses the exact same switch, so this was not a code requirement – I could have just run the wire directly into the house to the inverter.
Transition Box
Back up on the roof, the start of the conduit was still open with extra wire hanging out. This is the point where the USE-2 wires with MC4 connectors from the two strings of panels transition to THWN-2 inside the conduit. To accomplish this, I used a weatherproof enclosure and some special fittings to make a transition box. I then cut a couple short MC4 extension cables in half, and fed the cut ends into the box.

This picture is taken from the top of the array, looking down toward the gutter.
The box sits just above the top row of panels, in the middle.
The fittings have a rubber sphincter in them that clamps down on the wire as the end of the fitting is tightened. I ran the #6 ground wire through one, and the 4 USE-2 ends through the other. The bare ends of the USE-2 was joined to the conduit’s #10 THHN in the transition box, as well as joining the bare and THHN grounds. The conduit exits the gutter side of the box and continues on as you saw above.
The ends of the strings then simply plug into the transition box.

The wires coming into the basement are headed for the inverter, but that deserves a new post.