Merge pull request 'feat: Prototype base plate — real hub motor axle measurements' (#11) from sl-mechanical/prototype-baseplate into main

This commit is contained in:
seb 2026-02-28 15:17:47 -05:00
commit 544a52686e
3 changed files with 830 additions and 30 deletions

View File

@ -1,24 +1,78 @@
# SaltyBot Chassis — Bill of Materials
**Task:** bd-1iy5
**Rev:** A — 2026-02-28
**Task:** bd-1iy5 / prototype-baseplate
**Rev:** C — 2026-02-28 (vertical stem architecture; batteries on mast carousel)
**Agent:** sl-mechanical
---
## ⚠ Axle Measurement Update (Rev B)
PR #7 (`chassis_frame.scad`) used placeholder values. The table below records the
**caliper-verified** hub motor axle dimensions. All new designs must use these.
| Feature | Measured | PR #7 placeholder | Delta |
|---------|----------|-------------------|-------|
| Axle base diameter (round, near hub) | **16.11 mm** | 14 mm | +2.11 mm |
| D-cut shaft OD | **15.95 mm** | — (not modelled) | new |
| D-cut flat chord | **13.00 mm** | — | new |
| Total axle protrusion | **65.5 mm** | ~60 mm est. | +5.5 mm |
| Base section length | **15.0 mm** | — | new |
| D-cut section length | **43.35 mm** | — | new |
| Tip / shoulder | **3.0 mm** | — | new |
| Bearing seat collar OD | **37.8 mm** | — | new |
| Tire OD | **254 mm** (10×2.125") | 170 mm motor OD only | — |
| Axle CL height above ground | **127 mm** | 310 mm (wrong) | 183 mm |
`chassis_frame.scad` should be updated in a follow-on task to match Rev B values.
---
## Structural / Fabricated Parts
### Prototype Base Plate (`prototype_baseplate.scad`) — Rev C
> Batteries are removed from the base plate. Plate is now compact (680×130mm).
> Stem socket replaces battery tray. See Part B (stem clamp) below.
| # | Part | Qty | Material | Cut size | Notes |
|---|------|-----|----------|----------|-------|
| 1 | Base plate | 1 | 6mm 5052-H32 Al **or** 8mm acrylic | 680×130mm blank | `RENDER="plate_2d"` → DXF |
| 2 | Dropout clamp — lower | 2 | 8mm 6061-T6 Al | 90×70mm blank | Round bore Ø16.51mm; `RENDER="clamp_lower_2d"` |
| 3 | Dropout clamp — upper | 2 | 8mm 6061-T6 Al | 90×70mm blank | D-cut bore; `RENDER="clamp_upper_2d"` |
| 4 | Stem flange ring | 2 | 6mm Al or acrylic | Ø82mm disc | One above + one below plate; `RENDER="stem_flange_2d"` |
| 5 | Vertical stem tube | 1 | 38.1mm OD × 1.5mm wall 6061-T6 Al | 1050mm length | 1.5" EMT conduit is a drop-in alternative |
| 6 | FC standoff M3×6mm nylon | 4 | Nylon | — | MAMBA F722S vibration isolation |
| 7 | Ø4mm × 16mm alignment pin | 8 | Steel dowel | — | Dropout clamp-to-plate alignment |
### Battery Stem Clamp (`stem_battery_clamp.scad`) — Part B
| # | Part | Qty | Material | Notes |
|---|------|-----|----------|-------|
| 1 | Main deck plate | 1 | 6mm 5052 aluminium plate, 640×220mm | CNC router or waterjet; all holes per `chassis_frame.scad` |
| 2 | Longitudinal rib (front) | 1 | 4mm 5052 aluminium, 600×40mm | Laser-cut; press-fit into deck slots |
| 3 | Longitudinal rib (rear) | 1 | 4mm 5052 aluminium, 600×40mm | Same file, symmetric |
| 4 | Motor fork bracket (L) | 1 | 8mm 6061 aluminium | CNC mill or FDM PETG @100% infill for prototyping |
| 5 | Motor fork bracket (R) | 1 | 8mm 6061 aluminium | Mirror of item 4 |
| 6 | Battery tray | 1 | 3mm PETG FDM or 3mm aluminium fold | `chassis_frame.scad``battery_tray()` module |
| 7 | FC mount plate / standoffs | 1 set | PETG or nylon FDM | Includes 4× M3 nylon standoffs, 6mm height |
| 8 | Jetson Nano mount plate | 1 | 4mm 5052 aluminium or 4mm PETG FDM | B01 58×58mm hole pattern |
| 9 | Front bumper bracket | 1 | 5mm PETG FDM | Saddle clamps for 22mm EMT conduit |
| 10 | Rear bumper bracket | 1 | 5mm PETG FDM | Mirror of item 9 |
| 8 | Collar half | 2 | PETG FDM (5 perimeters, 40% infill) | Print flat-side-down; mirror 2nd in slicer. Bore Ø38.6mm |
| 9 | Radial arm | 4 | 4mm 5052-H32 Al (laser-cut) **or** PETG FDM | `RENDER="arm_2d"` for DXF with `ARM_THICK=4`; or print at 8mm |
| 10 | Battery cradle | 4 | PETG FDM (4 perimeters, 30% infill) | U-channel, open top; holds 1 pack per cradle |
| 11 | M6×60 SHCS | 4 | SS | 2 collar clamping bolts × 2 sides |
| 12 | M6 hex nut | 4 | SS | Captured in collar nut pockets |
| 13 | M6×12 set screw | 2 | SS, cup-point | 1 per collar half for height lock |
| 14 | M4×20 SHCS | 8 (16 for 4) | SS | Arm-to-collar bolts (2 per arm) |
| 15 | M4×16 SHCS | 8 (16 for 4) | SS | Cradle-to-arm bolts (2 per cradle) |
| 16 | M4 hex nut | 16 (32 for 4) | SS | Nuts for items 14 + 15 |
| 17 | Velcro strap 25mm × 600mm | 48 | — | 12 per battery pack through cradle slots |
### Full Chassis (`chassis_frame.scad`) — Rev A (placeholder values — pending Rev B update)
| # | Part | Qty | Material | Notes |
|---|------|-----|----------|-------|
| 6 | Main deck plate | 1 | 6mm 5052 aluminium plate, 640×220mm | CNC router or waterjet; all holes per `chassis_frame.scad` |
| 7 | Longitudinal rib (front) | 1 | 4mm 5052 aluminium, 600×40mm | Laser-cut; press-fit into deck slots |
| 8 | Longitudinal rib (rear) | 1 | 4mm 5052 aluminium, 600×40mm | Same file, symmetric |
| 9 | Motor fork bracket (L) | 1 | 8mm 6061 aluminium | **Update fork slot to Ø16.51mm before cutting** |
| 10 | Motor fork bracket (R) | 1 | 8mm 6061 aluminium | Mirror of item 9 |
| 11 | Battery tray | 1 | 3mm PETG FDM or 3mm aluminium fold | `chassis_frame.scad``battery_tray()` module |
| 12 | FC mount plate / standoffs | 1 set | PETG or nylon FDM | Includes 4× M3 nylon standoffs, 6mm height |
| 13 | Jetson Nano mount plate | 1 | 4mm 5052 aluminium or 4mm PETG FDM | B01 58×58mm hole pattern |
| 14 | Front bumper bracket | 1 | 5mm PETG FDM | Saddle clamps for 22mm EMT conduit |
| 15 | Rear bumper bracket | 1 | 5mm PETG FDM | Mirror of item 14 |
---
@ -26,8 +80,9 @@
| # | Part | Qty | Source / Spec | Notes |
|---|------|-----|---------------|-------|
| 11 | Hoverboard hub motor | 2 | Generic 6.5" / 170mm OD, 36V nominal | ~350W each; 14mm flat axle; confirm exact OD before cutting fork slots |
| 12 | Motor hall-sensor cable extension | 2 | 6-pin JST-PH 300mm | Route through deck cable slot |
| 16 | Hoverboard hub motor | 2 | 10×2.125" pneumatic tire, 36V nominal, ~350W | Axle: Ø16.11mm base / Ø15.95mm D-cut / 13mm flat; bearing seat Ø37.8mm — **all caliper-verified** |
| 17 | Motor hall-sensor cable extension | 2 | 6-pin JST-PH 300mm | Route through deck cable slot |
| 18 | Axle lock nut | 4 | M16×1.5 or thread-matched to actual axle tip | Confirm thread at tip before ordering; calipers show Ø≈10mm at tip |
---
@ -43,13 +98,27 @@
---
## Battery
## Battery (Vertical Stem Mount — Rev C)
> Batteries mount VERTICALLY on the stem carousel, **not** on the base plate.
> Each pack stands upright (420mm tall) in a cradle at the end of a radial arm.
| # | Part | Qty | Spec | Notes |
|---|------|-----|------|-------|
| 18 | LiPo / LiFePO4 pack | 1 | 24V (6S LiPo or 8S LiFePO4), 4Ah, ≤185×72×52mm | Confirm dims before printing tray; add 2mm clearance |
| 19 | Velcro strap 20mm wide | 2 | 300mm length | Route through tray strap slots |
| 20 | BMS board | 1 | Matched to cell chemistry | Mount externally on rear inner face of tray wall |
| 18 | Battery pack | 24 | 24V, **420×88×56 mm** each (caliper-verified) | Snap into battery cradle from above |
| 19 | BMS board | 1 | Matched to cell chemistry | Mount to stem or base plate underside; run wiring down stem |
### Battery stem clamp — configuration guide
| Config | Arm count | Carousel weight | Balance | Notes |
|--------|-----------|-----------------|---------|-------|
| 2-pack | 2 arms, 180° apart | ~1.4 kg | ✅ Symmetric | Minimum configuration |
| 4-pack | 4 arms, 90° apart | ~2.8 kg | ✅ Symmetric | Maximum practical config |
| 3-pack | 3 arms, 120° apart | ~2.1 kg | ⚠ Asymmetric mass | Needs counter-balance or avoid |
### CG height tuning
Slide entire carousel up/down the stem with M6 collar bolts loosened. Tighten at desired height. Typical balance point (initial estimate): batteries centred at 450600 mm above base plate. Adjust in ≈50 mm increments during commissioning.
---
@ -64,18 +133,23 @@
## Fasteners
| # | Part | Qty | Spec |
|---|------|-----|------|
| 23 | M5×16 SHCS | 24 | ISO 4762, SS |
| 24 | M5 hex nut | 24 | ISO 4032, SS |
| 25 | M4×12 SHCS | 12 | ISO 4762, SS |
| 26 | M4 hex nut | 12 | ISO 4032, SS |
| 27 | M3×10 SHCS | 20 | ISO 4762, SS |
| 28 | M3 hex nut | 20 | ISO 4032, SS |
| 29 | M3×6 BHCS | 8 | FC + Jetson board bolts |
| 30 | M14×1.5 axle nut | 4 | One each side per motor, flanged | Confirm axle thread pitch on actual motors |
| 31 | Serrated washer M14 | 4 | Axle anti-rotation |
| 32 | Flat washer M5 | 48 | SS |
| # | Part | Qty | Spec | Use |
|---|------|-----|------|-----|
| 20 | M5×16 SHCS | 16 | ISO 4762, SS | Dropout clamp bolts (4 per clamp × 4) |
| 21 | M5×20 SHCS | 8 | ISO 4762, SS | Stem flange bolts (4 per flange × 2) |
| 22 | M5 hex nut | 24 | ISO 4032, SS | |
| 23 | M4×20 SHCS | 16 | ISO 4762, SS | Arm-to-collar (2 per arm × 4 arms × 2) |
| 24 | M4×16 SHCS | 16 | ISO 4762, SS | Cradle-to-arm (2 per cradle × 4 arms × 2) |
| 25 | M4 hex nut | 32 | ISO 4032, SS | |
| 26 | M6×60 SHCS | 4 | ISO 4762, SS | Collar clamping bolts |
| 27 | M6 hex nut | 4 | ISO 4032, SS | Captured in collar pockets |
| 28 | M6×12 set screw | 2 | ISO 4026, SS cup-point | Stem height lock (1 per collar half) |
| 29 | M3×10 SHCS | 12 | ISO 4762, SS | FC mount + miscellaneous |
| 30 | M3×6 BHCS | 4 | ISO 4762, SS | FC board bolts |
| 31 | Axle lock nut (match axle tip thread) | 4 | Flanged, confirm thread | 2 per motor |
| 32 | Flat washer M5 | 32 | SS | |
| 33 | Flat washer M4 | 32 | SS | |
| 34 | Ø4×16 dowel pin | 8 | Steel | Dropout clamp alignment |
---

View File

@ -0,0 +1,348 @@
// =============================================================================
// SaltyBot Prototype Base Plate (Rev C compact, stem-mount)
// Agent: sl-mechanical | 2026-02-28
//
// Laser-cut or CNC-routed flat plate (6 mm Al / 8 mm acrylic).
// Uses CALIPER-VERIFIED hub motor axle measurements (see PR #7 / #11).
//
// ARCHITECTURE CHANGE (Rev C):
// Batteries are NO LONGER on the base plate.
// They stand vertically on a central stem via stem_battery_clamp.scad.
// The base plate is now compact only axle dropouts + stem socket + FC mount.
//
// AXLE PROFILE (stepped D-cut, caliper-verified)
// Zone Feature Ø / Width Length
//
// Base Round (near hub) Ø 16.11 mm 15.00 mm
// D-cut Round OD Ø 15.95 mm 43.35 mm
// Flat chord 13.00 mm
// Tip Shoulder/end 3.00 mm
// Total Hub face tip 65.50 mm
// Bearing seat collar: Ø 37.8 mm
// Tire: 10 × 2.125" pneumatic (Ø 254 mm, 35 PSI)
// =============================================================================
$fn = 128;
// =============================================================================
// AXLE PARAMETERS caliper-verified
// =============================================================================
AXLE_BASE_DIA = 16.11;
AXLE_BASE_LEN = 15.00;
AXLE_DCUT_DIA = 15.95;
AXLE_DCUT_FLAT = 13.00;
AXLE_DCUT_LEN = 43.35;
AXLE_TIP_LEN = 3.00;
AXLE_TOTAL = 65.50;
BEARING_SEAT_OD = 37.80;
TIRE_OD = 254.0;
AXLE_CL_HEIGHT = TIRE_OD / 2; // 127 mm above ground
// =============================================================================
// PLATE PARAMETERS
// =============================================================================
WHEELBASE = 600.0; // mm axle C/L to axle C/L
// Plate depth now driven only by structural + FC needs (no battery footprint).
PLATE_DEPTH = 130.0; // mm front-to-rear
PLATE_OVERHANG = 40.0; // mm plate past axle C/L each side
PLATE_THICK = 6.0; // mm
// Fork slot
FORK_W = AXLE_BASE_DIA + 0.4; // 16.51 mm
FORK_DEPTH = 50.0;
// Dropout clamp (two-piece sandwich)
CLAMP_L = 80.0;
CLAMP_H = 60.0;
CLAMP_THICK = 8.0;
CLAMP_BOLT_D = 5.3; // M5
CLAMP_BOLT_DX = 22.0;
CLAMP_BOLT_DY = 22.0;
CLAMP_ALIGN_D = 4.1; // Ø4 pin
// D-cut bore clearance
DCUT_CL = 0.3;
// FC mount MAMBA F722S 30.5 × 30.5 mm M3
FC_PITCH = 30.5;
FC_HOLE_D = 3.2;
// FC is offset toward front of plate (away from stem)
FC_X_OFFSET = -40.0; // mm from plate centre (negative = front/motor side)
// =============================================================================
// STEM SOCKET PARAMETERS
// =============================================================================
STEM_OD = 38.1; // mm 1.5" EMT conduit OD
STEM_BORE = STEM_OD + 0.5; // 38.6 mm with clearance
// Flange ring (laser-cut, bolts above + below plate to grip tube):
STEM_FLANGE_OD = 82.0; // mm flange outer diameter
STEM_FLANGE_BC = 66.0; // mm bolt circle diameter (4× M5 at 90°)
STEM_FLANGE_T = 6.0; // mm = PLATE_THICK (flush-mount)
// Stem position: at plate centre (X=0, Y=0)
// =============================================================================
// UTILITIES
// =============================================================================
M3 = 3.2; M4 = 4.3; M5 = 5.3;
PLATE_X_HALF = WHEELBASE/2 + PLATE_OVERHANG; // ± 340 mm
DCUT_R = (AXLE_DCUT_DIA + 2*DCUT_CL) / 2;
DCUT_FC = AXLE_DCUT_FLAT + 2*DCUT_CL;
// =============================================================================
// RENDER CONTROL
// =============================================================================
//
// "assembly" full 3-D preview
// "plate_2d" DXF base plate
// "clamp_lower_2d" DXF lower dropout clamp (× 2)
// "clamp_upper_2d" DXF upper dropout clamp (× 2)
// "stem_flange_2d" DXF stem flange ring (× 2, one above + one below plate)
RENDER = "assembly";
if (RENDER == "assembly") {
assembly();
} else if (RENDER == "plate_2d") {
projection(cut=true) translate([0,0,-PLATE_THICK/2]) base_plate();
} else if (RENDER == "clamp_lower_2d") {
projection(cut=true) translate([0,0,-CLAMP_THICK/2]) clamp_lower();
} else if (RENDER == "clamp_upper_2d") {
projection(cut=true) translate([0,0,-CLAMP_THICK/2]) clamp_upper();
} else if (RENDER == "stem_flange_2d") {
projection(cut=true) translate([0,0,-STEM_FLANGE_T/2]) stem_flange();
}
// =============================================================================
// ASSEMBLY
// =============================================================================
module assembly() {
color("Silver", 0.85) base_plate();
for (side = [-1, 1]) {
color("SteelBlue", 0.80)
translate([side * WHEELBASE/2, 0, PLATE_THICK])
clamp_lower();
color("CornflowerBlue", 0.80)
translate([side * WHEELBASE/2, 0, PLATE_THICK + CLAMP_THICK])
clamp_upper();
}
// Stem flange rings (above and below plate)
color("DimGray", 0.70)
translate([0, 0, -STEM_FLANGE_T])
stem_flange();
color("DimGray", 0.70)
translate([0, 0, PLATE_THICK])
stem_flange();
// Reference ghosts
%color("Orange", 0.25)
translate([0, 0, PLATE_THICK + STEM_FLANGE_T])
cylinder(d=STEM_OD, h=800); // vertical stem
%for (side = [-1, 1])
color("Tomato", 0.2)
translate([side * WHEELBASE/2, 0, 0])
rotate([0, side*90, 0])
axle_ghost();
}
// =============================================================================
// BASE PLATE (Part A compact)
// =============================================================================
module base_plate() {
R = 12; // corner radius
difference() {
// Outer profile
linear_extrude(PLATE_THICK)
minkowski() {
square([2*(PLATE_X_HALF - R), PLATE_DEPTH - 2*R], center=true);
circle(r=R);
}
// Fork slots (open at ±X edges, semicircular tip)
for (side = [-1, 1]) {
translate([side*(PLATE_X_HALF - FORK_DEPTH), -FORK_W/2, -1])
cube([FORK_DEPTH + 1, FORK_W, PLATE_THICK + 2]);
translate([side*(PLATE_X_HALF - FORK_DEPTH), 0, -1])
cylinder(d=FORK_W, h=PLATE_THICK + 2);
}
// Bearing seat relief (prevents Ø37.8 mm collar binding on edge)
for (side = [-1, 1])
translate([side*PLATE_X_HALF - side*(BEARING_SEAT_OD/2 + 1),
-BEARING_SEAT_OD/2, -1])
cube([BEARING_SEAT_OD/2 + 2, BEARING_SEAT_OD, PLATE_THICK + 2]);
// Dropout clamp bolt through-holes
for (side = [-1, 1])
for (dx = [-CLAMP_BOLT_DX, CLAMP_BOLT_DX])
for (dy = [-CLAMP_BOLT_DY, CLAMP_BOLT_DY])
translate([side*WHEELBASE/2 + dx, dy, -1])
cylinder(d=CLAMP_BOLT_D, h=PLATE_THICK + 2);
// Alignment pin holes (Ø4)
for (side = [-1, 1])
for (dy = [-CLAMP_BOLT_DY + 8, CLAMP_BOLT_DY - 8])
translate([side*WHEELBASE/2, dy, -1])
cylinder(d=CLAMP_ALIGN_D, h=PLATE_THICK + 2);
// Stem socket bore
translate([0, 0, -1])
cylinder(d=STEM_BORE, h=PLATE_THICK + 2);
// Stem flange bolt holes (4× M5, 90° pattern on STEM_FLANGE_BC)
for (a = [0, 90, 180, 270])
rotate([0, 0, a])
translate([STEM_FLANGE_BC/2, 0, -1])
cylinder(d=M5, h=PLATE_THICK + 2);
// FC mount (MAMBA F722S 30.5 × 30.5 M3)
for (x = [FC_X_OFFSET - FC_PITCH/2, FC_X_OFFSET + FC_PITCH/2])
for (y = [-FC_PITCH/2, FC_PITCH/2])
translate([x, y, -1])
cylinder(d=FC_HOLE_D, h=PLATE_THICK + 2);
// Wiring / cable pass-through slots (2×, flanking stem)
for (dy = [-30, 30])
hull() {
translate([15, dy, -1]) cylinder(d=14, h=PLATE_THICK + 2);
translate([-15, dy, -1]) cylinder(d=14, h=PLATE_THICK + 2);
}
// Lightening slots (between FC zone and dropout zones)
for (sx = [-1, 1]) {
// One slot each side of stem, in the structural corridor
lx = sx * (WHEELBASE/4);
hull() {
translate([lx, -(PLATE_DEPTH/2 - 22), -1]) cylinder(d=18, h=PLATE_THICK+2);
translate([lx, (PLATE_DEPTH/2 - 22), -1]) cylinder(d=18, h=PLATE_THICK+2);
}
}
}
}
// =============================================================================
// STEM FLANGE RING (laser-cut, qty 2 one above, one below plate)
// =============================================================================
module stem_flange() {
difference() {
cylinder(d=STEM_FLANGE_OD, h=STEM_FLANGE_T);
// Stem bore (tight fit tube presses into flange)
translate([0, 0, -1])
cylinder(d=STEM_BORE, h=STEM_FLANGE_T + 2);
// 4× M5 flange bolts
for (a = [0, 90, 180, 270])
rotate([0, 0, a])
translate([STEM_FLANGE_BC/2, 0, -1])
cylinder(d=M5, h=STEM_FLANGE_T + 2);
}
}
// =============================================================================
// DROPOUT CLAMP LOWER (round bore, base-section diameter)
// =============================================================================
module clamp_lower() {
difference() {
hull() {
translate([-CLAMP_L/2 + CLAMP_H/2, 0, 0]) cylinder(d=CLAMP_H, h=CLAMP_THICK);
translate([ CLAMP_L/2 - CLAMP_H/2, 0, 0]) cylinder(d=CLAMP_H, h=CLAMP_THICK);
}
// Round bore (base zone)
translate([0, 0, -1]) cylinder(d=AXLE_BASE_DIA + 0.4, h=CLAMP_THICK + 2);
// Slide-in slot (open toward wheel side)
translate([-CLAMP_L/2 - 1, -FORK_W/2, -1])
cube([CLAMP_L/2 + 1, FORK_W, CLAMP_THICK + 2]);
// Clamp bolts
for (dx = [-CLAMP_BOLT_DX, CLAMP_BOLT_DX])
for (dy = [-CLAMP_BOLT_DY, CLAMP_BOLT_DY])
translate([dx, dy, -1]) cylinder(d=CLAMP_BOLT_D, h=CLAMP_THICK + 2);
// Alignment pins
for (dy = [-CLAMP_BOLT_DY + 8, CLAMP_BOLT_DY - 8])
translate([0, dy, -1]) cylinder(d=CLAMP_ALIGN_D, h=CLAMP_THICK + 2);
}
}
// =============================================================================
// DROPOUT CLAMP UPPER (D-cut bore, anti-rotation)
// =============================================================================
module clamp_upper() {
dcut_r = DCUT_R;
dcut_d = sqrt(pow(dcut_r, 2) - pow(DCUT_FC/2, 2));
difference() {
hull() {
translate([-CLAMP_L/2 + CLAMP_H/2, 0, 0]) cylinder(d=CLAMP_H, h=CLAMP_THICK);
translate([ CLAMP_L/2 - CLAMP_H/2, 0, 0]) cylinder(d=CLAMP_H, h=CLAMP_THICK);
}
// D-cut bore
translate([0, 0, -1])
linear_extrude(CLAMP_THICK + 2)
dcut_profile_2d(dcut_r, dcut_d);
// Slide-in slot
translate([-CLAMP_L/2 - 1, -FORK_W/2, -1])
cube([CLAMP_L/2 + 1, FORK_W, CLAMP_THICK + 2]);
// Clamp bolts
for (dx = [-CLAMP_BOLT_DX, CLAMP_BOLT_DX])
for (dy = [-CLAMP_BOLT_DY, CLAMP_BOLT_DY])
translate([dx, dy, -1]) cylinder(d=CLAMP_BOLT_D, h=CLAMP_THICK + 2);
// Alignment pins
for (dy = [-CLAMP_BOLT_DY + 8, CLAMP_BOLT_DY - 8])
translate([0, dy, -1]) cylinder(d=CLAMP_ALIGN_D, h=CLAMP_THICK + 2);
// Orientation emboss
translate([0, dcut_d + 1.5, CLAMP_THICK - 0.8])
linear_extrude(1)
polygon([[0,0],[-3,-5],[3,-5]]);
}
}
// D-cut 2D profile helper
module dcut_profile_2d(r, flat_d) {
intersection() {
circle(r=r);
translate([-r - 1, -r - 1])
square([2*(r+1), r + 1 + flat_d]);
}
}
// =============================================================================
// AXLE GHOST (visualisation only)
// =============================================================================
module axle_ghost() {
cylinder(d=BEARING_SEAT_OD, h=12);
translate([0,0,12]) cylinder(d=AXLE_BASE_DIA, h=AXLE_BASE_LEN);
translate([0,0,12+AXLE_BASE_LEN]) cylinder(d=AXLE_DCUT_DIA, h=AXLE_DCUT_LEN);
}
// =============================================================================
// DXF EXPORT
// =============================================================================
//
// Part 1 Base plate:
// openscad prototype_baseplate.scad -D 'RENDER="plate_2d"' -o baseplate.dxf
//
// Part 2 Dropout clamp, lower (× 2):
// openscad prototype_baseplate.scad -D 'RENDER="clamp_lower_2d"' -o clamp_lower.dxf
//
// Part 3 Dropout clamp, upper (× 2):
// openscad prototype_baseplate.scad -D 'RENDER="clamp_upper_2d"' -o clamp_upper.dxf
//
// Part 4 Stem flange ring (× 2, one each side of plate):
// openscad prototype_baseplate.scad -D 'RENDER="stem_flange_2d"' -o stem_flange.dxf
//
// Materials:
// Plate + flanges : 6 mm 5052-H32 aluminium (preferred)
// 8 mm clear acrylic (quick proto)
// Dropout clamps : 8 mm 6061-T6 aluminium
// Stem tube : 38.1 mm OD × 1.5 mm wall 6061-T6 (or 1.5" EMT)
// Cut stem to ~1050 mm allows batteries from ~100 mm to ~950 mm height.
// =============================================================================

View File

@ -0,0 +1,378 @@
// =============================================================================
// SaltyBot Battery Stem Clamp (Part B)
// Agent: sl-mechanical | 2026-02-28
//
// HEIGHT-ADJUSTABLE battery carousel that slides on the central vertical stem.
// 24 battery packs stand UPRIGHT, arranged radially around the mast.
//
// HOW IT WORKS
// 1. Two collar halves clamp around the stem at the desired height.
// 2. Radial arms project outward from the collar (one per battery pack).
// 3. Each arm tip has a battery cradle an upward-open U-channel that
// the pack slides into from above.
// 4. Velcro straps thread through cradle slots and cinch around the pack.
// 5. Loosen the M6 collar bolts slide up/down for CG tuning.
// Tighten locks in place.
//
// BATTERY (each pack, standing vertically):
// 420 mm tall × 88 mm wide × 56 mm deep (verified)
//
// ANGULAR LAYOUT
// BATT_COUNT = 2 arms at 90° and 270° (±Y, balanced front/rear)
// BATT_COUNT = 4 arms at 45°, 135°, 225°, 315° (each collar half owns 2)
// BATT_COUNT = 3 arms at 90°, 210°, 330°
//
// PARTS (set RENDER= to export each)
// collar_half 3D print × 2 (mirror pair, RENDER="collar_half")
// arm laser-cut or print × BATT_COUNT (RENDER="arm_2d" for DXF)
// battery_cradle 3D print × BATT_COUNT (RENDER="cradle")
//
// STEM
// 38.1 mm OD × 1.5 mm wall 6061-T6 aluminium tube (or 1.5" EMT conduit).
// Cut to ~1050 mm. Clamp can sit anywhere from 150 mm to 850 mm height.
// =============================================================================
$fn = 64;
// =============================================================================
// STEM
// =============================================================================
STEM_OD = 38.1;
STEM_BORE = STEM_OD + 0.5; // collar bore clearance
// =============================================================================
// COLLAR
// =============================================================================
COLLAR_H = 80.0; // mm taller = more grip / less slip risk
COLLAR_OD = 84.0; // mm outer diameter (wall = (8438.6)/2 22.7 mm)
// Split plane: Y = 0 (each half is the +Y or Y side)
// Clamping bolts go through both halves at (±COLLAR_BOLT_X, 0, Z)
COLLAR_BOLT_X = 24.0; // mm bolt ±X from stem axis
COLLAR_BOLT_D = 6.5; // M6 clearance
COLLAR_NUT_D = 11.0; // M6 hex nut AF + 0.5 mm tolerance (point-to-point 10.4, use 11)
COLLAR_NUT_H = 5.2; // M6 standard nut height + 0.2 mm
// Height-lock / anti-rotation set screw (M6 thread on outer face of each half)
SETSCREW_D = 6.1; // through-hole for M6 set screw
// Arm attachment pads on collar exterior (flat boss, one per arm)
ARM_PAD_W = 32.0; // mm pad width (tangential)
ARM_PAD_H = 18.0; // mm pad height
ARM_PAD_T = 4.0; // mm pad protrusion from collar surface
ARM_BOLT_D = 4.3; // M4 clearance (arm-to-collar bolt)
ARM_BOLT_SPAN = 16.0; // mm C/L-to-C/L of two arm attachment bolts
// =============================================================================
// ARMS & BATTERIES
// =============================================================================
BATT_COUNT = 4; // 2, 3, or 4
BATT_L = 420.0; // mm pack height (vertical)
BATT_W = 88.0; // mm pack width (tangential)
BATT_D = 56.0; // mm pack depth (radial, into stem)
BATT_CL = 0.8; // mm all-round clearance in cradle
ARM_REACH = 55.0; // mm collar surface battery near face
ARM_W = 28.0; // mm arm width
ARM_THICK = 8.0; // mm arm thickness (3D-print); 4 mm if laser-cut Al
ARM_CRADLE_D = 4.3; // M4 clearance (cradle-to-arm bolt)
// =============================================================================
// BATTERY CRADLE
// =============================================================================
CRADLE_H = 80.0; // mm cradle height (pack extends BATT_L-CRADLE_H above)
CRADLE_WALL = 4.5; // mm wall thickness
CRADLE_STRAP_W = 25.0; // mm Velcro strap slot width
CRADLE_STRAP_T = 6.0; // mm slot height
// =============================================================================
// ANGULAR PLACEMENT
// =============================================================================
// First arm angle chosen so all arms are clear of the Y=0 split plane
ARM_START = (BATT_COUNT == 2) ? 90 :
(BATT_COUNT == 4) ? 45 :
/* 3 */ 90 ;
// Helper: is arm i on the +Y half (side=+1) or Y half (side=1)?
// side = +1 sin(angle) >= 0
// side = -1 sin(angle) < 0
function arm_angle(i) = ARM_START + i * (360 / BATT_COUNT);
function arm_on_side(i, side) =
(side > 0) ? (sin(arm_angle(i)) >= -0.001) :
(sin(arm_angle(i)) <= 0.001);
// =============================================================================
// RENDER CONTROL
// =============================================================================
// "assembly" full 3-D preview with ghosts
// "collar_half" single collar half for printing (print 2, one mirrored)
// "arm" single arm for printing or laser-cut
// "arm_2d" 2-D DXF projection of arm
// "cradle" single battery cradle for printing
RENDER = "assembly";
if (RENDER == "assembly") {
assembly();
} else if (RENDER == "collar_half") {
collar_half(side=1);
} else if (RENDER == "arm") {
arm();
} else if (RENDER == "arm_2d") {
projection(cut=true) translate([0, 0, -ARM_THICK/2]) arm();
} else if (RENDER == "cradle") {
battery_cradle();
}
// =============================================================================
// ASSEMBLY
// =============================================================================
module assembly() {
// Collar halves
color("LightSlateGray", 0.88) collar_half(side= 1);
color("SlateGray", 0.88) collar_half(side=-1);
// Arms + cradles at each battery position
for (i = [0 : BATT_COUNT - 1]) {
a = arm_angle(i);
rotate([0, 0, a]) {
// Arm: originates at collar surface, runs along +X
color("DimGray", 0.90)
translate([COLLAR_OD/2, 0, (COLLAR_H - ARM_THICK) / 2])
arm();
// Cradle: at arm tip
color("SteelBlue", 0.85)
translate([COLLAR_OD/2 + ARM_REACH,
-(BATT_W/2 + BATT_CL + CRADLE_WALL),
(COLLAR_H - CRADLE_H) / 2])
battery_cradle();
// Battery ghost (not for export)
%color("DarkGoldenrod", 0.30)
translate([COLLAR_OD/2 + ARM_REACH + CRADLE_WALL,
-(BATT_W/2 + BATT_CL),
(COLLAR_H - CRADLE_H) / 2])
cube([BATT_D + 2*BATT_CL, BATT_W + 2*BATT_CL, BATT_L]);
}
}
// Stem ghost
%color("Gray", 0.20)
translate([0, 0, -(COLLAR_H * 2)])
cylinder(d=STEM_OD, h=COLLAR_H * 14);
}
// =============================================================================
// COLLAR HALF
// =============================================================================
// Printed flat-side-down (split face = print bed).
// Print TWO: one as-is (side=+1), one mirrored in slicer (side=1).
// They are identical; the mirror instruction handles orientation.
//
// Bolt pattern:
// 4× M6 through the flat face (2 per half at ±COLLAR_BOLT_X)
// M6 hex nut pockets on the flat face (captured before assembly)
// 1× M6 set screw on the outer curved surface (height lock)
//
// Arm attachment:
// Raised pad on outer curved surface at each arm angle for this half.
// 2× M4 through-holes per pad; M4 hex nut pocket on inside of collar wall.
module collar_half(side = 1) {
mid_z = COLLAR_H / 2;
wall_t = (COLLAR_OD - STEM_BORE) / 2;
// Half of collar: the Y0 half (side=+1) or Y0 half (side=1)
difference() {
union() {
// Half-cylinder body
intersection() {
cylinder(d=COLLAR_OD, h=COLLAR_H);
// Keep only the appropriate half
translate([-COLLAR_OD/2 - 1,
(side > 0) ? 0 : -COLLAR_OD - 1,
-1])
cube([COLLAR_OD + 2, COLLAR_OD + 1, COLLAR_H + 2]);
}
// Arm attachment pads
for (i = [0 : BATT_COUNT - 1]) {
if (arm_on_side(i, side)) {
a = arm_angle(i);
rotate([0, 0, a])
translate([COLLAR_OD/2, -ARM_PAD_W/2,
mid_z - ARM_PAD_H/2])
cube([ARM_PAD_T, ARM_PAD_W, ARM_PAD_H]);
}
}
}
// Stem bore
translate([0, 0, -1])
cylinder(d=STEM_BORE, h=COLLAR_H + 2);
// Clamping bolt holes (2× through flat split face)
// Bolt axis: along Y (perpendicular to split plane)
// Holes at (±COLLAR_BOLT_X, 0, COLLAR_H/3) and (±COLLAR_BOLT_X, 0, 2*COLLAR_H/3)
for (bx = [-COLLAR_BOLT_X, COLLAR_BOLT_X])
for (bz = [COLLAR_H/3, 2*COLLAR_H/3])
translate([bx, -1, bz])
rotate([-90, 0, 0])
cylinder(d=COLLAR_BOLT_D, h=COLLAR_OD/2 + 2);
// M6 nut pockets on outer flat face of each half
// Pocket depth = COLLAR_NUT_H from the far curved side inward.
// This allows pre-installing the nuts before bolting the halves together.
for (bx = [-COLLAR_BOLT_X, COLLAR_BOLT_X])
for (bz = [COLLAR_H/3, 2*COLLAR_H/3])
translate([bx, side * (COLLAR_OD/2 - COLLAR_NUT_H), bz])
rotate([-90, 0, 0])
cylinder(d=COLLAR_NUT_D, h=COLLAR_NUT_H + 1, $fn=6);
// Set screw hole (M6, on curved outer surface at mid-height)
translate([0, side * (COLLAR_OD/2 + 1), COLLAR_H/2])
rotate([90, 0, 0])
cylinder(d=SETSCREW_D, h=COLLAR_OD/2 + 2);
// Arm bolt holes + nut pockets (through collar wall per arm)
for (i = [0 : BATT_COUNT - 1]) {
if (arm_on_side(i, side)) {
a = arm_angle(i);
for (dy = [-ARM_BOLT_SPAN/2, ARM_BOLT_SPAN/2])
rotate([0, 0, a])
translate([STEM_BORE/2 - 1, dy, mid_z])
rotate([0, 90, 0]) {
// Through-hole (M4 clearance all the way)
cylinder(d=ARM_BOLT_D,
h=COLLAR_OD/2 - STEM_BORE/2 + ARM_PAD_T + 2);
// Nut pocket on bore interior face
cylinder(d=10, h=4.5, $fn=6);
}
}
}
}
}
// =============================================================================
// ARM
// =============================================================================
// Flat bar, ARM_REACH × ARM_W × ARM_THICK.
// Collar end: 2× M4 clearance holes at ±ARM_BOLT_SPAN/2 in Y.
// Cradle end: 2× M4 clearance holes at ±(ARM_W/2 - 8) in Y.
// Can be laser-cut from 4 mm Al plate (reduce ARM_THICK to 4 in RENDER="arm_2d").
module arm() {
difference() {
translate([0, -ARM_W/2, 0])
cube([ARM_REACH, ARM_W, ARM_THICK]);
// Collar-end bolt holes (M4, match arm pad on collar)
for (dy = [-ARM_BOLT_SPAN/2, ARM_BOLT_SPAN/2])
translate([8, dy, -1])
cylinder(d=ARM_BOLT_D, h=ARM_THICK + 2);
// Cradle-end bolt holes (M4)
for (dy = [-(ARM_W/2 - 8), ARM_W/2 - 8])
translate([ARM_REACH - 10, dy, -1])
cylinder(d=ARM_CRADLE_D, h=ARM_THICK + 2);
// Lightening slot in centre (optional reduces print material)
if (ARM_REACH > 40) {
slot_l = ARM_REACH - 34;
slot_w = ARM_W - 16;
translate([17, -slot_w/2, -1])
hull() {
translate([slot_w/2, slot_w/2, 0]) cylinder(d=slot_w/2*0.8, h=ARM_THICK+2);
translate([slot_l - slot_w/2, slot_w/2, 0]) cylinder(d=slot_w/2*0.8, h=ARM_THICK+2);
}
}
}
}
// =============================================================================
// BATTERY CRADLE
// =============================================================================
// U-channel, open top for pack insertion from above.
// Inner pocket: (BATT_D + 2*BATT_CL) radially × (BATT_W + 2*BATT_CL) tangentially.
// Cradle height CRADLE_H battery extends (BATT_L CRADLE_H) above the cradle.
//
// Strap slots: 2× horizontal slots through front+rear walls (Velcro through-pass).
// Base bolt holes: 2× M4 for arm attachment (arm bolts up through arm into cradle).
module battery_cradle() {
cw = CRADLE_WALL;
id = BATT_D + 2*BATT_CL; // inner depth (radial, +X direction)
iw = BATT_W + 2*BATT_CL; // inner width (tangential, Y direction)
difference() {
// Outer block
cube([id + 2*cw, iw + 2*cw, CRADLE_H]);
// Battery slot (open top: subtract from cw to top + 1)
translate([cw, cw, -1])
cube([id, iw, CRADLE_H + 2]);
// Strap slots through left and right walls (Y faces), 2 heights
for (sz = [CRADLE_H * 0.30, CRADLE_H * 0.65])
translate([-1, cw + (iw - CRADLE_STRAP_W) / 2, sz])
cube([id + 2*cw + 2, CRADLE_STRAP_W, CRADLE_STRAP_T]);
// Arm attachment holes in floor (2× M4)
for (dy = [cw + iw/2 - ARM_BOLT_SPAN/2,
cw + iw/2 + ARM_BOLT_SPAN/2])
translate([cw + id/2, dy, -1])
cylinder(d=ARM_CRADLE_D, h=cw + 2);
// Corner chamfers (front face aids pack insertion)
chamfer_s = 5;
for (cy = [cw - 0.01, cw + iw - chamfer_s + 0.01])
translate([cw - 0.01, cy, CRADLE_H - chamfer_s])
rotate([0, 45, 0])
cube([chamfer_s * 1.42, chamfer_s, chamfer_s * 1.42]);
}
}
// =============================================================================
// DXF / PRINT EXPORT
// =============================================================================
//
// COLLAR HALF (3D print × 2 print one as-is, mirror second in slicer):
// openscad stem_battery_clamp.scad -D 'RENDER="collar_half"' -o collar_half.stl
// Print settings: PETG, 5 perimeters, 40% infill, 0.2 mm layer, no supports needed
// (flat split face sits on bed; overhangs 45°)
//
// ARM 3D print or laser-cut × BATT_COUNT:
// Print: openscad stem_battery_clamp.scad -D 'RENDER="arm"' -o arm.stl
// Laser (DXF): openscad stem_battery_clamp.scad \
// -D 'RENDER="arm_2d"' -D 'ARM_THICK=4' -o arm.dxf
// Laser material: 4 mm 5052-H32 aluminium
//
// BATTERY CRADLE (3D print × BATT_COUNT):
// openscad stem_battery_clamp.scad -D 'RENDER="cradle"' -o cradle.stl
// Print settings: PETG, 4 perimeters, 30% infill, 0.25 mm layer
//
// =============================================================================
//
// ASSEMBLY SEQUENCE
// 1. Print collar halves × 2, cradles × BATT_COUNT.
// 2. Laser-cut (or print) arms × BATT_COUNT.
// 3. Press M4 hex nuts into collar bore-face pockets.
// 4. Wrap collar halves around stem; thread M6 bolts through both halves.
// Do not fully tighten yet position to desired height.
// 5. Bolt each arm to its collar pad (M4 × 20 SHCS from arm outward).
// 6. Bolt each cradle to its arm tip (M4 × 16 SHCS from below).
// 7. Drop battery packs into cradles from above; route Velcro straps.
// 8. Tighten M6 collar bolts ( 6 N·m each). Use M6 set screw for rotation lock.
//
// CG TUNING
// Loosen M6 collar bolts (do not fully remove). Slide entire carousel up/down.
// Re-tighten. Typical balance point: batteries at 400600 mm above base plate.
// =============================================================================