A battery dispenser is a surprisingly hard design problem with multiple trade-offs and decisions.
I'll discuss this more in the design notes; the only question I'll address here is “how many batteries should it hold?”
My answer: infinity.
One of my design goals was to make a battery dispenser whose basic shape repeated itself so that it could be extended as far as you would like. Other than for the very bottom, I achieved that, so that you can make a battery holder as large as you want.
The basic battery holder holds 20 batteries. But you can add as many additional sections as you like, either in your slicer or printed separately and then attached via cable ties (if your print bed isn't large enough).
Minimum assembly requires one right side and one left side. The right side does not require supports. The left side requires supports under the very bottom of the dispenser because the final lip doesn't go all of the way down to the build plate to make it easier to grab the battery.
On my printer, a press fit between the two pieces seems sufficient. If you would like to reinforce, the holes in the cylinders are wide enough to fit a standard cable tie. Or you can always glue them together.
This project began when I downloaded a cool-looking battery dispenser from Thingiverse (moment of silence). I printed it, loaded it with batteries, pulled out the first battery and…it jammed – no battery popped into grabbing position next.
A battery dispenser is a surprisingly hard design problem with multiple trade-offs and decisions.
You want to keep it as compact as possible.
You also want to make it easy to get the batteries out, but not so easy that when you take one batter out, they all roll out.
So you have to play around with dimensions, angles and tolerances.
I've uploaded two variations on where I eventually landed.
The author marked this model as their own original creation. Imported from Thingiverse.