soundslab/soundslab_10000_v1.scad

190 lines
4.5 KiB
OpenSCAD
Raw Normal View History

2020-07-10 14:01:52 -04:00
// SoundSlab 10000 v1 case
2020-07-10 18:55:25 -04:00
//
// THIS IS ALL HACKY RIGHT NOW - OMG DO NOT USE
// imports
include <roundedcube.scad>
2020-07-10 14:01:52 -04:00
// parameters - all lengths in mm
battery_width = 60;
battery_length = 102;
battery_depth = 19; // battery + UPS HAT + external USB-A port
2020-07-10 14:01:52 -04:00
pi_width = 64;
pi_length = 30;
pi_height = 13; // pi zero w and Pirate Audio Headphone Amp HAT stacked
2020-07-10 18:55:25 -04:00
lcd_width = 23.4;
lcd_height = 23.4;
lcd_depth = 6; // how far to recess from top surface of case
headphone_offset_length = 20; // from "top"
headphone_offset_depth = 5; // from "front"
usb_a_offset_length = 15; // from "bottom"
usb_a_offset_depth = 11; // from "back"
micro_usb_offset_width = 18; // from "right"
micro_usb_offset_depth = 11; // from "back"
2020-07-10 18:55:25 -04:00
// build
case_width = pi_width + 2; // wider of battery_width and pi_width
case_length = battery_length + pi_length + 2 + 2; // extra 2mm for space between battery and pi
case_depth = battery_depth + 2; // deeper of battery_depth and pi_depth
2020-07-10 18:55:25 -04:00
difference() {
// case
color("white", 0.4) {
roundedcube(
[
case_width,
case_length,
case_depth
],
false,
5
);
}
// hollow out the case leaving 1mm thick shell
translate([1, 1, 1]) {
color("white", 0.0) {
roundedcube(
[
case_width - 2,
case_length - 2,
case_depth - 2
],
false,
5
);
}
}
2020-07-10 18:55:25 -04:00
// active area of the LCD screen is 23.4mm x 23.4mm according to http://www.lcdwiki.com/1.3inch_IPS_Module
// lcd cutout
translate ([
(case_width / 2) + 8 - (lcd_width / 2),
(case_length - 10) - (lcd_height),
case_depth - 6
2020-07-10 18:55:25 -04:00
]) {
color ("blue") {
cube(
[lcd_width, lcd_height, lcd_depth],
false
);
}
}
// lcd buttons
translate ([
(case_width / 2) + 21,
(case_length - 18),
case_depth - 6
2020-07-10 18:55:25 -04:00
]) {
color ("green") {
cube(
[3, 2, lcd_depth],
false
);
}
}
translate ([
(case_width / 2) + 21,
(case_length - 28),
case_depth - 6
2020-07-10 18:55:25 -04:00
]) {
color ("green") {
cube(
[3, 2, lcd_depth],
false
);
}
}
translate ([
(case_width / 2) - 8,
(case_length - 18),
case_depth - 6
2020-07-10 18:55:25 -04:00
]) {
color ("green") {
cube(
[3, 2, lcd_depth],
false
);
}
}
translate ([
(case_width / 2) - 8,
(case_length - 28),
case_depth - 6
2020-07-10 18:55:25 -04:00
]) {
color ("green") {
cube(
[3, 2, lcd_depth],
false
);
}
}
// joystick
translate ([
(case_width / 2) - 17,
(case_length - 27.5),
case_depth - 6
2020-07-10 18:55:25 -04:00
]) {
rotate(a=45,v=[0,0,1]) {
color ("green") {
cube(
[8, 8, lcd_depth],
false
);
}
}
}
// headphone jack
translate([
-1, // start far left of device
case_length - headphone_offset_length, // distance from "top"
case_depth - headphone_offset_depth // distance from "front"
]) {
rotate(a=90,v=[0,1,0]) {
color ("yellow") {
cylinder(
h=3,
d=4
);
}
}
}
// usb-a port (external storage)
translate([
-1, // start far left of device
usb_a_offset_length, // distance from "bottom"
case_depth - usb_a_offset_depth // distance from "back"
]) {
color ("red") {
cube(
[3, 14, 7],
false
);
}
}
// micro-usb port (power)
translate([
case_width - micro_usb_offset_width, // distance from "right"
-1, // start far bottom of device
case_depth - micro_usb_offset_depth // distance from "back"
]) {
color ("purple") {
cube(
[9, 3, 3],
false
);
}
}
2020-07-10 18:55:25 -04:00
}