---
title: Building a Solar Powered Lora Meshtastic Community Network
date: 2023-12-16T07:00:08+00:00
modified: 2025-11-13T17:01:12+00:00
image:: https://kaspars.net/wp-content/uploads/2023/12/meshtastic-ina219-wemos-heltec-esp32-lora-scaled.jpeg
permalink: https://kaspars.net/blog/solar-lora-meshtastic
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
category:
  - Electronics
post_tag:
  - Meshtastic
---

# Building a Solar Powered Lora Meshtastic Community Network

[Meshtastic](https://meshtastic.org/) is a wonderful project for creating decentralised text-based communication networks for local communities using [low power (and low cost) Lora radios](https://meshtastic.org/docs/hardware/devices/). Fun fact — the Meshtastic logo appears to reference the [chirp modulation](https://www.sghoslya.com/p/lora-is-chirp-spread-spectrum.html) used by Lora.

The best way to learn about the project is to [explore the forum](https://meshtastic.discourse.group/), join [the Discord server](https://discord.gg/ktMAKGBnBs) and [the Reddit community](https://www.reddit.com/r/meshtastic), follow `#meshtastic` [on Twitter](https://twitter.com/hashtag/Meshtastic), [Instagram](https://www.instagram.com/explore/tags/meshtastic/) and on [your ActivityPub network of choice](https://mastodon.social/tags/meshtastic), and [find recent videos on YouTube](https://www.youtube.com/results?search_query=meshtastic).

There are various community efforts to build local networks already:

- [Meshtastic Ukraine](https://wikimesh.pp.ua/uk/home) with [around 850 active nodes](https://mesh.in.ua/grafana/) in the 433 MHz range.
- [Austin Mesh](https://austinmesh.org) in Texas, USA with weekly Friday check-ins (also available globally through the MQTT gateway).
- [Iffy Books events](https://iffybooks.net/event/meshtastic-101-sept-10/) and [resources](https://iffybooks.net/solar-lora-circuit-diagram/) (including [this incredible zine about Meshtastic](https://github.com/iffybooks/meshtastic-zine)).

## Network Map

Here is a [map of all active nodes](https://map.technicallyrural.com) connected to networks that relay messages [to the official MQTT endpoint](https://meshtastic.org/docs/configuration/module/mqtt). This map is created by a forum user and shared in [this thread](https://meshtastic.discourse.group/t/where-is-the-world-map/6882/6).

## How to Build a Network

Following the learnings from the [solar-powered Raspberry Pi security camera project](https://kaspars.net/blog/solar-raspberry-pi-camera), I want to build solar-powered repeat nodes (with [`REPEATER` role](https://meshtastic.org/docs/configuration/radio/device)) to place in high enough places to enable coverage for everyone in the area. Since repeat nodes are invisible to the network and can’t send health or sensor data, another node with `SENSOR` role would be connected to the same battery and would broadcast the health of the repeater node along with temperature and humidity at very long intervals for maximum power savings.

I’ve decided to use [Heltec WiFi Lora 32 (v3)](https://heltec.org/project/wifi-lora-32-v3/) ($20, [schematic diagram](https://kaspars.net/wp-content/uploads/2023/12/HTIT-WB32LAF_V3.1_Schematic_Diagram.pdf), from [AliExpress](https://kaspars.net/go/heltec-wifi-lora-32) / [Amazon](https://kaspars.net/go/amazon-heltec-wifi-lora-32)) for the repeater nodes as they use ESP32-S3FN8 for the main controller and SX1262 LoRa chip with an IPEX1.0 antenna connector. This type of connector is really practical for bringing the antenna outside of the enclosure as the larger SMA connector cables are usually harder to bend and require more space in the case.

It also features a TP4054 charge controller and a voltage divider connected to an ADC pin for monitoring the battery voltage which is useful for telemetry. I’ve yet to figure out if it has any over discharge protection.

It is reported that [RAK4631 WisBlock Core](https://store.rakwireless.com/products/wisblock-meshtastic-starter-kit) ([AliExpress](https://kaspars.net/go/wisblock-rak4631-kit) / [Amazon](https://kaspars.net/go/amazon-wisblock-rak4631-kit)) with the nRF52840 microcontroller and the same SX1262 LoRa radio uses significantly less power compared to ESP32 devices so it is probably a better choice for pure repeater nodes. However, I wanted something that is more universal with a screen and a case for this prototyping phase.

## Power Requirements

There is [a great thread on the forum](https://meshtastic.discourse.group/t/solar-charging-of-meshtastic-devices/870) with several posts linking to the following resources that outline the effective power requirements:

- [Meshtastic ESP32 airtime and current draws (Google Sheets)](https://docs.google.com/spreadsheets/d/1ft1bS3iXqFKU8SApU8ZLTq9r7QQEGESYnVgdtvdT67k/edit)
- [NRF52840DK+SX1262 Meshtastic airtime/current draws (Google Sheets)](https://docs.google.com/spreadsheets/d/1UMZRrFwL2QfyxEf_jnd2sIuZqrikItOxJ1EPNF5UBdU/edit)
- [Meshtastic Power Consumption Tests (Google Sheets)](https://docs.google.com/spreadsheets/d/1wr6aqqmAICttwSqVga-WYILJpueYfDKX1ejSYZEfKY0/edit)
- [How To Calculate Solar Panel and Battery Size (Google Sheets)](https://docs.google.com/document/d/12GIY24vLKLABg2RUTPP6yMzokr44GMzJOE4p7ngaCbI/edit)

The general consensus appears to be that ESP32 powered devices without any bluetooth, screen or GPS attachments need 0.1W on average. I was also able to confirm this in real-life testing at the 10% air-time (maximum allowed in EU).

## Solar Power

The size of the battery and the solar panel power should be matched to ensure that a typical period of sunshine can charge the battery. Consider the following parameters:

- Total battery capacity.
- Maximum *charging current* supported by the cells.
- Duration of a typical charging session (hours of peak solar panel output).

For example, a typical 18650 cell with a capacity of 2500mAh or 9Wh (at 3.6V nominal voltage) recommends **a maximum charging current of only 1A for cycle use** which multiplied by the maximum charging voltage 4.2V gives us just *4.2W of maximum charging power*. So there is no reason to pick a 40Wp solar panel if only 4W of that can be used by the battery.

The maximum charging power of 4.2W also means that it requires at least 2.1 hours to fully recharge the battery. Accounting for the charging losses it would probably increase to 2.5h.

**As a rough guide you can pick a 10Wp solar panel for every 10Wh of battery capacity which requires 3h of full sunshine for a complete recharge.**

### Typical Charge Controllers

- **CN3791** ([datasheet PDF](https://kaspars.net/wp-content/uploads/2023/12/CN3791.pdf)) is a true MPPT charge controller with an input voltage of up to 28V and a charge current of 4A (at 4.2V). Batteries discharged below 66% are trickled charged with 17% of the maximum charge current.
- **CN3163** ([datasheet PDF](https://kaspars.net/wp-content/uploads/2023/12/CN3163.pdf)) is often called an MPPT controller but in reality it is only capable of reducing the charge current to maintain the minimum solar input of 4.4V (up to 6V). This controller can also adjust the charge rate based on the temperature to improve the battery life.
- **TP4056** and its clones like CL4056 are generic Li-Ion battery cell chargers that don’t have any special functionality related to the solar input.

From the CN3163 datasheet:

> If the output capability of input power supply is less than the charging current set by the resistor at ISET pin, then **the on-chip adaptive cell will begin to function to adjust the charging current based on the output capability of input power supply**. In this case, the charging current may be less than the value set by the resistor at ISET pin, but it is **maximized to the output capability of input power supply** on the condition that the input voltage at VIN pin is no less than 4.4V, which is the minimum operating voltage of CN3163.

### 3.3V Voltage Regulators

Microcontrollers require stable 3.3V input power so every Meshtastic device has a voltage regulator that creates this voltage either from the USB power or the battery. It is important that these devices are efficient and have a low voltage difference at which they can still do the conversion.

For example, the Heltec Lora 32 v3 uses CE6260 with a drop-out voltage of 0.120V at 100mA load which means that it will stop converting to 3.3V as soon as the battery voltage drops below 3.42V which leaves some of the battery capacity unusable. Importantly, the voltage difference increases with load so at 200mA (when transmitting a Lora packet) the drop-out voltage would increase to 0.25V requiring a battery voltage of 3.55V.

### Battery Protection

- Most 18650 size batteries don’t have any undervoltage protection.

## Solar Test Node

For the initial prototype I found [this 4W (D4W) solar panel](https://kaspars.net/go/4w-solar-panel-18650-battery) ([AliExpress](https://kaspars.net/go/4w-solar-panel-18650-battery)) with an integrated case for six 18650 battery cells. Using only three cells provides plenty of room for additional electronics like the LoRa board.

In general it is best to oversize the photovoltaic panels significantly to ensure that required charging voltage is reached even when there is low solar radiation (such as during winter).

![4W solar panel with 18650 batteries for Meshtastic Lora nodes](https://kaspars.net/wp-content/uploads/2023/12/meshtastic-4w-solar-panel-scaled.jpeg?strip=all&quality=90&resize=1920,1440)In winter the charging power didn’t exceed 1W, though.![Charging circuit of 4W solar panel with six 18650 batteries and CL4056 for charge control and FP6276B boost controller for 5V output](https://kaspars.net/wp-content/uploads/2023/12/meshtastic-4w-solar-panel-battery-scaled.jpeg?strip=all&quality=90&resize=2560,1920)4W solar panel with space for six 18650 batteries and a charging circuit.And here is a close-up of the circuitry:

![Charging circuit of 4W solar panel with 18650 batteries using CL4056 for charge control, FP6276B boost controller for 5V output and XB5352A for battery protection](https://kaspars.net/wp-content/uploads/2023/12/meshtastic-4w-solar-panel-circuit-scaled.jpeg?strip=all&quality=90&resize=2560,1920)Charging circuit of 4W solar panel with 18650 batteries using CL4056 (`U3`) for charge control, FP6276B (`U4`) boost controller for 5V output and XB5352A (`U5`) batter protection chip *only* for the solar input.### Battery Undervoltage Protection

The board appears to use XySemi XB5352A ([datasheet PDF](https://kaspars.net/wp-content/uploads/2024/01/xb5352a-battery-protection.pdf)) battery management chip `U5` (the SOT-23-5 component to the right of the “on” switch) which handles over-voltage (4.30V for VCU with 4.10V recovery VCL), over-discharge (2.40V VDL with 3.0V recovery VDL), over-current (3.2A IOV1), and over-temperature protection. However, this chip is placed *on the solar input* **so there is no under-voltage or over-discharge protection *on the battery side***. This makes this solar panel unusable without additional battery under-voltage protection.

## Configuring the Solar Powered Repeater 

And here is the case fitted with Heltec Lora 32 v3 with INA219 connected to pins 41 and 42 (confirmed this [with the Arduino Core library](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/blob/b9a9180f8ec5ff69b69bdaa31684583c4a5a5813/variants/wifi_lora_32_v3/pins_arduino.h#L34-L35) and the [usage in the Meshtastic firmware](https://github.com/meshtastic/firmware/blob/486bf796906d6237e4d29f0bd7d90144979e2f9e/variants/heltec_v3/variant.h#L7-L9)) for measuring the battery voltage and current over time and reported over [Power Telemetry](https://github.com/meshtastic/firmware/blob/486bf796906d6237e4d29f0bd7d90144979e2f9e/src/modules/Telemetry/PowerTelemetry.cpp). Note that simply attaching the device to the board will make the firmware [use the INA219 bus voltage reading also for Device Telemetry](https://github.com/meshtastic/firmware/blob/486bf796906d6237e4d29f0bd7d90144979e2f9e/src/Power.cpp#L287-L318) (which is not documented).

![Heltec Lora 32 v3 with an INA219 power sensor inside a 4W solar panel case](https://kaspars.net/wp-content/uploads/2023/12/meshtastic-ina219-wemos-heltec-esp32-lora-scaled.jpeg?strip=all&quality=90&resize=2560,1589)## Power Measurements

The test setup shown in the photo above was configured as a router node with a single 18650 cell (6.6Wh capacity verified with Liitokala Lii-M4S \[[AliExpress](https://kaspars.net/go/liitokala-lii-m4s) / [Amazon](https://kaspars.net/go/amazon-liitokala-lii-m4s)\]) at 5% air utilization rate (one telemetry message per minute). It ran for 6 days which amounts to an average power consumption of 0.046W (12mA@3.7V) at 5% utilization rate. Importantly, this node was also powering the INA219 sensor which was doing the power measurements every minute.

![Voltage of a single 18650 cell (6.6Wh capacity) powering Heltec WiFi Lora 32 v3 and INA219 current monitor while doing a single measurement and telemetry message as a Meshtastic router node](https://kaspars.net/wp-content/uploads/2023/12/heltec-lora-esp32-solar-power-measurements.png?strip=all&quality=90&resize=2434,1362)Voltage of a single 18650 cell (6.6Wh capacity) powering Heltec WiFi Lora 32 v3 and INA219 current monitor while doing a single measurement and telemetry message as a Meshtastic router node.