Chris Collins

Tools · electronics

Board power tree

Draw a board's power tree — USB, battery, adapter, PoE or solar, through LDOs, buck, boost and buck-boost converters, load switches and diodes, to the MCU, radio, sensors, LEDs and motors — and get each rail's current, power, converter loss and junction temperature with warnings, a Sankey of where the power goes, the overall efficiency, and the battery life from the duty cycles along the cell's discharge curve.

Added

Works with

How to use it

A board’s power tree is everything between the connector or the cell and the chips: which regulator feeds which rail, what each one costs in heat, and what the battery sees. This tool lets you draw it and then solves it over one wake period — so a converter is judged at the current it actually carries at each moment, including the microamps of deep sleep where most battery projects lose their charge.

How to use it

  1. Start from an example — an ESP32 sensor node on a LiPo, an Arduino Uno from a 9 V battery, an RP2040 board from USB, an LED-strip controller from 12 V, or a Raspberry Pi 4 from a 5 V adapter — or press New.

  2. Build the tree. + Source, + LDO, + Switcher, + Switch / diode and + Load add a part fed from the selected box. Drag a box to move it; drag from its coloured output dot on the right onto another box to feed that box from it (the inspector’s Fed from does the same on a phone). Tidy layout lines everything up.

  3. Choose the parts. Tap a box and pick a Part: sources (USB 2/3/C, adapters, 802.3af/at PoE, a small solar panel, LiPo, 18650, AA, NiMH, PP3, CR2032, LiFePO₄, lead-acid); LDOs (AMS1117, MCP1700, AP2112); switchers (TPS62840, TPS62130, MP1584, TPS63020, XL6009, a PoE PD module); load switches and diodes (TPS22918, LM66100, Schottky, 1N4007, MOSFETs); and loads (ESP32, ESP32-C3, RP2040, ATmega328P, nRF52840, SX1276, BME280, SHT31, OLED, WS2812B, LED strip, servo, motor, Pi 4, SSD, fan). Each preset shows where its typical figures come from; every value can be edited.

  4. Set the duty cycle. The wake period is one cycle. Each load has an active and a sleep current, how long it is active (always, 2.3 s, 50 ms) and when in the period it starts, so you can line up "sensor on for 100 ms, then Wi-Fi for 2 s". A load on a different rhythm (a blink every 2 s inside a 10-minute period) takes its own cycle and counts as its average. A load switch can be switched on for part of the period: everything behind it is unpowered the rest of the time.

  5. Read the results. The diagram shows each rail’s voltage, loss and junction temperature; boxes with a problem get a red or amber badge. Summary has the input power, what reaches the loads, the losses, the overall efficiency, the battery life (or the energy a day for a mains source, or the solar balance), and the warnings — tap one to jump to the part. Rails is the table; Where the power goes is a Sankey from the source through each converter to the loads and to heat. Current over one period is the source current on a log scale; Battery discharge is the cell voltage over its life.

  6. Export the diagram or the Sankey as SVG, or the table as CSV. Share link puts the whole tree in the URL; the tree is also remembered in this browser.

How it works

The tree is solved at each moment of the period where something switches on or off. Loads are constant currents. Currents are added up the tree and voltages come down it, a few passes until they agree:

  • Source — USB, an adapter or PoE is a voltage with a series resistance (the cable there and back) and a current or power limit. A battery is its open-circuit voltage at the state of charge, from the chemistry’s discharge curve, minus the current through its internal resistance.

  • LDO — the input current is the load current plus the quiescent (ground) current, so its loss is (Vin − Vout)·I + Vin·Iq. Dropout is a fixed part plus a resistance times the current: bipolar parts like the AMS1117 need about 1.1 V at any load, CMOS parts like the MCP1700 (178 mV at 250 mA) almost nothing at light load. Below Vout + dropout the output follows the input down.

  • Switcher — loss = Vin·I0 + k·Pout + R·Iout²: a no-load loss (quiescent current and the pulse-skipping losses that dominate at microamps), a part proportional to the power (switching, gate drive, a catch diode’s forward drop) and conduction loss. The three numbers for each preset are fitted by hand to the efficiency curves in its data sheet; the inspector draws the curve and marks where the converter sits at the lightest and heaviest moments of the period. A buck cannot raise the voltage and a boost cannot lower it (it passes the input through its diode); below its minimum input a switcher turns off.

  • Switches and diodes — R·I² plus Vf·I plus its own quiescent current.

  • Temperature — Tj = Ta + P·θJA, from the package’s θJA in the preset (on modest copper; check the data sheet and your layout). Small packages reach their steady temperature in seconds to tens of seconds, so the loss used is the larger of the period average and any stretch lasting 10 s or more. Open in Thermal design takes the loss and θJA to the thermal tool to try a heatsink or more copper.

  • Warnings — overcurrent against each part’s rating (and a boost’s switch-current limit), input above the maximum or below the minimum, LDO dropout, a buck or boost that cannot regulate, LDOs that burn more than they deliver, junction temperatures within 25 °C of the limit or over it, a load’s supply outside its range, a battery peak above what the cell gives comfortably, and cable drop.

  • Battery life — the battery is discharged in ½ % steps of charge. At each step the whole period is solved again at that open-circuit voltage, so a switcher draws more current as the cell runs down and every converter is at its real light-load efficiency during sleep; the self-discharge is added as a steady drain. It stops when the cell falls to its cut-off under the peak load, a converter switches off, or a load’s supply drops below its minimum — the Uno example stops at about 20 % charge, when the AMS1117/NCP1117 can no longer hold the ATmega above 4.5 V.

Where the numbers come from

  • Regulators and switchers — the data sheets named in each preset: AMS1117 (Advanced Monolithic Systems), MCP1700 (Microchip), AP2112 (Diodes Inc.), TPS62840, TPS62130, TPS63020, TPS22918 and LM66100 (Texas Instruments), MP1584 (Monolithic Power Systems), XL6009 (XLSEMI), IRLB8721 (Infineon), AO3401 (Alpha & Omega). θJA figures are typical for the package and vary a lot with copper area.

  • Loads — Espressif ESP32 (v5.3) and ESP32-C3 (v2.4) datasheets, the RP2040 datasheet (Table 637), Microchip ATmega328P, Nordic nRF52840 Product Specification v1.1, Semtech SX1276, Bosch BME280, Sensirion SHT3x, Worldsemi WS2812B; the Raspberry Pi 4 and Arduino Uno figures are measured board currents, which vary with firmware, peripherals and what is plugged in.

  • Sources — USB 2.0 and 3.x specifications (500 / 900 mA), USB Type-C current advertisement (1.5 / 3 A), IEEE 802.3af/at (12.95 / 25.5 W at the powered device, up to 20 Ω of cable loop), and typical discharge curves for each chemistry at light load and room temperature.

Limits

  • Loads are constant currents. A resistor-fed LED or a motor draws less at a lower voltage; a constant-power load (a downstream converter you have not drawn) draws more.

  • The switcher model is a three-term fit, good for comparing parts and finding where the power goes, not a replacement for the data sheet’s curve at your input voltage. Light-load modes differ a lot between parts and settings (PFM, power-save, forced PWM).

  • The battery curve is at light load and 20–25 °C. Capacity falls at high currents (Peukert) and in the cold, and the internal resistance rises with age; the battery-life estimator applies temperature and ageing derating.

  • Inrush and start-up surges (a motor’s stall current, capacitor charging) are not modelled: give the load its surge current for a short active time if it matters.

Linking to an example

Share link copies a URL with the whole tree packed into ?s=. A hand-written link can open an example: ESP32 on a LiPo · Arduino from 9 V · RP2040 from USB · LED strip from 12 V · Raspberry Pi from 5 V.

Runs entirely in your browser; nothing you type leaves this page.