# Sizing solar for a remote sensor station, with a 30-line Python script

Remote sensor station solar sizing looks simple on a whiteboard: add up the watts, buy a panel, buy a battery. Then the first grey week of winter arrives and the logger goes silent on day four. This walkthrough is the process I use for small 12 V or 24 V DC sites, such as a camera, a cellular router and a few sensors, with a script at the end so you can rerun the numbers when the load list changes.

All numbers below are an example, not a recommendation for your site.

## Step 1: Write the load budget in watt-hours, not watts

Everything here runs on DC, so there is no inverter in the chain. That matters: an inverter's idle draw alone could exceed the entire load on a site like this.

| Load | Average power | Hours/day | Wh/day |
|---|---|---|---|
| IP camera (night IR on) | 6 W | 24 | 144 |
| LTE router | 5 W | 24 | 120 |
| Data logger + sensors | 1.5 W | 24 | 36 |
| Charge controller self-use | 0.5 W | 24 | 12 |
| **Total** | **13 W** | | **312 Wh** |

Two traps. First, use measured average power, not the nameplate maximum, but measure it over a full day including night mode. Second, include the controller's own consumption. It looks tiny until you multiply by 24.

## Step 2: Pick days of autonomy from the weather, not from habit

Autonomy is how many days the battery must carry the load with almost no solar input. For a station that sends alarms, I start at five days in temperate climates with long grey spells, and three in sunny regions. Look at the worst stretch of consecutive overcast days in local records for the month you care about.

Five days × 312 Wh = 1,560 Wh that must be usable.

## Step 3: Turn usable energy into battery capacity

Usable is not the same as rated. Divide by the depth of discharge you are willing to use:

- LiFePO4 planned at 80% DoD: 1,560 / 0.8 = 1,950 Wh
- Gel planned at 50% DoD: 1,560 / 0.5 = 3,120 Wh

Then account for cold. Batteries deliver less capacity at low temperature. Using 85% as a conservative winter factor for LiFePO4 gives about 2,290 Wh, which is roughly 180 Ah at 12.8 V. I would round up to a 200 Ah pack.

One more cold-weather point: most LiFePO4 packs must not be charged below 0 °C. If the enclosure freezes, either pick a pack with low-temperature charge protection or self-heating, or consider gel, which charges in the cold at the cost of more weight and a lower usable fraction.

## Step 4: Size the array for the worst month, plus recovery

Peak sun hours (PSH) vary a lot by season. Use the worst month the station must survive. Say that is 2.5 PSH.

I apply two factors:

- **System efficiency (0.85):** battery round trip and wiring losses, so the array must deliver 312 / 0.85 ≈ 367 Wh/day.
- **PV derate (0.8):** temperature, soiling, mismatch and controller losses.

Minimum array to break even on an average winter day: 367 / (2.5 × 0.8) ≈ 184 W.

Break-even is not enough. After a grey spell the battery is empty and the array must refill it while still running the load. If I want to recover one day's deficit per sunny day, the array has to cover two days of energy: (367 + 312) / (2.5 × 0.8) ≈ 340 W. In practice that means two modules in the 180–200 W class.

## Step 5: Check the controller and wiring

At 12.8 V, 400 W of array produces up to about 31 A of charge current, so a 40 A MPPT controller fits with margin. If the cable run from panel to enclosure is long, consider a 24 V battery instead; halving the current quarters the resistive loss.

Also check the string's open-circuit voltage at the coldest expected temperature against the controller's absolute maximum PV input. Voc rises as cells get colder.

## The script

```python
# Remote DC site sizing. Example values only; edit for your site.
loads_w = {"camera": 6, "lte_router": 5, "logger": 1.5, "controller": 0.5}

autonomy_days = 5
dod = 0.8            # LiFePO4 planning DoD (use ~0.5 for gel)
cold_factor = 0.85   # usable capacity fraction at winter temperature
battery_v = 12.8
worst_psh = 2.5      # peak sun hours in the design month
system_eff = 0.85    # battery round trip + wiring
pv_derate = 0.8      # temperature, soiling, mismatch, controller

daily_wh = sum(loads_w.values()) * 24
need_from_pv = daily_wh / system_eff

battery_wh = daily_wh * autonomy_days / dod / cold_factor
battery_ah = battery_wh / battery_v

pv_min_w = need_from_pv / (worst_psh * pv_derate)
pv_recovery_w = (need_from_pv + daily_wh) / (worst_psh * pv_derate)
ctrl_a = pv_recovery_w / battery_v

print(f"Daily load:        {daily_wh:.0f} Wh")
print(f"Battery:           {battery_wh:.0f} Wh  (~{battery_ah:.0f} Ah @ {battery_v} V)")
print(f"PV break-even:     {pv_min_w:.0f} W")
print(f"PV with recovery:  {pv_recovery_w:.0f} W")
print(f"Controller current: {ctrl_a:.0f} A (choose next size up)")
```

Run it and you get roughly 312 Wh/day, 2,290 Wh of battery, 184 W break-even and 340 W with recovery.

## Cross-checking with a second tool

I like to compare my numbers against a different method, because the assumptions differ. The [off-grid solar system calculator](https://solarenergystoragesystem.com/en/calculator) on the TORCHN site uses a 4 peak-sun-hour baseline with a sunlight factor for good, normal or weak regions, and sizes the battery as daily kWh × backup days ÷ usable DoD. Its daily-energy slider starts at 1 kWh, so for a 312 Wh DC site treat it as a sanity check on the battery side rather than a design. If two methods disagree by a lot, the gap usually points to an assumption worth checking, often the sun hours.

## What usually goes wrong

- The load was measured in daytime only, and night IR doubled the camera draw.
- The panel was tilted for summer and sits in shadow from a ridge in winter.
- The battery froze at night and the BMS refused to charge in the morning.
- Nobody checked the logs until the station went dark.

Log battery voltage and state of charge through the same modem that sends the sensor data. It costs nothing and tells you about a failing array weeks before an outage.

---

*Disclosure: I work with TORCHN. Yangzhou Weikechuang handles export trade and projects, and Yangzhou Dongtai handles production; both share the TORCHN brand.*

