{"id":9417,"date":"2026-08-10T13:37:10","date_gmt":"2026-08-10T11:37:10","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/"},"modified":"2026-08-10T13:37:10","modified_gmt":"2026-08-10T11:37:10","slug":"raspberry-pi-power-draw-ups-runtime-calculator","status":"publish","type":"page","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/","title":{"rendered":"Raspberry Pi Power Draw &#038; UPS Runtime Calculator"},"content":{"rendered":"<div class=\"gtm-analyser-container\" style=\"background: var(--bg-panel, #1e1e24); padding: 25px; border-radius: 8px; border: 1px solid var(--border, #2a2a35);\">\n<p style=\"color: var(--text-secondary, #a0a0b0); margin-bottom: 20px;\">Pick a board, add whatever hangs off it, and this page works out the steady power draw, how much headroom the supply keeps, and how long a battery would hold the system up. The watt figures per model are rough guideline values for a stock board; your own firmware, cooling and peripherals will shift them.<\/p>\n<div style=\"display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px;\">\n<div style=\"flex: 2; min-width: 260px;\">\n            <label for=\"pl-modell\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Raspberry Pi model (idle \/ full load)<\/label><br \/>\n            <select id=\"pl-modell\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px;\"><option value=\"pizero2w\">Pi Zero 2 W &mdash; 0.4 \/ 1.6 W<\/option><option value=\"pi3bp\">Pi 3B+ &mdash; 1.9 \/ 5.1 W<\/option><option value=\"pi4b\">Pi 4B &mdash; 2.7 \/ 6.4 W<\/option><option value=\"pi5-4\" selected>Pi 5 (4 GB) &mdash; 2.7 \/ 8.6 W<\/option><option value=\"pi5-8\">Pi 5 (8 GB) &mdash; 3.0 \/ 9.0 W<\/option><\/select>\n        <\/div>\n<div style=\"flex: 1; min-width: 160px;\">\n            <label for=\"pl-last\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">CPU load share (%)<\/label><br \/>\n            <input type=\"number\" id=\"pl-last\" value=\"35\" min=\"0\" max=\"100\" step=\"1\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;\"><br \/>\n            <input type=\"range\" id=\"pl-last-regler\" value=\"35\" min=\"0\" max=\"100\" step=\"1\" style=\"width: 100%; margin-top: 8px; accent-color: var(--accent, #3ddc97);\">\n        <\/div>\n<div style=\"flex: 1; min-width: 160px;\">\n            <label for=\"pl-netzteil\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Power supply rating (W)<\/label><br \/>\n            <input type=\"number\" id=\"pl-netzteil\" value=\"15\" min=\"0\" step=\"0.1\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;\">\n        <\/div>\n<\/p><\/div>\n<div style=\"border-top: 1px solid var(--border, #2a2a35); padding-top: 18px; margin-bottom: 20px;\">\n<div style=\"color: var(--text-primary, #e8e8ef); font-weight: 700; margin-bottom: 10px;\">Extra consumers<\/div>\n<div id=\"pl-liste\" style=\"margin-bottom: 12px;\"><\/div>\n<div style=\"display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;\">\n<div style=\"flex: 1; min-width: 240px;\">\n                <label for=\"pl-vorlage\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Preset to add<\/label><br \/>\n                <select id=\"pl-vorlage\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px;\"><\/select>\n            <\/div>\n<p>            <button id=\"pl-add-btn\" class=\"button\" style=\"background: transparent; color: var(--accent, #3ddc97); border: 1px solid var(--accent, #3ddc97); padding: 12px 24px; border-radius: 6px; font-weight: 700; cursor: pointer;\">Add row<\/button>\n        <\/div>\n<\/p><\/div>\n<div style=\"border-top: 1px solid var(--border, #2a2a35); padding-top: 18px; margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;\">\n<div style=\"flex: 2; min-width: 240px;\">\n            <label for=\"pl-akku-modus\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Battery capacity given as<\/label><br \/>\n            <select id=\"pl-akku-modus\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px;\"><option value=\"mah\" selected>Capacity in mAh plus cell voltage<\/option><option value=\"wh\">Energy in Wh<\/option><\/select>\n        <\/div>\n<div id=\"pl-mah-block\" style=\"flex: 1; min-width: 160px;\">\n            <label for=\"pl-mah\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Battery capacity (mAh)<\/label><br \/>\n            <input type=\"number\" id=\"pl-mah\" value=\"10000\" min=\"0\" step=\"100\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;\">\n        <\/div>\n<div id=\"pl-volt-block\" style=\"flex: 1; min-width: 140px;\">\n            <label for=\"pl-volt\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Cell voltage (V)<\/label><br \/>\n            <input type=\"number\" id=\"pl-volt\" value=\"3.7\" min=\"0\" step=\"0.1\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;\">\n        <\/div>\n<div id=\"pl-wh-block\" style=\"flex: 1; min-width: 160px; display: none;\">\n            <label for=\"pl-wh\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Battery energy (Wh)<\/label><br \/>\n            <input type=\"number\" id=\"pl-wh\" value=\"37\" min=\"0\" step=\"0.1\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;\">\n        <\/div>\n<\/p><\/div>\n<div style=\"display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px;\">\n<div style=\"flex: 1; min-width: 180px;\">\n            <label for=\"pl-eta\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Converter efficiency (%)<\/label><br \/>\n            <input type=\"number\" id=\"pl-eta\" value=\"85\" min=\"1\" max=\"100\" step=\"1\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;\">\n        <\/div>\n<div style=\"flex: 1; min-width: 180px;\">\n            <label for=\"pl-reserve\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Reserve time for a clean shutdown (s)<\/label><br \/>\n            <input type=\"number\" id=\"pl-reserve\" value=\"60\" min=\"0\" step=\"5\" class=\"form-control\" style=\"width: 100%; padding: 12px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;\">\n        <\/div>\n<p>        <button id=\"pl-btn\" class=\"button\" style=\"background: var(--accent, #3ddc97); color: #0b1114; border: none; padding: 12px 24px; border-radius: 6px; font-weight: 700; cursor: pointer;\">Calculate<\/button>\n    <\/div>\n<div id=\"pl-ergebnis\"><\/div>\n<\/div>\n<p><script>\n(function () {\n    \/\/ --- reine Rechenlogik, ohne jeden DOM-Zugriff ---\n    const MODELLE = {\n        'pizero2w': { leerlaufW: 0.4, vollW: 1.6 },\n        'pi3bp': { leerlaufW: 1.9, vollW: 5.1 },\n        'pi4b': { leerlaufW: 2.7, vollW: 6.4 },\n        'pi5-4': { leerlaufW: 2.7, vollW: 8.6 },\n        'pi5-8': { leerlaufW: 3.0, vollW: 9.0 }\n    };<\/p>\n<p>    const VORLAGEN = [\n        { name: 'SATA SSD over USB', watt: 2.5 },\n        { name: 'NVMe SSD on a HAT', watt: 3.5 },\n        { name: 'Cooling fan', watt: 0.6 },\n        { name: 'Camera module', watt: 1.2 },\n        { name: 'Generic HAT', watt: 1.0 },\n        { name: 'Own entry', watt: 0 }\n    ];<\/p>\n<p>    function zahlAus(wert) {\n        const text = String(wert === null || wert === undefined ? '' : wert).replace(',', '.').trim();\n        if (text === '') { return NaN; }\n        const zahl = Number(text);\n        return isFinite(zahl) ? zahl : NaN;\n    }<\/p>\n<p>    function formatiere(zahl, stellen) {\n        if (typeof zahl !== 'number' || !isFinite(zahl)) { return '-'; }\n        return zahl.toFixed(stellen);\n    }<\/p>\n<p>    function wattstundenAusMah(mah, volt) {\n        const m = zahlAus(mah);\n        const v = zahlAus(volt);\n        if (!isFinite(m) || !isFinite(v)) { return NaN; }\n        return m \/ 1000 * v;\n    }<\/p>\n<p>    function modellDaten(schluessel) {\n        const daten = MODELLE[schluessel];\n        if (!daten) { return null; }\n        return { leerlaufW: daten.leerlaufW, vollW: daten.vollW };\n    }<\/p>\n<p>    function boardLeistung(leerlaufW, vollW, lastAnteil) {\n        return leerlaufW + (vollW - leerlaufW) * (lastAnteil \/ 100);\n    }<\/p>\n<p>    function berechne(eingabe) {\n        const e = eingabe || {};<\/p>\n<p>        const leerlaufW = zahlAus(e.leerlaufW);\n        const vollW = zahlAus(e.vollW);\n        if (!isFinite(leerlaufW) || !isFinite(vollW) || leerlaufW < 0 || vollW < 0) {\n            return { ok: false, fehler: 'The board data is incomplete, so the total draw cannot be worked out.' };\n        }\n\n        const lastAnteil = zahlAus(e.lastAnteil);\n        if (!isFinite(lastAnteil) || lastAnteil < 0 || lastAnteil > 100) {\n            return { ok: false, fehler: 'Enter a load share between 0 and 100 percent.' };\n        }<\/p>\n<p>        const netzteilW = zahlAus(e.netzteilW);\n        if (!isFinite(netzteilW) || netzteilW <= 0) {\n            return { ok: false, fehler: 'Enter a power supply rating above 0 W.' };\n        }\n\n        const akkuWh = zahlAus(e.akkuWh);\n        if (!isFinite(akkuWh) || akkuWh <= 0) {\n            return { ok: false, fehler: 'Enter a battery energy above 0 Wh.' };\n        }\n\n        const wirkungsgrad = zahlAus(e.wirkungsgrad);\n        if (!isFinite(wirkungsgrad) || wirkungsgrad < 1 || wirkungsgrad > 100) {\n            return { ok: false, fehler: 'Enter a converter efficiency between 1 and 100 percent.' };\n        }<\/p>\n<p>        const reserveSek = zahlAus(e.reserveSek);\n        if (!isFinite(reserveSek) || reserveSek < 0) {\n            return { ok: false, fehler: 'Enter a reserve time of 0 seconds or more.' };\n        }\n\n        const zusatz = Array.isArray(e.zusatz) ? e.zusatz : [];\n        let extrasW = 0;\n        for (let i = 0; i < zusatz.length; i++) {\n            const posten = zusatz[i] || {};\n            const watt = zahlAus(posten.watt);\n            if (!isFinite(watt) || watt < 0) {\n                return { ok: false, fehler: 'Every extra consumer needs a watt value of 0 or more.' };\n            }\n            extrasW = extrasW + watt;\n        }\n\n        const boardW = boardLeistung(leerlaufW, vollW, lastAnteil);\n        const gesamtW = boardW + extrasW;\n        if (!isFinite(gesamtW) || gesamtW <= 0) {\n            return { ok: false, fehler: 'The board data is incomplete, so the total draw cannot be worked out.' };\n        }\n\n        const ampere = gesamtW \/ 5;\n        const reserveProzent = (netzteilW - gesamtW) \/ netzteilW * 100;\n        const laufzeitStunden = akkuWh * (wirkungsgrad \/ 100) \/ gesamtW;\n        const laufzeitMinuten = laufzeitStunden * 60;\n        const benoetigtWh = gesamtW * (reserveSek \/ 3600) \/ (wirkungsgrad \/ 100);\n\n        let schwelleProzent = benoetigtWh \/ akkuWh * 100;\n        const reserveZuGross = schwelleProzent > 100;\n        if (reserveZuGross) { schwelleProzent = 100; }<\/p>\n<p>        let netzteilStatus = 'ok';\n        if (gesamtW > netzteilW) {\n            netzteilStatus = 'ueberlast';\n        } else if (reserveProzent < 20) {\n            netzteilStatus = 'knapp';\n        }\n\n        return {\n            ok: true,\n            boardW: boardW,\n            extrasW: extrasW,\n            gesamtW: gesamtW,\n            ampere: ampere,\n            netzteilW: netzteilW,\n            reserveProzent: reserveProzent,\n            netzteilStatus: netzteilStatus,\n            akkuWh: akkuWh,\n            laufzeitStunden: laufzeitStunden,\n            laufzeitMinuten: laufzeitMinuten,\n            benoetigtWh: benoetigtWh,\n            schwelleProzent: schwelleProzent,\n            reserveZuGross: reserveZuGross\n        };\n    }\n\n    \/\/ fuer die Pruefung von aussen erreichbar\n    if (typeof window !== 'undefined') {\n        window.LW_TEST = window.LW_TEST || {};\n        window.LW_TEST.PL = {\n            berechne: berechne,\n            formatiere: formatiere,\n            zahlAus: zahlAus,\n            wattstundenAusMah: wattstundenAusMah,\n            boardLeistung: boardLeistung,\n            modellDaten: modellDaten,\n            MODELLE: MODELLE,\n            VORLAGEN: VORLAGEN\n        };\n    }\n\n    \/\/ --- DOM-Anbindung, sauber abgesichert ---\n    const btn = document.getElementById('pl-btn');\n    const out = document.getElementById('pl-ergebnis');\n    if (!btn || !out) { return; }\n\n    const feldModell = document.getElementById('pl-modell');\n    const feldLast = document.getElementById('pl-last');\n    const reglerLast = document.getElementById('pl-last-regler');\n    const feldNetzteil = document.getElementById('pl-netzteil');\n    const liste = document.getElementById('pl-liste');\n    const feldVorlage = document.getElementById('pl-vorlage');\n    const addBtn = document.getElementById('pl-add-btn');\n    const feldModus = document.getElementById('pl-akku-modus');\n    const blockMah = document.getElementById('pl-mah-block');\n    const blockVolt = document.getElementById('pl-volt-block');\n    const blockWh = document.getElementById('pl-wh-block');\n    const feldMah = document.getElementById('pl-mah');\n    const feldVolt = document.getElementById('pl-volt');\n    const feldWh = document.getElementById('pl-wh');\n    const feldEta = document.getElementById('pl-eta');\n    const feldReserve = document.getElementById('pl-reserve');\n\n    const STIL_INPUT = 'padding: 10px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ef); border-radius: 6px; font-family: monospace;';\n\n    function wertVon(feld, ersatz) {\n        if (!feld) { return ersatz; }\n        return feld.value;\n    }\n\n    if (feldVorlage) {\n        for (let i = 0; i < VORLAGEN.length; i++) {\n            const option = document.createElement('option');\n            option.value = String(i);\n            option.textContent = VORLAGEN[i].name + ' (' + formatiere(VORLAGEN[i].watt, 1) + ' W)';\n            feldVorlage.appendChild(option);\n        }\n    }\n\n    function zeileAnlegen(name, watt) {\n        if (!liste) { return; }\n        const reihe = document.createElement('div');\n        reihe.setAttribute('data-pl-reihe', '1');\n        reihe.setAttribute('style', 'display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px;');\n\n        const nameFeld = document.createElement('input');\n        nameFeld.type = 'text';\n        nameFeld.value = name;\n        nameFeld.setAttribute('data-pl-name', '1');\n        nameFeld.setAttribute('placeholder', 'Name of the consumer');\n        nameFeld.setAttribute('style', 'flex: 2; min-width: 180px; ' + STIL_INPUT);\n\n        const wattFeld = document.createElement('input');\n        wattFeld.type = 'number';\n        wattFeld.step = '0.1';\n        wattFeld.min = '0';\n        wattFeld.value = String(watt);\n        wattFeld.setAttribute('data-pl-watt', '1');\n        wattFeld.setAttribute('style', 'flex: 1; min-width: 110px; ' + STIL_INPUT);\n\n        const einheit = document.createElement('span');\n        einheit.textContent = 'W';\n        einheit.setAttribute('style', 'color: var(--text-secondary, #a0a0b0); font-family: monospace;');\n\n        const wegBtn = document.createElement('button');\n        wegBtn.type = 'button';\n        wegBtn.className = 'button';\n        wegBtn.textContent = 'Remove';\n        wegBtn.setAttribute('style', 'background: transparent; color: var(--text-secondary, #a0a0b0); border: 1px solid var(--border, #2a2a35); padding: 9px 14px; border-radius: 6px; cursor: pointer;');\n        wegBtn.addEventListener('click', function () {\n            if (reihe.parentNode) { reihe.parentNode.removeChild(reihe); }\n        });\n\n        reihe.appendChild(nameFeld);\n        reihe.appendChild(wattFeld);\n        reihe.appendChild(einheit);\n        reihe.appendChild(wegBtn);\n        liste.appendChild(reihe);\n    }\n\n    function zusatzLesen() {\n        const posten = [];\n        if (!liste) { return posten; }\n        const reihen = liste.querySelectorAll('[data-pl-reihe]');\n        for (let i = 0; i < reihen.length; i++) {\n            const nameFeld = reihen[i].querySelector('[data-pl-name]');\n            const wattFeld = reihen[i].querySelector('[data-pl-watt]');\n            posten.push({\n                name: nameFeld ? nameFeld.value : '',\n                watt: wattFeld ? wattFeld.value : ''\n            });\n        }\n        return posten;\n    }\n\n    if (addBtn) {\n        addBtn.addEventListener('click', function () {\n            let index = 0;\n            if (feldVorlage) { index = parseInt(feldVorlage.value, 10); }\n            if (!(index >= 0) || index >= VORLAGEN.length) { index = 0; }\n            zeileAnlegen(VORLAGEN[index].name, VORLAGEN[index].watt);\n        });\n    }<\/p>\n<p>    if (feldLast && reglerLast) {\n        reglerLast.addEventListener('input', function () {\n            feldLast.value = reglerLast.value;\n        });\n        feldLast.addEventListener('input', function () {\n            const zahl = zahlAus(feldLast.value);\n            if (isFinite(zahl) && zahl >= 0 && zahl <= 100) { reglerLast.value = String(zahl); }\n        });\n    }\n\n    function modusUmschalten() {\n        const modus = wertVon(feldModus, 'mah');\n        const mahAktiv = modus !== 'wh';\n        if (blockMah) { blockMah.style.display = mahAktiv ? '' : 'none'; }\n        if (blockVolt) { blockVolt.style.display = mahAktiv ? '' : 'none'; }\n        if (blockWh) { blockWh.style.display = mahAktiv ? 'none' : ''; }\n    }\n\n    if (feldModus) {\n        feldModus.addEventListener('change', modusUmschalten);\n        modusUmschalten();\n    }\n\n    function schuetze(text) {\n        return String(text).replace(\/&#038;\/g, '&amp;').replace(\/<\/g, '&lt;').replace(\/>\/g, '&gt;');\n    }<\/p>\n<p>    function meldung(text, farbe) {\n        return '<\/p>\n<div style=\"background: var(--bg-body, #14141a); border: 1px solid ' + farbe + '; border-left-width: 4px; color: var(--text-primary, #e8e8ef); padding: 12px 14px; border-radius: 6px; margin-top: 12px;\">' + schuetze(text) + '<\/div>\n<p>';\n    }<\/p>\n<p>    function kachel(titel, wert, zusatz) {\n        return '<\/p>\n<div style=\"flex: 1; min-width: 190px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); border-radius: 6px; padding: 14px;\">' +\n            '<\/p>\n<div style=\"color: var(--text-secondary, #a0a0b0); font-size: 0.8rem; margin-bottom: 6px;\">' + schuetze(titel) + '<\/div>\n<p>' +\n            '<\/p>\n<div style=\"color: var(--text-primary, #e8e8ef); font-family: monospace; font-size: 1.35rem; font-weight: 700;\">' + schuetze(wert) + '<\/div>\n<p>' +\n            '<\/p>\n<div style=\"color: var(--text-secondary, #a0a0b0); font-size: 0.8rem; margin-top: 6px;\">' + schuetze(zusatz) + '<\/div>\n<p>' +\n            '<\/p><\/div>\n<p>';\n    }<\/p>\n<p>    function ausgeben(r) {\n        let html = '<\/p>\n<div style=\"display: flex; gap: 12px; flex-wrap: wrap;\">';\n        html += kachel('Total draw', formatiere(r.gesamtW, 2) + ' W', 'board ' + formatiere(r.boardW, 2) + ' W + add-ons ' + formatiere(r.extrasW, 2) + ' W');\n        html += kachel('Current at 5 V', formatiere(r.ampere, 2) + ' A', formatiere(r.gesamtW, 2) + ' W \/ 5 V');\n        html += kachel('Supply headroom', formatiere(r.reserveProzent, 1) + ' %', formatiere(r.netzteilW - r.gesamtW, 2) + ' W \/ ' + formatiere(r.netzteilW, 1) + ' W');\n        html += '<\/div>\n<p>';<\/p>\n<p>        html += '<\/p>\n<div style=\"display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px;\">';\n        html += kachel('UPS runtime', formatiere(r.laufzeitMinuten, 1) + ' min', 'battery ' + formatiere(r.akkuWh, 2) + ' Wh');\n        html += kachel('Shutdown threshold', formatiere(r.schwelleProzent, 2) + ' %', formatiere(r.benoetigtWh, 3) + ' Wh');\n        html += '<\/div>\n<p>';<\/p>\n<p>        if (r.netzteilStatus === 'ueberlast') {\n            html += meldung('The supply is overloaded: the system asks for more than the supply is rated to give. Pick a stronger supply or drop a consumer.', '#e5484d');\n        } else if (r.netzteilStatus === 'knapp') {\n            html += meldung('Less than 20 percent headroom left. Peaks during boot or a burst of load can still push the supply past its rating.', '#f0b429');\n        } else {\n            html += meldung('The supply keeps a comfortable margin over the calculated draw.', 'var(--accent, #3ddc97)');\n        }<\/p>\n<p>        if (r.reserveZuGross) {\n            html += meldung('The reserve time alone would need the whole battery. Use a larger pack or shorten the reserve time.', '#e5484d');\n        }<\/p>\n<p>        html += '<\/p>\n<p style=\"color: var(--text-secondary, #a0a0b0); font-size: 0.85rem; margin-top: 14px;\">Trigger the shutdown once the battery falls to the threshold above, so the reserve time still fits at the current draw. The runtime assumes the whole pack is usable and the draw stays constant, so treat it as an upper bound.<\/p>\n<p>';\n        out.innerHTML = html;\n    }<\/p>\n<p>    btn.addEventListener('click', function () {\n        const daten = modellDaten(wertVon(feldModell, 'pi5-4'));\n        if (!daten) {\n            out.innerHTML = meldung('The board data is incomplete, so the total draw cannot be worked out.', '#e5484d');\n            return;\n        }<\/p>\n<p>        let akkuWh;\n        if (wertVon(feldModus, 'mah') === 'wh') {\n            akkuWh = zahlAus(wertVon(feldWh, ''));\n            if (!isFinite(akkuWh) || akkuWh <= 0) {\n                out.innerHTML = meldung('Enter a battery energy above 0 Wh.', '#e5484d');\n                return;\n            }\n        } else {\n            const mah = zahlAus(wertVon(feldMah, ''));\n            if (!isFinite(mah) || mah <= 0) {\n                out.innerHTML = meldung('Enter a battery capacity above 0 mAh.', '#e5484d');\n                return;\n            }\n            const volt = zahlAus(wertVon(feldVolt, ''));\n            if (!isFinite(volt) || volt <= 0) {\n                out.innerHTML = meldung('Enter a cell voltage above 0 V.', '#e5484d');\n                return;\n            }\n            akkuWh = wattstundenAusMah(mah, volt);\n        }\n\n        const ergebnis = berechne({\n            leerlaufW: daten.leerlaufW,\n            vollW: daten.vollW,\n            lastAnteil: wertVon(feldLast, ''),\n            netzteilW: wertVon(feldNetzteil, ''),\n            akkuWh: akkuWh,\n            wirkungsgrad: wertVon(feldEta, ''),\n            reserveSek: wertVon(feldReserve, ''),\n            zusatz: zusatzLesen()\n        });\n\n        if (!ergebnis.ok) {\n            out.innerHTML = meldung(ergebnis.fehler, '#e5484d');\n            return;\n        }\n        ausgeben(ergebnis);\n    });\n})();\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pick a board, add whatever hangs off it, and this page works out the steady power draw, how much headroom the supply keeps, and how long a battery would hold the system up. The watt figures per model are rough guideline values for a stock board; your own firmware, cooling and peripherals will shift them. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-tool-base.php","meta":{"footnotes":""},"class_list":["post-9417","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Raspberry Pi Power Draw &amp; UPS Runtime Calculator - Lukas Wojcik - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Raspberry Pi Power Draw &amp; UPS Runtime Calculator - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"Pick a board, add whatever hangs off it, and this page works out the steady power draw, how much headroom the supply keeps, and how long a battery would hold the system up. The watt figures per model are rough guideline values for a stock board; your own firmware, cooling and peripherals will shift them. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/08\/og-default.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/raspberry-pi-power-draw-ups-runtime-calculator\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/raspberry-pi-power-draw-ups-runtime-calculator\\\/\",\"name\":\"Raspberry Pi Power Draw & UPS Runtime Calculator - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-08-10T11:37:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/raspberry-pi-power-draw-ups-runtime-calculator\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/raspberry-pi-power-draw-ups-runtime-calculator\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/raspberry-pi-power-draw-ups-runtime-calculator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Toolbox\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Raspberry Pi Power Draw &#038; UPS Runtime Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"luky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Raspberry Pi Power Draw & UPS Runtime Calculator - Lukas Wojcik - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/","og_locale":"en_US","og_type":"article","og_title":"Raspberry Pi Power Draw & UPS Runtime Calculator - Lukas Wojcik - Blog","og_description":"Pick a board, add whatever hangs off it, and this page works out the steady power draw, how much headroom the supply keeps, and how long a battery would hold the system up. The watt figures per model are rough guideline values for a stock board; your own firmware, cooling and peripherals will shift them. [&hellip;]","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/","og_site_name":"Lukas Wojcik - Blog","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/08\/og-default.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/","name":"Raspberry Pi Power Draw & UPS Runtime Calculator - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"datePublished":"2026-08-10T11:37:10+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/raspberry-pi-power-draw-ups-runtime-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Toolbox","item":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/"},{"@type":"ListItem","position":3,"name":"Raspberry Pi Power Draw &#038; UPS Runtime Calculator"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"luky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/9417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=9417"}],"version-history":[{"count":0,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/9417\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=9417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}