Files
SteamFrame-FPV-Control-Center/hardware/power_station/case/power_station_case.scad
T

315 lines
12 KiB
OpenSCAD

// ============================================================================
// SteamFrame FPV — Custom Power Station Enclosure + RF-Spaced Cradles
// ============================================================================
// Matches the 120 x 75 mm 2-layer Carrier Board PCB (../pcb/power_station.kicad_pcb).
//
// Features:
// - Main base holding the 120x75mm Carrier Board on 4x M3 standoffs
// - 1/4"-20 hex nut trap underneath for standard camera tripod + 4 flat desk feet
// - Panel cutouts for XT60 IN (24V), Rocker Switch, XT60 OUT (12V VRX),
// USB-C PD #1 (Nomad JR), USB-C PD #2 (MOGOOD PD IN), USB-C Data IN & OUT
// - Vented lid with VBUS jumper access + clip for MOGOOD USB-C Splitter
// - Two slide-in / velcro cradles spaced on opposite wings for RF isolation:
// * Left wing : VRX Eachine Sphere Link (Radxa Zero 3W)
// * Right wing : RadioMaster Nomad + Custom JR Box (RP2350)
//
// How to export STLs in OpenSCAD:
// Set `part` below to "bottom", "lid", "cradle_vrx", "cradle_nomad",
// or "preview" to inspect the assembled station.
// ============================================================================
part = "preview"; // "preview" | "bottom" | "lid" | "cradle_vrx" | "cradle_nomad"
$fn = 48;
// ---- PCB & Base Dimensions (mm) ----
pcb_w = 120.0;
pcb_d = 75.0;
pcb_t = 1.6;
pcb_margin = 1.0;
wall = 3.0;
base_t = 4.0;
standoff_h = 6.0;
case_h = 42.0;
inner_w = pcb_w + 2 * pcb_margin; // 122
inner_d = pcb_d + 2 * pcb_margin; // 77
outer_w = inner_w + 2 * wall; // 128
outer_d = inner_d + 2 * wall; // 83
pcb_ox = wall + pcb_margin;
pcb_oy = wall + pcb_margin;
pcb_oz = base_t + standoff_h;
// ---- Adjustable Device Cradle Dimensions (measure yours & tweak!) ----
// 1) VRX Eachine Sphere Link (Radxa Zero 3W)
vrx_w = 76.0;
vrx_d = 56.0;
vrx_wall_h = 22.0;
// 2) RadioMaster Nomad + JR Box (RP2350)
nomad_w = 82.0;
nomad_d = 54.0;
nomad_wall_h = 28.0;
// Velcro strap slot size (standard 20 mm FPV battery strap)
strap_w = 21.0;
strap_h = 3.5;
// Slide-in dovetail rail clearance (increase slightly if printer tolerances are tight)
rail_tol = 0.25;
// ---- Helper Modules ----
module rounded_box(w, d, h, r = 3.0) {
hull() {
for (x = [r, w - r], y = [r, d - r])
translate([x, y, 0]) cylinder(h = h, r = r);
}
}
module slot_x(len, h, depth) {
r = h / 2;
hull() {
translate([r, 0, r]) rotate([-90, 0, 0]) cylinder(h = depth, r = r);
translate([len - r, 0, r]) rotate([-90, 0, 0]) cylinder(h = depth, r = r);
}
}
module dovetail_male(length, base_w = 14, top_w = 10, h = 4.0) {
linear_extrude(height = length)
polygon([
[-base_w / 2, 0],
[ base_w / 2, 0],
[ top_w / 2, h],
[ -top_w / 2, h]
]);
}
// ============================================================================
// 1. BOTTOM ENCLOSURE
// ============================================================================
module bottom_case() {
difference() {
union() {
// Outer shell
rounded_box(outer_w, outer_d, case_h, r = 3.5);
}
// Hollow interior
translate([wall, wall, base_t])
rounded_box(inner_w, inner_d, case_h, r = 1.5);
// ---- Left Wall Cutouts (X = 0) ----
// XT60-M 24V Input (PCB Y = 21.6)
translate([-1, pcb_oy + 21.6 - 8.0, pcb_oz + 4.0])
cube([wall + 2, 16.0, 10.0]);
// Panel Rocker Switch 10A (19.5 x 13.0 mm)
translate([-1, pcb_oy + 50.0 - 9.75, pcb_oz + 6.0])
cube([wall + 2, 19.5, 13.0]);
// ---- Right Wall Cutouts (X = outer_w) ----
// XT60-F 12V VRX Output (PCB Y = 18.6)
translate([outer_w - wall - 1, pcb_oy + 18.6 - 8.0, pcb_oz + 4.0])
cube([wall + 2, 16.0, 10.0]);
// USB-C Data OUT to Radxa OTG (PCB Y = 52.0)
translate([outer_w - wall - 1, pcb_oy + 52.0 - 5.5, pcb_oz + 2.0])
cube([wall + 2, 11.0, 6.0]);
// ---- Front Wall Cutouts (Y = outer_d, PCB Y = 75) ----
// USB-C PD #1: Nomad JR (PCB X = 24.0)
translate([pcb_ox + 24.0 - 6.0, outer_d - wall - 1, pcb_oz + 3.0])
slot_x(12.0, 6.5, wall + 2);
// USB-C PD #2: MOGOOD PD IN (PCB X = 62.0)
translate([pcb_ox + 62.0 - 6.0, outer_d - wall - 1, pcb_oz + 3.0])
slot_x(12.0, 6.5, wall + 2);
// USB-C Data IN: from MOGOOD (PCB X = 94.0)
translate([pcb_ox + 94.0 - 5.5, outer_d - wall - 1, pcb_oz + 2.5])
slot_x(11.0, 5.5, wall + 2);
// ---- Bottom: 1/4"-20 Camera Tripod Through-Hole ----
translate([outer_w / 2, outer_d / 2, -0.5])
cylinder(h = base_t + 8.0, d = 6.8);
// ---- Bottom: 4x Silicone Desk Foot Recesses ----
for (fx = [12, outer_w - 12], fy = [12, outer_d - 12])
translate([fx, fy, -0.1])
cylinder(h = 1.2, d = 12.0);
}
// ---- Internal Reinforced Boss + 1/4"-20 Hex Nut Trap ----
// Standard 1/4"-20 hex nut: 11.1 mm across flats -> 12.82 mm across corners (+0.4mm tol)
translate([outer_w / 2, outer_d / 2, base_t - 0.5]) {
difference() {
cylinder(h = 6.5, d = 22.0);
translate([0, 0, 1.5])
cylinder(h = 6.0, d = 13.2, $fn = 6);
translate([0, 0, -0.5])
cylinder(h = 7.5, d = 6.8);
}
}
// ---- 4x M3 PCB Standoffs (exact PCB mounting holes) ----
for (mx = [5, 115], my = [5, 70]) {
translate([pcb_ox + mx, pcb_oy + my, base_t - 0.5]) {
difference() {
cylinder(h = standoff_h + 0.5, d = 7.0);
translate([0, 0, 1.0])
cylinder(h = standoff_h + 1, d = 2.8); // M3 self-tapping (or 4.0mm for heat-set insert)
}
}
}
// ---- 4x Lid Corner Pillars (M3 screws, fused into corner walls) ----
for (ix = [0, 1], iy = [0, 1]) {
cx = ix == 0 ? wall + 3.5 : outer_w - wall - 3.5;
cy = iy == 0 ? wall + 3.5 : outer_d - wall - 3.5;
gx = ix == 0 ? wall - 1.0 : outer_w - wall - 3.5;
gy = iy == 0 ? wall - 1.0 : outer_d - wall - 3.5;
pillar_z = base_t + standoff_h + 4.0;
pillar_h = case_h - pillar_z;
difference() {
union() {
translate([cx, cy, pillar_z])
cylinder(h = pillar_h, d = 7.0);
// Corner web fusing pillar cleanly into both side walls
translate([gx, gy, pillar_z])
cube([4.5, 4.5, pillar_h]);
}
translate([cx, cy, case_h - 10.0])
cylinder(h = 11.0, d = 2.8);
}
}
// ---- Front Clip Channel for MOGOOD USB-C Splitter ----
// Holds the splitter neatly right in front of PD #2 and DATA IN
translate([pcb_ox + 68, outer_d - 1.0, 8]) {
difference() {
cube([24, 15, 14]);
translate([2, 3, 2]) cube([20, 10, 13]);
translate([6, 11, 4]) cube([12, 5, 11]); // cable exit slot
}
}
}
// ============================================================================
// 2. VENTED LID WITH RF-SPACED CRADLE DOVETAIL RAILS
// ============================================================================
module lid() {
lid_t = 3.0;
lip_h = 2.5;
wing_ext = 38.0; // Extends left & right wings for RF separation between VRX and Nomad
difference() {
union() {
// Main lid plate + side wings
translate([-wing_ext, 0, 0])
rounded_box(outer_w + 2 * wing_ext, outer_d, lid_t, r = 4.0);
// Inner alignment lip
translate([wall + 0.3, wall + 0.3, -lip_h])
rounded_box(inner_w - 0.6, inner_d - 0.6, lip_h, r = 1.5);
// Left Dovetail Rail (VRX Cradle)
translate([-wing_ext + 22, 12, lid_t])
rotate([-90, 0, 0])
dovetail_male(outer_d - 24, base_w = 16, top_w = 12, h = 4.5);
// Right Dovetail Rail (Nomad + JR Cradle)
translate([outer_w + wing_ext - 22, 12, lid_t])
rotate([-90, 0, 0])
dovetail_male(outer_d - 24, base_w = 16, top_w = 12, h = 4.5);
}
// Hollow center of alignment lip
translate([wall + 3.0, wall + 3.0, -lip_h - 0.5])
rounded_box(inner_w - 6.0, inner_d - 6.0, lip_h + 1.0, r = 1.0);
// 4x M3 Lid Screw Holes (countersunk)
for (cx = [wall + 3.5, outer_w - wall - 3.5], cy = [wall + 3.5, outer_d - wall - 3.5]) {
translate([cx, cy, -lip_h - 1])
cylinder(h = lid_t + lip_h + 2, d = 3.4);
translate([cx, cy, lid_t - 1.2])
cylinder(h = 1.5, d1 = 3.4, d2 = 6.2);
}
// Ventilation Slots over Buck 12V & SW3518S modules
for (vx = [20 : 8 : outer_w - 24]) {
translate([vx, 14, -1])
rounded_box(3.5, 22, lid_t + 2, r = 1.5);
translate([vx, 46, -1])
rounded_box(3.5, 22, lid_t + 2, r = 1.5);
}
// VBUS Jumper Access Window (PCB X = 94, Y = 44)
translate([pcb_ox + 88, pcb_oy + 38, -1])
rounded_box(14, 12, lid_t + 2, r = 1.5);
}
}
// ============================================================================
// 3. SLIDE-IN CRADLE MODULE (REUSABLE FOR VRX & NOMAD)
// ============================================================================
module device_cradle(dev_w, dev_d, wall_h, g29_notch = false) {
c_wall = 3.0;
base_h = 7.0;
tot_w = dev_w + 2 * c_wall;
tot_d = dev_d + 2 * c_wall;
difference() {
union() {
// Base plate + side retaining walls
rounded_box(tot_w, tot_d, base_h + wall_h, r = 3.0);
}
// Main device pocket (open top + open front/rear for antennas & airflow)
translate([c_wall, c_wall, base_h])
cube([dev_w, dev_d, wall_h + 2]);
// Open front & rear slots so antennas, SMA, fan, and connectors stay clear
translate([c_wall + 8, -1, base_h + 4])
cube([dev_w - 16, tot_d + 2, wall_h + 2]);
// Slide-in Female Dovetail Slot on bottom
translate([tot_w / 2, -0.5, 0])
rotate([-90, 0, 0])
dovetail_male(tot_d + 1, base_w = 16 + 2 * rail_tol, top_w = 12 + 2 * rail_tol, h = 4.5 + rail_tol);
// 2x Velcro Strap Slots (20 mm FPV strap)
for (sy = [tot_d * 0.25 - strap_w / 2, tot_d * 0.75 - strap_w / 2]) {
translate([-1, sy, base_h + 5])
cube([tot_w + 2, strap_w, strap_h]);
}
// Bottom airflow cutout
translate([c_wall + 10, c_wall + 10, base_h - 2.5])
cube([dev_w - 20, dev_d - 20, 4]);
// Extra side/bottom notch on Nomad cradle for G29 USB-A cable on RP2350
if (g29_notch) {
translate([tot_w - c_wall - 1, tot_d / 2 - 10, base_h + 2])
cube([c_wall + 2, 20, wall_h]);
}
}
}
// ============================================================================
// RENDER SELECTION
// ============================================================================
if (part == "bottom") {
bottom_case();
} else if (part == "lid") {
rotate([180, 0, 0]) lid();
} else if (part == "cradle_vrx") {
device_cradle(vrx_w, vrx_d, vrx_wall_h, g29_notch = false);
} else if (part == "cradle_nomad") {
device_cradle(nomad_w, nomad_d, nomad_wall_h, g29_notch = true);
} else if (part == "preview") {
color("SlateGray") bottom_case();
color("SteelBlue", 0.85) translate([0, 0, case_h]) lid();
color("DarkOrange", 0.9) translate([-38 + 22 - (vrx_w + 6) / 2, (outer_d - (vrx_d + 6)) / 2, case_h + 3.0])
device_cradle(vrx_w, vrx_d, vrx_wall_h, g29_notch = false);
color("ForestGreen", 0.9) translate([outer_w + 38 - 22 - (nomad_w + 6) / 2, (outer_d - (nomad_d + 6)) / 2, case_h + 3.0])
device_cradle(nomad_w, nomad_d, nomad_wall_h, g29_notch = true);
}