chiark / gitweb /
adafruit-powerboost: 1000: wip windows
[reprap-play.git] / adafruit-powerboost-1000.scad
1 // -*- C -*-
2
3 psu_sz_nom = [ 21.59, 35.56 ];
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_baffle_cnr_y = 7.45; // from connector end
13 psu_baffle_th = [ 0.8, 3.5 ];
14 psu_usbend_led_x = 4.5;
15 psu_usbend_led_y = 4.5;
16 psu_innerend_led_depth = 10;
17
18 // ----- calculated -----
19
20 psu_usbend_led_depth = psu_baffle_cnr_y*2 - psu_usbend_led_x;
21
22 module PsuLedBafflePlan(){
23 }
24
25 module PsuLedWindowsPlanCore(){
26   difference(){
27     union(){
28       // Two LEDs one side of inlet connector
29       // "Full" (near edge) and "Chrg" (inner)
30       AtPsuMountCorner(0,0) {
31         rectfromto([ -(psu_board_support_wall + 0.1),
32                      +psu_usbend_led_x ],
33                    [ psu_usbend_led_y,
34                      +psu_usbend_led_depth ]);
35       }
36
37       // One LED, "Low", other side of inlet connector
38       AtPsuMountCorner(1,0) {
39         sz = psu_baffle_cnr_y - psu_board_support_wall - psu_baffle_th[0];
40         translate([0, psu_baffle_cnr_y])
41           rectfromto([ -(psu_board_support_wall + 0.1),
42                        -sz/2 ],
43                      [ psu_sz[0]/2,
44                        +sz/2 ]);
45       }
46
47       // One LED, PWR, near outlet USB pads
48       AtPsuMountCorner(1,1){
49         rectfromto([0,0],
50                    [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
51                      psu_innerend_led_depth]);
52       }
53     }
54 //    translate([0, -psu_sz[1]/2])
55 //      square(center=true, [psu_baffle_th[1], psu_sz[1]]);;
56   }
57 }