// ====================================================================== // Clark's DJ Table — enclosure (Option A: compact, one-piece prints) // Parametric OpenSCAD model. Units = mm. // // Two printed parts, each inside the Bambu A1 mini 180x180 bed: // - top_plate : control panel with all cutouts (prints flat, face down) // - tray : floor + walls with a 10° console slope, rear jack // cutouts, corner bosses square to the sloped top // // >>> DIMENSIONS MARKED "CONFIRM" ARE PLACEHOLDERS <<< // Measure the real parts, then update the variables. Every control // position is a named variable — nudge freely. // // Print: set `part` to "plate_print" or "tray", F6, Export as STL, // slice in Bambu Studio for the A1 mini. // ====================================================================== part = "assembly"; // "plate_print" | "tray" | "plate" | "assembly" explode = 8; // gap between tray and plate in the assembly view (0 = seated) $fn = 72; // ---------------------------------------------------------------- box box_w = 172; // X, width (A1 mini bed is 180; 172 + 3 mm brim each side = 178) box_d = 156; // Y, depth of the footprint tilt = 10; // console slope of the top plate, degrees toward the user front_h = 45; // front wall height (to the underside of the plate); raised from 35 for floor clearance wall = 2.6; // side wall thickness floor_t = 2.6; // tray floor thickness plate_t = 3.0; // top plate thickness corner_r = 6; // outer corner radius back_h = front_h + box_d * tan(tilt); // ~72.5 — back wall height plate_l = box_d / cos(tilt); // ~158.4 — plate length along the slope // plate registration lip (hangs under the plate, sits just inside the walls) lip_t = 1.6; lip_h = 3; lip_clr = 0.8; // generous: the lip leans 10° toward the back wall // ------------------------------------------------- control hole sizes // Proven sizes from ~/workspaces/personal/code/home_projects/hammond-enclosure-panels // (printed on this A1 mini; nominal sizes work, no shrink factor). rot_hole_d = 9.825; // 3/8-32 bushing (C&K A10405RNCQ / CS19D32B encoder) + 0.3 button_d = 12.2; // FILN 12 mm LED button, M12x0.75 thread + 0.2 button_bezel = 14.0; // FILN bezel OD (for spacing / looks) led_hole_d = 8.3; // 5 mm panel-mount LED holder // HW-233 slide-pot module: 90.8 x 21.3 mm board, hung under the plate on 4 // standoffs, lever through a slot. Measured 2026-10-09: 55 mm travel; lever tab // 1 mm thick, 5 mm wide at the base tapering to 4 mm; body 9 x 75 x 7 mm; // tab tip 22 mm above the PCB, so it stands 11 mm proud of the plate. // The housing runs 14 mm from the pin edge of the 21.3 mm board, so the board // sits off-centre under the slot. Mount it with the right-angle pins pointing // right (toward the knobs) and the pin end toward the front: no room for // pins + plugs on the wall side. Female jumper plugs end ~11.5 mm past the // board edge (x ~ 47.5), clear of the FILTER switch (body up to ~Ø30) and PREV. fader_travel = 55; fader_tab = 5; // widest dimension of the lever tab fader_slot_l = fader_travel + fader_tab + 4; // 64 — 2 mm slack each end; cap still covers it fader_slot_w = fader_tab + 0.6; // 5.6 — clears the tab if its wide face runs across fader_mount = [15.5, 85]; // Ø3.2 corner holes, centre-to-centre fader_pcb_off = 14 - 21.3/2; // 3.35 — board centre sits this far right of the slot fader_mount_d = 2.6; // M3 self-tap pilot in the standoff fader_standoff_h = 8; // plate underside -> PCB top; 7 mm body + 1 mm clearance // SH1122 256x64 OLED (same PCB as office-desktop-audio-control). // The glass is off-centre on the PCB, so the M2 holes sit asymmetrically // about the window: -32.39 / +39.81 in X, ±7.62 in Y. oled_win_w = 53.58; // 53.18 active + 0.4 oled_win_h = 15.18; // 14.78 active + 0.4 oled_holes_x = [-32.39, 39.81]; oled_holes_y = [-7.62, 7.62]; // Posts on the plate underside, as on the IR Link sender panel // (home-office/ryans-office/ir-link/panels): no screw heads on the top face. // The board's front to the glass face is 2 mm, so 2 mm posts let the glass rest // against the underside of the plate. Raise to 2.2 if it presses hard enough // to bow the board. oled_post_h = 2.0; oled_post_d = 4.0; // edge stays 3.75 mm in from the PCB edge, clear of the glass oled_pilot_d = 1.6; // M2 self-tapping oled_skin = 0.6; // pilot stops this far below the top face // Screws: M2 x 4 self-tapping (board 1.6 + 2.4 into the post); M2 x 5 also fits. // The pilot is 4.4 deep, so anything longer than 6 breaks through the top. // ------------------------------------------------- rear jack cutouts // X positions are world X (0 = left seen from the front), so the antenna at // low X is on the RIGHT when you look at the back panel. jack_z = 22; // height of jack centres up the back wall usbb_w = 12.3; usbb_h = 11.3; // USB-B panel mount (power + data), from office-desktop-audio-control usbb_screw_d = 3.3; usbb_screw_span = 30.5; // M3, its own nuts ant_d = 6.6; // RP-SMA antenna bulkhead (Bluetooth) out_x = 150; coax_x = 124; optical_x = 98; usbb_x = 60; ant_x = 20; optical_w = 15; optical_h = 15; // TOSLINK square CONFIRM coax_hole_d = 8.5; // RCA panel thread CONFIRM out_hole_d = 6.5; // 3.5 mm panel thread CONFIRM // --------------------------------------------- plate<->tray assembly screw_clear_d = 3.4; // M3 clearance in the plate (button-head screws, no countersink) screw_bore = 15; // screw-tip clearance: M3 x 8 button heads ideal (3 plate + 5 insert); 12 / 16 also fit insert_d = 4.0; // Kadrick M3 x 5 heat-set insert (4.5 / 3.9 mm taper) insert_depth = 6; // 5 mm insert + 1 mm for displaced plastic boss_d = 9; // ~2x the insert OD so the boss does not split screw_inset = 9; // from the plate corners // ============================================ control positions (X,Y) // Plate coordinates: X: 0 = left, Y: 0 = front edge of the plate, // measured ALONG the slope (plate is plate_l long). knob_cols = [60, 100, 140]; // three columns, 40 mm pitch eq_y = 112; // EQ row (back) mid_y = 74; // filter / echo row front_y = 32; // transport row (front) fader_x = 22; fader_cy = 84; // vertical fader, left column oled_c = [100, 139]; // OLED, back-centre source_c = [152, 141]; // SOURCE button, back-right (nut clears the OLED PCB) led_c = [158, 118]; // BT status LED, right edge (clear of the SOURCE label) screw_pts = [for (sx = [0, 1], sy = [0, 1]) [sx ? box_w - screw_inset : screw_inset, sy ? plate_l - screw_inset : screw_inset]]; // ====================================================================== // Helpers // ====================================================================== module rrect(w, d, r) { // centred rounded rectangle hull() for (sx = [-1, 1], sy = [-1, 1]) translate([sx * (w/2 - r), sy * (d/2 - r)]) circle(r = r); } module vhole(dia, z0 = -1, h = plate_t + 2) // through-hole, normal to the plate translate([0, 0, z0]) cylinder(h = h, d = dia); // Plate frame -> world: origin at the front-left top edge of the front wall, // rotated so +Y runs up the slope and +Z is the plate normal. module on_slope(lift = 0) translate([0, 0, front_h + lift]) rotate([tilt, 0, 0]) children(); // ====================================================================== // TOP PLATE (built in plate coordinates, top face at z = plate_t) // ====================================================================== module top_plate() { difference() { union() { translate([box_w/2, plate_l/2, 0]) linear_extrude(plate_t) rrect(box_w, plate_l, corner_r); plate_lip(); translate(oled_c) oled_posts(); } // -- rotary switches: 3 EQ + filter + echo -- for (x = knob_cols) translate([x, eq_y]) vhole(rot_hole_d); // EQ translate([knob_cols[0], mid_y]) vhole(rot_hole_d); // filter translate([knob_cols[1], mid_y]) vhole(rot_hole_d); // echo // -- fader slot -- translate([fader_x, fader_cy, -1]) linear_extrude(plate_t + 2) rrect(fader_slot_w, fader_slot_l, fader_slot_w/2); // -- buttons: 3 transport + source (echo throw = push on the echo encoder) -- for (x = knob_cols) translate([x, front_y]) vhole(button_d); translate(source_c) vhole(button_d); // -- BT status LED -- translate(led_c) vhole(led_hole_d); // -- OLED window + blind pilots in its posts -- translate(oled_c) oled_cut(); // -- corner screw clearance -- for (p = screw_pts) translate(p) vhole(screw_clear_d); } translate([fader_x + fader_pcb_off, fader_cy]) standoffs(fader_mount, fader_standoff_h, fader_mount_d); } module plate_lip() { o = wall + lip_clr; translate([box_w/2, plate_l/2, -lip_h]) linear_extrude(lip_h) difference() { rrect(box_w - 2*o, plate_l - 2*o, max(corner_r - o, 1)); rrect(box_w - 2*(o + lip_t), plate_l - 2*(o + lip_t), max(corner_r - o - lip_t, 0.5)); // notch the lip around the corner bosses for (p = screw_pts) translate(p - [box_w/2, plate_l/2]) circle(d = boss_d + 1.5); } } module oled_posts() { for (x = oled_holes_x, y = oled_holes_y) translate([x, y, -oled_post_h]) cylinder(h = oled_post_h + 0.01, d = oled_post_d); } module oled_cut() { translate([0, 0, -1]) linear_extrude(plate_t + 2) square([oled_win_w, oled_win_h], center = true); for (x = oled_holes_x, y = oled_holes_y) translate([x, y, -oled_post_h - 0.01]) cylinder(h = oled_post_h + plate_t - oled_skin + 0.01, d = oled_pilot_d); } // four posts hanging below the plate on a rectangular hole pattern; blind // pilot holes so screws go in from below and the top face stays clean module standoffs(pattern, h, hole_d) { for (sx = [-1, 1], sy = [-1, 1]) translate([sx * pattern[0]/2, sy * pattern[1]/2, -h]) difference() { cylinder(h = h, d = hole_d + 3.6); translate([0, 0, -1]) cylinder(h = h + 0.5, d = hole_d); } } // ====================================================================== // TRAY (floor + sloped walls + rear jacks + corner bosses) // ====================================================================== // Everything below the plate's underside plane. module below_slope() on_slope() translate([-50, -50, -200]) cube([box_w + 100, plate_l + 100, 200]); module outline(h, inset = 0) translate([box_w/2, box_d/2, 0]) linear_extrude(h) rrect(box_w - 2*inset, box_d - 2*inset, max(corner_r - inset, 1)); module tray() { intersection() { union() { difference() { outline(back_h + 1); translate([0, 0, floor_t]) outline(back_h + 2, wall); rear_jacks(); } corner_bosses(); } below_slope(); } // board_standoffs(); // add once board footprints are measured } // Bosses run square to the plate so screws and inserts go in straight. // They lean 10° and merge into the back wall at the rear corners. module corner_bosses() { intersection() { on_slope() for (p = screw_pts) translate(p) difference() { translate([0, 0, -back_h - 20]) cylinder(h = back_h + 20, d = boss_d); translate([0, 0, -insert_depth]) cylinder(h = insert_depth + 1, d = insert_d); translate([0, 0, -screw_bore]) cylinder(h = screw_bore + 1, d = screw_clear_d); // screw tip clearance } translate([0, 0, floor_t - 0.01]) outline(back_h + 2); // stand on the floor, stay inside the shell } } module rear_jacks() { // cut horizontally through the back wall (y ~ box_d) module thru(x) translate([x, box_d + 1, jack_z]) rotate([90,0,0]) children(); thru(usbb_x) linear_extrude(wall + 2) square([usbb_w, usbb_h], center = true); // USB-B power + data for (sx = [-1, 1]) thru(usbb_x + sx * usbb_screw_span/2) cylinder(h = wall + 2, d = usbb_screw_d); thru(optical_x) linear_extrude(wall + 2) square([optical_w, optical_h], center = true); // optical thru(coax_x) cylinder(h = wall + 2, d = coax_hole_d); // coax RCA thru(out_x) cylinder(h = wall + 2, d = out_hole_d); // 3.5 mm out thru(ant_x) cylinder(h = wall + 2, d = ant_d); // BT antenna } // ====================================================================== // Cosmetic parts (colour groups) — placed on the sloped plate. // Exported as separate STLs so the web viewer can colour each group. // ====================================================================== knob_d = 18; // KAISH knurled aluminium knob, Ø18 x 18 mm (6.4 mm shaft bore) knob_h = 18; knob_top = 14; // flat top face diameter // place a child on the top face of the seated plate at plate coords (x, y); // local = true leaves it in plate coords (the web viewer tilts it itself) local = false; module on_top(x, y) if (local) translate([x, y, plate_t]) children(); else on_slope(explode) translate([x, y, plate_t]) children(); // A knurled knob: fluted grip, rounded shoulder down to the flat top, indicator line. module knob() { r = knob_d / 2; fh = knob_h - 2; // height of the knurled band n = 40; // number of flutes difference() { union() { cylinder(h = fh, r = r - 0.6); // core for (i = [0:n-1]) rotate([0,0, i*360/n]) // flutes (knurl) translate([r - 0.6, 0, 0]) cylinder(h = fh, d = 1.2, $fn = 8); translate([0,0,fh]) cylinder(h = 2, r1 = r, r2 = knob_top/2); // shoulder to the flat top } translate([knob_top/4, 0, knob_h - 0.3]) cube([knob_top/2, 0.9, 1.2], center = true); // indicator line } } module g_knob_low() on_top(knob_cols[0], eq_y) knob(); module g_knob_mid() on_top(knob_cols[1], eq_y) knob(); module g_knob_high() on_top(knob_cols[2], eq_y) knob(); module g_knob_filter() on_top(knob_cols[0], mid_y) knob(); module g_knob_echo() on_top(knob_cols[1], mid_y) knob(); // fader cap as on the HW-233: long axis along the travel, dished top with grip // ridges across it and the indicator line in the dip. Size estimated from a photo. module fader_cap() { w = 13; l = 24; h = 10; R = 24; // across, along travel, height, dish radius top = function(y) min(h, h + R - 2 - sqrt(R*R - y*y)); // dished top surface difference() { hull() { linear_extrude(0.1) rrect(w, l, 2); translate([0,0,h - 0.1]) linear_extrude(0.1) rrect(w - 1.5, l - 2, 1.5); } translate([0, 0, h + R - 2]) rotate([0, 90, 0]) cylinder(h = w + 2, r = R, center = true, $fn = 120); for (i = [-4:4]) if (i != 0) // grip ridges translate([0, i * 2.5, top(i * 2.5)]) cube([w + 2, 0.7, 1.0], center = true); translate([0, 0, top(0)]) cube([w + 2, 1.2, 1.6], center = true); // indicator line } } // FILN 12 mm LED button: Ø14 bezel standing 4.8 mm proud, Ø9 / Ø7.5 LED ring on the face module button() { r = button_bezel / 2; difference() { union() { cylinder(h = 4.3, r = r); // bezel translate([0,0,4.3]) cylinder(h = 0.5, r1 = r, r2 = r - 0.5); // edge chamfer } translate([0,0,4.5]) difference() { // LED ring groove cylinder(h = 1, d = 9); translate([0,0,-0.5]) cylinder(h = 2, d = 7.5); } } } module g_fadercap() on_top(fader_x, fader_cy) fader_cap(); module g_prev() on_top(knob_cols[0], front_y) button(); module g_play() on_top(knob_cols[1], front_y) button(); module g_next() on_top(knob_cols[2], front_y) button(); module g_source() on_top(source_c[0], source_c[1]) button(); // green LED ring that sits in a button's face groove (transport buttons) module button_led() translate([0,0,4.5]) difference() { cylinder(h = 0.25, d = 8.9); translate([0,0,-0.5]) cylinder(h = 1.5, d = 7.6); } module g_prev_led() on_top(knob_cols[0], front_y) button_led(); module g_play_led() on_top(knob_cols[1], front_y) button_led(); module g_next_led() on_top(knob_cols[2], front_y) button_led(); // realistic OLED: a small module with a bezel and a recessed glossy display module oled_screen() { ww = oled_win_w; hh = oled_win_h; difference() { hull() { linear_extrude(0.1) rrect(ww + 5, hh + 6, 2.5); translate([0,0,1.8]) linear_extrude(0.1) rrect(ww + 3, hh + 4, 2); } translate([0,0,1.1]) linear_extrude(1.4) rrect(ww + 0.5, hh + 0.5, 1.2); // recessed glass window } } module g_oled() on_top(oled_c[0], oled_c[1]) oled_screen(); // ====================================================================== // Render selector // ====================================================================== // Plate flipped face-down for printing: smooth top face off the bed, // lip and standoffs point up, no supports. module plate_print() translate([0, plate_l, plate_t]) rotate([180, 0, 0]) top_plate(); if (part == "plate_print") plate_print(); // print else if (part == "tray") tray(); // print else if (part == "plate") top_plate(); // plate coords, face up else if (part == "body_plate") on_slope(explode) top_plate(); // placed, for the viewer else if (part == "knob_low") g_knob_low(); else if (part == "knob_mid") g_knob_mid(); else if (part == "knob_high") g_knob_high(); else if (part == "knob_filter") g_knob_filter(); else if (part == "knob_echo") g_knob_echo(); else if (part == "fadercap") g_fadercap(); else if (part == "prev") g_prev(); else if (part == "play") g_play(); else if (part == "next") g_next(); else if (part == "source") g_source(); else if (part == "prev_led") g_prev_led(); else if (part == "play_led") g_play_led(); else if (part == "next_led") g_next_led(); else if (part == "oled") g_oled(); else { // "assembly" — full coloured preview tray(); color("#33322d") on_slope(explode) top_plate(); color("#1c1c1c") g_knob_low(); color("#1c1c1c") g_knob_mid(); color("#1c1c1c") g_knob_high(); color("#e07b24") g_knob_filter(); color("#c05a9e") g_knob_echo(); color("#2f6dbd") g_fadercap(); color("#d0cec5") g_prev(); color("#d0cec5") g_play(); color("#d0cec5") g_next(); color("#c2c0b6") g_source(); color("#2fd46a") { g_prev_led(); g_play_led(); g_next_led(); } color("#101010") g_oled(); }