Customizable Print-in-Place Cases for Button and Cylindrical Batteries

Highly customizable cases for batteries such as CR2032s. OpenSCAD source included.
1,456
4070
200
22 k
updated April 16, 2025

Description

PDF

Print-in-place model to hold button-style or cylindrical batteries. Some example models are included, and the OpenSCAD source code is provided, for full customization.

Instructions below are for button-style batteries. The version for cylindrical batteries works the same but doesn't have many of the customization options. (Caveat: For cylindrical batteries, I've only tested the CR123A batteries myself). Has not been updated (yet).

Update 4/16/2025:

  • Added option for printing text in a different color using an MMU or multi-extruder printer.
  • Re-wrote the way the text is added to the model. 
  • Freely downloadable developer version of OpenSCAD is now required.

Uh… wait… OpenSCAD? What's that?! Do I need to learn how to write code?

No, you don't! It's actually very simple, and you don't need to “speak SCAD” to create your very own battery cases.

Just check out the PDF file with a step-by-step guide I uploaded here (Files page>Other files), to see how easy it is to design a customized box per your specs.

The key parameters to change are:

  • Name of the battery. The name is printed on the lid of the box.
  • Dimensions of batteries. CR-type batteries have the dimensions encoded in their names, CR2032 for example means 20 mm diameter and 3.2 mm depth.
  • Number of batteries in one “column”. Default is 10.
  • Number of side-by-side “columns". Between 1 and 3, default is 1.
  • Peep hole on the bottom, to check how many batteries are in the case. (Optional).
  • Lock type:  The original type is a clasp. Alternatively, you may use magnets. Currently supported: 6 x 3 mm round magnets, and 20 x 3 x 2 mm rectangular magnets. 
  • For optional key tag, look under Other Options.

IMPORTANT: While the naming conventions of CR batteries usually represent their actual dimensions (see above), there are — of course 😡 — exceptions. For example, while CR2412 batteries have the expected diameter of 24mm, CR2450 and CR2477 have a diameter of 24.5mm. Go figure… Do a Google search or go to a site such as https://www.cheap-batteries.com/coin_batttery_chart.html to double-check the dimensions of your batteries!

 

Print instructions:

0.2 or less layer height. No supports needed (unless you're printing the key tab version).

The hinge for this box is print-in-place. I used a 0.2mm clearance which should be fine for most well-calibrated printers. The first time you move the hinge may require a bit of pressure. Repeatedly opening and closing the box will make the hinge movement smoother. 

Same goes for the clasp, which may be a bit hard to open the first couple of times. Open and close it a few times, and it should be fine.

Like all print-in-place models, you may find that for your particular printer the clearance may be too high or too low (part of the hinge fused together). Alas, different printers have different tolerances, so there's no surefire way to ensure a model is working everywhere.  If you have issues, you may want to try and scale the model slightly, say to 103% or so, to create more clearance. Or use sandpaper/dremel.

Magnet lock: The slots for magnets are sized for press fit. However, different brands of magnets may vary slightly in size. If needed, use superglue to hold them in place. Make sure the two magnets are inserted such that they attract each other!!! It's very easy to mix it up.

If you have a printer with multiple extruders such as a Prusa XL or a printer with a multi-material unit (MMU): there is an option to print the label text in a different color. Select that option in the customizer, render, and save. Load the STL into Prusaslicer. Right-click on it and select Split>To parts. Select the parts that make up the text and assign a different extruder to them. See example 3md file.

For printers with a single extruder, I have uploaded a 3mf file that shows how to insert an accent color, using manual filament swaps, by adding a manual filament swap at 1.2 mm (for the accent color) and a second one at 1.6 mm (back to the original color) in Prusaslicer. 

Version History

Update 5/21/2024:

  • Added option to use magnet lock instead of clasp.
  • Slightly modified hinge to prevent binding between top and bottom part of the case.

Update 10/11/2023: Added a version for cylindrical batteries such as AA, CR123, etc.

Update 1/19/2023:

  • Fixed major bug that could prevent the lid text from being created. 
  • Reworked how lid text is being drawn. Cases where it overflows should be rarer now, and I added an option to manually scale the text. Blame OpenSCAD's rudimentary text handling abilities.
  • Per @dimo414's suggestion, I changed the peep hole style to extend to the top of the lid. For those who preferred the old style, it's available as an option.
  • Fixed assertion error caused by invalid lower range of battery diameter.

Update 1/17/2023: @petrus2999 suggested adding an option to have dividers on top, in addition to the bottom. Here it is. Caveat: I have not test printed it myself.

Update 9/7/2022: I loved @PixxelSnake's idea of a “peep hole” in the bottom to see how many batteries are left. I added this to the script and made it the default. Will even work with multiple rows of batteries. However, it you'd like to disable it, look under Other Options in the Customizer panel. Also, I removed the version with the old clasp design.

Update 9/2/2022: Added 3mf file with manual filament swaps for two color version. 

Update 1/2/2022: Several comments indicated that the clasp didn't work well for some. The new version has a different clasp design. 

Update 4/12/2021: Thanks to @wolph for his suggestion to use a cube_fillet function, which I added to the OpenSCAD code, to generate rounded edges. Images are still from my original version.

If you like what I'm doing…

 … consider buying me a coffee or joining my Club.

Tags



Model origin

The author marked this model as their own original creation.

License