chiark / gitweb /
adafruit-powerboost: legends wip
[reprap-play.git] / adafruit-powerboost-1000.scad
index 1cdecc4c288313e3ee588f7f2403ea3325602e6c..78286c135c4bc648449cf68791bcbc26132bb2b7 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C -*-
 
-psu_sz_nom = [ 21.59, 35.56 ];
+psu_sz_nom = [ 11.43*2, 36.20 ];
 
 //// toplevels-from:
 include <adafruit-powerboost-common.scad>
@@ -9,10 +9,68 @@ psu_hole_pos = [ 2.05, // from back edge of psu_sz[0]
                 0.55 * 0.5 * 25.4, // from centreline
                 ];
 
+psu_led_low_x = 4;
+
+psu_led_usbend_y_min = 4.5;
+psu_led_chrg_min_x = -1.0;
+psu_led_chrg_max_x = 3.0;
+psu_led_chrg_both_sz_y = 7.0;
+
+psu_led_low_sz_x = 4.5;
+psu_led_low_min_y = -1.5;
+psu_led_low_max_y = 2.5;
+
+psu_led_baffle_th = 0.8;
+psu_led_baffle_ends = 1.5;
+
+psu_baffle_th = [ 0.8, 3.5 ];
+psu_innerend_led_depth = 7;
+
 // ----- calculated -----
 
 module PsuLedBafflePlan(){
+  AtPsuMountCorner(0,0) {
+    translate([ (psu_led_chrg_min_x + psu_led_chrg_max_x)/2,
+              psu_led_usbend_y_min + psu_led_chrg_both_sz_y/2 ])
+      square(center=true,
+            [ psu_led_chrg_max_x - psu_led_chrg_min_x
+              + psu_led_baffle_ends*2,
+              psu_led_baffle_th ]);
+  }
 }
 
 module PsuLedWindowsPlanCore(){
+  difference(){
+    union(){
+      // Two LEDs one side of inlet connector
+      // "Full" (near edge) and "Chrg" (inner)
+      AtPsuMountCorner(0,0) {
+       translate([0, psu_led_usbend_y_min ])
+         rectfromto([ psu_led_chrg_min_x, 0 ],
+                    [ psu_led_chrg_max_x,
+                      psu_led_chrg_both_sz_y ]);
+      }
+
+      // One LED, "Low", other side of inlet connector
+      AtPsuMountCorner(1,0) {
+       translate([0, psu_led_usbend_y_min ])
+         rectfromto([ 0,
+                      psu_led_low_min_y ],
+                    [ psu_led_low_sz_x,
+                      psu_led_low_max_y ]);
+      }
+
+      // 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]);
+      }
+    }
+  }
+}
+
+module PsuLedLegendsPlan(){
+  mirror([1,0])
+    text("T");
 }