From 077e5cbedbee7e7a7e5f01da2f2f84c0d0bfc423 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Thu, 11 Dec 2025 22:48:56 +0100 Subject: [PATCH] added first enclosure for n28. --- avr/devices/n28/0BUILD | 1 + avr/devices/n28/enclosure.scad | 120 +++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 avr/devices/n28/enclosure.scad diff --git a/avr/devices/n28/0BUILD b/avr/devices/n28/0BUILD index 472c33c..aea5b98 100644 --- a/avr/devices/n28/0BUILD +++ b/avr/devices/n28/0BUILD @@ -10,6 +10,7 @@ defs.asm README + enclosure.scad diff --git a/avr/devices/n28/enclosure.scad b/avr/devices/n28/enclosure.scad new file mode 100644 index 0000000..9c4dd78 --- /dev/null +++ b/avr/devices/n28/enclosure.scad @@ -0,0 +1,120 @@ +$fn = 50; + +width = 22; +length = 117; +height = 28; + +corner_radius = 2; +wall_thickness = 2; +post_diameter = 8; +post_height = 4; + +hole_diameter = 3; +lid_thickness = 2; +lid_lip = 1 ; +lid_tolerance = .5; + + +module posts(x, y, z, h, r){ + translate([x, y, z]) + cylinder(r = r, h = h); + + translate([-x, y, z]) + cylinder(r = r, h = h); + + translate([-x, -y, z]) + cylinder(r = r, h = h); + + translate([x, -y, z]) + cylinder(r = r, h = h); +} + + + +difference() { + // box + hull() { + posts( + x=(width/2 - corner_radius), + y=(length/2 - corner_radius), + z=0, + h=height, + r=corner_radius); + } + + // hollow + hull() { + posts( + x=(width/2 - corner_radius - wall_thickness), + y=(length/2 - corner_radius - wall_thickness), + z=wall_thickness, + h=height, + r=corner_radius); + } + + // lip inside box + hull() { + posts( + x=(width/2 - corner_radius - lid_lip), + y=(length/2 - corner_radius - lid_lip), + z=(height - lid_thickness), + h=(lid_thickness + 1), + r=corner_radius); + } + + // ventilation slits left 1 + for(i = [(wall_thickness+post_height+2):2:(height-6)]) { + translate([(-width/2)-wall_thickness, (-length/2)+25, i]) + cube([10, length/4, 1], center=true); + } + + // ventilation slits left 2 + for(i = [(wall_thickness+post_height+2):2:(height-6)]) { + translate([(-width/2)-wall_thickness, (length/2)-25, i]) + cube([10, length/4, 1], center=true); + } + + // ventilation slits right 1 + for(i = [(wall_thickness+post_height+2):2:(height-6)]) { + translate([(width/2)-wall_thickness, (-length/2)+25, i]) + cube([10, length/4, 1], center=true); + } + + // ventilation slits right 2 + for(i = [(wall_thickness+post_height+2):2:(height-6)]) { + translate([(width/2)-wall_thickness, (length/2)-25, i]) + cube([10, length/4, 1], center=true); + } + + // network connector hole 1 + translate([0, (length/2), post_height+wall_thickness+2+8]) + cube([16, 21, 15], center=true); + + // network connector hole 2 + translate([0, (-length/2), post_height+wall_thickness+2+8]) + cube([16, 21, 15], center=true); + + // sensor hole + translate([(width/2), -7, post_height+wall_thickness+2+8]) + cube([5, 10, 7], center=true); + +} + + +// support posts for pcb +difference() { + translate([0, length/4, wall_thickness]) + cylinder(r = post_diameter/2, h = post_height); + + translate([0, length/4, wall_thickness]) + cylinder(r = hole_diameter/2, h = post_height+3); +} + + +difference() { + translate([0, -length/4, wall_thickness]) + cylinder(r = post_diameter/2, h = post_height); + + translate([0, -length/4, wall_thickness]) + cylinder(r = hole_diameter/2, h = post_height+3); +}