Methodology and Formulas
This page documents every formula, constant, and data source used by the RV Power Planner. The calculator is 100% deterministic: the numbers you see are computed by the exact rules below, with no hidden multipliers or hand-typed estimates.
1. Calculation Rules
- Battery voltage: LiFePO4 nominal is 12.8 V (25.6 V, 51.2 V); lead-acid is 12 V (24 V, 48 V). Battery Wh = Ah × nominal V. Usable Wh = Wh × DoD (LiFePO4 default 90%, AGM 50%).
- Loads: Native DC: battery Wh = load Wh. DC through a converter (USB-C PD): ÷ 0.90. AC via inverter: ÷ inverter efficiency (default 0.87). Efficiency is output over input, so it is a divisor, never a "plus 15%" multiplier.
- Inverter idle: If any AC load exists, add idle watts (default 20) × the configured on-hours per day (default 24, settable 0–24; 0 means the inverter is switched off).
- Duty cycle: Defined over 24 hours (e.g., 45 W fridge at 33% = 45 × 24 × 0.33 = 356 Wh).
- Solar harvest: Array W × peak sun hours × panel derate (0.80) × charge controller efficiency (MPPT 0.95, PWM 0.75). The 0.80 covers heat, dust, wiring, and angle; do not apply another derate on top.
- Stored energy: Harvest × battery charge efficiency (LiFePO4 0.95, lead-acid 0.82).
- Alternator or DC-DC: Amps × 14.4 V × (system voltage ÷ 12) × hours × 0.90.
- Battery-only runtime (no solar): Usable Wh ÷ daily load Wh.
- Peukert (lead-acid only): Effective capacity = rated Ah × (rated Ah ÷ (average amps × 20)) ^ (k − 1), k = 1.2 default, capped at 1.
- Inverter size: Continuous ≥ simultaneous running AC watts × 1.25, and surge capability (assume 2× continuous) ≥ the largest start-up surge plus other running loads. Round up to 300, 500, 1000, 1500, 2000, 3000, 5000 W.
- DC current at full inverter load: Uses the system voltage (worst case at low battery voltage).
- Wiring: Design current = continuous amps × 1.25. Choose the smallest AWG whose ampacity covers it and whose round-trip voltage drop stays ≤ 3%. Fuse at or above the design current and at or below the cable ampacity. A single 4/0 cannot carry 190 A at the 125% rule; the tool then tells the user to go 24 V or 48 V, use shorter runs, or parallel cables. Note: The wiring table has been cross-checked against NEC Table 310.16 (75 °C copper column) and NEC Chapter 9, Table 8 (stranded, uncoated copper, 75 °C DC resistance). NEC 240.4(D) small-conductor rules and ambient-temperature derating may further limit permitted overcurrent protection. Verify with a qualified RV electrician or the manufacturer's install manual before installing.
- Recommendation: Needed Ah = daily Wh × target days ÷ (nominal V × DoD); round up to 100, 200, 300, 400, 600, 800 Ah. Needed solar W = daily Wh ÷ (PSH × derate × charge controller eff × charge eff); round up to the next 100 W.
- Status colours: Green means solar surplus when net energy is ≥ +10% of the daily load; amber means the daily balance is within ±10%; red means a deficit greater than 10%.
- Region-derived state: When a region is selected, PSH and freeze risk are derived from the region data, not taken from the URL. Shared URLs carrying stale values are corrected on load.
2. Data Sources
- Peak Sun Hours (PSH): NLR PVWatts v8 API (free key), NSRDB dataset, 14% system losses. Fetched for 15 representative US RV sites, flat (0°) and tilted (~latitude) mountings.
- Freeze Months: Derived from NOAA climate normals. Months whose average daily low is ≤ 34 °F are flagged to trigger lithium cold-charge warnings.
- Appliance Presets: Sourced from manufacturer specifications, community averages, and secondary blogs. Ranges are shown where sources disagree (e.g., Starlink Mini 20–40 W).
- Sample Scenarios: The calculator includes a set of pre-configured sample scenarios (e.g., "Starlink Mini + 12V fridge off-grid"). These are starting points to quickly load a typical configuration into the calculator. They are not definitive recommendations; the numbers are computed dynamically based on the loaded inputs, which you can freely adjust.
3. Test Vectors
The engine is validated against 44 strict test cases. Key expected outputs include:
- 12V fridge: 356 Wh/day
- Fridge + Starlink Mini: 716 Wh/day; 200 Ah LiFePO4 gives 3.2 days battery-only runtime with no solar input
- AC losses use a divisor: 1,400 W A/C for 2 h = 3,218 Wh/day (with 0.87 efficiency)
- 400 W MPPT at 4.5 PSH: 1,368 Wh/day harvest
- Full-time remote work load: ~2,780 Wh/day, red status on 400 W AZ winter solar
- 2,000 W inverter at full load on 12 V: ~192 A, fires red DC-current alert
- AGM Peukert: 200 Ah at 40 A average gives ~152 Ah effective capacity
- Wire pick: 150 A over 5 ft needs 4/0 AWG with 200 A fuse; 190 A exceeds single 4/0 under the 125% rule
- Recommendation for 716 Wh/day: 200 Ah and 300 W solar at 4.5 PSH
- Scenario URL round-trips and live gear block updates correctly on every input change.
4. Changelog
- 2026-11-26 — Single-page architecturePer-scenario pages (
/setups/*,/calculators/*,/regions/*) were replaced by sample scenarios inside the calculator on the home page. No formula, constant or preset changed. Gear suggestions are now recomputed live from the current inputs. URLs gained a short?preset=<id>form; the full-state URL format (v1) is unchanged. - 2026-11-26 — Wiring table NEC cross-checkResistance values updated to match NEC Chapter 9, Table 8 (stranded, uncoated copper, 75 °C DC resistance). Ampacity values remain per NEC Table 310.16 (75 °C column), with added documentation noting that NEC 240.4(D) small-conductor rules cap overcurrent protection at 15 A (14 AWG), 20 A (12 AWG), and 30 A (10 AWG). Removed inaccurate reference to ABYC E-11 for RVs; RV installations follow NFPA 1192 and the NEC.
- 2026-11-25 — applyRegion defaults
applyRegionnow defaultsmto 1 andmtto 'flat' whenregis set but either is missing, restoring the freeze warning on URLs whose region was picked without touching the month selector. - 2026-11-23 — Region-derived state
applyRegion(cfg, regions)re-derivespshandfreezeRiskon URL load and in the setup page builder. Shared URLs that previously lost the cold-charge warning after reload now preserve it.pshin a URL is overwritten byregions.jsonwhenregis set. - 2026-11-20 — Inverter idle hours
invAlwaysOnreplaced byinvIdleH(0–24 hours per day). URL keyiobecomesih; legacyio=0decodes to 0. - 2026-11-20 — Alert message clarityHigh-DC-current alerts quote both running current and full-load current of the recommended inverter, matching the wire-and-fuse panel. Thresholds unchanged.