Garage solar looks simple until you meet the trench. See standalone vs. tie-in setups, battery picks, and the code rules that trip up DIYers.
You priced the panels. You picked a sunny spot on the garage roof. Then someone asked how the power gets from the garage to the house, and the whole plan changed. For most detached garage solar projects, the panels are the easy part. The wire is where the money, the permits, and the headaches hide.
To the electrical code, a detached garage is a separate building. That one fact drives almost every rule. Power that crosses open ground has to travel in a trench at a set depth. The garage needs its own shutoff and its own ground rods. The cable between buildings has to be sized for distance, not just for amps.
Many homeowners expect solar to cut that work out. Sometimes it does. Often it adds to it, because now power may need to flow both ways between the garage and the house.
Every garage solar plan falls into one of two camps:
Neither is better across the board. The right pick depends on what you run out there, how far the garage sits from the house, and whether you might move soon, since a solar lease clause can complicate a future sale if you lease rather than buy.
If your garage holds a few lights, a fridge, and a battery charger, a standalone system is often enough. If it holds a welder, an air compressor, an EV charger, or a heated shop, you will want the grid behind you. Big tools pull big startup surges, and small battery systems struggle to keep up.
Location shapes the permits and pricing too. Interconnection rules vary by utility, so an installer who already knows the local paperwork can save you weeks. Arizona homeowners can start by comparing top Phoenix solar installers before asking for quotes, since crews that handle outbuildings often catch trench and feeder issues early.

This is where most DIY plans stall. The panels bolt on in a weekend. The trench, the feeder, and the grounding can take longer than the rest of the job combined, so anyone comparing local solar installers in Phoenix or elsewhere should ask who handles that part. Here is what inspectors look for.
Burial depth depends on the cable type and what protects it. Common minimums under the National Electrical Code look like this:
Depths go up under driveways, and your city may be stricter. Always call 811 a few days before you dig so buried gas, water, and cable lines get marked. Hitting a gas line with a trencher is a bad day for everyone.
A detached building fed from the house needs a four-wire feeder. That means two hot wires, a neutral, and a separate ground. At the garage subpanel, the neutral and ground stay apart. They only bond together at the main panel in the house.
The garage also needs its own grounding electrode, usually one or two ground rods driven near the building. And it needs a disconnect, a single switch or main breaker that kills all power to that structure. Skip any of these and the inspection fails.
Here is the real surprise for most people. A wire chart tells you what size cable can safely carry a certain number of amps. It does not account for distance. Over a long run, voltage drops, and tools at the far end run weak and hot.
A good target is no more than 3 percent drop. For a garage 150 feet away, that can mean wire one or two sizes larger than the amp chart suggests. With copper prices where they are, many installers use aluminum feeder cable for long runs. It costs less and works well when the lugs are rated for it.
Roof-mounted panels on any building need rapid shutdown, a way to quickly drop the voltage on the roof so firefighters can work safely. Systems also need specific warning labels at the panel and disconnect.
If you tie in to the house, the solar power feeds back into your main panel. The code limits how much backfed current a panel can take, often called the 120 percent rule. An older 100-amp panel may not have the room a solar-ready electric panel offers, which can force a panel upgrade or a supply-side connection. Your utility must also approve the system before you flip it on.

A house battery sits in a cozy utility room. A garage battery bakes in summer and freezes in winter. That changes which chemistry makes sense and where you mount it.
This is the go-to choice today. It lasts thousands of cycles, needs no upkeep, and lets you use most of its stored energy. The catch is cold. Most lithium batteries cannot safely charge below freezing unless they have built-in heaters. If your garage drops under 32°F, buy a model with self-heating or plan to insulate the battery area.
Lead acid costs less up front and handles cold charging better. But you should only use about half its rated capacity, or it wears out fast. Flooded types also vent gas and need water topped off. AGM batteries are sealed and easier to live with, but they still lose life quickly in high heat.
Heat is the quiet battery killer in many regions. “In a hot climate, we look at where the battery hangs before we look at the brand,” says Marcus Delgado, senior solar design specialist at Capital Energy. “A north wall, shade, and a little airflow can add years to a battery in an uninsulated garage.”
Start with what you actually run. Add up the daily watt-hours of each item. A garage fridge might use 1.2 kilowatt-hours a day. LED shop lights might add 0.3. A few hours of a small air compressor and a phone charger could push the total near 2 kilowatt-hours.
Next, decide how many cloudy days you want to ride through. Two days is a common pick. In this example, that means about 4 to 5 kilowatt-hours of usable storage. With lithium, that is close to the rated size. With lead acid, you would need roughly double the rated capacity.
Then check the inverter. It must handle the surge of your largest motor. A compressor that runs at 1,500 watts may spike to three times that on startup. An undersized inverter will trip every time the tank kicks on.
Solar on a detached garage is less about panels and more about the path the power takes. A standalone setup keeps everything in one building and can skip the trench, but it lives or dies by smart battery sizing. A tie-in to the house gives you grid backup for big tools, yet it brings deep trenches, a four-wire feeder, ground rods, a disconnect, rapid shutdown, and utility approval into the picture.
Before you buy a single panel, walk the distance from your garage to your main panel and picture the trench. Price the feeder wire for that full run, check your panel's room for backfeed, and think hard about how hot or cold your garage gets. Get those answers first, and the rest of the project falls into place instead of falling apart halfway through.