3 psu_sz_nom = [ 11.43*2, 36.20 ];
6 include <adafruit-powerboost-common.scad>
8 psu_hole_pos = [ 2.05, // from back edge of psu_sz[0]
9 0.55 * 0.5 * 25.4, // from centreline
14 psu_led_usbend_y_min = 4.5;
15 psu_led_chrg_min_x = -1.0;
16 psu_led_chrg_max_x = 3.0;
17 psu_led_chrg_both_sz_y = 7.0;
19 psu_led_low_sz_x = 4.5;
20 psu_led_low_min_y = -1.5;
21 psu_led_low_max_y = 2.5;
23 psu_led_baffle_th = 0.8;
24 psu_led_baffle_ends = 1.5;
26 psu_baffle_th = [ 0.8, 3.5 ];
27 psu_innerend_led_depth = 7;
29 psu_led_legend_battery_l = 6.0;
30 psu_led_legend_battery_w = 4.0;
31 psu_led_legend_battery_edge = 0.75;
32 psu_led_legend_battery_nub_l = 0.75;
33 psu_led_legend_battery_nub_w = 1.5;
35 // ----- calculated -----
37 module PsuLedBafflePlan(){
38 AtPsuMountCorner(0,0) {
39 translate([ (psu_led_chrg_min_x + psu_led_chrg_max_x)/2,
40 psu_led_usbend_y_min + psu_led_chrg_both_sz_y/2 ])
42 [ psu_led_chrg_max_x - psu_led_chrg_min_x
43 + psu_led_baffle_ends*2,
48 module PsuLedWindowsPlanCore(){
51 // Two LEDs one side of inlet connector
52 // "Full" (near edge) and "Chrg" (inner)
53 AtPsuMountCorner(0,0) {
54 translate([0, psu_led_usbend_y_min ])
55 rectfromto([ psu_led_chrg_min_x, 0 ],
57 psu_led_chrg_both_sz_y ]);
60 // One LED, "Low", other side of inlet connector
61 AtPsuMountCorner(1,0) {
62 translate([0, psu_led_usbend_y_min ])
69 // One LED, PWR, near outlet USB pads
70 AtPsuMountCorner(0,1){
72 [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
73 psu_innerend_led_depth]);
79 module PsuLedLegendBattery(percent=50){
80 e = psu_led_legend_battery_edge;
81 full_l = percent/100 * (psu_led_legend_battery_l - e*2);
84 square([psu_led_legend_battery_l,
85 psu_led_legend_battery_w], center=true);
86 translate([psu_led_legend_battery_l/2, 0])
87 square([psu_led_legend_battery_nub_l*2,
88 psu_led_legend_battery_nub_w], center=true);
90 translate([-(psu_led_legend_battery_l/2-e),
91 -(psu_led_legend_battery_w/2-e)])
92 square([full_l, psu_led_legend_battery_w - e*2]);
96 module PsuLedLegendsPlan(){
97 PsuLedLegendBattery();
99 // text("\u2300\u23fb", font="Noto Regular");