Power and battery
A walking humanoid carries its whole power station on its back. This page builds Marvin Bot’s 48 V battery from single cells, estimates how long it lasts, follows the current from the pack through fuse, precharge and contactor to the motors, and shows why energy flowing back from braking joints can push the bus towards the actuators’ 60 V limit.
The idea in one picture
Section titled “The idea in one picture”A robot that walks around cannot trail a power cable, so it carries a battery, like a cordless drill or an electric scooter. That battery must hold enough energy for a useful session (Marvin Bot’s requirement is at least an hour), deliver big bursts of current when the legs push hard, and be wired so that a fault or an emergency stop is always safe.
Three words do most of the work. Think of water in a pipe: voltage (V, volts) is the pressure, current (A, amps) is the flow, and power (W, watts) is pressure × flow. Energy (Wh, watt-hours) is power kept up for a time: a 600 Wh battery can supply 600 W for one hour, or 300 W for two.
A lithium-ion cell is a small chemical energy store whose voltage depends on how full it is: about 4.2 V when full and about 3.0 V when empty, averaging 3.6 V (its “nominal” voltage).[1] One cell is far too low a voltage for 48 V motors, so cells are wired in series (voltages add): 13 in series (13S) give 13 × 3.6 = 46.8 V nominal and 13 × 4.2 = 54.6 V full. Each series position can hold several cells in parallel (capacities and current limits add): 3 in parallel (3P) of 4.5 Ah cells give 13.5 Ah. The energy is volts times amp-hours:
E = (S × Vcell) × (P × Qcell) = 46.8 V × 13.5 Ah ≈ 632 Wh (13S3P of 3.6 V, 4.5 Ah cells)
runtime ≈ usable energy / average power
The rest of the page is about the two numbers that are hard: how much of the energy you may use, and what the average power is.
Playground 1: battery runtime calculator
Section titled “Playground 1: battery runtime calculator”Start here: click the presets and watch the Runtime readout (green = meets the 1 h requirement, amber = only just). The top controls build the pack from cells; the “Day’s mix” sliders say how the robot spends its time; the load assumptions are estimates you can test. Terms such as copper loss, RMS and C-rate are explained in From first principles below. The Orin is the robot’s on-board computer (an NVIDIA Jetson AGX Orin, see 11 Sensors and compute).
From first principles
Section titled “From first principles”Cells, packs and the words for them
Section titled “Cells, packs and the words for them”- Capacity (Ah, amp-hours): the charge a cell delivers from full to empty. 4.5 Ah means 4.5 A for an hour, or 45 A for six minutes.
- Energy (Wh, watt-hours) = average voltage × capacity. Molicel lists the P45B at 3.6 V, 4.5 Ah, 16.2 Wh.[1] 39 cells × 16.2 Wh = 632 Wh.
- C-rate: current divided by capacity. 1C empties a cell in an hour; 10C in six minutes. The P45B is rated for 45 A continuous, 10C.[1][3] In a 3P pack the cells share the current, so the pack can supply 135 A.
- State of charge (SoC): how full the pack is, 0-100%. Depth of discharge is the share you actually use.
- Internal resistance: every cell behaves like an ideal voltage source with a small resistor in series. Molicel gives at most 13.8 mΩ for the P45B.[1] A 13S3P pack is about 13 × 13.8 / 3 ≈ 60 mΩ before wiring: at 80 A the pack voltage sags by about 5 V.
Why 21700 high-discharge cells? “21700” is the size (21 mm diameter, 70 mm long). High-discharge cells such as the P45B trade a little energy density for low internal resistance, so they can deliver the short bursts of current a robot’s legs draw without overheating.
Why charge only to 4.1 V? A lithium-ion cell ages faster at high voltage. Battery University’s table gives 300-500 cycles when charged to 4.20 V and 600-1,000 cycles at 4.06 V, with 81% of the energy; 4.13 V gives 400-700 cycles and 90%.[2] Marvin Bot’s 4.1 V rule sits between those rows (about 86% of the energy, interpolated). It also leaves 1.3 V more headroom below the actuators’ 60 V for regenerative braking.
Where the power goes
Section titled “Where the power goes”The playground adds up four terms for each activity (standing, walking, stairs):
In the formulas below, η (eta) is an efficiency between 0 and 1; Iph and Rph are the current and resistance of one motor phase (winding), and RLL is the resistance measured between two of the motor’s three wires.
P = Pcomputer / ηDC-DC + Pelectronics + Σ PCu + Pmech / ηgear, then × 1.10 for wiring, converter and driver losses
PCu = 3 Iph² Rph = 1.5 (τ / Kt)² RLL (copper loss of one motor at output torque τ)
- Computer: the Jetson AGX Orin 64 GB has power modes of 15, 30 (default) and 50 W, plus an unconstrained MAXN mode[4]; the playground uses 60 W for MAXN, the figure NVIDIA’s tools quote for the 64 GB module, and divides by a 90% DC-DC efficiency.
- Electronics (estimate, 30 W): 23 RobStride drivers idling at about 1 W each, the Feetech servos’ 12 V rail, the depth camera, IMU and CAN adapters. These are guesses until measured.
- Copper loss: a motor’s torque comes from current, and current through winding resistance makes heat. Torque τ needs current τ/Kt (Kt = torque constant, newton-metres of torque per amp), and heat goes with current squared. The RS04’s torque constant is 2.1 N·m/A and resellers list its winding resistance as 0.16 Ω line to line[5][6]: at its 40 N·m rating that is 1.5 × (40/2.1)² × 0.16 ≈ 87 W of heat. For the RS03 and RS00, without published resistances, the playground scales that figure by motor mass (55 and 19 W at rating; an estimate); the RS10P’s specification sheet gives 3.73 N·m/A and 1.41 Ω, so 1.5 × (14/3.73)² × 1.41 ≈ 30 W.[5]
Because loss goes with τ², the average heat depends on the root-mean-square (RMS) torque: half the rated torque RMS costs a quarter of the rated loss. - Mechanical work: positive work done on the body. For walking the playground uses a mechanical cost of transport (how much work it takes to move each newton of weight one metre) of 0.1 (work per unit weight per metre; an estimate) at 0.5 m/s: 0.1 × 41.0 kg × 9.81 × 0.5 ≈ 20 W. For stairs, lifting 41 kg up an 18 cm step every 2 s: 41 × 9.81 × 0.09 m/s ≈ 36 W. Both are divided by 85% gearbox efficiency. Negative work (lowering the body) is assumed lost as heat, not recovered.
The surprise for most newcomers is that heat, not lifting, dominates: holding a bent knee costs copper loss even though nothing moves. That is why the stair torques in 05 Leg loads and stairs matter for runtime as well as for motor temperature.
Peak current
Section titled “Peak current”Average power sets runtime; peak current sets the cell, fuse and wire choices. The playground takes one stance leg on a stair (3 RS04 at hip pitch, hip roll, knee and 3 RS03 at hip yaw and ankle) at a chosen share of peak torque and 4 rad/s, adds copper loss and mechanical power, and divides by the pack voltage near empty (3.5 V/cell). With the repo’s “peaks ≤ 70% of peak rating” rule this gives about 80 A for a fraction of a second, within the 135 A the three parallel cells allow and just under the 100 A main fuse.
A fuse at a modest overload takes from seconds to minutes to blow (its time-current curve), so sub-second peaks at this level pass, but the margin is thin and the phase 2 bench test must confirm the real peaks. electrical/harness.yaml estimates 78.5 A continuous for the main path with a different method (rated torque at half the no-load speed, half the motors at once), so both point to the same order of current.
Playground 2: regenerative braking and the 60 V margin
Section titled “Playground 2: regenerative braking and the 60 V margin”A bicycle dynamo makes electricity when the wheel turns; an electric motor does the same when something turns it. So when a motor slows a moving limb, it works as a generator: the limb’s kinetic energy turns into current that flows back onto the 48 V bus. If the battery can absorb it, the bus voltage rises only by current × internal resistance. If it cannot (the BMS has blocked charging because the pack is full, the contactor is open, or the robot runs from a bench supply that cannot sink current), the energy has nowhere to go but the capacitors on the bus, and their voltage climbs fast:
Why it matters: the RobStride drivers are only rated to 60 V. A full pack is already at 54.6 V, so there is little room for the voltage to climb before parts are damaged.
kinetic energy of a swinging limb: E = ½ J ω² (J = moment of inertia, kg·m²; ω = joint speed, rad/s)
battery connected: V = VOC + I Rpack, I = Pregen / V
battery blocked: ½ C Vpeak² = ½ C V0² + η E → Vpeak = √(V0² + 2ηE / C)
In words: VOC is the pack’s resting voltage, Rpack its internal resistance, Pregen the power flowing back; C is the total capacitance on the bus (capacitors are small, fast energy stores, measured in farads; a millifarad, mF, is a thousandth), V0 the voltage before braking and η the share of the limb’s energy that reaches the bus. A clamp is a circuit that switches a resistor across the bus above a set voltage (a “brake chopper”), or a TVS diode that conducts above it, turning excess energy into heat.
A second, less obvious path: a motor spun faster than its no-load speed generates a back-EMF (the voltage a spinning motor makes) above the bus voltage and pushes current through its driver’s transistor diodes even when the driver is disabled. A robot falling with the contactor open can therefore still pump energy into the (now isolated) motor-side capacitors. The clamp belongs on the motor side of the contactor for this reason.
Playground 3: the power path, block by block
Section titled “Playground 3: the power path, block by block”Click a block to read what it does. Use the buttons to press the e-stop (emergency stop button) or pull the pack while running (“hot swap”), and watch which parts stay powered. The key idea: the computer has its own small keep-alive battery, so cutting the motors never reboots it.
Precharge, in numbers
Section titled “Precharge, in numbers”Every motor driver and DC-DC converter has capacitors across its input. When the contactor (a heavy-duty, electrically operated switch) closes onto empty capacitors, the only thing limiting the current is the resistance of the loop: 54 V across 0.1 Ω is over 500 A for a fraction of a millisecond, enough to weld contactor contacts or blow the fuse. A precharge resistor first fills the capacitors slowly: with R = 47 Ω and C = 5 mF the time constant RC is 0.24 s, the peak current about 1.2 A, and after 5RC (1.2 s) the capacitors are within 1% of the pack voltage, so the contactor closes with almost no current. (RC, resistance × capacitance, is how long the charging takes: after one RC the capacitors are 63% full.) The resistor briefly absorbs ½CV² ≈ 7 J. (The capacitance is an estimate; the real value sets the resistor and the precharge time.)
How Marvin Bot does it
Section titled “How Marvin Bot does it”Requirements: R30 runtime ≥ 1 h of mixed walking and standing; R31 quick-release pack with the computer staying up during a swap; R32 pack voltage plus regen spikes below the actuators’ 60 V limit (docs/requirements.md). The BMS reports over the seventh CAN bus at 10 Hz (10 CAN buses), and the robot sits down and cuts actuator power at about 15% (docs/safety.md).
Trade-offs and alternatives
Section titled “Trade-offs and alternatives”| Option | For | Against |
|---|---|---|
| 13S3P, 4.1 V daily (chosen) | ~1.5 h (repo), ~135 A of cell current, 1.3 V more regen headroom | ~3.4 kg, high in the torso |
| 13S2P | ~1.1 kg lighter (the repo lists it as a mass reserve) | runtime at the 1 h limit; 90 A cell limit near the stair peaks |
| Charge to 4.2 V every day | ~15% more energy | roughly half the cycle life; 54.6 V leaves 5.4 V to the 60 V limit |
| 12S pack (50.4 V full) | more regen margin | less voltage for motor speed; 12S BMS and chargers less common at this current |
| Two packs OR-ed (v2 in the repo) | swap one pack while walking | more mass, more electronics |
| Computer after the contactor | simpler wiring | every e-stop reboots the computer and loses logs |
Decisions you can make here
Section titled “Decisions you can make here”- Pack size (S and P). Trade: 13S2P saves about 1.1 kg high in the torso but drops runtime to about 1.1 h and puts the stair peaks (about 82 A) close to the 90 A the cells allow.
- Charge voltage. Trade: 4.2 V gives about 20% more runtime, but roughly halves cycle life and leaves only 5.4 V of headroom to 60 V for braking energy.
- The reserve at which the robot sits down (15% today). Trade: a lower reserve adds runtime, but leaves less margin for the voltage sag on a hard push near empty and ages the cells faster.
- Clamp voltage and position, and bus capacitance. Trade: a lower clamp protects the drivers better but wastes more energy as heat and may trigger in normal braking; capacitors only help as √C and add bulk.
- Orin power mode. Trade: 15 W instead of 30 W adds about 0.1 h with the default day, at the cost of slower perception and planning on the robot.
Built from your settings above. Paste it into an issue, a design discussion or an AI assistant session.
Next: 10 CAN buses and bandwidth follows the other set of wires to every motor: the data cables that carry commands and readings, including the BMS’s battery reports.
Further reading
Section titled “Further reading”- Battery University, BU-808: How to prolong lithium-based batteries: the charge-voltage and cycle-life table behind the 4.1 V rule.
- Battery University, BU-304a: Safety concerns with Li-ion: what goes wrong inside a cell and why packs need protection.
- Molicel INR-21700-P45B: the cell’s capacity, current and resistance figures.
- NVIDIA Jetson Linux: power and performance: the Orin’s power modes and how to switch them.
- Analog Devices LTC4359: an ideal-diode controller of the class the BOM lists, with application circuits for supply ORing.
Sources
Section titled “Sources”- Molicel, INR-21700-P45B product page — used for: 3.6 V nominal, 4.5 Ah, 16.2 Wh, 45 A max continuous, 242 Wh/kg, 13.8 mΩ max internal resistance.
- Battery University, BU-808 How to prolong lithium-based batteries — used for: cycle life and available energy vs charge voltage (4.20 V 300-500 cycles; 4.13 V 400-700, 90%; 4.06 V 600-1,000, 81%).
- Battery University, BU-402 What is C-rate? — used for: C-rate definition.
- NVIDIA, Jetson Linux Developer Guide: power modes for Jetson AGX Orin — used for: AGX Orin 64 GB modes MAXN (no fixed budget), 15 W, 30 W (default), 50 W.
- RobStride, Product_Information (manuals) — used for: torque constants, rated and peak torques, 60 V upper voltage limit (via description/actuators.yaml).
- OpenELAB, RobStride04 complete guide (reseller specification) — used for: RS04 terminal resistance 0.16 Ω ±10% (reseller figure, not from RobStride’s manual).
- Analog Devices, LTC4359 ideal diode controller — used for: what an ideal-diode OR does (a MOSFET acting as a low-loss diode).
- Littelfuse, industrial and UL fuses catalogue (POWR-GARD JLLN Class T) — used for: Class-T fuses’ DC rating (125-160 V DC) and 20 kA DC interrupting rating.
- Battery University, BU-304a Safety concerns with Li-ion — used for: why packs need a BMS and current protection.