more accurate uC model

This commit is contained in:
2026-08-29 19:16:25 +02:00
parent fb77f9facb
commit 0b36ca56f6
+81 -30
View File
@@ -1,45 +1,96 @@
include <BOSL2/std.scad>
BASE_MODEL_SCALE = [1.1, 1, 1.1]; BASE_MODEL_SCALE = [1.1, 1, 1.1];
BASE_MODEL_TRANSLATE = [-0.4, 0, 16.978]; BASE_MODEL_TRANSLATE = [-0.4, 0, 16.978];
EPS = 0.01;
$fn = 50;
module main_display(){ module main_display() {
// Outer dimensions, height currently unknown // Outer dimensions, height currently unknown
cube([55.04, 89.3, 10]); cube([55.04, 89.3, 10]);
} }
module pad(){ module pad() {
// A button has 4.2 x 6 mm -> At least ~20x20 are required for the PCB // A button has 4.2 x 6 mm -> At least ~20x20 are required for the PCB
cube([20, 20, 10]); cube([20, 20, 10]);
} }
module small_display_below_main() module small_display_below_main() {
{ // https://de.aliexpress.com/item/1005003753680706.html
// https://de.aliexpress.com/item/1005003753680706.html cube([45.8, 20, 11.3]);
cube([45.8, 20, 11.3]); // old i2c variant:
// old i2c variant: //cube([43.5, 19.44, 4.5]);
//cube([43.5, 19.44, 4.5]);
// initial dimension ideas // initial dimension ideas
// cube([38,16,4]); // cube([38,16,4]);
// translate([150,0,0]) cube([22,5.5,4]); // translate([150,0,0]) cube([22,5.5,4]);
} }
module tertiary_display() module tertiary_display() {
{ // https://de.aliexpress.com/item/1005006034531826.html
// https://de.aliexpress.com/item/1005006034531826.html cube([80, 36, 10]);
cube([80, 36, 10]);
} }
module battery() { module battery(anchor = BOTTOM) {
// 18650 // 18650
rotate([0,90,0]) cylinder(d=18, h=65); rotate([0, 90, 0]) cylinder(d=18, h=65, anchor=anchor);
} }
module microcontroller() { /// USB-C port and switch not 100% dimensionally accurate, take care!
// width 32 including USB-C port module micro_controller(battery_holder = false, battery = false) {
length = 91.5; pcb_length = 91.5;
height = 20; pcb_height = 6.5; // including components, highest point: jst connector, followed by uC
battery_length = 65; pcb_height_no_components = 1.1;
delta = length - battery_length; pcb_width = 28.8;
cube([length, 32, height]);
translate([delta / 2,16, 15]) battery(); hole_diameter = 2.5;
hole_inset = 1;
usb_protrusion = 1.7;
usb_width = 9;
usb_inset_from_pcb_end = 5;
power_switch_protrusion = 2.1;
power_switch_inset_from_pcb_end = 8.1;
power_switch_width = 4;
battery_holder_height = 15;
battery_holder_width = 21;
battery_holder_length = 77.3;
battery_length = 65;
battery_protrusion = 4.5;
difference() {
cuboid([pcb_length, pcb_width, pcb_height], rounding=2, edges="Z") {
if (battery_holder)
position(TOP)
cube([battery_holder_length, battery_holder_width, battery_holder_height], anchor=BOTTOM + CENTER) {
if (battery)
position(TOP)
up(battery_protrusion)
battery(anchor=CENTER + LEFT);
}
position(RIGHT + BOTTOM) {
position(FRONT)
left(usb_inset_from_pcb_end)
cube([usb_width, usb_protrusion, pcb_height - pcb_height_no_components], orient=FRONT, anchor=RIGHT + BOTTOM + FRONT);
position(BACK)
left(power_switch_inset_from_pcb_end)
cube([power_switch_width, power_switch_protrusion, pcb_height - pcb_height_no_components], orient=FRONT, anchor=RIGHT + TOP + FRONT);
}
}
xcopies(pcb_length - (2 * hole_inset) - hole_diameter) {
ycopies(pcb_width - (2 * hole_inset) - hole_diameter) {
cyl(d=hole_diameter, h=pcb_height + EPS, orient=UP);
}
}
}
// delta = length - battery_length;
// cube([length, 32, height]);
// translate([delta / 2,16, 15]) battery();
// if
} }
micro_controller(true, true);