TheGreenWatt

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:

ComponentPurposeExample
Solar panel(s)Generate DC electricity from sunlight100–400 W panel, Vmp 18–41 V
Charge controllerRegulates voltage, prevents overchargingMPPT (recommended) or PWM
BatteryStores energy for use when sun is not shining12V/24V/48V LiFePO4 or AGM
DC wiringConnects components10–4 AWG stranded copper, red (+) and black (−)
MC4 connectorsWeatherproof panel connectionsPre-crimped leads or MC4 crimp tool
Inline fuses or breakersOvercurrent protection at each connectionRated per NEC 690.9
MultimeterVerify voltage and polarity before connectingAny basic DC multimeter ($15–$30)
Ring terminals + heat shrinkSecure battery and controller connectionsMatch 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.

Basic Wiring: One Solar Panel To One Battery

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.

Solar Panele.g. 100–400 W+FUSE1.25 × IscStep 2: PanelChargeController(MPPT or PWM)PV+PV−BAT+BAT−FUSEController max AStep 1: BatteryBattery12V / 24V / 48VLiFePO4 or AGM+Panel → Fuse → Controller → Fuse → BatteryRed = positive (+) Black = negative (−) Yellow = fuse

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.

Two Panels To One Battery: Parallel vs Series Wiring

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: Voltage Same, Current DoublesPWM or MPPT OK · 2 × 100W panels at 18V = 18V, 11.1APanel A18V · 5.55APanel B18V · 5.55AFUSEControllerMPPT/PWMBattery12V 100Ah18V · 11.1A200W to controllerSeries: Voltage Doubles, Current SameMPPT required · 2 × 100W panels at 18V = 36V, 5.55APanel A18V · 5.55AA− → B+Panel B18V · 5.55AFUSEMPPTControllerBattery12V 100Ah36V · 5.55A200W to controller

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.

Complete System: Panels → Controller → Battery Bank → Inverter → AC Loads

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.

DC Power Flow →→→ │ DC to AC │ →→→ AC PowerSolarPanelsDC outputFUSE10–6 AWGChargeControllerMPPT / PWMConnect 1stFUSE8–4 AWGBattery Bank12V/24V/48VEnergy StorageFUSE4–2/0 AWGInverterDC → AC120V/240VTo AC loadsACConnection Order:1. Battery → Controller (sets voltage reference)2. Panels → Controller (safe startup)3. Inverter → Battery (independent DC-AC)Disconnect in reverse: panels → battery → inverterCritical Safety Notes:Fuse at every connection point (NEC 690.9)Verify polarity with multimeter before connectingInverter connects to battery, NOT controllerGrid connection requires 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.

Wire Gauge (AWG) By Current And Distance

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.

10 ft20 ft30 ft50 ft75 ft100 ftOne-way wire distance10A15A20A30A40A50A60A141414121010141412108814121210861412108641210864212108421/01286421/0Green = thin wire (cheap) · Yellow = medium · Red = thick wire (expensive) · AWG for ≤2% voltage drop at 12V

Quick Rules Of Thumb

ConnectionTypical currentTypical distanceRecommended gauge
Panel to controller5–15 A10–50 ft10–6 AWG
Controller to battery10–60 A3–6 ft (keep short)8–4 AWG
Battery to inverter40–200 A3–6 ft (keep short)4 AWG to 2/0 AWG
Battery bank interconnectsVaries1–3 ftSame 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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

Frequently Asked Questions

Can I connect a solar panel directly to a battery without a charge controller?
No. Without a charge controller, the panel will continue pushing voltage into the battery after it is full, causing overcharging. Overcharging lithium batteries risks thermal runaway (fire). Overcharging lead-acid batteries boils the electrolyte and warps the plates. The only exception is a very small trickle panel (under 5 W) with a built-in blocking diode on a large battery, but even then a controller is the safe choice.
Can I connect a 24V solar panel to a 12V battery?
Yes, but only with an MPPT charge controller. MPPT converts the higher panel voltage to the lower battery voltage, capturing the excess voltage as extra current. A PWM controller would work technically but waste roughly 50% of the energy because it drops the panel voltage to match the battery. For any panel where Vmp is more than 1.5 times the battery voltage, MPPT is essential.
How do I connect a solar panel to a 12V battery?
Connect a charge controller (MPPT or PWM) between the panel and battery. Wire the battery to the controller first (positive to positive, negative to negative), then wire the panel to the controller. Install an inline fuse on each side. Use a panel with Vmp of 18V or higher (any panel marketed as 12V compatible or any residential panel with an MPPT controller). The controller regulates voltage to safe charging levels.
How do I connect a solar panel to a leisure battery or boat battery?
The wiring is identical to any 12V battery connection: panel to charge controller to battery. For marine installations, use tinned copper wire (resists corrosion), waterproof MC4 connectors, and a marine-rated fuse block. Mount the controller in a dry, ventilated location. For caravans and motorhomes, secure all wiring with cable clips to prevent vibration damage during travel.
Do I need a fuse between the solar panel and charge controller?
Yes. NEC 690.9 requires overcurrent protection on all solar circuits. Install an inline fuse rated at 1.25 times the array short-circuit current (Isc) between the panels and controller. Also install a fuse between the controller and battery rated at the controller maximum output amps. Fuses protect against short circuits, wiring faults, and component failures.
Can I charge a battery while using it at the same time?
Yes. The charge controller manages simultaneous charging and discharging. If the solar input exceeds the load, the excess charges the battery. If the load exceeds solar input, the battery supplements the difference. This is how RV and off-grid systems work continuously. The controller prioritizes battery health by managing charge stages (bulk, absorption, float) regardless of connected loads.
What size wire do I need from the charge controller to the battery?
Wire size depends on current and distance. For a 30A controller with a 5-foot run to the battery, 10 AWG is sufficient. For 50A at 10 feet, use 6 AWG. The rule is to keep voltage drop under 2% of system voltage. Use the formula: wire gauge = f(amps x distance). Oversized wire is always safe; undersized wire is a fire risk. See the wire sizing table in this article for specific recommendations.
How do I connect two solar panels to one battery?
Wire the two panels either in parallel (positive to positive, negative to negative) or in series (positive of panel A to negative of panel B). Parallel keeps voltage the same and doubles current. Series doubles voltage and keeps current the same. Both configurations feed into a single charge controller, which then charges the battery. Parallel works with PWM or MPPT; series requires MPPT.
How do I connect solar panels to multiple batteries?
Wire the batteries together first (parallel for more capacity at the same voltage, or series for higher voltage at the same capacity), then connect the battery bank to the charge controller as a single unit. The controller does not know or care how many batteries are in the bank. Use identical batteries (same brand, capacity, age, and chemistry) and equal-length cables to each battery for balanced charging.
How do I connect solar panels to my house electrical panel?
For grid-tied systems, the inverter output connects to a dedicated breaker in your main electrical panel. This must be done by a licensed electrician to meet NEC 705 and local code requirements. The electrician installs a backfeed breaker, ensures the panel bus bar can handle the additional current (120% rule), and coordinates with your utility for net metering approval. Off-grid systems use a separate sub-panel fed by the inverter.
What happens if I connect the solar panel with reversed polarity?
Reversed polarity (positive to negative) can destroy the charge controller in milliseconds. The internal MOSFETs or capacitors see reverse voltage and fail catastrophically. Some controllers have built-in reverse polarity protection, but many budget models do not. Always verify polarity with a multimeter before connecting. If you accidentally reverse the connection and the controller stops working, it is not repairable.
Marko Visic
Physicist and solar energy enthusiast. After installing solar panels on my own house, I built TheGreenWatt to share what I learned. All calculators use NREL PVWatts v8 data and peer-reviewed formulas.