How to print a battery case for AA, AAA and 18650
A case for loose batteries
Loose batteries in a drawer, a backpack or a camera bag are a nuisance and sometimes a hazard. They scatter, you never know which ones are charged, and as soon as a key ring, a coin or a paper clip touches both terminals, a short-circuit current flows. Alkaline cells just get warm; lithium cells such as 18650 or 21700 can get really hot. That is why airlines ask for spare lithium cells in carry-on luggage to be protected individually.
This generator builds a small, sturdy case made for exactly your cells. It has two parts: a tray with one pocket per cell, and a sleeve that slides over it. Closed, the case is a smooth, rounded capsule with no corners to catch on anything. To open it, you push a small tab that sits in a notch of the sleeve, and the tray slides out. There are no hinges, no snap hooks and no threads, so nothing can break off or wear out.
The case for two AA cells measures only 34 × 18 × 53 mm when closed (example). With four cells in a row it is 65 mm wide and still fits in any jacket pocket (example).
What you need
- an FDM printer; the parts are small and fit any bed from 18 × 18 cm up,
- PLA or PETG, about 10 to 60 g depending on the size,
- no supports, no glue and no tools.
Everything is computed in your browser. You need no account, and nothing is uploaded. The whole design lives in the page link, so you can bookmark it or pass it on.
Choosing format and count
At the top you pick the cell format. The generator then fills in the matching pocket diameter and depth. Both values already include some play, so the cells slide in and out easily:
| Format | other names | pocket Ø × depth |
|---|---|---|
| AAA | Micro, LR03 | 10.8 × 44.5 mm |
| AA | Mignon, LR6 | 14.7 × 51 mm |
| C | Baby, LR14 | 26.4 × 50.5 mm |
| D | Mono, LR20 | 34.4 × 62 mm |
| CR123A | photo battery | 17.2 × 35 mm |
| 16340 | RCR123A | 16.7 × 35 mm |
| 14500 | Li-ion in AA size | 14.7 × 51 mm |
| 18650 | Li-ion | 18.7 × 66 mm |
| 21700 | Li-ion | 21.4 × 71 mm |
The AA and AAA values come straight from the original design; the others are the nominal sizes of the formats plus about 0.2 mm in diameter and 0.5 mm in length. For any other round cell, such as a 26650 or a roll of coin cells, choose Custom size and enter the diameter and length yourself. As soon as you change either value by hand, the generator switches to “Custom size” anyway.
Cells per row and Rows set how many cells the case holds. Four AA cells in a row is the classic spare set for a flash unit, a game controller or a remote. Eight cells in two rows make an almost square case that holds a full charger load (example). More rows make the case deeper instead of wider, which is often handier than a long bar.
Protected Li-ion cells: 18650 and 21700 cells with a built-in protection circuit are longer than the nominal size, 18650s often 67 to 69 mm. Measure your cells with calipers before printing and set the pocket depth to the longest cell plus half a millimeter. The generator reminds you of this for these formats.
Under Parts you choose what the download contains: both parts side by side on one plate, just the tray, just the sleeve, or the closed case. The closed view is only for looking at; you always print the two parts.
Adjusting the fit
How easily the tray slides depends on your printer, the filament and the nozzle. Two values under Fit set the play:
- Play all around is the air between tray and sleeve along the long sides, 0.25 mm in the original. Larger values slide more easily, smaller ones hold tighter.
- Play at the ends adds extra air at the two narrow ends, 0.2 mm in the original.
Our tip: print a case for a single cell first. It takes about half an hour and tells you whether the fit is right. If the tray sticks, raise the play in 0.05 mm steps. If it falls out on its own, lower it. PETG shrinks a little less and is a little stickier than PLA, so it usually needs slightly more play.
The walls are 0.8 mm in the original. That is two lines of a 0.4 mm nozzle and plenty for AA and AAA. For large cells such as C and D, or for cases that get carried around a lot, 1.2 mm is a better choice, as in the examples for C cells and D cells. The end wall sets the bottom of the tray and the lid of the sleeve. The end bevel shapes the sloped transition at the ends, which guides the sleeve neatly onto the tray when you close it.
The finger notch is as wide as one cell, but at most 20 mm. The tab on the tray is half as tall as it is wide; the notch in the sleeve is fully round and 0.4 mm larger. If you don’t need the notch, for example because the case goes into a fitted drawer, you can switch it off.
Labels and colors
The closed end of the sleeve takes a label with up to two lines of ten characters each. It sits on the face that lies on the bed while printing and is mirrored, so it reads the right way around from outside. Because it forms directly on the print bed, it comes out especially crisp.
There are two styles:
- Engraved: the letters are cut 0.4 mm deep into the lid. This works on any printer and in any color.
- Flush: the letters are a separate part in their own color that fills the engraving exactly, so the surface stays smooth. You need a printer that can print several filaments within the same layer; a simple color change at one layer height won’t do here.
The text size adapts to the lid automatically. Very small cases, for example for a single AAA cell, have little room; short texts such as “AAA” or “1.2 V” work best there.
Tray and sleeve can have different colors, too. A proven system: a green tray for charged cells and a red one for empty cells. Or label the cases “FULL” and “EMPTY”, like the examples AA case “FULL” and AAA case “EMPTY”. When you take fresh cells out, the empty ones go straight into the other case, and a flat battery never ends up in a device again.
For Li-ion cells, bright colors such as yellow or orange work well. The case for four 18650 cells labeled “LI-ION” stands out in any backpack and at any security check.
Printing tips
- Orientation: print both parts upright, just as they come in the download: the tray standing on its bottom, the sleeve on its closed end. No supports are needed.
- Layer height: 0.2 mm is fine. Very small labels benefit from 0.15 mm.
- Walls: set at least two perimeters in your slicer. With 0.8 mm walls the nozzle then prints solid walls with no infill in between.
- Elephant’s foot: the bottom edge of both parts has a small bevel. It makes up for the elephant’s foot of the first layer, so tray and sleeve don’t catch at the rim.
- Material: PLA is perfectly fine for everyday use. PETG is tougher and handles the heat in a car better, so it is the better choice for Li-ion cells that ride along in summer.
- First test: check the fit with an empty case. If the tray slides cleanly, the cells will sit right, too.
A word on safety: the case protects the terminals from short circuits and the cells from pressure and knocks. It is not fire protection. Damaged, swollen or overheated Li-ion cells don’t belong in a plastic case but at a battery collection point.
Want to build cells into a battery pack instead of storing them? Use the battery cell holder: honeycomb holders for 18650 and 21700 cells with channels for nickel strips.
Origin and license
This generator is a port of the OpenSCAD model Customizable case for AA, AAA, cylindrical batteries by kpreid on Printables, published under CC BY 4.0. From there come the tray-and-sleeve design, the beveled ends, the finger notch, the default walls and play, and the pocket sizes for AA and AAA. The geometry was translated line by line to TypeScript and produces the same sizes and volumes as the original.
New here are the cell formats from AAA to D, CR123A, 18650 and 21700, the label, the colors for tray, sleeve and label, and the multi-color 3MF export. The table of cell formats is our own work and is shared with other generators on this site. The fonts are licensed under the SIL Open Font License. You’ll find all details on the licenses page.
Ready to try? Open the generator or browse the examples.
All parameters
The numeric settings of the generator with their default values and allowed ranges. Text, fonts, patterns and colors are set directly in the generator.
| Parameter | Default | Range | Meaning |
|---|---|---|---|
| Cells | |||
| Pocket diameter | 14.7 mm | 5 – 40 mm | Diameter of one pocket including play: about 0.2 mm more than the cell. |
| Pocket depth | 51 mm | 10 – 120 mm | Depth of the pockets including play: about 0.5 mm more than the longest cell. |
| Cells per row | 2 | 1 – 10 | This many cells sit side by side. |
| Rows | 1 | 1 – 6 | More rows make the case deeper instead of wider. |
| Walls | |||
| Tray wall | 0.8 mm | 0.4 – 3 mm | Outer wall of the tray around the cells. |
| Sleeve wall | 0.8 mm | 0.4 – 3 mm | Wall of the sleeve that slides over the tray. |
| Wall between cells | 0.8 mm | 0.4 – 3 mm | Web between two pockets. |
| End wall | 0.8 mm | 0.4 – 3 mm | Bottom of the tray and lid of the sleeve. |
| End bevel | 0.6 mm | 0 – 2 mm | Height of the sloped edge where the ends meet the wall. |
| Fit | |||
| Play all around | 0.25 mm | 0.1 – 0.8 mm | Air between tray and sleeve. More play slides easier, less holds tighter. |
| Play at the ends | 0.2 mm | 0 – 0.8 mm | Extra air at the two narrow ends of the case. |
| Finger notch | |||
| Largest notch width | 20 mm | 6 – 30 mm | The notch is as wide as one cell, but at most this wide. |
| Notch play | 0.4 mm | 0 – 1 mm | How much larger the notch in the sleeve is than the tab. |
| Label | |||
| Text size | 0 mm | 0 – 20 mm | Height of the capital letters, 0 = fit automatically. |
Frequently asked questions
Which batteries fit?
AA, AAA, C, D, CR123A, 16340, 14500, 18650 and 21700 are presets. Any other round cell gets its case through “Custom size”: you enter the diameter and length yourself.
Can I use it to carry lithium cells when traveling?
It covers the terminals against short circuits, as airlines require for spare cells. It is not fireproof, though, and your airline’s rules still apply.
The tray is too tight or too loose. What now?
Change “Play all around” under “Fit” in 0.05 mm steps. PETG usually needs a little more play than PLA. A case for a single cell is the quickest way to test.
Do protected 18650 cells fit?
Protected cells can be up to 69 mm long. Measure yours and set the pocket depth to about 70 mm; the generator switches to “Custom size” on its own.
How do I open the case?
Push the tab in the sleeve’s notch with a finger, and the tray slides out.
Origin & license
- Customizable case for AA, AAA, cylindrical batteries by kpreid · CC BY 4.0 · code ported – tray and sleeve with beveled ends and finger notch, AA/AAA dimensions (ported; extended with cell formats, label and colors)