Skip to content

Power design

Mitra Ardron edited this page Feb 8, 2026 · 17 revisions

Frugal IoT - power design

TODO - add pictures of boards

Power management is one of the key aspects of successful IoT design, along with the sensor, communications, and physical enclosure.

There are two complementary aspects of Power management. This document covers how to supply power, while reducing power usage is documented in Power Reduction

Status (Jan 2026)

This is a work in progress - I have built prototypes for three scenarios.

Tarun at GDT built a similar device based on an earlier version of this see IoT-GDT/wiki and issues he is facing at IOT-GDT#5 and IOT-GDT#9

Also see active issues #23 for software and #103 for hardware

Built in charging

If you can use a board with built in battery support, then this is the simplest - but not always appropriate or cheapest solution. Supported boards that do this include Lolin C3 Pico; the Lilygo TTGO and T3S3 range of boards for LoRa; and the Heltec boards.

Pair one of these boards with a solar panel that has a USB output for example, these are commonly available as they are used for external security cameras. I find them on Ali Express for around €3-5 but shop around as prices change. Also see below, many of these boards do NOT match the specification on the site, though they may still be a good deal.

Battery price depends mostly on the size of the batteery. are about €2-3 for either an 18650 plus holder; or one of the packaged remote-control batteries.

In terms of cost, a Lolin C3 Pico is for example ~€7 while an S2 is ~€2.50, for a much better board. The extra power supply parts needed for the S2 are about €1 (charger + booster) So the overall solution with a power-bank might actually be cheaper since in both cases you need an enclosure to house battery + dev board + wiring.

TODO add photo of C3 with panel + battery

Powerbank for IoT

The solution offered here is a power-bank optimised for small IoT applications, and the two options below both have a BOM cost of well below €10 including the solar panel.

Goals are:

  • An appropriate level of reliability for the situation.
  • Not adding unnecessary costs to simple scenarios.
  • Being able to assemble in-country from easily available parts.
  • Which means using existing off-the-shelf boards
  • Appropriately weather-proof depending on where it will be used.
  • In particular to avoid shipping batteries more than necessarily - they are heavy, and often get stuck in customs, or subject to import duty, and may have safety regulations for air shipping.

Top level design of power-bank

Screenshot 2025-03-22 at 12 02 20 PM

The core idea is a power source, a charger, a battery, a boost converter (to 5V) and a dev board.

Getting the details right turns out to be a lot harder than I expected, so I will include some of the mistakes made so that hopefully if you are designing your own setup then you won’t repeat them.

Let’s start from an assumption that you are trying to power a simple dev board, with its WIFi radio on, drawing about 150mA. But it might be operational for 30 seconds every 10 minutes, and just ~1mA when in deep sleep, so average power consumption is ~8.5mA, which is 5V*0.0085 * 24 = 1Wh/day

These numbers will be different (higher) for a LoRa powered node if it is a member of a mesh that is running continuously.

Why a common powerbank won’t work.

The most obvious, mistake would be to get a cheap off-the-shelf power bank and charge the board from that. The problem is that most power-bank’s turn off when the load drops below a about 50mA, a current that looks small, when charging a phone, but is larger than your device draws - especially when in deep sleep.

Essentially we need to build a “power bank” that does not have this characteristic, and ideally is affordable and weather resistant.

Source of power - Solar (raw or USB) or USB (intermittent or full-time)

USB

Obviously, the simplest case is full-time USB, via a standard USB phone charger,

In some cases, it will be possible to charge the device occasionally from a USB.

Solar

In most other cases the obvious source of power would be a small solar panel. Solar panels are rated by Watt-peak (Wp). A reasonable rule of thumb is to assume you get the equivalent of 4 hours of this power from an optimally pointed panel in mid-latitudes, but this will be far less further from the equator, or during the monsoon or winter.

There are small thin-film panels, often 1/2 Watt which MIGHT be enough depending on the exact calculations, but leaves little spare.

A 5W panel (about the smallest polycrystalline ones made) would give you 20Wh per day, so even in winter it’s significantly more than you need. These used to be easy to get, but I do not see any on AliExpress any more, as they have been mostly replace by a newer alternative which are solar panels, with a built-in voltage stabiliser to a 5V USB connection. For example this is €5.68 and designed to power a security camera. It works well, though it’s almost certainly not 10 Watts as advertised.

Note - that I’ve noticed a lot of panels on Ali-Express are miss-advertised, badly enough to be worth complaining about, for example this is advertised as 35W when its closer to 3W. At €2.25 that wasn’t a bad deal, but now the price has more than doubled (to $5.66), its looking more like a scam!

Charger board

The charger depends on the source of power, whether it is USB or Solar. To use solar well, you need a charger that is designed to get the most out of the characteristics of the solar cell. There are a class of controllers called “MPPT” (for Maximum Power Point Tracking), however true MPPT is hard to do in a cheap board, and some boards that advertise MPPT may not actually do it.

Three affordable solar chargers,

This CN3065 based board is available from multiple suppliers for around €1.50. They may be the same board, from the same factory, or copies or reworks of a standard design. An advantage is that it has both solar and USB inputs so is good where a single power bank design might be used with either USB (including USB solar panels) or with unregulated solar panels. The downside is that it only works at 6V, which is a common small panel voltage. You can use it with either plugs for solar, battery and booster, or hard-wired.

If the panel has a different voltage then there is a CN3791 based [board] that comes in 6V, 9V, and 12V versions. It is a little more expensive (approx €2.50) and does not have a USB option. It is probably more efficient, but the extra €1, and lack of a USB port mean that I would only use it to pair with a higher (9V or 12V) voltage solar panel.

There are also CN3163 boards. Which are also limited to 6V panels. These claim to be MPPT, though some reviewers doubt this. Its is typically slightly cheaper than the CN3065, but needs soldering rather than plug-in connectors. I have not, yet, tried this board but suspect it works.

USB only solution

For situations where the device will be driven only from USB - either from a plugin source, or a regulated solar panel, then a simpler charger is possible. I have been using this simple board which is only about €0.16, and am not aware of why a more expensive board might be needed.

Battery

Battery choices break down into two basic choices

18650

This ubiquitous cell comes from many suppliers. While it sounds like a standard, it actually comes in different capacities, and many cells are not actually the capacity they are advertised at. 

** TODO Do the calculations - and note 3.7V v 4.2V **

Cells range widely in price and are famously over-specified, I have been paying about €1.46 for cells that claim 9900mAh but are probably closer to 3500mAh! 18650 cells require a battery holder - such as this at about €0.40

compact cells (e.g. for Radio Control)

The other alternative is the type of cell used for radio controlled devices. These are usually a bit more expensive (for the same capacity) for example €1.31 for 200mAH, or €1.97 for 2000mAh

Where not much power is required, especially if using a dev board such as a Lolin C3 Pico, or the Lilygo LoRa boards, then one of these may be the right solution.

Booster

This takes the 4.2V from the battery and boosts it to 5V for a USB connector to the dev board.

The booster is actually the hardest part to get right. The core challenge is that a well designed IoT sensor is a power-sipper. So there are two challenges.

  • Many of the booster circuits turn off at currents below 20mA, so the dev-board loses power and never returns from sleep.
  • Most passive boosters have self-consumption as high as 20mA meaning they draw more power than the dev-board plus sensors

Of the 8 booster boards I bought, 6 had one or other of these problems, and I settled on this one that has a 1mA self-consumption and no minimum draw.

I have been getting good results with this board, though I’d be happier if I had a good alternative rather than being dependent on one supplier. So far we have not found the board on in-country suppliers such as Robu.in

Prototype power banks

Combining these, I have put together two power banks.

I used a short piece of 40mm pipe with push-on caps as the enclosure, because larger ABS boxes (e.g. electrical junction boxes) were pricey, and a box long enough for a 18650 left a lot of wasted space. Offcuts of the pipe should be free, and the ends can be sourced from local plumbing supplies or online e.g. AliExpress

Solution 1 consists of an 18650 cell in a battery holder, it is wired directly to the CN3065 and Booster. Cables are brought to the outside for USB, or Solar panel, and to power the dev board. It should alternatively be possible to house the dev board in the pipe, and bring cables out to sensors such as used for the Agri-sensor.

Solution 2 is almost the same, but uses the cheap USB charger.

The costs come out close enough that the most affordable solution will depend on which panels you can source.

Full Bill of Materials

TODO - link to parts

Power 1 Power 2
for 5V-USB Solar panels for 6V Solar (cheaper panels)
Pipe ends + Pipe ~1.34 ~1.34
Solar panel Note products often do not match spec on Ali 3.07 (price has gone up, shop around) 2.40
Battery holder 18650 0.45 0.45
Battery 18650 Note capacities vary and many cells do not match label capacity 1.64 1.64
Booster - very fussy must be this one 0.45 0.45
Charger 5v->Lithium 0.16
Charger CN3065 Solar->Lithium or voltage matched CN3791 1.64
Cables ~0.20 ~0.20
Total $7.31 $8.12

Battery monitoring

There is a nasty bug in most chips/dev-boards where they behave badly as the voltage drops (sometimes called “brown out”) and if the power then comes back up the board may not recover without a full (manual) reset. In particular the RTC’s on ESP32’s can become corrupt and lose data.

The solution, in many, but not all, cases is to watch for the battery dropping, and as it gets low use significantly less power. There is a function in the System_Power which is run before Radios or UART are turned on, which checks power, and goes immediately to deep sleep for a programable period (by default the same as the normal dee-sleep time). In my experiments this makes the device remain functional (but not sending data) till the battery voltage rises, which is typically from solar in the morning.

If this happens regularly it is an indication that either the battery is too small to drive the device overnight, or the solar panel is too small (or positioned badly) to fully charge it each day.

In both prototypes, a lead from the positive side of the battery is brought out. If you use different boards, check that the voltage across the battery is the same as that between the positive lead of the battery and the negative lead of the booster, which it will be if the Booster uses a common ground.

This lead goes to a pin that can be AnalogRead, and a Sensor_Battery is added in main.cpp. The Voltage Divider is 2.

Other alternatives

There are two power supply boards from Adafruit The BQ25185 solar charger+boost for €6.22 Guide and BQ25185 Guide for €7.46.

They are similar but the first lacks a boost, requiring this as an extra, and have no advantages we can find over the €0.16 charger used above. It doesn’t even turn off the output when battery voltage drops, in fact the board refuses to charge this too-low battery, making the board close to useless.

The second one looks better, but we haven’t tried it yet, and at €7.46 compared to €0.16 + €0.45 its unlikely to be a good value solution.


Power Calculations

— TODO - REWORK THESE FROM SPREADSHEET

Resources

Clone this wiki locally