3 - mozna sirsi misto na baterku?
4 - vetsi vybrani pro baterku ve vicku
5 - kuzelova dira pro tlacitka
6 - jine diry pro uchyceni
7 - zvetsit vybrani na strane tlacitek
8 - mozna prilis velky klip zasunovaciho konce baterky
9 - diry pro neizolovany drat muzou byt mensi
11 - mensi horni cast klipu baterky - pri 0.7 je sirka nahore 16 mm.
16 // 18650 is ~18mm diameter, ~65mm length,
28 pcb_thick = 1.2 + 0.3;
32 batt_clip_h = base_h + pcb_width - pcb_groove;
38 pcbside_protrusion_len = 20;
39 pcbside_protrusion_diam = 2.5;
40 battside_protrusion_len = 10;
41 battside_protrusion_diam = 2;
43 base_batt_extend = wall + pcb_thick; // extend the base on the battery side
47 uswitch_diam = 2.5 + 0.5;
49 s2_xoff = -160 * 25.4/1000;
50 led_xoff = 90 * 25.4/1000;
51 s1_xoff = 340 * 25.4/1000;
54 pcb_clip_off = led_xoff + pcb_clip_w/2;
57 translate([0, 0, base_h/2]) {
59 cube([batt_len + 2*wall + 2*cable_sep, batt_diam + 2*wall, base_h], center=true);
61 translate([0, -batt_diam/2-wall-pcb_thick/2-wall/2, 0])
62 cube([batt_len + 2*wall, pcb_thick + wall + eps, base_h], center=true);
63 // battery-side extension
64 translate([0, batt_diam/2 + wall + base_batt_extend, 0])
65 cube([batt_len + 2*wall, eps, base_h], center=true);
69 module base_protrusions() {
70 // pcb-side side protrusion
71 translate([-pcbside_protrusion_len/2, -batt_diam/2-2*wall-pcb_thick, base_h-pcbside_protrusion_diam/2])
73 cylinder(r = pcbside_protrusion_diam/2, h = pcbside_protrusion_len, $fn = 6);
75 // battery-side side protrusion
76 translate([-battside_protrusion_len/2, batt_diam/2+wall+base_batt_extend, base_h-battside_protrusion_diam/2])
78 cylinder(r = battside_protrusion_diam/2, h = battside_protrusion_len, $fn = 6);
82 // rear part of the PCB holder (behind S1)
83 translate([pcb_clip_off, -batt_diam/2-wall-pcb_thick+eps, 0])
84 cube([pcb_clip_w, pcb_thick+wall, pcb_width + wall + base_h - pcb_groove]);
85 // side part of the PCB holder (near the battery wires)
86 translate([-pcb_len/2-wall, -batt_diam/2-pcb_thick-2*wall, 0])
87 cube([pcb_groove+wall, pcb_thick+2*wall+eps, pcb_width + wall + base_h - pcb_groove]);
93 // frot + rear part of the battery clip
96 translate([batt_len/2+wall/2, 0, batt_clip_h/2+wall/2])
98 cube([wall, batt_diam + 2*wall, batt_clip_h + wall], center=true);
99 translate([-15/2, 0, -batt_clip_h/2])
100 cube([15, batt_diam+2*wall, wall], center=true);
104 translate([pcb_clip_off+pcb_clip_w/2, 0, batt_clip_h/2+wall/2])
106 cube([pcb_clip_w, batt_diam + 2*wall, batt_clip_h + wall], center=true);
107 translate([0, 0, -batt_clip_h/2])
108 cube([2*pcb_clip_w, batt_diam+2*wall, wall], center=true);
110 // pcb holder - pcb side only
111 translate([-pcb_len/2-wall, -batt_diam/2-wall, 0])
113 cube([pcb_groove + wall, batt_diam/2 + wall, base_h + pcb_width + wall - pcb_groove]);
114 translate([-3*(pcb_groove+wall), 0, 0])
115 cube([4*(pcb_groove+wall), batt_diam/2 + wall, base_h]);
120 translate([0, 0, infty/4 + wall + batt_diam/2])
121 cube([infty/2, infty/2, infty/2], center=true);
122 translate([-infty/2, 0, batt_diam/2+wall])
124 cylinder(r=batt_diam/2+wall, h = infty);
131 translate([-batt_len/2, 0, batt_diam/2+wall])
133 cylinder(r=batt_diam/2, h = batt_len);
145 translate([0, -batt_diam/2-wall-pcb_thick/2, base_h - pcb_groove + pcb_width/2])
146 cube([pcb_len, pcb_thick, pcb_width], center=true);
149 // 4 wire holes at the battery ends
150 for (j=[-wire_sep/2, wire_sep/2])
151 for (i=[-wire_sep/2, wire_sep/2])
152 translate([-infty/2, i, batt_diam/2 + wall+j])
155 cylinder(r=wire_thick/2, h = infty, $fn=6);
157 // holes for wire from battery to the PCB
158 translate([-infty/2, -batt_diam/2, base_h + wire_thick/2])
161 cylinder(r=wire_thick/2, h = infty, $fn=6);
162 // hole for the cable outlet
163 translate([-pcb_len/2+pcb_groove+cable_out_diam/2, -batt_diam/2-pcb_thick-2*wall, -infty/2])
164 cylinder(r=cable_out_diam/2, h = infty, $fn=6);
165 // holes for binding to the shoe
167 pcb_len/2 + wall + wire_thick/2 + wire_sep,
168 pcb_len/2 + wall + wire_thick/2,
169 -pcb_len/2 - wall - wire_thick/2 - wire_sep,,
170 -pcb_len/2 - wall - wire_thick/2 ]) {
172 translate([x, y*(batt_diam/2 + wall + wire_thick/2), -infty/2])
173 cylinder(r=wire_thick/2, h=infty, $fn=6);
176 // hole for easy opening
177 translate([-battside_protrusion_len/2, batt_diam/2+wall+base_batt_extend, base_h-3*battside_protrusion_diam/2])
179 cylinder(r = battside_protrusion_diam/2, h = battside_protrusion_len, $fn = 4);
184 module cover_internal() {
187 // battery + wall + cable space
188 translate([-batt_len/2, 0, batt_diam/2+wall])
190 cylinder(r=batt_diam/2, h = batt_len);
192 translate([0, 0, wall + batt_clip_h])
193 cube([batt_len+2*wall + cable_sep, batt_diam + 2*wall, eps], center=true);
195 translate([-pcb_len/2-wall, -batt_diam/2-2*wall-pcb_thick, base_h-pcb_groove])
196 cube([pcb_len+2*wall, wall+pcb_thick, pcb_width+wall]);
200 module cover_hole() {
205 translate([batt_len/2, -infty/2, wall + batt_clip_h])
217 sphere(wall+cover_sep, $fn=6);
219 sphere(wall+cover_sep, $fn=16);
224 sphere(cover_sep, $fn=8);
227 translate([s2_xoff, 0, base_h-pcb_groove + pcb_width/2])
229 cylinder(r=uswitch_diam/2, h = infty, $fn=6);
231 translate([led_xoff, 0, base_h-pcb_groove + pcb_width/2])
233 cylinder(r=led_diam/2, h = infty, $fn=6);
235 translate([s1_xoff, 0, base_h-pcb_groove + pcb_width/2])
237 cylinder(r=uswitch_diam/2, h = infty, $fn=6);
239 translate([0, 0, -infty/2]) cube(infty, center=true);
243 translate([0, -19, 0])
247 translate([0, 19, 0])
252 // translate([0, 17, batt_diam + 3*wall + cover_sep])
253 // rotate([180, 0, 0])
256 translate([0, 19, 0]) {