瀏覽代碼

octathingy: first redesign with smaller pcb design (version 2)

Fernando Pablo Lopez-Lezcano 8 年之前
父節點
當前提交
0271d2c1ac
共有 1 個文件被更改,包括 35 次插入 和 13 次删除
  1. 35 13
      Octathingy_mount_pcb.scad

+ 35 - 13
Octathingy_mount_pcb.scad

@@ -47,13 +47,13 @@ mount_radius = 4.0;
 // size of Zapnspark printed circuit board
 // size of Zapnspark printed circuit board
 // kicad length = 79.375
 // kicad length = 79.375
 // measured length = 79.20 (2016.08.25)
 // measured length = 79.20 (2016.08.25)
-pcb_length = 79.20;
+pcb_length = pcb_version == 2 ? 72.39 : 79.20;
 // kicad width = 19.050
 // kicad width = 19.050
 // measured width = 18.82 (2016.08.25)
 // measured width = 18.82 (2016.08.25)
-pcb_width = 18.85;
+pcb_width = pcb_version == 2 ? 15.34 : 18.85;
 // ultimaker spec thickness = 1.61
 // ultimaker spec thickness = 1.61
 // measured thickness = 1.56 (w/ copper)
 // measured thickness = 1.56 (w/ copper)
-pcb_thickness = 1.58;
+pcb_thickness = pcb_version == 2 ? 1.68 + 0.02 : 1.58;
 
 
 // tolerance to add to length and width of pcb
 // tolerance to add to length and width of pcb
 //
 //
@@ -103,8 +103,8 @@ stalk_height = 60;
 wall = 1.0;
 wall = 1.0;
 
 
 // back and front clearance of pcb (components and leads)
 // back and front clearance of pcb (components and leads)
-pcb_front = 3.00;
-pcb_back = 1.80;
+pcb_front = pcb_version == 2 ? 2.50 : 3.00;
+pcb_back = pcb_version == 2 ? 1.50 : 1.80;
 
 
 // calculated minimum "radius" of microphone box
 // calculated minimum "radius" of microphone box
 box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
 box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
@@ -114,7 +114,7 @@ mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
 
 
 // body parameters
 // body parameters
 render_screw_holes = true;
 render_screw_holes = true;
-radial_pcb_offset = 17.0;
+radial_pcb_offset = pcb_version == 2 ? 15.0 : 17.0;
 octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
 octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
 octa_pcb_radius = radial_pcb_offset + pcb_width/2 + 5 * wall;
 octa_pcb_radius = radial_pcb_offset + pcb_width/2 + 5 * wall;
 
 
@@ -207,9 +207,30 @@ module one_pcb_slot (pcb_w, pcb_l, pcb_t, slot_d, front, back, test = false) {
         translate([-2 * wall, -back + wall, 0]) {
         translate([-2 * wall, -back + wall, 0]) {
             cube([pcb_w + 4 * wall, wall, pcb_l]);
             cube([pcb_w + 4 * wall, wall, pcb_l]);
         }
         }
+        // pcb for testing fit
+        if (test) {
+            translate([0, back, 0]) {
+                cube([pcb_w, pcb_t, pcb_l]);
+            }
+            // small electrolytic capacitors (pcb_version == 2)
+            // https://www.mouser.com/datasheet/2/293/e-umw-1219455.pdf
+            cap_diam = 8.0;
+            // should be 5, but transistors are a bit taller;
+            cap_len = 6.0;
+            translate([pcb_w/2, pcb_t + cap_diam + 0.15, 6]) {
+                rotate([90, 0, 0]) cylinder(r = (cap_diam/2), h = cap_len, $fn = facets);
+            }
+            // film capacitors
+            cap_h = 12;
+            cap_w = 9;
+            cap_t = 5.5;
+            translate([pcb_w/2 - cap_w/2, pcb_t + 0.15, 10]) {
+                cube([cap_w, cap_t, cap_h]);
+            }
+        }
     }
     }
     // add capacitor if in test mode
     // add capacitor if in test mode
-    if (test) {
+    *if (test) {
         cap_diam = 10.2;
         cap_diam = 10.2;
         translate([0, cap_diam/2 + pcb_t, 0]) {
         translate([0, cap_diam/2 + pcb_t, 0]) {
             cylinder(r = cap_diam/2, h = 20, $fn = facets);
             cylinder(r = cap_diam/2, h = 20, $fn = facets);
@@ -231,11 +252,13 @@ module rounded_octagon_wall(height, radius, wall) {
     }
     }
 }
 }
 
 
+octa_pcb_twist = pcb_version == 2 ? 19 : 16;
+
 module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
 module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
     // rotate pcb assembly so it does not interfere with the screws
     // rotate pcb assembly so it does not interfere with the screws
-    offset_angle = -16;
+    offset_angle = -octa_pcb_twist;
     // rotate individual pcb's to better use the internal space of the body
     // rotate individual pcb's to better use the internal space of the body
-    twist_angle = 16;
+    twist_angle = octa_pcb_twist;
     difference() {
     difference() {
         union() {
         union() {
             difference() {
             difference() {
@@ -248,7 +271,7 @@ module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
                             translate([radial_pcb_offset, 0, 0]) {
                             translate([radial_pcb_offset, 0, 0]) {
                                 rotate([0, 0, 180 + twist_angle]) {
                                 rotate([0, 0, 180 + twist_angle]) {
                                     one_pcb_slot(pcb_width + pcb_fit, height * 2/3, pcb_thickness + pcb_tfit, 
                                     one_pcb_slot(pcb_width + pcb_fit, height * 2/3, pcb_thickness + pcb_tfit, 
-                                        pcb_slot_depth, pcb_front, pcb_back, false);
+                                        pcb_slot_depth, pcb_front, pcb_back, true);
                                 }
                                 }
                             }
                             }
                         }
                         }
@@ -470,7 +493,6 @@ module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_heigh
             length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
             length = windscreen_thread_height, angle = windscreen_thread_angle, internal = false);
         cylinder(r = windscreen_thread_radius - wall - windscreen_thread_depth, h = windscreen_thread_height + thin_mint, $fn = facets);
         cylinder(r = windscreen_thread_radius - wall - windscreen_thread_depth, h = windscreen_thread_height + thin_mint, $fn = facets);
     }
     }
-
     // flare to stalk
     // flare to stalk
     translate([0, 0, height - 1.5]) {
     translate([0, 0, height - 1.5]) {
         difference() {
         difference() {
@@ -1019,9 +1041,9 @@ module render_octa_pcb_mount(z_offset, showint) {
         octa_mount_body(octa_pcb_mount_height, octa_pcb_radius, mount_lip, mount_lip, 0);
         octa_mount_body(octa_pcb_mount_height, octa_pcb_radius, mount_lip, mount_lip, 0);
         // add ccrma logo
         // add ccrma logo
         rotate([0, 0, -90 + 22.5]) {
         rotate([0, 0, -90 + 22.5]) {
-            translate([0, -(octa_pcb_radius - 3.75), octa_pcb_mount_height / 2]) {
+            translate([0, -(octa_pcb_radius - 3.7), octa_pcb_mount_height / 2]) {
                 rotate([90, 270, 0]) {
                 rotate([90, 270, 0]) {
-                    logo_scale = 1 / 2.4;
+                    logo_scale = 1 / (pcb_version == 2 ? 3.0 : 2.4);
                     scale([logo_scale, logo_scale, 1.0]) {
                     scale([logo_scale, logo_scale, 1.0]) {
                         ccrma_logo(1.65);
                         ccrma_logo(1.65);
                     }
                     }