This is a battery box designed as a module in OpenSCAD, that allows you to make a holder for 1 to as many as you like (or your OpenSCAD installation will want to compile)
I needed a battery holder that could be screw mounted on a little robot and decided to design one that could be 3D printed.
I have put comments in the OpenSCAD code, so if you want to modify things, it should be relatively easy to find the right spots to edit.
If all you want to change is the number of cells, simply call the module with a different argument.
This battery box is designed for AA batteries using a little clip from Keystone Electronics (part number 5209).
I got them from DigiKey (https://www.digikey.com/en/products/detail/keystone-electronics/5209/299941)
You will need two of these for each cell in the holder.
In addition, you will also need some relatively thin wire, to connect the cells on the back, and some wire to connect the battery box to your load.
The author marked this model as their own original creation. Imported from Thingiverse.