How To Connect Solar Panels To A Battery: Step-by-Step Wiring Guide (+ Diagrams)
Every solar-to-battery system has three components in the same order: solar panel, charge controller, battery. The controller sits between panel and battery to regulate voltage and prevent overcharging. Never connect a panel directly to a battery. This guide walks through each connection step-by-step, covers single-panel and multi-panel setups, shows how to add an inverter for AC power, and includes wire sizing tables and three wiring diagrams.
When I wired my first off-grid system — two 100 W panels on a shed roof charging a 100 Ah LiFePO4 battery — I spent more time on YouTube than actually wiring. The physical connection took 20 minutes. The concept is simple: positive to positive, negative to negative, battery first, panels second. But the details matter: wire gauge, fuse ratings, connection order, and controller choice determine whether your system works safely for decades or becomes a fire risk.
What You Need To Connect Solar Panels To A Battery
Before you start wiring, gather everything:
| Component | Purpose | Example |
|---|---|---|
| Solar panel(s) | Generate DC electricity from sunlight | 100–400 W panel, Vmp 18–41 V |
| Charge controller | Regulates voltage, prevents overcharging | MPPT (recommended) or PWM |
| Battery | Stores energy for use when sun is not shining | 12V/24V/48V LiFePO4 or AGM |
| DC wiring | Connects components | 10–4 AWG stranded copper, red (+) and black (−) |
| MC4 connectors | Weatherproof panel connections | Pre-crimped leads or MC4 crimp tool |
| Inline fuses or breakers | Overcurrent protection at each connection | Rated per NEC 690.9 |
| Multimeter | Verify voltage and polarity before connecting | Any basic DC multimeter ($15–$30) |
| Ring terminals + heat shrink | Secure battery and controller connections | Match wire gauge to terminal size |
The one absolute rule: Never connect solar panels directly to a battery without a charge controller. A panel's open-circuit voltage (Voc) can exceed the battery's safe charging voltage by 50–200 %, and without regulation the battery will overcharge. For lithium batteries, overcharging risks thermal runaway. For lead-acid, it boils electrolyte and warps plates.
Wiring Diagram: Solar Panel To Charge Controller To Battery
The energy path is always: Panel → Fuse → Controller → Fuse → Battery. The controller has two pairs of terminals: PV+ / PV− (panel side) and BAT+ / BAT− (battery side). Each side gets its own fuse.
Every solar-to-battery system needs a charge controller between the panel and the battery. The controller prevents overcharging and regulates voltage. Connect the battery to the controller first (Step 1) — this sets the voltage reference. Then connect the panel (Step 2). An inline fuse on each side protects the wiring and components. Never connect a panel directly to a battery.
Step-By-Step: Connecting One Solar Panel To A Battery
Step 1 — Check Your Battery Voltage
Determine whether your battery is 12 V, 24 V, or 48 V. This sets the system voltage for everything else. A single 12 V battery (like a 100 Ah LiFePO4) operates at 12 V nominal. Two 12 V batteries in series make a 24 V system. Four in series make 48 V.
Step 2 — Verify Panel Compatibility
Check the panel's Vmp (voltage at maximum power) on the datasheet or back label. For PWM controllers, the panel Vmp should be close to the battery voltage — a 36-cell panel (Vmp ~18 V) for a 12 V battery. For MPPT controllers, any panel with Vmp above the battery voltage works — including standard 60-cell residential panels (Vmp ~31 V). See MPPT vs PWM — Which Controller Do You Need? for the full comparison.
Step 3 — Mount The Charge Controller
Mount the controller near the battery in a dry, ventilated location. Heat reduces controller efficiency and lifespan. Keep the controller-to-battery wire run as short as possible (under 6 feet ideal) — this is the highest-current section and shorter wire means less voltage drop and thinner gauge needed.
Step 4 — Connect Battery To Controller FIRST
This is the critical step. Connect the battery positive (+) terminal to the controller BAT+ terminal, and battery negative (−) to BAT−. Use appropriately sized wire (see wire sizing section below) with ring terminals crimped to each end. The controller screen should light up and display the battery voltage.
Why battery first? The battery tells the controller what system voltage to use (12 V, 24 V, or 48 V). Most MPPT controllers auto-detect the voltage on first connection. If you connect panels first without the battery, the controller sees unregulated Voc (37–250 V depending on panel and wiring) with no load to absorb it — this can destroy the controller's input stage instantly.
Step 5 — Install Fuses
Install an inline fuse between the battery and controller, rated at the controller's maximum output current. Install a second fuse between the panel and controller, rated at 1.25 × the panel's Isc (short-circuit current). For a 100 W panel with Isc of 6.1 A: fuse = 6.1 × 1.25 = 7.6 A → use a 10 A fuse.
Step 6 — Connect Panel To Controller SECOND
Connect the panel positive (+) to controller PV+, and panel negative (−) to PV−. If the panel is already in sunlight, you may see a small spark at the connector — this is normal (the controller's input capacitors are charging). The controller should now show charging status: battery voltage, charging current, and watts being produced.
Step 7 — Verify Charging
Check the controller display or app (many MPPT controllers have Bluetooth). You should see:
- Battery voltage: 13.0–14.6 V for a 12 V system (depending on charge stage)
- Charging current: proportional to sunlight and panel size
- Power: panel wattage × efficiency (expect 70–95 % of rated watts depending on conditions)
If the display shows 0 W or no charging current, verify: (1) the panel is in sunlight, (2) polarity is correct on both sides, (3) fuses are not blown.
Connecting Two Solar Panels To One Battery
Two panels can be wired in parallel or series before feeding into the same charge controller and battery.
Parallel wiring connects all positive leads together and all negative leads together — the voltage stays the same but the current doubles. Series wiring connects the positive of one panel to the negative of the next — the voltage doubles but the current stays the same. Parallel works with both PWM and MPPT controllers. Series requires MPPT (the higher string voltage exceeds PWM input limits). Series wiring reduces current, which means thinner wires and less voltage drop on long runs.
Parallel Wiring (Current Adds)
Connect all panel positives together and all panel negatives together using branch connectors (MC4 Y-connectors). The voltage stays the same as one panel, but the current doubles.
Example: Two 100 W panels at 18 V / 5.55 A each → 18 V / 11.1 A to the controller (200 W total).
When to use parallel: When the panel Vmp is already matched to your battery voltage (36-cell panels on 12 V battery). Works with both PWM and MPPT controllers. Better shade tolerance — if one panel is shaded, the other keeps producing.
Series Wiring (Voltage Adds)
Connect the positive of Panel A to the negative of Panel B. The remaining free positive (Panel A) and free negative (Panel B) go to the controller. The voltage doubles, current stays the same.
Example: Two 100 W panels at 18 V / 5.55 A each → 36 V / 5.55 A to the controller (200 W total).
When to use series: When you have an MPPT controller (required — PWM cannot handle the doubled voltage). Series wiring reduces current, which means thinner wire and less voltage drop on long runs from roof to controller. This is the preferred configuration for runs over 20 feet.
See How To Wire Solar Panels — Series vs Parallel vs Series-Parallel for the full wiring guide with diagrams for 3+ panel arrays.
Connecting Solar Panels To Multiple Batteries
Wire the batteries together first, then connect the battery bank to the controller as a single unit. The controller does not know how many batteries are behind it — it sees only the bank voltage and responds accordingly.
Batteries In Parallel (More Capacity, Same Voltage)
Connect all battery positives together and all negatives together. The voltage stays the same but capacity (Ah) adds up.
Example: Two 12 V / 100 Ah batteries in parallel → 12 V / 200 Ah bank. You now have twice the stored energy at the same voltage.
Critical rule: Use identical batteries — same brand, same capacity, same chemistry, same age. Mismatched batteries in parallel will have unequal internal resistance, causing one to work harder than the other. Use equal-length cables to each battery for balanced current distribution.
Batteries In Series (Higher Voltage, Same Capacity)
Connect the positive of Battery A to the negative of Battery B. The free positive (Battery A) and free negative (Battery B) connect to the controller BAT terminals.
Example: Two 12 V / 100 Ah batteries in series → 24 V / 100 Ah bank. Higher voltage means lower current for the same power, which allows a smaller (cheaper) controller and thinner wire.
Series-Parallel (Higher Voltage AND More Capacity)
For larger systems: wire pairs in series to reach the desired voltage, then wire the series strings in parallel to increase capacity. Example: four 12 V / 100 Ah batteries → two series pairs (24 V each) wired in parallel = 24 V / 200 Ah bank.
Adding An Inverter: Solar To Controller To Battery To Inverter
An inverter converts the battery's DC power to 120 V or 240 V AC power for household appliances. The inverter connects directly to the battery — not to the charge controller.
Why direct to battery? Inverters draw high surge current when appliances start (a refrigerator compressor draws 3–5× its running current for the first second). The battery can deliver this surge; the charge controller cannot. The controller output is limited to its rated amps, and a surge would either trip its protection or damage it.
A complete off-grid or hybrid solar system has four main components in order: solar panels, charge controller, battery bank, and inverter. The inverter connects directly to the battery bank (not the controller) because it draws high surge current when appliances start. Each connection point needs an appropriately sized fuse or breaker. For grid-tied systems, the inverter output feeds into a dedicated breaker in your electrical panel — this must be done by a licensed electrician.
Inverter Sizing
The inverter's continuous wattage rating must meet or exceed your peak simultaneous AC load. A 2,000 W inverter handles most RV or small off-grid needs (microwave + lights + phone chargers). Size the inverter-to-battery wire for the full inverter current: at 12 V, a 2,000 W inverter draws 167 A — this requires 2/0 AWG cable and a 200 A fuse. At 48 V, the same 2,000 W draws only 42 A and needs 6 AWG cable. This is one of the strongest arguments for upgrading to a 24 V or 48 V battery bank.
Connecting Solar To Your House Electrical Panel
For grid-tied systems, the inverter output connects to your home's electrical panel through a dedicated breaker. This must be done by a licensed electrician. The NEC (Article 705) and local building codes govern:
- Backfeed breaker installation — the solar breaker must be at the opposite end of the bus bar from the main breaker
- 120 % rule — total breaker amperage (main + solar) cannot exceed 120 % of the bus bar rating
- Rapid shutdown — NEC 690.12 requires module-level rapid shutdown for rooftop systems
- Utility coordination — your utility must approve the interconnection and install a net meter
For off-grid systems, the inverter feeds a separate sub-panel that powers selected circuits. No utility coordination needed, but the wiring must still meet local electrical code.
I strongly recommend against DIY electrical panel work. The consequences of mistakes — arc flash, house fire, backfeeding the grid and electrocuting a lineman — are severe and can be fatal. Hire a licensed electrician. The panel connection typically costs $500–$1,500 depending on complexity.
Wire Sizing: What Gauge Wire Do You Need?
Wire gauge depends on current (amps) and distance (one-way feet from source to load). The goal is to keep voltage drop under 2 % of system voltage. Undersized wire overheats — this is a fire risk, not just an efficiency issue.
Thicker wire (lower AWG number) is needed for higher currents and longer distances. Series wiring reduces current and allows thinner, cheaper wire. Parallel wiring increases current and requires thicker wire. This table assumes maximum 2% voltage drop for a 12V system. For 24V or 48V systems, you can use one gauge thinner.
Quick Rules Of Thumb
| Connection | Typical current | Typical distance | Recommended gauge |
|---|---|---|---|
| Panel to controller | 5–15 A | 10–50 ft | 10–6 AWG |
| Controller to battery | 10–60 A | 3–6 ft (keep short) | 8–4 AWG |
| Battery to inverter | 40–200 A | 3–6 ft (keep short) | 4 AWG to 2/0 AWG |
| Battery bank interconnects | Varies | 1–3 ft | Same gauge as controller-to-battery |
Controller to battery is the highest-current run. Keep it as short as possible. Every foot of wire adds resistance and voltage drop. Mount the controller within arm's reach of the battery bank.
Panel to controller is usually the longest run. If this run exceeds 20 feet, consider series wiring (higher voltage, lower current) to reduce the required wire gauge. A 12 V system with 30 A at 40 feet needs 4 AWG. The same power at 24 V is 15 A and needs only 8 AWG — half the copper, half the cost.
See How Many Amps Does A 100W Panel Produce for the current values to use in wire sizing calculations.
Common Mistakes To Avoid
-
Connecting panels directly to battery (no controller). The panel Voc can push the battery above safe voltage, causing overcharging, gassing, swelling, or fire. Always use a charge controller.
-
Wrong connection order (panels before battery). The controller needs the battery to set its voltage reference. Panels first = unregulated Voc hits the controller with no load = instant damage risk.
-
Reversed polarity. Connecting positive to negative destroys the controller's internal MOSFETs. Always verify with a multimeter. Red probe to positive, black to negative — the display should show a positive voltage.
-
Undersized wire. Wire that is too thin for the current overheats. This is not just an efficiency problem — it is a fire hazard. Use the wire gauge table and always round up to the next thicker gauge if in doubt.
-
Missing fuses or breakers. Every connection point needs overcurrent protection. A short circuit without a fuse can deliver hundreds of amps from the battery — enough to melt wires and start a fire in seconds.
-
Using PWM with high-voltage residential panels on a 12 V battery. A 60-cell panel (Vmp 31.5 V) through PWM to a 12 V battery wastes 58 % of the energy. Use an MPPT controller or a 36-cell panel designed for 12 V systems.
-
Mixing different batteries in a bank. Different brands, capacities, ages, or chemistries in the same bank cause imbalanced charging and premature failure. Use identical batteries from the same manufacturing batch if possible.
-
Inverter connected to controller instead of battery. The inverter must connect directly to the battery to handle surge currents. The controller output cannot supply the instantaneous current that motors and compressors demand at startup.
Bottom Line
The wiring path is always: Panel → Fuse → Controller → Fuse → Battery. Connect the battery first, panels second. Install fuses at every connection point. Use appropriately sized wire (check the gauge table). Choose MPPT for any system over 200 W or when the panel Vmp exceeds 1.5× the battery voltage.
For most people building their first off-grid or RV system, the entire wiring job takes 30–60 minutes once you have all the components. The physical connections are simple — positive to positive, negative to negative. The important part is doing it in the right order with the right protection.
Keep Reading
- MPPT vs PWM Charge Controller — Which Do You Need? (+ Sizing Calculator)
- How To Wire Solar Panels — Series vs Parallel Diagrams
- Solar Panel Charge Time Calculator
- How Long To Charge A 12V Battery With A 100W Panel
- What Size Solar Panel To Charge A 100Ah Battery
- How Many Amps Does A 100W Panel Produce
- How Many Amp-Hours Is A Tesla Powerwall
- Solar Panel Output Voltage — Voc, Vmp, And Nominal
Frequently Asked Questions
Can I connect a solar panel directly to a battery without a charge controller?
Can I connect a 24V solar panel to a 12V battery?
How do I connect a solar panel to a 12V battery?
How do I connect a solar panel to a leisure battery or boat battery?
Do I need a fuse between the solar panel and charge controller?
Can I charge a battery while using it at the same time?
What size wire do I need from the charge controller to the battery?
How do I connect two solar panels to one battery?
How do I connect solar panels to multiple batteries?
How do I connect solar panels to my house electrical panel?
What happens if I connect the solar panel with reversed polarity?
Sources
- NEC 2023 Article 690 — Solar Photovoltaic Systems (wiring, fusing, and grounding requirements)
- Victron Energy — Wiring Unlimited (comprehensive solar wiring reference, free PDF)
- Battle Born Batteries — How to Connect Solar Panels to a Battery Bank
- Renogy — Solar Panel Wiring Guide (series, parallel, and series-parallel)
- Blue Sea Systems — Wire Gauge and Ampacity Table (marine and DC systems)
- PVEducation — Solar Cell I-V Characteristics and Maximum Power Point
- Morningstar — Charge Controller Installation Best Practices