Bladeren bron

twist the pcb's so that there is more space for the big electrolytic capacitor and all boards can be packed in a smaller space - but this one is too small, soldering both sides would be a pain

Fernando Pablo Lopez-Lezcano 9 jaren geleden
bovenliggende
commit
56039df74e
1 gewijzigde bestanden met toevoegingen van 27 en 20 verwijderingen
  1. 27 20
      Octathingy_mount_pcb.scad

+ 27 - 20
Octathingy_mount_pcb.scad

@@ -101,7 +101,7 @@ wall = 1.0;
 
 // back and front clearance of pcb (components and leads)
 pcb_front = 13.25;
-pcb_back = 3.0;
+pcb_back = 1.75;
 
 // calculated minimum "radius" of microphone box
 box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
@@ -197,18 +197,26 @@ module one_pcb(pcb_w, pcb_l, pcb_t, slot, clear, back) {
     translate([-pcb_t/2, -pcb_w/2, 0]) {
         cube([pcb_t, pcb_w, pcb_l]);
     }
-    // space in front and behind
+    // clear space in front of pcb
     translate([0, -pcb_w/2+slot, 0]) {
         cube([clear, pcb_w - (2 * slot), pcb_l]);
     }
+    // clear space in back of pcb (to clear solder joints)
     translate([-(back + pcb_t/2), -pcb_w/2+slot, 0]) {
         cube([back, pcb_w - (2 * slot), pcb_l]);
     }
 }
 
-module one_pcb_spar(pcb_w, pcb_l, pcb_t, slot, clear, back) {
-    translate([-(back + pcb_t/2 + wall), -pcb_w/2, 0]) {
-        cube([wall, pcb_w, pcb_l]);
+module one_pcb_spar(pcb_w, pcb_l, pcb_t, slot, back) {
+    translate([-(back + pcb_t/2 + 2 * wall), -(pcb_w/2 + slot), 0]) {
+        cube([back, pcb_w + (2 * slot), pcb_l]);
+    }
+}
+
+module one_capacitor(pcb_w, pcb_l, pcb_t) {
+    cap_diam = 10.2;
+    translate([-pcb_t + cap_diam/2, -pcb_w/2, 0]) {
+        cylinder(r = (cap_diam/2), h = 20, $fn = facets);
     }
 }
 
@@ -227,11 +235,13 @@ module rounded_octagon_wall(height, radius, wall) {
 }
 
 render_screw_holes = true;
-radial_pcb_offset = 19;
+radial_pcb_offset = 17;
 
 module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
-    // rotate pcb's so they don't interfere with the screws
-    offset_angle = -12;
+    // rotate pcb assembly so it does not interfere with the screws
+    offset_angle = -18;
+    // rotate individual pcb's to better use the internal space of the body
+    twist_angle = 18;
     difference() {
         union() {
             difference() {
@@ -240,16 +250,16 @@ module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
                 // remove pcb slots
                 for (r = [0:360/8:360]) rotate([0, 0, r + offset_angle]) {
                     translate([0, radial_pcb_offset, 0]) {
-                        one_pcb(pcb_width, pcb_length, pcb_thickness, pcb_slot_depth, 6, 2);
+                        rotate([0, 0, twist_angle]) one_pcb(pcb_width, pcb_length, pcb_thickness, pcb_slot_depth, 5, pcb_back);
                     }
                 }
                 // remove inner tube
-                difference() {
+                rotate([0, 0, 0]) difference() {
                     cylinder(r = radial_pcb_offset + pcb_width/2 - wall, h = pcb_length, $fn = facets);
-                    cylinder(r = radial_pcb_offset - pcb_width/2 + 2 * wall, h = pcb_length, $fn = 8);
+                    cylinder(r = radial_pcb_offset - pcb_width/2 + 3 * wall, h = pcb_length, $fn = 8);
                 }
                 // remove inner cylinder
-                rotate([0, 0, 22.5]) cylinder(r = radial_pcb_offset - pcb_width/2 - wall, h = pcb_length, $fn = 8);
+                rotate([0, 0, 0]) cylinder(r = radial_pcb_offset - pcb_width/2 - wall, h = pcb_length, $fn = 8);
                 // upper lip for flare to microphone
                 translate([0, 0, height - upper_lip]) {
                     rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
@@ -291,18 +301,15 @@ module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
     }
     // add spars that connect internal hub to outer ring
     for (r = [0:360/8:360]) rotate([0, 0, r + offset_angle]) {
-        translate([0, pcb_width, 0]) {
-            one_pcb_spar(pcb_width, height * 2/3, pcb_thickness, pcb_slot_depth, 7, 2);
+        translate([0, radial_pcb_offset + pcb_slot_depth, 0]) {
+            rotate([0, 0, twist_angle]) one_pcb_spar(pcb_width, height * 2/3, pcb_thickness, pcb_slot_depth, wall);
         }
     }
     // test for capacitor fit
     // electrolytic capacitors
-    cap_diam = 10.2;
-    *for (r = [0:360/8:360]) {
-        rotate([0, 0, r + offset_angle]) {
-            translate([cap_diam/2, radial_pcb_offset, 0]) {
-                cylinder(r = (cap_diam/2), h = 20, $fn = facets);
-            }
+    *for (r = [0:360/8:360]) rotate([0, 0, r + offset_angle]) {
+        translate([0, radial_pcb_offset + pcb_width/2, 0]) {
+            rotate([0, 0, twist_angle]) one_capacitor(pcb_width, pcb_length, pcb_thickness);
         }
     }
 }