X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=adafruit-powerboost-500.scad;h=d10002e26b68caa1e9e5ce68a37f39989a1cd21b;hp=ddf2b2dea475126fe8af7684d3921ac86288d329;hb=HEAD;hpb=7bd820edec632ef5f009a473d6569c46c0c45dff diff --git a/adafruit-powerboost-500.scad b/adafruit-powerboost-500.scad index ddf2b2d..d10002e 100644 --- a/adafruit-powerboost-500.scad +++ b/adafruit-powerboost-500.scad @@ -1,71 +1,19 @@ // -*- C -*- -include +psu_sz_nom = [ 21.59, 35.56 ]; -psu_sz = [ 21.7, 36.0 ] + [ 0.25, 0.25 ]; +//// toplevels-from: +include -psu_th = 1.70 + 0.25; -psu_th_for_clamp = 1.50; - -psu_hole_pos = [ 2.05, // from back edge of psu_sz[0] - 0.55 * 0.5 * 25.4, // from centreline - ]; -psu_hole_dia = 2.5 - 0.3; -psu_baffle_gap = 1.0 + 0.5; psu_baffle_cnr_y = 7.45; // from connector end psu_baffle_th = [ 0.8, 3.5 ]; -psu_connector_z = 2.9 + 0.1; -psu_connector_z_overlap = 0.15; -psu_connector_depth = 6.25; -psu_connector_w = 8.0 + 0.5; -psu_usb_protr = 0.6; psu_usbend_led_x = 4.5; psu_innerend_led_depth = 10; -psu_clamp_th = 4.0 + 0.75; -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; - // ----- calculated ----- psu_usbend_led_depth = psu_baffle_cnr_y*2 - psu_usbend_led_x; -psu_z = NutBox_h_base(psu_board_nutbox); -psu_z_down = psu_z + 0.1; - - -module PsuBoardRepresentation(){ - linear_extrude(height= psu_th) - square(center=true, [psu_sz[0],psu_sz[1]]); -} - -module PsuRepresentation(){ - PsuBoardRepresentation(); - translate([0, -psu_sz[1]/2, -psu_connector_z]) - linear_extrude(height= psu_connector_z + psu_connector_z_overlap) - rectfromto([ -psu_connector_w/2, -10 ], - [ +psu_connector_w/2, psu_connector_depth ]); -} - -module AtPsuMountCorner(mx,my){ - mirror([mx,0,0]) - mirror([0,my,0]) - translate(-0.5 * [psu_sz[0], psu_sz[1], 0] - -1 * [0,0, psu_z_down]) - children(); -} - -module PsuMountCornerExtrude(mx,my, plus_z=board_support_z){ - AtPsuMountCorner(mx,my){ - linear_extrude(height= psu_z_down + plus_z, convexity=10) { - children(); - } - } -} module PsuLedBafflePlan(){ baffle_tr = [0, psu_baffle_cnr_y] @@ -81,15 +29,21 @@ module PsuLedBafflePlan(){ } } -module PsuLedWindowsPlan(){ +module PsuLedLegendsPlan(){ +} + +module PsuLedWindowsPlanCore(){ difference(){ union(){ + // Two LEDs incl "Chrg", one side of inlet connector AtPsuMountCorner(1,0) { rectfromto([ -(psu_board_support_wall + 0.1), +psu_usbend_led_x ], [ psu_sz[0]/2, +psu_usbend_led_depth ]); } + + // One LED, "Low", other side of inlet connector AtPsuMountCorner(0,0) { sz = psu_baffle_cnr_y - psu_board_support_wall - psu_baffle_th[0]; translate([0, psu_baffle_cnr_y]) @@ -98,89 +52,15 @@ module PsuLedWindowsPlan(){ [ psu_sz[0]/2, +sz/2 ]); } + + // One LED, PWR, near outlet USB pads AtPsuMountCorner(0,1){ rectfromto([0,0], [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2, psu_innerend_led_depth]); } } - PsuLedBafflePlan(); translate([0, -psu_sz[1]/2]) square(center=true, [psu_baffle_th[1], psu_sz[1]]);; } } - -module PsuMountPositiveMain(){ - for (mx=[0,1]) { - for (my=[0,1]) { - PsuMountCornerExtrude(mx,my){ - rectfromto(-[1,1]*psu_board_support_wall, - +[1,1]*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]); - } - } - translate([0,0, -psu_z_down]) - linear_extrude(psu_z_down - psu_baffle_gap, convexity=10) - PsuLedBafflePlan(); -} - -module PsuMountNegative(){ - axis = [0, -psu_sz[1]/2, psu_th]; - PsuRepresentation(); - translate(axis) - rotate([atan(2 * board_support_z / psu_sz[1]), - 0,0]) - translate(-axis) - PsuBoardRepresentation(); -} - -module PsuMountPositive(){ - difference(){ - PsuMountPositiveMain(); - PsuMountNegative(); - intersection(){ - hull(){ - PsuBoardRepresentation(); - translate([0,0,5]) PsuBoardRepresentation(); - } - translate([-20,0,-20]) cube(40); - } - } - for (mx=[0,1]) { - PsuMountCornerExtrude(mx,1){ - translate([psu_sz[0]/2 - psu_hole_pos[1], - psu_hole_pos[0]] - + board_gap * [1,1] ) - circle(r= psu_hole_dia/2); - } - } - translate([0, psu_sz[1]/2 + psu_board_nutbox[0]/2, 0]) - rotate([0,0,180]) - NutBox(psu_board_nutbox, psu_z_down); -} - -module PsuClamp(){ ////toplevel - rotate([180,0,0]) difference(){ - linear_extrude(height=psu_clamp_th + psu_th_for_clamp, convexity=5) { - difference(){ - hull(){ - circle(r = fix_sz/2); - translate([ -psu_board_nutbox[0]/2, 0]) - square(center=true, [ psu_board_clamp_ovlp*2, psu_clamp_w ]); - } - circle(r = psu_board_nutbox[0]/2); - } - } - translate([0,0,-1]) linear_extrude(height=psu_th_for_clamp+1) { - translate([ -psu_board_nutbox[0]/2 + psu_clamp_gap, 0 ]) - mirror([1,0]) - translate([0,-20]) square(40); - } - } -}