chiark / gitweb /
adafruit-powerboost: wip common, transfer variables, etc.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Nov 2021 15:40:39 +0000 (15:40 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Nov 2021 15:41:13 +0000 (15:41 +0000)
from a4d84a2286021d5a47c93edff24f2f0d5a863f19, near enough

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
adafruit-powerboost-500.scad
adafruit-powerboost-common.scad

index f91389caf41e58947370924691413aa3ca2c7082..0097bb48a5d5b0b5bf0531eaeb204285fb0e9df4 100644 (file)
@@ -9,7 +9,6 @@ psu_hole_pos = [ 2.05, // from back edge of psu_sz[0]
                 0.55 * 0.5 * 25.4, // from centreline
                 ];
 
-psu_baffle_gap = 1.0 + 0.5;
 psu_baffle_cnr_y = 7.45; // from connector end
 psu_baffle_th = [ 0.8, 3.5 ];
 psu_usbend_led_x = 4.5;
index eef9226c73781cfc08acd4cded2b74c694eb29e1..a98f42763b4403e47d7c591ab2faa9e35f1edd59 100644 (file)
@@ -1,6 +1,7 @@
 // -*- C -*-
 
 include <nutbox.scad>
+include <utils.scad>
 
 psu_sz  = psu_sz_nom + [ 0.11, 0.44 ] + [ 0.25, 0.25 ];
 
@@ -19,9 +20,16 @@ psu_clamp_w = 8.0;
 psu_clamp_gap = 0.4;
 
 psu_board_clamp_ovlp = 4.5;
-psu_board_support_wall = 2;
 psu_board_nutbox = nutbox_data_M3;
 
+psu_board_gap = 0.5;
+psu_board_support_wall = 2;
+psu_board_support_ovlp = 4.5;
+psu_board_support_ovlp_ceil = 2;
+psu_board_support_z = 2;
+
+psu_baffle_gap = 1.0 + 0.5;
+
 psu_y = +psu_sz[1]/2 + psu_usb_protr;
 
 // ----- calculated -----
@@ -50,7 +58,7 @@ module AtPsuMountCorner(mx,my){
        children();
 }
 
-module PsuMountCornerExtrude(mx,my, plus_z=board_support_z){
+module PsuMountCornerExtrude(mx,my, plus_z=psu_board_support_z){
   AtPsuMountCorner(mx,my){
     linear_extrude(height= psu_z_down + plus_z, convexity=10) {
       children();
@@ -63,14 +71,14 @@ module PsuMountPositiveMain(){
     for (my=[0,1]) {
       PsuMountCornerExtrude(mx,my){
        rectfromto(-[1,1]*psu_board_support_wall,
-                  +[1,1]*board_support_ovlp);
+                  +[1,1]*psu_board_support_ovlp);
       }
     }
     // mount above at plug end
     PsuMountCornerExtrude(mx,0, psu_th + psu_board_support_wall){
       rectfromto(-[1,1]*psu_board_support_wall,
-                [board_support_ovlp,
-                 board_support_ovlp_ceil]);
+                [psu_board_support_ovlp,
+                 psu_board_support_ovlp_ceil]);
     }
   }
   translate([0,0, -psu_z_down])
@@ -82,7 +90,7 @@ module PsuMountNegative(){
   axis = [0, -psu_sz[1]/2, psu_th];
   PsuRepresentation();
   translate(axis)
-    rotate([atan(2 * board_support_z / psu_sz[1]),
+    rotate([atan(2 * psu_board_support_z / psu_sz[1]),
            0,0])
     translate(-axis)
     PsuBoardRepresentation();
@@ -107,7 +115,7 @@ module PsuMountPositive(){
     PsuMountCornerExtrude(mx,1){
       translate([psu_sz[0]/2 - psu_hole_pos[1],
                 psu_hole_pos[0]]
-               + board_gap * [1,1] )
+               + psu_board_gap * [1,1] )
        circle(r= psu_hole_dia/2);
     }
   }