Power System Wiring and Safety

Complete wiring diagrams, fusing, wire gauge selection, weatherproof connectors, and battery telemetry monitoring.

Wiring a Solar Power System for LoRa Repeaters

Proper wiring is the difference between a reliable 5-year solar node and a fire hazard or intermittent failure. This page covers the complete wiring path from solar panel to LoRa load, including fusing strategy, wire gauge selection, connector types, weatherproofing, and cable management inside enclosures.

System Wiring Overview

A correctly wired solar system follows this signal path:

Solar Panel(s)
 │
 ├─── [Fuse #1: Panel → Controller] ── MC4 cable to controller PV input
 │
Charge Controller (MPPT/PWM)
 │
 ├─── [Fuse #2: Controller → Battery] ── to battery positive terminal
 │
Battery Pack (LiFePO4/LiPo + BMS)
 │
 └─── [Fuse #3: Battery → Load] ── to load (LoRa node, 5V regulator, etc.)

Three independent fuses are required. Never combine them. Each fuse protects the wire segment between it and the next power source, limiting fault current to what the wire can safely carry.

Fusing Requirements

Segment Fuse Type Rating (for 10 W panel, 7 Ah battery) Placement
Panel → Charge controller (PV in) Blade fuse or ANL 10 A (next standard above Isc × 1.56) Within 12 inches of panel junction box positive terminal
Charge controller → Battery Blade fuse or ANL 15 A (next standard above charge controller rated output × 1.25) Within 12 inches of battery positive terminal
Battery → Load Blade fuse or resettable PPTC 3 - 5 A (sized to wire gauge, not load) Within 7 inches of battery positive terminal

Fuse ratings are sized to protect the wire, not the load. Use the next standard blade fuse size above 125% of the wire's ampacity at the installation temperature. ANL (bolt-down) fuses are preferred for currents above 30 A. For small LoRa systems (under 10 A total), automotive blade fuses in a waterproof inline holder (Littelfuse SPTP series, ~$2) are adequate.

Wire Gauge Selection

AWG Conductor Area (mm²) Max Ampacity (60 °C insulation, bundled) Typical LoRa System Use
AWG 220.33 mm²3 ASensor wiring, signal lines
AWG 200.52 mm²5 ALoad output for single ESP32 node
AWG 180.82 mm²7 ALoad output for small system (5 A load)
AWG 161.31 mm²10 ABattery-to-controller runs under 3 m
AWG 142.08 mm²15 ABattery-to-controller runs 3 - 10 m; 10 W panel to controller
AWG 123.31 mm²20 A20 - 40 W panel runs; Pi gateway battery cables
AWG 105.26 mm²30 A40 - 100 W panel runs over 5 m
AWG 88.37 mm²40 A100 W+ systems; long battery cable runs

Always use stranded copper wire with UV-resistant and temperature-rated insulation (XLPE or THWN-2 for outdoor; silicone for inside enclosures near heat). Solid wire is not suitable for mobile or vibrating installations. Use tinned copper wire in marine environments.

For voltage drop calculation in long cable runs:

Voltage_drop (V) = 2 × I (A) × R_per_meter (Ω/m) × Length (m)

Target: keep drop to less than 3% of system voltage.
For 12 V system, 3% = 0.36 V maximum drop.

Example: 5 A load, 5 m one-way run, AWG 14 (0.0083 Ω/m):
 Drop = 2 × 5 × 0.0083 × 5 = 0.415 V (3.5% - marginal, upgrade to AWG 12)

Weatherproof Connectors

MC4 Connectors (Panel Wiring)

MC4 (Multi-Contact 4 mm) connectors are the industry standard for solar panel connections. They are IP67-rated, UV-resistant, and rated to 1000 V DC and 30 A. Never use non-MC4 connectors on the panel-side wiring - the exposed conductors in DIY terminal connections will corrode and introduce resistance. Crimp MC4 connectors with the correct MC4 crimper (not pliers) to ensure proper contact retention. MC4 pairs from different manufacturers (e.g., Stäubli vs Amphenol) are nominally cross-compatible but may have reduced IP rating when mixed - use matched pairs.

Anderson Powerpole Connectors (Load Connections)

Anderson Powerpole connectors (SB series 15 A, 30 A, 45 A) are the amateur radio and telecom standard for DC power distribution. They are genderless, stackable, and accept 12 - 20 AWG wire. The Powerpole 15/30 A connector accepts 14 - 18 AWG; crimp with an RENNSTEIG RE 2-30 or similar ratchet crimper. ARES (Amateur Radio Emergency Service) has standardized on red (+) and black (−) 30 A Powerpoles for all portable power connections.

Other Connectors

Connector Rating Use Case
XT6060 A continuous, 12 VHigh-current battery connections in drone/RC-derived builds
JST PH 2.0 mm2 ALiPo cell to embedded board (standard on most Adafruit/SparkFun boards)
JST XH 2.54 mm3 ASensor connections inside enclosure
Dean's Ultra T-plug30 ALegacy RC packs; avoid for new designs

Polarity Protection

A reverse-polarity connection will damage or destroy the charge controller, LoRa board, and BMS in milliseconds. Implement at least one of the following:

  1. Asymmetric connectors: MC4 (panel), Powerpole (load), JST (board) are all polarised - they cannot be connected backwards if crimped correctly.
  2. Schottky diode on the input: A 3 A / 40 V Schottky diode (e.g., 1N5822) in series with the positive line wastes 0.3 - 0.4 V but prevents reverse connection. Only practical for low-current loads.
  3. P-channel MOSFET reverse protection: A P-channel MOSFET (e.g., AO3401, IRF9540) provides near-zero-drop reverse polarity protection. Standard in commercial MPPT charge controller input stages.

Cable Routing and Strain Relief in Enclosures

Inside IP65/IP67 enclosures (Polycase WQ series, Bud Industries NBF, PolyBox), cables enter through compression cable glands. Rules:

Monitoring Battery State via Meshtastic Telemetry

Meshtastic and MeshCore both include power telemetry features that allow a node to report its battery voltage and charge level over the mesh network. This page covers enabling these features, configuring voltage ADC pins for different hardware, interpreting voltage as state-of-charge for LiFePO4 batteries, setting low-battery alerts, and visualising data in Grafana.

Enabling Power Telemetry in Meshtastic

In Meshtastic firmware (2.x), power metrics are part of the Telemetry Module. To enable battery reporting:

Via Meshtastic Python CLI

# Install CLI: pip install meshtastic
# Enable device metrics (includes battery level, voltage, uptime)
meshtastic --set telemetry.device_update_interval 300
# Sets reporting interval to 300 seconds (5 minutes)

# Verify telemetry module is enabled
meshtastic --get telemetry

Via Meshtastic Web App or Mobile App

  1. Open the Meshtastic app and connect to your node.
  2. Navigate to Config → Module Config → Telemetry.
  3. Enable Device Metrics.
  4. Set the update interval (300 - 3600 seconds; use longer intervals for battery-powered nodes to reduce TX duty cycle).
  5. Save and reboot the node.

Once enabled, the node broadcasts a meshtastic.Telemetry protobuf packet on the default channel at the configured interval. The packet includes:

Voltage ADC Pin Configuration on Different Boards

Not all Meshtastic hardware platforms use the same pin or divider ratio for battery voltage measurement. The firmware auto-detects the board type from compile-time defines, but custom builds or off-label hardware may need manual configuration.

Board ADC Pin (GPIO) Voltage Divider Ratio Max Measurable Voltage Notes
TTGO T-Beam v0.7 GPIO35 1:2 (100 kΩ / 100 kΩ) ~8.4 V Measures raw LiPo voltage
TTGO T-Beam v1.1 (AXP192) AXP192 PMIC register Internal PMIC ADC Reported via I²C Reads VBAT register; very accurate
TTGO LoRa32 v2.1 GPIO35 1:2 ~8.4 V Same as T-Beam v0.7
Heltec WiFi LoRa 32 v3 GPIO1 (ADC1_CH0) 1:1 (no divider; up to 3.3 V input only) 3.3 V max Only suitable for direct 3.3 V LiPo via USB-C charging; not for 12 V systems
RAK WisBlock RAK4631 GPIO5 (P0.05 / AIN3) 1:2 via RAK5005-O base board ~6 V Reads via nRF52840 SAADC
Wispr / Custom ESP32 User-defined GPIO User-defined User-defined Set in platformio.ini or via power.adc_multiplier_override config key

If the reported voltage seems incorrect, verify with a multimeter at the battery terminals. Then check power.adc_multiplier_override:

meshtastic --set power.adc_multiplier_override 2.0
# Multiplies the raw ADC reading by 2.0 (use for 1:2 divider boards)

Interpreting Voltage as State-of-Charge for LiFePO4

Meshtastic's built-in SoC estimation uses LiPo voltage thresholds (3.0 - 4.2 V per cell). For LiFePO4 packs, these thresholds are incorrect - LiFePO4 cells operate in the 2.5 - 3.65 V range. The firmware will report incorrect percentages unless you compensate.

LiFePO4 Single-Cell (3.2 V nominal) Voltage → SoC Table

Resting OCV (V) Approximate SoC (%) Interpretation
3.60 - 3.65100%Fully charged, absorb phase complete
3.40 - 3.4590%High charge, float plateau
3.30 - 3.3570 - 80%Mid-range - most of usable capacity here
3.27 - 3.3050%Flat region - voltage barely distinguishable from 70%
3.22 - 3.2530%Still flat; lower usable threshold approaching
3.18 - 3.2220%Low battery - alert threshold
3.10 - 3.1810%Critical - immediate recharge needed
< 3.10<5%BMS will soon disconnect; node will shut down

4S LiFePO4 Pack (12.8 V nominal) Voltage → SoC Table

Pack Voltage (V) SoC (%)
14.4 - 14.6100% (end of charge)
13.6 - 13.890%
13.2 - 13.470 - 80%
13.0 - 13.250%
12.8 - 13.030%
12.4 - 12.820%
12.0 - 12.410%
< 11.8<5% (BMS cutoff imminent)

Setting Low-Battery Alerts in Meshtastic

Meshtastic does not natively send alert messages when battery drops below a threshold, but there are two approaches to implement this:

Approach 1 - Node-Red / MQTT Alert Pipeline

  1. Configure Meshtastic MQTT uplink: meshtastic --set mqtt.enabled true --set mqtt.address YOUR_BROKER_IP
  2. In Node-Red, subscribe to msh/US/+/json/LongFast/# (adjust channel name as needed).
  3. Filter for msg.payload.decoded.telemetry.deviceMetrics.voltage below your LVD threshold.
  4. Route low-voltage events to an alert node (email, PushOver, Telegram bot).

Approach 2 - Meshtastic Python Script (Autonomous Node)

import meshtastic
import meshtastic.serial_interface
from meshtastic.mesh_pb2 import MeshPacket

iface = meshtastic.serial_interface.SerialInterface()
LOW_VOLTAGE_THRESHOLD = 3.18 # V per cell for LiFePO4 (20% SoC)

def on_receive(packet, interface):
 if "decoded" in packet and "telemetry" in packet["decoded"]:
 m = packet["decoded"]["telemetry"].get("deviceMetrics", {})
 voltage = m.get("voltage", 0)
 node_id = packet["fromId"]
 if voltage > 0 and voltage < LOW_VOLTAGE_THRESHOLD:
 print(f"LOW BATTERY: Node {node_id} at {voltage:.2f} V")
 # Send alert message on mesh
 iface.sendText(f"⚠ Low battery: {node_id} {voltage:.2f}V", wantAck=False)

iface.localNode.setOwner("MonitorNode")
iface.addReceiveObserver(on_receive)
input("Press Enter to exit\n")
iface.close()

MeshCore Telemetry Equivalent

MeshCore uses a similar but distinct telemetry structure. Battery reporting in MeshCore is enabled via the telemetry section in the node YAML configuration file:

telemetry:
 enabled: true
 interval_s: 300
 battery:
 adc_pin: 35
 adc_vref: 3.3
 divider_ratio: 2.0
 low_voltage_alert: 3.18

MeshCore publishes telemetry packets to MQTT in JSON format. Grafana can consume these via the Grafana MQTT data source plugin or via InfluxDB (Node-Red → InfluxDB → Grafana).

Graphing Battery Data in Grafana

Architecture

Meshtastic Node
 │ (MQTT telemetry JSON)
 ▼
Mosquitto MQTT Broker
 │
 ▼
Node-Red (parse JSON → extract voltage/SoC → write to InfluxDB)
 │
 ▼
InfluxDB 2.x (time-series storage)
 │
 ▼
Grafana (dashboards, alerts)

InfluxDB Line Protocol (Node-Red write node)

measurement: node_battery
tags: node_id, node_name, location
fields: voltage (float), battery_pct (int), soc_lifepo4 (float)
timestamp: nanosecond UNIX timestamp from packet

Grafana Panel Configuration

A complete Grafana dashboard JSON template for Meshtastic power monitoring is maintained in the Mesh America GitHub repository under monitoring/dashboards/meshtastic-power.json.