kapy academy

Battery holders

13 min readUpdated Nov 2026

A holder drawn at 65 mm takes no real 18650: a flat top measures up to 65.25 and a protected button top about 69–70. The holder has to keep the cell where the contacts press on it hard enough, and keep metal away from every part of the cell it should not touch. The length budget decides it: the cavity is sized for the longest cell you will use, and the spring must still be compressed with the shortest. The contacts are bought; the plastic only locates them.

Cell dimensions

AA and AAA are sizes defined in IEC 60086, with published limits. 18650 and 21700, on the other hand, only name an approximate diameter and length; they are not a standard with tolerances. Each manufacturer sets its own maximum in its datasheet, and protected cells add length on top. Start from the maximum in your cell's datasheet, and measure anything the datasheet leaves out with callipers.

Batteries and cylindrical cells (mm)
Cell Chemistry and voltage Ø Length including terminal Terminals Source
AA (LR6 alkaline; HR6 NiMH, same dimensions) 1.5 V (NiMH 1.2 V) 13.5–14.5 49.2–50.5 + button Ø ≤ 5.5 and ≥ 1 high; − flat Ø ≥ 7, recessed ≤ 0.5 IEC 60086-2, via Wikipedia (AA battery)
AAA (LR03) 1.5 V ≈ 10.5 ≈ 44.5 + button Ø ≤ 3.8 and ≥ 0.8 high; − flat Ø ≥ 4.3 Energizer E92, via Wikipedia (AAA battery)
18650 flat top Li-ion 3.6 V nominal 18; max. 18.55 nominal 65; max. 65.25 flat Samsung INR18650-35E, datasheet v1.0
18650 button top / protected Li-ion 3.6 V measure yours ≈ 67 button top; ≈ 69–70 protected + button Retailer listings: typical values
21700 flat top Li-ion 3.6 V nominal 21; max. 21.25 (50S); common max. ≈ 21.7 nominal 70; max. 70.62 (50S); common max. ≈ 71 flat Samsung INR21700-50S, Samsung SDI specification
21700 protected Li-ion 3.6 V measure yours longer; no reliable figure + button Measure yours

Li-ion is short for lithium-ion. The Samsung cells in the table are datasheet examples, not recommendations: the models change, the method does not. The AAA figures are approximate; design to the cells you actually have. A Li-ion 14500 has the nominal size of an AA and fits its holder, but it gives 3.6–3.7 V instead of 1.5 V: the holder will take it, your circuit may not. There are also lithium AAs regulated to 1.5 V and LiFePO4 14500s at 3.2 V, and their length varies between makers: measure yours.

body Ølength incl. terminalnominal 65≈ 10.5≈ 44.5+ buttonØ ≤ 3.8 · ≥ 0.8flat − endØ ≥ 4.314.550.5+ buttonØ ≤ 5.5 · ≥ 1flat − endØ ≥ 718.5565.25> 18.55≈ 7021.2570.62protectionAAAAA18650flat top 65.2518650protected ≈ 69–702170010 mm
A cell's name is a class, not a measurement. A protected 18650 is almost 5 mm longer than a flat top.

The length budget

A spring contact only pushes while it is compressed, so the cavity length, from the face of the fixed contact to the spring seat, is:

L_cav = L_cell,max + h_work,min

h_work,min is the spring's height with the longest cell in place. It must stay at least 1 mm above the solid height (coils touching). With the shortest cell, the spring sits at L_cav − L_cell,min, and that height must be at least 2 mm below the free height so there is useful preload. Both margins are starting values, not a standard.

That sets how much variation a holder can absorb: the difference between the longest and the shortest cell cannot exceed free height − solid height − 3 mm of margins. A 1.3 mm spread, like AA's (49.2–50.5), is no problem. The 4.75 mm between a flat-top 18650 (65.25) and a protected one (70) is.

Example: an 18650 holder

Take a generic coil contact for 18650 with a free height of 10 and a solid height of 3. These are example numbers: measure yours with callipers. Its travel is 7 mm; take off the margins and it accepts a 4 mm difference between cells.

If you design for the protected cell (70 mm). h_work,min = 3 + 1 = 4, so L_cav = 74. Now drop in a 65.25 flat top: the spring sits at 74 − 65.25 = 8.75, compressed by only 1.25 mm. The cell rattles and, under vibration, the contact cuts in and out.

If you design for the flat top. With the spring compressed to a height of 5 mm, L_cav = 65.25 + 5 = 70.25. A 70 mm protected cell leaves 0.25 mm for a spring that is 3 mm at solid height: it will not go in.

No single cavity works for both. Pick one cell type and emboss it on the part ("18650 flat top" or "protected"). If you really need both, use a spring or contact leaf whose free height minus solid height is at least 8 mm: the 4.75 difference plus both margins. Check the longest and the shortest cell on paper before you print.

L_cav = 74L_cell = 70spring h = 4solid height 3L_cell = 65.25spring h = 8.75free height 101.25 mm compressionmakes contactno contactpocket Ø 6–6.5+ buttonflat − endAA
With the cavity at 74 for the protected cell, a flat top leaves the spring compressed by only 1.25 mm.

Buy the contacts

Contacts are sheet-metal parts: nickel-plated spring-steel coils for the − end, and flat or dimpled plates for the +. They are sold by battery size. Keystone's 5201/5204 family of AA and AAA contacts, for example, is 0.020″ (0.51 mm) stock. Part numbers change: always start from the manufacturer's current drawing. Keystone also gives its mounting dimensions as reference only. Draw the slot from your contact, not from a model someone posted on a forum.

Do not print them. Conductive filament has far too much resistance to carry a cell's current. And a plastic spring under constant preload creeps (Creep and fatigue) and loses contact force within weeks. Steel holds the force; the plastic only locates the contact.

The slot is the sheet thickness plus 0.20 clearance per side (a sliding fit): about 0.9 mm for 0.51 stock. The contact slides in and its tab holds it; if that is not enough, add a printed lip or a drop of cyanoacrylate. The solder tab can exit through a slot of its own. Solder the wire to the contact before it goes into the slot, never with the part assembled (it melts the slot) or with the cell in. Do not heat-stake the contact either.

At high current, such as motors or bright LEDs, the coil is the hot spot in the circuit: it has more resistance than a plate. Use plate or leaf contacts and short wires of adequate gauge, and touch the contact after a few minutes at full load to see whether it is warming up.

Look after the cell's wrap. On a Li-ion cell, the metal can is the negative terminal right up to the rim around the positive cap, and the plastic wrap is the only thing insulating that area. A + contact wider than the cap, or a burr that cuts the wrap, shorts the cell. Keep the + contact inside the cap's area and chamfer the edges.

Series and parallel links between cells are made with wire or with the holder's metal straps.

Polarity: a reversed cell must not touch

In a series holder, a reversed cell subtracts its voltage and the current from the others is forced through it backwards. An alkaline cell heats up and leaks electrolyte; a reversed Li-ion ends up overcharged or over-discharged. The geometric fix comes from the terminals' limit dimensions: recess the + contact in a pocket wider than the button but narrower than the flat − end.

On an AA, the button is at most Ø 5.5 and at least 1 high, and the flat − end is Ø 7 or more. A pocket of Ø 6–6.5 with the contact 0.5 below its rim (starting values) lets the button of a correctly fitted cell reach the contact while a reversed cell rests on the rim. On an AAA (button ≤ 3.8, flat − ≥ 4.3), the pocket comes out at Ø 4.0–4.1, which is very tight: print a coupon. The depth must always be less than the minimum button height: 1 on AA, 0.8 on AAA.

A flat-top Li-ion has no button, so the recessed pocket does not work. Emboss + and − next to each end and on the floor: it is the cheapest polarity protection on any holder, and the only one on a flat-top holder.

The bore: size and print orientation

The bore diameter is the cell's maximum diameter plus 0.50–0.60 clearance. The cell has to go in and come out by hand without rubbing, because rubbing scratches the wrap. AA: 14.5 → 15.1. 18650: 18.55 → 19.15. 21700: 21.85 for the 50S, 22.3 for 21.7 mm cells. On a protected cell the extra wrap can add girth: measure its diameter.

The simplest form is an open U-shaped cradle, printed with the cell's axis horizontal and the base on the bed: with no roof, it comes out clean. A closed tube lying on its side is a horizontal hole over 10 mm and needs a teardrop or flat roof (Designing out supports). Standing up, with the axis vertical, the bore is a vertical hole: allow for it printing small (Why holes print small), and bear in mind the walls end up tall and thin.

To retain the cells, the end contacts plus a lid or a strap are enough. If the cradle wraps more than 180° so the cell snaps in, its arms work as a clip: size the deflection with Print-friendly snap fits and print the arms so they bend within a layer, not across the layers. In a long cradle printed lying down, the arms of the C partly flex across the layers, and that is where they break. Use short clips printed with the cell's axis vertical, the C profile in XY, or a flat tab on the bed instead.

Leave a finger notch or a ribbon under the cell: a Li-ion in a snug cradle will not come out without levering it with something metal, which scratches the wrap.

open cradlefinger notchØ 19.15horizontal hole > 10 mmC-clipopening ≈ 0.87 Darms across the layersaxis vertical, profile in XYbed
An open cradle prints without supports. If you want the cell to snap in, print the arms with the C profile in XY, so they bend within a layer.

Spring preload is a sustained load, and a Li-ion cell warms up in use: the 35E, for example, allows charging between 0 and 45 °C and discharging up to 60 °C at the cell surface. Under load, an unfilled part works up to about 15–20 °C below its HDT at 0.45 MPa: PLA about 40 °C, PETG 50, ASA 80–85 (Heat, cold, sunlight and chemicals). PETG is fine for moderate current draw indoors. If the cell can reach that 60 °C, use ASA or PC; inside a car, never PLA or PETG. PLA is fine for AA or AAA in a remote that never leaves the living room.

When it fails

Symptom, cause and fix
Symptom Cause Fix
The cell will not fit lengthwise Drawn at the nominal 65 or 70, or a protected cell in a flat-top holder Redo the length budget with the longest cell you will use; mark the type on the part
The device resets or cuts out when you move it Spring barely compressed: short cell in a long cavity Shorten the cavity or fit a longer spring: ≥ 2 mm compression with the shortest cell
Contact force drops within weeks A plastic spring or tab carries the preload and creeps Steel contact; the plastic only locates it; PETG or ASA if it gets warm
The plastic next to the contact softens or marks High current through a coil spring Plate or leaf contact; a higher-temperature material
Hot cell, scratched or cut wrap + contact wider than the cap, sharp edge on the slot, or a tight bore Narrow the contact, chamfer the edges, more clearance in the bore
A reversed AA still makes contact + contact flush with the floor Recessed pocket sized from the terminals' limit dimensions
Tight or oval bore Closed tube printed lying down with a sagging roof, or holes printing small Open cradle or teardrop roof; coupon
The clip arms snap Long cradle printed lying down: the arms bend across the layers Short clips with the C profile in XY

How to test it

Print a single-cell coupon first, full length, with the contact slots and the polarity pocket: what you are checking is the length budget, and that will not fit in a slice. Next to it, three 10 mm rings at +0.4, +0.6 and +0.8 over the cell's maximum diameter. Fit the real contacts and your cell, and measure the spring height with callipers both free and with the cell in (Test coupons). If the longest and the shortest cell both work out, print the full holder in the final material.

See also

Design it in KapyCAD

Draw the part to the standard's dimensions and keep them as values you can edit.

Free plan, no card. Runs in your browser, nothing to install.

Open the editor

Still have a question?