Building a Solar Powered Lora Meshtastic Community Network

Meshtastic is a wonderful project for creating decentralised text-based communication networks for local communities using low power (and low cost) Lora radios. Fun fact — the Meshtastic logo appears to reference the chirp modulation used by Lora.

The best way to learn about the project is to explore the forum, join the Discord server and the Reddit community, follow #meshtastic on Twitter, Instagram and on your ActivityPub network of choice, and find recent videos on YouTube.

There are various community efforts to build local networks already:

Network Map

Here is a map of all active nodes connected to networks that relay messages to the official MQTT endpoint. This map is created by a forum user and shared in this thread.

How to Build a Network

Following the learnings from the solar-powered Raspberry Pi security camera project, I want to build solar-powered repeat nodes (with REPEATER role) 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) ($20, schematic diagram) 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 (similarly priced) 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 with several posts linking to the following resources that outline the effective power requirements:

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) 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) 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 (affiliate link) 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
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
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
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) 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 and the usage in the Meshtastic firmware) for measuring the battery voltage and current over time and reported over Power Telemetry. Note that simply attaching the device to the board will make the firmware use the INA219 bus voltage reading also for Device Telemetry (which is not documented).

Heltec Lora 32 v3 with an INA219 power sensor inside a 4W solar panel case

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

8 Comments

  1. Will Martin says:

    Hi Kaspars – this is Will from Austin Mesh – thanks for mentioning us! We have a meeting tonight and I’m excited to keep building out the network. We’ve found that it’s better to over-spec both the batteries and solar panels. Our “version 5.0” solar repeater uses a 12 watt panel and a 6,400 mAh battery (parts list is on austinmesh.org). One of the main problems with the RAK chips is if the voltage falls to a certain level it will put it into a permanent fault state, so it’s best to have a battery that cleanly shuts off power if voltage falls below a certain level. The simpleest way we’ve found to do this is with the Voltaic Systems iot battery packs. The other way we’ve tried is to use a an 18650 battery and use a cutoff chip that shuts power if voltage drops below 4.25v: https://www.etsy.com/listing/1421193059/10-li-ion-battery-protection-modules-pcm

    • Ryan T Carroll says:

      Hey Mr. Martian. Although I am not from Texas (anymore) I wanted to pick your brain if I may. I am very new to LoRa, but I can’t get enough. I am attempting to build a solar powered Lora system. Although my town is so small, if you blink you’ll pass it, I do want to build something for close family. Within 5-10 miles to start with. I have purchased some equipment so far, but I keep getting conflicting designs and I’m totally lost. I was wondering if you or someone you may know, would be able to reach out to possibly help with pointers and what not. I figured maybe email or messenger might be more prompt would bug everyone on this thread lol. With having to order most things from overseas, I’d rather not take 6months to build due to ordering and returning wrong parts and whatnot. Thanks in advance brother.

  2. Jason Cameron says:

    One thing that I have been unable to find is where to find places to put the nodes. What are legal ways to place nodes in an area to get significant coverage? I live around Wichita, Kansas, which is relatively flatter than most areas of the country, but I’m unsure of how to go about setting up nodes to provide coverage? How do you go about it? Also, I’m using a “hide my email” which is why it looks strange, but this is to keep spam at bay, I hope you understand. I appreciate your time.

    • Kaspars says:

      That’s a great question. I’m also unsure about this here in Europe. I have the opposite problem of high density buildings and needing to place the nodes on roofs to allow for any decent coverage.

      The most practical examples I’ve seen on YouTube and the Meshtastic Discord channel are nodes higher up in mountains placed in wilderness or attached to trees.

  3. brett says:

    ask for forgiveness rather than permission. if authorities somehow manage to identify you as the owner, tell them you’re working with search and rescue to provide a wide-range capable communication network for their teams

  4. Daniel says:

    Hey Kaspar.
    Im currious how many nodes that one repeater can serve ? is it ok for 12 nodes for 1 repeater ?
    I appreciate your time.

  5. Nice node build and website, I recently discovered Meshtastic and started a website and YouTube Channel all about it, a mix of guides and tutorials, news and articles

Leave a Reply