3D Printed 18650 button-top cell holder for slightly longer protected cells
Category: Batteryholder
Using this part
This TurboCase prefab can be directly pasted into your KiCad PCB editor by using the copy button below. The
code of the footprint is also shown here for reference. The footprint file can also be downloaded to be
added to your own local footprint libraries.
Download footprint
The OpenSCAD code
This is the OpenSCAD code that will end up in your final case .scad file:
module BatteryHolder_Cylindrical(diameter, length) {
length = length/10 + 1;
border = 3.5;
bs = 1;
grip=12;
difference() {
union() {
difference() {
cube([diameter+(2*bs), length+(2*border), diameter/2]);
rotate([-90, 0, 0])
translate([diameter/2+bs, -(diameter/2), border])
cylinder(length, diameter/2, diameter/2);
}
translate([diameter/2+bs, 0, diameter/2])
rotate([-90, 0, 0])
cylinder(border, diameter/2, diameter/2);
translate([diameter/2+bs, length+border, diameter/2])
rotate([-90, 0, 0])
cylinder(border, diameter/2, diameter/2);
}
translate([0, -0.005, diameter*0.75])
cube([diameter+(2*bs), length+(2*border)+0.01, diameter/2]);
translate([diameter/2+bs, border/2, diameter])
cube([diameter*0.75, border/2, diameter*1.7], center=true);
translate([diameter/2+bs, border/2+length+border, diameter])
cube([diameter*0.75, border/2, diameter*1.7], center=true);
translate([diameter/2+bs, 0, diameter*0.75])
cube([1, border, diameter*1.7], center=true);
translate([diameter/2+bs, length+border*2, diameter*0.75])
cube([1, border, diameter*1.7], center=true);
translate([diameter/2+bs, length/2+border, diameter/2-1])
cube([diameter+border, length-(grip*2), diameter], center=true);
translate([diameter/2+bs, border+(grip/2)-0.6, diameter/2-1])
cube([diameter, grip-1.2, diameter], center=true);
translate([diameter/2+bs, border-(grip/2)+1.2 + length, diameter/2-1])
cube([diameter, grip-1.2, diameter], center=true);
}
}