From e7710563132a6edcbe6d21aa5d8caf0cf003dc58 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 9 Nov 2024 17:09:45 -0500 Subject: [PATCH] Work on adding reinforcement to the electronics mount. --- app/data/cfg.json | 2 +- app/package-lock.json | 2 +- app/package.json | 2 +- data/cfg.json | 2 +- package-lock.json | 4 +- package.json | 2 +- processing/mcopy/cfg.json | 2 +- scad/projector_controller.scad | 91 ++++++++++++++++++++++++++++++---- 8 files changed, 88 insertions(+), 19 deletions(-) diff --git a/app/data/cfg.json b/app/data/cfg.json index 087dad4..8a31903 100644 --- a/app/data/cfg.json +++ b/app/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.146", + "version": "1.8.147", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/app/package-lock.json b/app/package-lock.json index dee2c2d..19dbd8a 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.8.146", + "version": "1.8.147", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 5dd5495..f7fee18 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.8.146", + "version": "1.8.147", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/data/cfg.json b/data/cfg.json index 087dad4..8a31903 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.146", + "version": "1.8.147", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index 386451f..56e0da7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.8.146", + "version": "1.8.147", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.8.146", + "version": "1.8.147", "license": "MIT", "dependencies": { "alert": "file:app/lib/alert", diff --git a/package.json b/package.json index a5a8a3c..b137545 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.8.146", + "version": "1.8.147", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index 087dad4..8a31903 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.8.146", + "version": "1.8.147", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/scad/projector_controller.scad b/scad/projector_controller.scad index 854862a..7ab19fb 100644 --- a/scad/projector_controller.scad +++ b/scad/projector_controller.scad @@ -1,8 +1,6 @@ include ; include ; -PART="electronics_mount"; - CaseX = 121; CaseY = 172; CaseZ = 56; @@ -30,6 +28,8 @@ RelayPosition = [25, -25, 1]; ResistorPosition = [-37, 18, 0]; CapacitorPosition = [-35, -40, 0]; +ReinforcementBoltSpacingX = 65; + /** * DEBUG MODULES **/ @@ -124,18 +124,23 @@ module capacitor_debug (pos = [0, 0, 0]) { } } -module debug () { - case_debug(); - translate([0, 0, -CaseInnerZ/2+(CaseMountsH)]) electronics_mount(); - relay_module_debug([RelayPosition[0], RelayPosition[1], RelayPosition[2]-15]); - resistor_debug([ResistorPosition[0], ResistorPosition[1], ResistorPosition[2] -8]); - capacitor_debug([CapacitorPosition[0], CapacitorPosition[1], CapacitorPosition[2] - 8]); -} - /** * CASE MODULES **/ + module m3_bolt (pos = [0, 0, 0], h = 10, pad = 0) { + translate(pos) cylinder(r = R(3.25 + pad), h = h, center = true, $fn = 30); +} + +module arduino_bolts_voids (pos = [0, 0, 0], rot = [0, 0, 0], h = 10, pad = 0) { + translate(pos) rotate(rot) { + m3_bolt([-2.5, -15.25, 0], h, pad); + m3_bolt([-50.75, -14, 0], h, pad); + m3_bolt([-45.7, -66, 0], h, pad); + m3_bolt([-17.75, -66, 0], h, pad); + } +} + module arduino_mount_reinforcement () { X = 57.25; Y = 71; @@ -240,18 +245,69 @@ module capacitor_mount (pos = [0, 0, 0]) { } } +module electronics_attachment_bolt_reinforcement (pos = [0, 0, 0]) { + translate(pos) translate([-28, -4, -2]) { + translate([ReinforcementBoltSpacingX / 2, -4, 0]) { + cylinder(r = R(12), h = 5, center = true, $fn = 30); + } + translate([-ReinforcementBoltSpacingX / 2, -4, 0]) { + cylinder(r = R(12), h = 5, center = true, $fn = 30); + } + } +} + +module electronics_attachment_bolt_voids (pos = [0, 0, 0]) { + translate(pos) translate([-28, -4, 0]) { + translate([ReinforcementBoltSpacingX / 2, -4, 0]) { + cylinder(r = R(3.25), h = 20 + 1, center = true, $fn = 30); + translate([0, 0, -4]) m3_nut(); + translate([6, 0, 0]) cylinder(r = R(3.25), h = 20 + 1, center = true, $fn = 30); + + } + translate([-ReinforcementBoltSpacingX / 2, -4, 0]) { + cylinder(r = R(3.25), h = 20 + 1, center = true, $fn = 30); + translate([0, 0, -4]) m3_nut(); + } + } +} + +//BOM: 4, M3 hex cap bolt 8mm,N/A,Attach Arduino Uno module electronics_mount () { difference () { union() { case_mounts([0, 0, 0]); translate(ArduinoPosition) { - scale([1.02, 1.02, 1]) rotate([0, 0, 180]) bumper(); + rotate([0, 0, 180]) bumper(); arduino_mount_reinforcement(); } relay_mount(RelayPosition); resistor_mount(ResistorPosition); capacitor_mount(CapacitorPosition); + electronics_attachment_bolt_reinforcement(ArduinoPosition); } + arduino_bolts_voids(ArduinoPosition); + electronics_attachment_bolt_voids(ArduinoPosition); + } + //translate([35.1, 76.8, 4.5]) rotate([0, 0, 180]) arduino(); +} + +module electronics_attachment () { + difference () { + cube([70, 16, 19.75], center = true); + translate([1/2, 0, -15.5]) cube([58, 20 + 1, 20], center = true); + translate([5.5, 0, -11.5]) cube([48, 20 + 1, 20], center = true); + translate([11.75, 00, -4.5]) cube([13, 20 + 1, 20], center = true); + translate([-18, 00, -5]) cube([10, 20 + 1, 20], center = true); + translate([ReinforcementBoltSpacingX / 2, 0, 0]) { + cylinder(r = R(3.25), h = 20 + 1, center = true, $fn = 30); + translate([0, 0, 10]) cylinder(r = R(6.5), h = 20 , center = true, $fn = 30); + } + translate([-ReinforcementBoltSpacingX / 2, 0, 0]) { + cylinder(r = R(3.25), h = 20 + 1, center = true, $fn = 30); + translate([0, 0, 10]) cylinder(r = R(6.5), h = 20 , center = true, $fn = 30); + } + arduino_bolts_voids([28, 6.5, 0], h = 20, pad = 5); + } } @@ -263,8 +319,21 @@ module usb_protector () { } } +module debug () { + case_debug(); + translate([0, 0, -CaseInnerZ/2+(CaseMountsH)]) electronics_mount(); + relay_module_debug([RelayPosition[0], RelayPosition[1], RelayPosition[2]-15]); + resistor_debug([ResistorPosition[0], ResistorPosition[1], ResistorPosition[2] -8]); + capacitor_debug([CapacitorPosition[0], CapacitorPosition[1], CapacitorPosition[2] - 8]); + translate(ArduinoPosition) translate([-27.5, -8, -10]) electronics_attachment(); +} + +PART="electronics_mount"; + if (PART == "electronics_mount") { electronics_mount(); +} else if (PART == "electronics_attachment") { + electronics_attachment(); } else if (PART == "case_mounts") { case_mounts(); } else if (PART == "usb_protector") {