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