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