AA to D/C Battery Adapter
A sleeve that lets an AA cell be used in devices that take D or C cells, such as flashlights and radios - handy as a stopgap, keeping in mind the capacity is still that of an AA cell. The AA cell is held by three crush ribs and pushed out through a side window. For the D size, an M4 x 8 pan-head screw self-tapped into the top acts as the + terminal and its tip touches the AA cell; the C size needs no extra parts because the AA terminals protrude from both open ends. The D version measures 33.8 x 33.8 x 58.2 mm (61.0 mm long with the screw head), and the C version 25.8 x 25.8 x 47.5 mm. Print the D version upside down, top face on the bed, to avoid bridging the bore ceiling; no supports are needed. Adjustable parameters: cell size, outer diameter reduction, bore clearance, rib interference, screw length, screw head height, pilot hole diameter and the side window.
# AA to D / C Battery Adapter - sleeve that makes an AA cell fit D or C devices
#
# Insert an AA cell (R6, 14.5 dia x 50.5) and the outside matches a D cell
# (R20, 34.2 dia x 61.5) or a C cell (R14, 26.2 dia x 50).
#
# Conductor assumptions:
# D ... an M4x8 pan-head screw (nickel-plated steel) is self-tapped into the top center.
# The screw head (2.8 high) acts as the D cell's + terminal; the screw tip touches the AA + terminal.
# The AA - terminal sticks out 0.3mm below the bottom and touches the device's - contact directly.
# C ... an AA cell is 0.5mm longer than a C cell, so the tube is open at both ends. The AA +/- terminals
# protrude from both ends and touch the device contacts (no conductor parts; the device springs take up the 50.5 length).
# The AA cell is held by a press fit on three crush ribs and pushed out with a finger through the side window.
@param choices:["D", "C"] desc:"Outer size (D or C cell)"
cell = "D"
@param 0..2 step:0.1 desc:"Outer diameter reduction (diameter, mm)"
od_margin = 0.4
@param 0.2..1.0 step:0.1 desc:"AA-to-bore clearance (diameter, mm)"
bore_clear = 0.6
@param 0..0.4 step:0.05 desc:"Rib interference (per side, mm)"
rib_squeeze = 0.15
@param 6..12 desc:"+ terminal screw length (D only, mm)"
screw_len = 8
@param 2..4 step:0.1 desc:"+ terminal screw head height (D only, mm)"
head_h = 2.8
@param 2.5..4.5 step:0.1 desc:"Screw pilot hole diameter (M4 self-tapping, mm)"
pilot_d = 3.3
@param desc:"Side window (for removing the cell)"
window = true
# --- AA cell (IEC R6) ---
aa_d = 14.5
aa_len = 50.5
aa_out = 0.3 # how far the AA - terminal sticks out of the bottom
# --- Outer shape (slightly under the IEC R20 / R14 maximum dimensions) ---
is_d = cell == "D"
od = (if is_d then 34.2 else 26.2) - od_margin
r = od / 2
tip_z = aa_len - aa_out # height of the AA + terminal (= screw tip)
# D: tube height chosen so the screw tip lands at tip_z (overall length incl. screw head is 61.0)
body_h = if is_d then tip_z + screw_len else aa_len - 3
total = if is_d then body_h + head_h else aa_len
# AA bore: blind hole stopped by the top wall for D (screw tip protrudes 0.5mm from the ceiling), through hole for C
bore_h = if is_d then tip_z + 0.5 + 1 else body_h + 2
bore_r = (aa_d + bore_clear) / 2
# Crush ribs: three 2mm-dia half cylinders. Inner tips at dia (14.5 - 2 x interference)
rib_r = 1
rib_c = aa_d / 2 - rib_squeeze + rib_r
body = cylinder r body_h | floor
| edges [>Z, <Z] | chamfer 0.8
bore = cylinder bore_r bore_h | floor | translate 0 0 -1
rib_h = if is_d then tip_z else body_h
ribs = cylinder rib_r rib_h | floor | polar 3 rib_c
# Window: 8 wide (narrower than the AA cell), on the -X side (ribs are at 0/120/240deg, so 180deg is between them)
win_w = 8
win_h = body_h * 0.55
win = box (r + 2) win_w win_h | floor
| translate (r / -2 - 1) 0 (body_h * 0.2)
pilot = cylinder (pilot_d / 2) 30 | floor | translate 0 0 (tip_z - 1)
sleeve = body | diff bore | union ribs
sleeve2 = if window then (sleeve | diff win) else sleeve
if is_d then (sleeve2 | diff pilot) else sleeve2