-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix front panel height. Add screw hole for debug panel (on top chassi…
…s). Rework of screws connecting bottom and top chassis. Add PCB mounting screw. Add PCB support bars. Refactor by splitting models to separate files and submodules. Related to #50.
- Loading branch information
1 parent
dc4a741
commit c814658
Showing
6 changed files
with
351 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// This is model of bottom chassis. | ||
|
||
module ChassisBottom_FrontPanel(Height) | ||
{ | ||
translate([-PCB_X/2 - CHASSIS_THICKNESS-COMPONENT_TOLERANCE, | ||
-PCB_Y/2, | ||
Height]) | ||
{ | ||
GenericFrontPanel(); | ||
} | ||
} | ||
|
||
module ChassisBottom_SupportAroundPCB() | ||
{ | ||
linear_extrude(height = 2*CHASSIS_THICKNESS+PCB_Z_OFFSET, convexity = 10, twist = 0) | ||
{ | ||
square([PCB_X+2*COMPONENT_TOLERANCE, CHASSIS_THICKNESS]); | ||
} | ||
} | ||
|
||
module ChassisBottom_SupportsAroundPCB() | ||
{ | ||
translate([-PCB_X/2 -COMPONENT_TOLERANCE, | ||
-PCB_Y/2-CHASSIS_THICKNESS-COMPONENT_TOLERANCE, | ||
0]) | ||
{ | ||
ChassisBottom_SupportAroundPCB(); | ||
} | ||
|
||
translate([-PCB_X/2 - COMPONENT_TOLERANCE, | ||
PCB_Y/2+COMPONENT_TOLERANCE, | ||
0]) | ||
{ | ||
ChassisBottom_SupportAroundPCB(); | ||
} | ||
} | ||
|
||
module ChassisBottom_PCBMountingHole() | ||
{ | ||
translate([0, | ||
0, | ||
CHASSIS_THICKNESS]) | ||
{ | ||
GenericChassis_InsertNutSocket(PCB_Z_OFFSET, false); | ||
} | ||
} | ||
|
||
module ChassisBottom_PCBBottomHolder() | ||
{ | ||
PCBBottomHolderThickness = 2; | ||
|
||
linear_extrude(height = PCB_Z_OFFSET, convexity = 10, twist = 0) | ||
{ | ||
square([PCBBottomHolderThickness, PCB_Y]); | ||
} | ||
} | ||
|
||
module ChassisBottom_PCBBottomHolders() | ||
{ | ||
translate([-PCB_X/2, | ||
-PCB_Y/2, | ||
CHASSIS_THICKNESS]) | ||
{ | ||
ChassisBottom_PCBBottomHolder(); | ||
} | ||
|
||
translate([PCB_X/2-1, | ||
-PCB_Y/2, | ||
CHASSIS_THICKNESS]) | ||
{ | ||
ChassisBottom_PCBBottomHolder(); | ||
} | ||
} | ||
|
||
module ChassisBottom(Height) | ||
{ | ||
difference() | ||
{ | ||
union() | ||
{ | ||
GenericChassis(Height); | ||
ChassisBottom_FrontPanel(Height); | ||
ChassisBottom_SupportsAroundPCB(); | ||
ChassisBottom_PCBMountingHole(); | ||
ChassisBottom_PCBBottomHolders(); | ||
|
||
InsertNutSockets(Height, false); | ||
} | ||
|
||
// add mounting for top and bottom chassis | ||
InsertNutSockets(Height, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
// This is model of top chassis. | ||
|
||
// below values are taken from KiCad model | ||
|
||
SCREW_CONNECTOR_DX = 10 + COMPONENT_TOLERANCE; | ||
SCREW_CONNECTOR_Y = 1 - COMPONENT_TOLERANCE; | ||
SCREW_CONNECTOR_DY = 20.668 + 2*COMPONENT_TOLERANCE; | ||
|
||
AdcPowerSupplyYOffset = PCB_X/2 | ||
- SCREW_CONNECTOR_DX | ||
+ CHASSIS_THICKNESS | ||
- COMPONENT_TOLERANCE; | ||
|
||
module ChassisTop_WallsAroundADCAndPowerSupplySocket(Height) | ||
{ | ||
linear_extrude(height = Height, convexity = 10, twist = 0) | ||
{ | ||
translate([AdcPowerSupplyYOffset, | ||
-SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y - CHASSIS_THICKNESS, | ||
0]) | ||
{ | ||
square([SCREW_CONNECTOR_DX + COMPONENT_TOLERANCE, CHASSIS_THICKNESS]); | ||
} | ||
|
||
translate([AdcPowerSupplyYOffset, | ||
-SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y + SCREW_CONNECTOR_DY, | ||
0]) | ||
{ | ||
square([SCREW_CONNECTOR_DX + COMPONENT_TOLERANCE, CHASSIS_THICKNESS]); | ||
} | ||
|
||
translate([AdcPowerSupplyYOffset, | ||
-SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y, | ||
0]) | ||
{ | ||
square([CHASSIS_THICKNESS, SCREW_CONNECTOR_DY + CHASSIS_THICKNESS]); | ||
} | ||
} | ||
} | ||
|
||
module ChassisTop_SupportFrontPanel() | ||
{ | ||
translate([-PCB_X/2 -COMPONENT_TOLERANCE, | ||
-PCB_Y/2, | ||
CHASSIS_THICKNESS]) | ||
{ | ||
linear_extrude(height = CHASSIS_THICKNESS, convexity = 10, twist = 0) | ||
{ | ||
square([CHASSIS_THICKNESS, PCB_Y]); | ||
} | ||
} | ||
|
||
} | ||
|
||
module ChassisTop_DebugPanelMountingScrewSupport() | ||
{ | ||
|
||
DebugPanelSupportSize = 10; | ||
|
||
translate([-PCB_X/2+DEBUG_CONNECTOR_X+DEBUG_CONNECTOR_DX/2, | ||
-PCB_Y/2+DEBUG_CONNECTOR_DY/2+COMPONENT_TOLERANCE, | ||
0]) | ||
{ | ||
difference() | ||
{ | ||
union() | ||
{ | ||
translate([0,DebugPanelSupportSize/2,0]) | ||
{ | ||
linear_extrude(height = CHASSIS_THICKNESS+INSERT_NUT_LENGTH, convexity = 10, twist = 0) | ||
{ | ||
square([INSERT_NUT_HOLDER_DIAMETER, DebugPanelSupportSize], center=true); | ||
} | ||
} | ||
GenericChassis_InsertNutSocket(CHASSIS_THICKNESS+INSERT_NUT_LENGTH, false); | ||
} | ||
|
||
// add hole for debug socket screw | ||
linear_extrude(height = CHASSIS_THICKNESS+INSERT_NUT_LENGTH, convexity = 10, twist = 0) | ||
{ | ||
circle(r=INSERT_NUT_RADIUS); | ||
} | ||
} | ||
} | ||
} | ||
|
||
module Chassis3DTop(Height) | ||
{ | ||
difference() | ||
{ | ||
union() | ||
{ | ||
GenericChassis(Height); | ||
ChassisTop_DebugPanelMountingScrewSupport(); | ||
} | ||
|
||
// add hole for ADC and power supply socket | ||
translate([AdcPowerSupplyYOffset, | ||
-SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y, | ||
0]) | ||
{ | ||
linear_extrude(height = Height, convexity = 10, twist = 0) | ||
{ | ||
square([SCREW_CONNECTOR_DX + CHASSIS_THICKNESS, SCREW_CONNECTOR_DY]); | ||
} | ||
} | ||
|
||
// add hole for flashing and UART sockets | ||
DebugPanel(Height); | ||
|
||
// add hole for front pannel | ||
translate([-PCB_X/2 - CHASSIS_THICKNESS-COMPONENT_TOLERANCE, | ||
-PCB_Y/2, | ||
CHASSIS_THICKNESS]) | ||
{ | ||
GenericFrontPanel(); | ||
} | ||
} | ||
|
||
ChassisTop_WallsAroundADCAndPowerSupplySocket(Height); | ||
ChassisTop_SupportFrontPanel(); | ||
|
||
// add nounting screws | ||
InsertNutSockets(Height, false); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
module Chassis2DQuarter(Thickness) | ||
{ | ||
CHASSIS_X = PCB_X/2 + COMPONENT_TOLERANCE + Thickness; | ||
CHASSIS_Y = PCB_Y/2 + COMPONENT_TOLERANCE + Thickness; | ||
|
||
polygon(points=[ | ||
[0, 0], | ||
[CHASSIS_X, 0], | ||
[CHASSIS_X, CHASSIS_Y + CHASSIS_CORNER_DIAMETER/2 - Thickness/2], | ||
[CHASSIS_X - CHASSIS_CORNER_RADIUS - CHASSIS_THICKNESS/2, CHASSIS_Y + CHASSIS_CORNER_DIAMETER], | ||
[0, CHASSIS_Y + CHASSIS_CORNER_DIAMETER], | ||
]); | ||
|
||
translate([CHASSIS_X - CHASSIS_THICKNESS - INSERT_NUT_RADIUS, | ||
CHASSIS_Y + INSERT_NUT_RADIUS, | ||
0]) | ||
{ | ||
circle(r=INSERT_NUT_RADIUS + CHASSIS_THICKNESS); | ||
} | ||
} | ||
|
||
module Chassis2DHalf(Thickness) | ||
{ | ||
Chassis2DQuarter(Thickness); | ||
|
||
rotate([180, 0, 0]) | ||
{ | ||
Chassis2DQuarter(Thickness); | ||
} | ||
} | ||
|
||
module GenericChassis2D(Thickness) | ||
{ | ||
Chassis2DHalf(Thickness); | ||
|
||
rotate([0, 180, 0]) | ||
{ | ||
Chassis2DHalf(Thickness); | ||
} | ||
} | ||
|
||
|
||
|
||
module GenericChassis_InsertNutSocket(Height, isFull) | ||
{ | ||
linear_extrude(height = Height, convexity = 10, twist = 0) | ||
{ | ||
difference() | ||
{ | ||
if(!isFull) | ||
{ | ||
circle(r=INSERT_NUT_RADIUS + CHASSIS_THICKNESS); | ||
} | ||
|
||
circle(r=INSERT_NUT_RADIUS); | ||
} | ||
} | ||
} | ||
|
||
module InsertNutSockets(Height, isFull) | ||
{ | ||
Thickness = CHASSIS_THICKNESS; | ||
CHASSIS_X = PCB_X/2 + COMPONENT_TOLERANCE + Thickness; | ||
CHASSIS_Y = PCB_Y/2 + COMPONENT_TOLERANCE + Thickness; | ||
|
||
translate([CHASSIS_X - Thickness - INSERT_NUT_RADIUS, | ||
CHASSIS_Y + INSERT_NUT_RADIUS, | ||
0]) | ||
{ | ||
GenericChassis_InsertNutSocket(Height, isFull); | ||
} | ||
|
||
translate([CHASSIS_X - Thickness - INSERT_NUT_RADIUS, | ||
-CHASSIS_Y - INSERT_NUT_RADIUS, | ||
0]) | ||
{ | ||
GenericChassis_InsertNutSocket(Height, isFull); | ||
} | ||
|
||
translate([-CHASSIS_X + Thickness + INSERT_NUT_RADIUS, | ||
CHASSIS_Y + INSERT_NUT_RADIUS, | ||
0]) | ||
{ | ||
GenericChassis_InsertNutSocket(Height, isFull); | ||
} | ||
|
||
translate([-CHASSIS_X + Thickness + INSERT_NUT_RADIUS, | ||
-CHASSIS_Y - INSERT_NUT_RADIUS, | ||
0]) | ||
{ | ||
GenericChassis_InsertNutSocket(Height, isFull); | ||
} | ||
} | ||
|
||
module GenericChassis(Height) | ||
{ | ||
difference() | ||
{ | ||
linear_extrude(height = Height, convexity = 10, twist = 0) | ||
{ | ||
GenericChassis2D(CHASSIS_THICKNESS); | ||
} | ||
|
||
translate([0, 0, CHASSIS_THICKNESS]) | ||
{ | ||
linear_extrude(height = Height - CHASSIS_THICKNESS, convexity = 10, twist = 0) | ||
{ | ||
GenericChassis2D(0); | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This is model of panel where BNC, LCD and encoder are. | ||
|
||
module GenericFrontPanel() | ||
{ | ||
linear_extrude(height = TOP_CHASSIS_HEIGHT-CHASSIS_THICKNESS, convexity = 10, twist = 0) | ||
{ | ||
square([CHASSIS_THICKNESS, PCB_Y]); | ||
} | ||
} |
Oops, something went wrong.