1 // use <obiscad/bevel.scad>
6 use <microusb_frame.scad>
10 use <underButtons.scad>
14 $fn = 100; //50 200 // rounding resolution <--------------- CHANGE IT BEFORE EXPORT
17 topShift = 2.5; // 2 // height shift of top part
18 clipRotateShift = 20; // turn angle of perimeter clip holders
21 busStopperWidth = 0.6;
23 // ----------------------- battery holder wall -------------
25 module batteryWall( width, height, radius, depth ){
26 // translate([-height/2,-width/2,-depth/2])
28 translate([radius,radius,0]) hull() {
29 translate([0, 0, 0]) cylinder(depth, radius, radius);
30 translate([height-radius*2, 0, 0]) cylinder(depth, radius, radius);
31 translate([0, width-radius*2, 0]) cylinder(depth, radius, radius);
32 translate([height-radius*2, width-radius*2, 0]) cylinder(depth, radius, radius);
35 // translate([0, width-radius, 0]) cube ([height,radius,depth]);
38 module batteryWallComplex(){
39 batteryWall ( 14.5, 60, 5, 1 );
40 translate([0,0,1.5]) batteryWall ( 14.5, 60, 5, 1 );
41 translate([20,-1,0]) rotate([0,0,90]) cube([1,10,1]);
42 translate([50,-1,0]) rotate([0,0,90]) cube([1,10,1]);
45 // translate([0,0,-10]) batteryWallComplex();
47 // ----------------------- speaker hole --------------------
48 module roundHole ( length, radius, depth ) {
50 translate ([length/2, 0, -depth/2]) hull() {
51 translate([-length, 0, 0]) cylinder(depth, radius, radius);
52 cylinder(depth, radius, radius);
57 // ----------------------- round stopper -------------------
59 module roundStopper ( length, radius ) {
62 translate ([length/2, 0, -depth/2]) hull() {
63 translate([-length, 0, 0]) cylinder(depth, radius, radius);
64 cylinder(depth, radius, radius);
71 // ---------------------- bolt holder ----------------------
72 module boltHolder( shift ){
78 translate([ 0, 0, 1 - bottomShift]) color("red") cylinder(length, 3, 3);
79 translate([ 0, 0, -1 - bottomShift]) color("red") cylinder(innerHoleLength, diameter/2, diameter/2 );
80 translate([ 0, 0, -1 - bottomShift]) color("red") cylinder(3, 2.5, diameter/2);
85 // ---------------------- bolt holder bottom ---------------
87 module boltHolderBottom( height ){
90 translate([ 0, 0, 0]) color("red") cylinder( height, 3, 3);
91 translate([ 0, 0, -1]) color("red") cylinder( height + 2, diameter/2, diameter/2 );
96 // ---------------------- bolt hole ------------------------
98 translate([ 0, 0, -7.5]) color("red") cylinder(14, 2.7, 2.7);
99 color("red") cylinder(14, 1.25, 1.25);
100 translate([ 0, 0, -1]) color("red") cylinder(8, 8, 1);
105 // ---------------------- PCB round holder -----------------
106 module PCBRoundHolder(){
108 translate([ 0, -25, 11]) color("red") cylinder(5, 2, 2);
109 //translate([ 0, 0, -1]) color("red") cylinder(5, 2, 2);
114 // ---------------------- PCB holder -----------------------
116 translate([ -0.5, -44, 11 + totalPCBShift]) difference(){
117 translate([0,1,-1]) cube([1,8,5]);
118 // translate([ -5, 0, -1]) rotate([35,0,0]) cube([10,10,10]);
119 translate([ -1, 0, 1]) rotate([28,0,0]) cube([15,15,15]);
124 // color("red") translate ([0,0,30]) PCBHolder();
127 // --------------------- GPS holder ------------------------
130 translate([ 0, 29.5,9]) cube(size = [18,5,16], center = true); // 12
131 translate([ 0, 32,7.5]) cube(size = [15,7,17], center = true); // clip
132 translate([ 0, 29.5,7.5]) cube(size = [16.2,2,17], center = true); // pass
134 // translate([ -5, 27.3, 10.5]) sphere(r=1);
135 // translate([ 5, 27.3, 10.5]) sphere(r=1);
136 // translate([ 0, -17,0]) rotate(180) PCBHolder();
137 translate([0, 26,13 + totalPCBShift]) color("red") cube([1,3,4 + 2],center=true); // PCB holder
141 // ---------------------- sound PCB hole -------------------
142 module soundPCBhole(){
143 translate([ 0, 37, -4]) color("green") cube([18, 10, 7], center=true);
148 translate([ 0, 15 + slightShift, 1]) color("green") cube([18 - 2, 15, 6], center=true);
149 // translate([ 0, 8, 0]) color("green") cube([10, 2, 1], center=true);
150 // translate([5,7.5,-0.5]) rotate([0,90,0]) cylinder(4,0.5,0.5);
151 translate([-3,7.5 + slightShift,-0.5]) rotate([0,90,0]) cylinder(6,0.5,0.5);
156 rotate([90,0,0]) translate([ -5, -5, -55.5]) cylinder (14, 2.75, 2.75); // translate: 55 (open hole)
157 rotate([90,0,0]) translate([ -5, -5, -43]) cylinder (0.5, 2.75, 2.75); // stopper
160 rotate([90,0,0]) translate([ -5, -5, -58]) cylinder (14, 4.25, 4.25);
164 // ---------------------- charger PCB hole -----------------
165 module chargerPCBhole(){
169 translate([ 0, 37.5, -4 + bottomShift/2]) color("green") cube([17.1, 10, 7 - bottomShift], center=true);
172 translate([ 0, 1, 0]) difference(){
173 translate([ 0, 22, 0]) color("green") cube([18, 15, 6], center=true);
174 // translate([ 0, 8, 0]) color("green") cube([10, 2, 1], center=true);
175 translate([6,14.5,-0.5 - 1]) rotate([0,90,0]) cylinder(3,0.6,0.6); // clip
176 translate([3.5,14.5 + 1.5,-0.5 - 1]) rotate([0,90,0]) cylinder(3,0.6,0.6); // clip
178 translate([2,14,-0.5]) cube([9,4,5], center=true);
183 translate([0,50,-3.3]) rotate([90,180,0]) microusb(10); // translate: 50 (open hole)
184 translate([0,43.5,-3.3]) rotate([90,180,0]) microusb(0.5); // stopper
187 // translate([0,53,-3.3]) rotate([90,180,0]) microusb(10); // translate: 50 (open hole)
188 translate([-1,74.5,-3.3]) rotate([90,0,0]) microusb_frame(30);
191 // translate([-6,42,-3.3]) rotate([0,90,90]) cylinder(13,1,1);
193 translate([-6,42,-3.3]) rotate([0,90,90]) cylinder(13,1,1);
194 translate([-6,42.7,-3.3]) rotate([0,90,90]) cylinder(0.5,2,2); // stopper
198 // ---------------------- switcherhole ---------------------
199 module switcherHole(){
201 translate([ 0, 37.5, -3.25]) color("green") cube([12, 10, 5], center=true);
204 translate([0,43.5,-3.3]) rotate([90,180,0]) difference(){
205 roundHole ( 5, 1.2, 6 );
206 translate([0,0,0.5]) roundHole ( 5, 1.2, 0.5 ); // stopper
210 translate([0,47,-3.3]) rotate([90,0,0]) roundHole ( 7, 2.3, 6 );
214 // ---------------------- cross stand ----------------------
216 module crossStand(standLenght){
218 widhtOfSegment = 0.5;
221 translate([0,0,standLenght/2]) {
222 // translate([0,(widthOfCross-widhtOfSegment)/2,0]) cube([widthOfCross, widhtOfSegment, standLenght]);
224 cube([widthOfCross, widhtOfSegment, standLenght], center=true);
225 // translate([widthOfCross/2, widhtOfSegment,standLenght - 5]) rotate([90,90,0]) cylinder(widhtOfSegment*2, fixHoleRadius, fixHoleRadius);
227 rotate(90) cube([widthOfCross, widhtOfSegment, standLenght], center=true);
229 // cylinder(standLenght,standLenght * sin(45)/cos(45),1);
235 // ---------------------- segment with clip ----------------
237 module segment(depth, width, radius, angle){
240 cylinder (depth , radius, radius);
241 // cylinder (2 , 46 - wall + error + fixatorWidth, 46 - wall + error + fixatorWidth);
243 cube([radius,radius,depth]);
244 rotate([0,0,90 - angle]) cube([radius,radius,depth]);
247 translate([0,0,-1]) cylinder (depth + 2 , radius - width, radius - width);
249 // rotate([0,0,25]) translate([43,0,0]) color("purple") cylinder(2,clipRadius,clipRadius);
252 module clipSegment(depth, width, radius, angle){
253 clipRadius = 1; // ounded holder swing clip radius
256 translate([0,0,2]) segment(depth, width, radius, angle - angleOfStopper); // long segment
257 rotate([0,0,-angle + angleOfStopper]) translate([0,0,-1.1]) segment(depthOfStopper, width , radius , angleOfStopper); // depth, width, radius, angle // short segment
258 rotate([0,0,-angle + 100]) translate([radius-1.1,0,-0.1]) cylinder(2.5, clipRadius, clipRadius); // clip
260 // rotate([0,0,180]) segment(depth, width, radius, angle);
263 // rotate([0,0,-20]) color("purple") clipSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43);
265 module clipSegmentSimple(depth, width, radius, angle){
266 clipRadius = 0.8; // ounded holder swing clip radius
269 translate([0,0,2]) segment(depth, width, radius, angle - angleOfStopper - 13.5); // long segment
270 // rotate([0,0,-angle + angleOfStopper]) translate([0,0,-1.1]) segment(depthOfStopper, width , radius , angleOfStopper); // depth, width, radius, angle // short segment
271 // rotate([0,0,-angle + 100]) translate([radius-1.1,0,-0.1]) cylinder(2.5, clipRadius, clipRadius); // clip
273 // rotate([0,0,180]) segment(depth, width, radius, angle);
276 module clipCounterSegment(depth, width, radius, angle){
277 clipRadius = 1.05; // ounded holder swing clip radius
282 translate([0,0,0]) segment(depth, width-0.6, radius+1, angle - angleOfStopper); // long segment
283 rotate([0,0,-angle + 100]) translate([radius-1.1,0,-0.1]) cylinder(2.5, clipRadius, clipRadius); // clip
284 rotate([0,0,-angle-1]) translate([-0.2,35,-1]) rotate(45) cube([10,10,10]); // corner cut for clip
286 // rotate([0,0,-angle + angleOfStopper]) translate([0,0,-1.1]) segment(depthOfStopper, width , radius , angleOfStopper); // depth, width, radius, angle // short segment
288 // rotate([0,0,180]) segment(depth, width, radius, angle);
293 // rotate([0,0,-20]) color("red") clipCounterSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43);
295 // perimeterFixator(2);
297 // ---------------------- perimeter bottom fixator --------
299 module perimeterFixator(bottomWall){
300 // cylinder perimeter fixator
303 color ("green") rotate ([0,0,46.5]) {
304 segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, 90);
305 rotate([0,0,180]) segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, 90);
307 additionalSegmentAngle = 30;
308 rotate([0,0,additionalSegmentAngle]) segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, additionalSegmentAngle);
309 rotate([0,0,180 + additionalSegmentAngle]) segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, additionalSegmentAngle);
313 color ("blue", 0.5) translate([ 0, 0, -1]) difference (){
314 translate([ 0, 0, -1.6]) cylinder (6.5 , 46 - wall - 0.5, 46 - wall - 0.5); // height of fixator
315 translate([ 0, 0, -10]) cylinder (17, 46 - wall - bottomWall, 46 - wall - bottomWall );
317 // translate([ 0, 0, 3]) cube([120, 20, bottomPlate + 6], center=true); // bus hole
318 // removed part for rubber bus wire
319 // rotate([0,0,33]) translate([ 0, 0, 3]) cube([120, 20, bottomPlate + 6], center=true);
320 // rotate([0,0,17]) translate([ 0, 0, 3]) cube([120, 20, bottomPlate + 6], center=true);
325 // ----------------------- pcb clip ------------------------
327 module pcbClip( width ) {
332 translate([0,0,length/2]) cube([1,width,6 + length],center=true);
333 translate([-0.8,0,-2.25]) cube([1.2,width,1.4],center=true);
335 translate([-3.4,0,-2]) rotate([0,45,0]) cube([6,width+2,3],center=true);
340 // --------------- bus hole stopper -----------------
342 module busHoleStopper( substBoxShift ){ // -7
345 translate([0,0,-9]) cylinder(5, 45 + busStopperShift, 45 + busStopperShift);
346 translate([0,0,-10]) cylinder(7, 45 - busStopperWidth + busStopperShift, 45 - busStopperWidth + busStopperShift);
347 translate([-50,-10,substBoxShift]) cube([10,20,10]);
349 translate([-45,0,-7 ]) rotate([90,0,90]) roundHole ( 13, 1.5, 6 );
353 // ---------------------------------------------------------
354 // ---------------------- top part ------------------------
355 // ---------------------------------------------------------
357 module topEarBody () {
366 translate([ 0, 0, -65 + topShift ]) sphere(r = 90);
369 translate([ -60, -60, bottomPlate-50 ]) cube([120,120,50]);
372 translate([ 0, 0, 17 + topShift ]) color("green") cylinder(30, 35, 35);
378 sphere(r = 46 - wall);
379 translate([ 0, 0, -65 + topShift]) sphere(r = 90 - wall);
381 // flat under the sticker place
382 translate([ 0, 0, 17 - wall + topShift ]) cylinder(30, 40, 40);
385 // perimeter fixator hole
386 translate([ 0, 0, error * 3 - 3]) cylinder (6 , 46 - wall + error, 46 - wall + error);
388 // bus hole (moved to the bottom)
389 rotate([0,0,90]) translate([ 0, 45, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 );
390 rotate([0,0,90 - 180]) translate([ 0, 45, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 );
393 translate([ 0, 0, 14]) color("red") cylinder(8, 3.3, 3.3);
394 // translate([ 0, -5, 0]) cube([11,11,50]);
396 // buttons and leds holes
401 translate([0,12,17.3 + 0.3]) color("red") rotate([0,180,0]) scale(0.3) imlogo(2);
403 // slight antenna recess
404 // translate([0,0,16.9]) cylinder(ahHeight + 1, ahDiameter/2, ahDiameter/2, center = true, $fn=6);
406 // scirts under buttons
407 translate([0,-4.8,13]) color("blue", 0.5) underButtons(5);
413 translate([0,0,7]) busHoleStopper(-17);
414 rotate(180) translate([0,0,7]) busHoleStopper(-17);
417 // buss stripe holder
418 // translate([-45,-5,2]) cube([10,10,1]);
420 // translate([8,0,16]) difference(){
421 // translate([-47,0,-7.5]) rotate([90,90,0]) roundHole ( 15, 0.5, 6 );
422 // translate([-50,-10,-1 + topShift ]) cube([10,20,10]);
426 //translate ([0,0,+ topShift]){
427 rotate (-20) translate([ -35.5, 0, 1]) boltHolder( topShift );
428 rotate (20) translate([ 35.5, 0, 1]) boltHolder( topShift );
429 rotate (-20) translate([ 35.5, 0, 1]) boltHolder( topShift );
430 rotate (20) translate([ -35.5, 0, 1]) boltHolder( topShift );
434 color("red") translate ([0,0, + topShift]){
436 rotate([0,0,70]) PCBHolder();
437 rotate([0,0,110]) PCBHolder();
438 rotate([0,0,-70]) PCBHolder();
439 rotate([0,0,-110]) PCBHolder();
440 // translate([ -0.5, 21, 10]) color("red") cube([1,2,5]);
444 color ("green") translate([ 0, 0, 0 + topShift]) GPSHolder();
446 // rounded holder swing
448 for (a =[0:3]) rotate([0,0,clipRotateShift + 50 + 90*a]) color("red") clipCounterSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43);
451 // for (a =[0:3]) rotate (a*90) translate([12,0,16]) crossStand(5);
454 translate([39.9,0,14 - 1.6 + totalPCBShift]) color ("red") pcbClip(20);
455 rotate(180) translate([39.9,0,14 - 1.6 + totalPCBShift]) color ("red") pcbClip(20);
458 translate([0,0,17 - 2.9]) color ("red") {
461 // antenna parameters
463 ahDiameter = 9.3; // inner hole external dia of antenna !
466 cylinder(ahHeight, ahDiameter/2 + ahWall, ahDiameter/2 + ahWall, center = true, $fn=6);
467 cylinder(ahHeight + 1, ahDiameter/2, ahDiameter/2, center = true, $fn=6);
469 // translate([0,0,-4.3]) rotate([20,0,0]) cube([20,15,5], center=true); // bevel for AA batt
470 // translate([0,0,-4.3]) rotate([-20,0,0]) cube([20,15,5], center=true); // bevel for AA batt
474 // shHeight = 5; translate([0,0,0.5]) for (a =[0:2]) rotate([0,0,30 + a*60]) cube([1,20,shHeight], center=true);
477 // antenna bolt clips
478 for (a =[1:3]) rotate( 120 * a) translate([0,4.3,-2.5]) sphere(0.5);
484 // ---------------------- new speaker pad holder ----------
486 module speakerPad () {
490 // ---------------------------------------------------------
491 // ----------------------- bottom part ---------------------
492 // ---------------------------------------------------------
494 module bottomEarBody ( height ) {
497 speakerBottomWall = 2;
505 // translate([ -60, -60, 0]) cube([120, 120, bottomPlate]);
506 translate([ -60, -60, -20]) difference () {
507 cube([120, 120, 20 + bottomPlate ]);
508 // helmet radius sphere
509 translate([ 60, 60, -helmetRadius + 20 + bottomShift ]) sphere(r = helmetRadius); // $fn = 500
512 // translate([ -60, -200, -20]) translate([ 60, 60, -helmetRadius + 20]) sphere(r = helmetRadius);
515 translate([ 0, 0, bottomShift]) difference () {
517 translate([ 0, 0, 4 + bottomShift]) sphere(r = 46);
518 translate([ 0, 40, -height-20-10]) cylinder (40, 40, 40);
519 translate([ -60, -60, bottomPlate - height]) cube([120, 120, height]);
521 translate([ 0, 0, 0]) rotate ([-7.5, 0, 0]) {
522 translate([0, 40, -10]) rotate_extrude(convexity = 10) translate([40, 0, 0]) circle(r = 10);
526 // cylinder perimeter fixator
527 perimeterFixator( speakerBottomWall );
530 // speaker appendix hole
533 translate([ 0, 0, wall - 13]) intersection() {
534 cylinder (14 , 48 - wall - speakerBottomWall - qwe , 48 - wall - speakerBottomWall -qwe );
535 translate([ 0, 41, bottomShift - 0]) difference(){
536 cylinder (14, 40 - wall - 11, 40 - wall + 1);
537 translate([0,-33,4]) cube([60,10,20], center=true);
544 translate([ 0, 30 - speakerShift, -8 + bottomShift]) roundHole ( 10, 1, 6 );
545 translate([ 0, 25 - speakerShift, -8 + bottomShift]) roundHole ( 24, 1, 6 );
546 translate([ 0, 20 - speakerShift, -8 + bottomShift]) roundHole ( 24, 1, 6 );
547 translate([ 0, 15 - speakerShift, -8 + bottomShift]) roundHole ( 10, 1, 6);
550 rotate([0,0,30]) soundPCBhole();
552 // USB charger pcb hole
553 rotate([0,0,-30]) chargerPCBhole();
555 // translate([-6,4,-3.3]) rotate([0,90,90]) cylinder(13,1,1); // stopper
561 translate([0,0,-10]){
562 rotate (180 - 20) translate([ 35.5, 0, 1.5]) boltHole();
563 rotate (20) translate([ 35.5, 0, 1.5]) boltHole();
566 // bus hole // roundHole( length, radius, depth )
567 rotate([0,0,90]) translate([ 0, 44, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 );
568 rotate([0,0,90 - 180]) translate([ 0, 44, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 );
571 translate([0,-35,-0.3]) color("red") rotate([180,180,0]) scale(0.3) imlogo(2);
575 // tiny stand under chargerPCBhole
576 // rotate([0,0,-30]) translate([0,42,-5.25]) cube([6,2,1], center=true);
579 translate([0,0,7]) busHoleStopper(-7);
580 rotate(180) translate([0,0,7]) busHoleStopper(-7);
582 // bolt hole bump (removed for battery holder movability)
583 // rotate (180 - 20) translate([ 35.5, 0, 0]) boltHolderBottom( 1.8 );
584 // rotate (20) translate([ 35.5, 0, 0]) boltHolderBottom( 1.8 );
587 rotate(90) translate([39.2 + 1.2,0,-3]) color ("blue"){
588 translate([0,-6.3,0]) rotate([-90,0,-90]) pcbClip(3.7);
589 translate([0,6.3,0]) rotate([-90,180,-90]) pcbClip(3.7);
592 translate([0,39.5,-3]) difference(){
593 cube([14,5.5,5], center=true);
594 color ("red") translate([0,0.5,0]) cube([12,5,7], center=true);
595 color ("red") translate([0,-1,0]) cube([10,5,7], center=true);
596 color ("red") translate([0,-1,2]) cube([12,5,2], center=true);
601 translate([0,27.5,-11]) color("red") speaker(1);
603 translate([-11.5,19.5,-11.5]){
606 translate([0,0,0]) cylinder(length,radius,radius);
607 translate([0,16.3,0]) cylinder(length,radius,radius);
608 translate([22.8,16.3,0]) cylinder(length,radius,radius);
609 translate([22.8,0,0]) cylinder(length,radius,radius);
614 translate([0,-25,-7]) rotate([0,0,180]) velcro(5);
615 translate([ 0, 0, -20.5 -helmetRadius + 20 + bottomShift ]) color("blue",0.5) sphere(r = helmetRadius);
618 // pcb cross stands (moved on top)
619 // translate([20,-10,6]) crossStand(13);
620 // translate([-20,-10,6]) crossStand(13);
622 // rounded holder swing clip segment
623 rotate([0,0,-clipRotateShift]) color("purple") clipSegmentSimple(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); // depth, width, radius, angle
624 rotate([0,0,90 - clipRotateShift]) color("purple") clipSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43);
625 rotate([0,0,180 - clipRotateShift]) color("purple") clipSegmentSimple(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43);
626 rotate([0,0,180 + 90 - clipRotateShift]) color("purple") clipSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43);
629 // translate([0,-35,-0.3]) color("red") rotate([180,180,0]) scale(0.3) imlogo(2);
633 ///////////////////////////////////////////////////////////////////
635 // testing parameters
637 horizontalCutAngle = -90; // 20 -- bolt holes, 37 -- clip
644 rotate (180 + rotateTop) translate([ 0, 0, 0]) topEarBody ();
645 // rotate([0,0,horizontalCutAngle ]) translate([ 0, 80, -10]) cube(size = [160,160,160], center = true); // testing half cut
646 // translate([0,0,26]) cube ([100,100,50], center=true);
649 // color("red", 0.5) cube ([92,92,10], center=true);
652 translate([ 0, 0, -0]) bottomEarBody ( height=10 );
653 // rotate([0,0,horizontalCutAngle ]) translate([ 0, 80, -10]) cube(size = [160,160,160], center = true); // testing half cut
654 // translate([0,0,26]) cube ([100,100,50], center=true); // -50 -- for perimener clip test
657 // rotate(20) translate([35.5,0,-4]) bolt(); // bolt
660 buttonLen = 4.5; // 7, 4.5
661 rotate([0,0,-18]) translate([-3,18.5,12.5 + totalPCBShift]){ cube([6,6,4]); translate([2.9,2.9,0]) color("gray") cylinder( buttonLen,3.4/2,3.4/2); } // move 0.3, cap skirt 0.5 // button
663 translate([0,0,-1.6 + totalPCBShift]) color("green", 0.5) pcb(1.6, 41); // pcb
664 translate([0,0,12 - 0.2]) cylinder(5.7,9/2,9/2,$fn=6); // anntenna bolts ~5.3mm thin
667 translate([0,-21.7,16]) color ("blue") cylinder (5,3/2,3/2);
669 translate([0,0,-1.6 + totalPCBShift]){
672 rotate ([0,0,+rotateTop]) translate([ 0, +21,7.5]) color("purple", 0.5) cube(size = [42,26,10], center = true);
674 translate([-13, -13, 3.5]){
675 translate([-26/2,0,0]) color("grey") cube([26 * 2,5,8.9]); // module connecctor headers
676 translate([-26/2,2.5,-2]) color("purple") cube([26,10,1.6]); // pcb module // DAC
677 translate([26/2 + 3,2.5,-1]) color("green") cube([22,15,5.7]); // pcb module // power supply
678 translate([26/2 + 3 + 12,2.5 - 0.2 - 10,-1]) color("green") cube([10,10,0.5]); // pcb module // small power supply
681 rotate(180) translate([ 0, 32,9.5]) color("purple", 0.5) cube(size = [16,7,16], center = true); // GPS PA6C
687 // power switcher // 4.6 x 4.7 x 11.5 // wide, white
688 // translate([0,40,-3.3]) color("purple") powerSwitcher();
690 // power switcher // 3.7 x 3.5 x 8.5 // travel 2mm // black, cheap
691 // translate([0,40.7,-3.3]) powerSwitcher2();
693 // color ("green", 0.5) translate([0,40,-23]) cube([12,5,5], center=true); // switcher
694 // translate([ 0, 27.5, -28]) color("green", 0.5) cube([27,20,6], center=true); // speaker
695 // translate([ 0, 27.5, -5]) color("green", 0.5) cube([27,20,12], center=true); // big speaker
697 // rotate([0,0,-120]) translate([ -28.5, 0, -21.5]) color("green", 0.5) cube([27.7, 17.2, 1.2], center=true); // charger
698 // rotate([0,0,-60]) translate([ -25, 0, -21.5]) color("green", 0.5) cube([34, 17.5, 6.5 - 5.5], center=true); // sound pcb
700 // translate([ 0, -3, 6]) color ("green", 0.5) cube(size = [55,55,11], center = true); // 55x55x11 battery
701 // translate([ 0, 0, 7.5]) color("green", 0.5) cube(size = [55,55,15], center = true); // 60x60x15 battery
702 // translate([ 0, 0, 0]) color("green", 0.5) cylinder(15,32,32); // cylinder battery
703 // rotate([0,0,90]) translate([ 0, 0, 8.5]) color("green", 0.5) cube(size = [63,58,17], center = true); // 4xAA battery
704 // translate([ 0, 0, 8.5]) rotate([90,0,0]) color("green", 0.5) roundHole(61-8*2,16/2,57); // 4xAA battery (rounded box)
707 translate([ -29, -63/2, 0]) rotate([90,0,90]) color("green", 0.5) batteryWall(16.5,63,16.5/2,58);
710 translate([ 0.5, 1, 8.5 - 20 ]) rotate([0,90,0]) color("green", 0.5) translate ([0,3,0]){
711 translate([ 0, 0, 0]) battery();
712 translate([ 0, -15, 0]) rotate([0,180,0]) battery();
713 translate([ 0, -30, 0]) battery();
714 translate([ 0, 15, 0]) rotate([0,180,0])battery();
718 // -------------------- helpers -----------------------------
720 module powerSwitcher2(){
721 cube([8.5,3.5,3.7],center=true);
722 translate([0,3.2,0]) cube([1.5,3,1.5],center=true);
725 module powerSwitcher(){
726 cube([11.5,4.6,4.7],center=true);
727 translate([0,4.3,0]) cube([2,4,2],center=true);
731 cylinder(1.7,4.2/2,4.2/2);
732 cylinder(10,2/2,2/2);
736 translate([ 0, 0, -24 - 0.5 ]) {
738 cylinder (49,7.25,7.25);
739 translate([ 0, 0, -1]) cylinder (1,2.7,2.7);
743 module pcb( thickness, radius ){
745 translate([ 0, 0,12 + 0.5]) cylinder(thickness, radius, radius);
746 translate([ 0, 0,12 + 0.5 -1 ]) cylinder(3, 6, 6); // antenna
747 translate([0,-36.5,15]) cube([70,20,10], center=true);
748 rotate([0,0,90]) translate([0,-49.3,15]) cube([70,20,10], center=true); // side cut
749 rotate([0,0,90 - 180]) translate([0,-49.3,15]) cube([70,20,10], center=true); // side cut
750 rotate([0,0,-20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt
751 rotate([0,0,180 + 20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt
752 rotate([0,0,180-20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt
753 rotate([0,0,20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt