chiark / gitweb /
adafruit-powerboost: 1000: remove obsolete vars
[reprap-play.git] / adafruit-powerboost-1000.scad
1 // -*- C -*-
2
3 psu_sz_nom = [ 11.43*2, 36.20 ];
4
5 //// toplevels-from:
6 include <adafruit-powerboost-common.scad>
7
8 psu_hole_pos = [ 2.05, // from back edge of psu_sz[0]
9                  0.55 * 0.5 * 25.4, // from centreline
10                  ];
11
12 psu_led_low_x = 4;
13
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;
18
19 psu_led_low_sz_x = 4.5;
20 psu_led_low_min_y = -1.5;
21 psu_led_low_max_y = 2.5;
22
23 psu_led_baffle_th = 0.8;
24 psu_led_baffle_ends = 1.5;
25
26 psu_baffle_th = [ 0.8, 3.5 ];
27 psu_innerend_led_depth = 10;
28
29 // ----- calculated -----
30
31 module PsuLedBafflePlan(){
32   AtPsuMountCorner(0,0) {
33     translate([ (psu_led_chrg_min_x + psu_led_chrg_max_x)/2,
34                psu_led_usbend_y_min + psu_led_chrg_both_sz_y/2 ])
35       square(center=true,
36              [ psu_led_chrg_max_x - psu_led_chrg_min_x
37                + psu_led_baffle_ends*2,
38                psu_led_baffle_th ]);
39   }
40 }
41
42 module PsuLedWindowsPlanCore(){
43   difference(){
44     union(){
45       // Two LEDs one side of inlet connector
46       // "Full" (near edge) and "Chrg" (inner)
47       AtPsuMountCorner(0,0) {
48         translate([0, psu_led_usbend_y_min ])
49           rectfromto([ psu_led_chrg_min_x, 0 ],
50                      [ psu_led_chrg_max_x,
51                        psu_led_chrg_both_sz_y ]);
52       }
53
54       // One LED, "Low", other side of inlet connector
55       AtPsuMountCorner(1,0) {
56         translate([0, psu_led_usbend_y_min ])
57           rectfromto([ 0,
58                        psu_led_low_min_y ],
59                      [ psu_led_low_sz_x,
60                        psu_led_low_max_y ]);
61       }
62
63       // One LED, PWR, near outlet USB pads
64       AtPsuMountCorner(0,1){
65         rectfromto([0,0],
66                    [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
67                      psu_innerend_led_depth]);
68       }
69     }
70   }
71 }