chiark / gitweb /
adafruit-powerboost: wip
[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_cnr_y = 7.45; // from connector end
27 psu_usbend_led_x = 4.5;
28 psu_baffle_th = [ 0.8, 3.5 ];
29 psu_usbend_led_y = 4.5;
30 psu_innerend_led_depth = 10;
31
32 // ----- calculated -----
33
34 psu_usbend_led_depth = psu_baffle_cnr_y*2 - psu_usbend_led_x;
35
36 module PsuLedBafflePlan(){
37   AtPsuMountCorner(0,0) {
38     translate([ (psu_led_chrg_min_x + psu_led_chrg_max_x)/2,
39                psu_led_usbend_y_min + psu_led_chrg_both_sz_y/2 ])
40       square(center=true,
41              [ psu_led_chrg_max_x - psu_led_chrg_min_x
42                + psu_led_baffle_ends*2,
43                psu_led_baffle_th ]);
44   }
45 }
46
47 module PsuLedWindowsPlanCore(){
48   difference(){
49     union(){
50       // Two LEDs one side of inlet connector
51       // "Full" (near edge) and "Chrg" (inner)
52       AtPsuMountCorner(0,0) {
53         translate([0, psu_led_usbend_y_min ])
54           rectfromto([ psu_led_chrg_min_x, 0 ],
55                      [ psu_led_chrg_max_x,
56                        psu_led_chrg_both_sz_y ]);
57       }
58
59       // One LED, "Low", other side of inlet connector
60       AtPsuMountCorner(1,0) {
61         translate([0, psu_led_usbend_y_min ])
62           rectfromto([ 0,
63                        psu_led_low_min_y ],
64                      [ psu_led_low_sz_x,
65                        psu_led_low_max_y ]);
66       }
67
68       // One LED, PWR, near outlet USB pads
69       AtPsuMountCorner(0,1){
70         rectfromto([0,0],
71                    [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
72                      psu_innerend_led_depth]);
73       }
74     }
75   }
76 }