From 1ed956cb95ae64324b55f19d2310ce55d25f97d6 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 20 Feb 2022 13:51:27 +0000 Subject: very rough start of enclosure --- enclosure/enclosure.scad | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 enclosure/enclosure.scad diff --git a/enclosure/enclosure.scad b/enclosure/enclosure.scad new file mode 100644 index 0000000..e260376 --- /dev/null +++ b/enclosure/enclosure.scad @@ -0,0 +1,54 @@ +/* + a box divided on layers, 4 long screws at the corners to keep it + together, alignment pins between layers + + * top, big hole for the screen and small holes for air + + * board, holds the board and the switch / button / usb / sd holes on + the sides; the co2 sensor probably goes here as well + + * bottom, for battery and pm sensor + */ + +DISPLAY_WIN_X=51; +DISPLAY_WIN_Y=26; +DISPLAY_OFF_X=16; +DISPLAY_OFF_Y=7; + +//PITCH=0.254; don't really care +BOARD_X=66.5; +BOARD_Y=36.8; +BOARD_PIN_D=1.9; +BOARD_PIN_OFF_X=2.5; BOARD_PIN_DIST_X=61; +BOARD_PIN_OFF_Y=2.5; BOARD_PIN_DIST_Y=32.5; + +BOARD_OFF_X=3; +BOARD_OFF_Y=3; + +TOP_LAYER_Z=10; + +TOTAL_X=100; +TOTAL_Y=40; +TOTAL_Z=30; + +module top() { + difference() { + cube([TOTAL_X, TOTAL_Y, TOP_LAYER_Z]); + translate([BOARD_OFF_X, BOARD_OFF_Y, 0]) union() { + translate([DISPLAY_OFF_X, DISPLAY_OFF_Y, -1]) + cube([DISPLAY_WIN_X, DISPLAY_WIN_Y, TOP_LAYER_Z*2]); + + // alignment pins + translate([BOARD_PIN_OFF_X, BOARD_PIN_OFF_Y, -1]) + cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); + translate([BOARD_PIN_OFF_X+BOARD_PIN_DIST_X, BOARD_PIN_OFF_Y, -1]) + cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); + translate([BOARD_PIN_OFF_X, BOARD_PIN_OFF_Y+BOARD_PIN_DIST_Y, -1]) + cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); + translate([BOARD_PIN_OFF_X+BOARD_PIN_DIST_X, BOARD_PIN_OFF_Y+BOARD_PIN_DIST_Y, -1]) + cylinder(d=BOARD_PIN_D,h=TOP_LAYER_Z/2); + } + } +} + +top(); -- cgit v1.2.3