chiark / gitweb /
Add 'diziet-utils/' from commit 'd070a0324f10f76f9c97d8f56f864f0cafa88cf1'
[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 PsuLedLegendsPlan(){
33 }
34
35 module PsuLedWindowsPlanCore(){
36   difference(){
37     union(){
38       // Two LEDs incl "Chrg", one side of inlet connector
39       AtPsuMountCorner(1,0) {
40         rectfromto([ -(psu_board_support_wall + 0.1),
41                      +psu_usbend_led_x ],
42                    [ psu_sz[0]/2,
43                      +psu_usbend_led_depth ]);
44       }
45
46       // One LED, "Low", other side of inlet connector
47       AtPsuMountCorner(0,0) {
48         sz = psu_baffle_cnr_y - psu_board_support_wall - psu_baffle_th[0];
49         translate([0, psu_baffle_cnr_y])
50           rectfromto([ -(psu_board_support_wall + 0.1),
51                        -sz/2 ],
52                      [ psu_sz[0]/2,
53                        +sz/2 ]);
54       }
55
56       // One LED, PWR, near outlet USB pads
57       AtPsuMountCorner(0,1){
58         rectfromto([0,0],
59                    [psu_sz[0]/2 - psu_hole_pos[1] - psu_hole_dia/2,
60                      psu_innerend_led_depth]);
61       }
62     }
63     translate([0, -psu_sz[1]/2])
64       square(center=true, [psu_baffle_th[1], psu_sz[1]]);;
65   }
66 }