// definitions
InterCellGap = 1.0;
EPS_SUB = 0.1;
///////////////////////////////////////////////////
// FREY CELL DEFINITION
// Body
// Vent
// Terminal Components
// Base
// Pad
// Pedestal
// Post
CellBodyWidth = 130.4;
CellBodyDepth = 36.22;
CellBodyHeight = 270;
CellTerminalOffset = 74;
CellTerminalBaseWidth = 30.55;
CellTerminalBaseDepth = 25.6;
CellTerminalBaseHeight = 1.3;
CellTerminalPadDiameter = 5.82;
CellTerminalPadHeight = 0.8;
CellTerminalPadWidthSpace = 21.08;
CellTerminalPadDepthSpace = 16.08;
CellTerminalPedestalDiameter = 16.0;
CellTerminalPedestalHeight = 1.43;
CellTerminalPostDiameter = 9.65;
CellTerminalPostHeight = 15.0;
CellVentPortDiameterA = 13;
CellVentPortDiameterB = 5.2;
CellVentPortHeight = 1.3;
module CellBody()
{
color(c = [0.2,0.4,0.95,1])
{
cube([CellBodyWidth,CellBodyDepth,CellBodyHeight],center=true);
}
color(c = [0,0,0,1])
{
translate([0,0,CellBodyHeight*0.5+0.05])
{
cube([CellBodyWidth,CellBodyDepth,0.05], center=true);
}
}
}
module CellTerminalBase()
{
cube([CellTerminalBaseWidth,CellTerminalBaseDepth,CellTerminalBaseHeight],center=true);
}
module CellTerminalPad()
{
cylinder(h = CellTerminalPadHeight, d = CellTerminalPadDiameter, $fn=32, center = true);
}
module CellTerminalPads()
{
for(i=[-1:2:1])
{
for(j=[-1:2:1])
{
translate([i*CellTerminalPadWidthSpace*0.5,j*CellTerminalPadDepthSpace*0.5,0])
{
CellTerminalPad();
}
}
}
}
module CellTerminalPedestal()
{
cylinder(h = CellTerminalPedestalHeight, d = CellTerminalPedestalDiameter, $fn=64, center = true);
}
module CellTerminalPost()
{
cylinder(h = CellTerminalPostHeight, d = CellTerminalPostDiameter, $fn=64, center = true);
}
module CellTerminalComplete()
{
translate([0,0,CellTerminalBaseHeight*0.5])
{
CellTerminalBase();
}
translate([0,0,CellTerminalBaseHeight+CellTerminalPadHeight*0.5])
{
CellTerminalPads();
}
translate([0,0,CellTerminalBaseHeight+CellTerminalPedestalHeight*0.5])
{
CellTerminalPedestal();
}
translate([0,0,CellTerminalBaseHeight+CellTerminalPedestalHeight+CellTerminalPostHeight*0.5])
{
CellTerminalPost();
}
}
module CellTerminals()
{
for(i=[-1:2:1])
{
translate([CellTerminalOffset*0.5*i,0,0])
{
CellTerminalComplete();
}
}
}
module CellComplete()
{
translate([0,0,CellBodyHeight*0.5])
{
CellBody();
}
translate([0,0,CellBodyHeight])
{
CellTerminals();
}
}
module CellEightPack()
{
CELLS = 8;
for(i=[-ceil(CELLS/2-0.5):1:floor(CELLS/2-0.5)])
{
translate([0,(CellBodyDepth+InterCellGap)*i,0])
{
CellComplete();
}
}
}
// end frey cell definition
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
// JBD BMS DEFINITION
BMSTotalWidth = 102;
BMSTotalDepth = 138;
BMSTotalHeight = 16.5;
BMSPCBHeight = 1.6;
BMSHeatSinkHeight = 1.9;
BMSHeatSinkIndentOffsetA = 10;
BMSHeatSinkIndentWidthA = 25;
BMSHeatSinkIndentDepthA = 71.0;
BMSHeatSinkIndentWidthB = 82;
BMSHeatSinkIndentDepthB = 15.45;
BMSMountPostOuterDiameter = 4.0;
BMSMountPostInnerDiameter = 2.45;
BMSMountPostIndentWidthA = 4.765;
BMSMountPostIndentDepthA = 5.155;
BMSMountPostIndentDepthB = (BMSHeatSinkIndentOffsetA + BMSHeatSinkIndentDepthA + BMSMountPostIndentDepthA) - (BMSTotalDepth*0.5);
BMSTerminalPostWidth = 14.7;
BMSTerminalPostDepth = 14.7;
BMSTerminalPostHeight = 8.0;
BMSTerminalPostThickness = 1.4;
BMSTerminalPostIndentWidth = 4.10;
BMSTerminalPostIndentDepth = 38.6;
//BMSTerminalPostSpacingDepth = 34.5;
BMSTerminalPostInsetDepth = 47.0;
BMSTerminalPostSpacingDepth = 32.4;
BMSTerminalPostHoleDiameter = 4.8;
module BMSCircuitBoard()
{
color(c=[0.1,0.5,0.1,1])
{
cube([BMSTotalWidth,BMSTotalDepth,BMSPCBHeight],center=true);
}
}
module BMSHeatSinkBase()
{
cube([BMSTotalWidth,BMSTotalDepth,BMSHeatSinkHeight],center=true);
}
module BMSHeatSinkNegativeSpace()
{
translate([0,0,0])
{
// larger indent pair on sides for BMS terminals
for(i=[-1:2:1])
{
translate([
(BMSTotalWidth*0.5-BMSHeatSinkIndentWidthA*0.5)*i,
-(BMSTotalDepth*0.5-BMSHeatSinkIndentDepthA*0.5)+BMSHeatSinkIndentOffsetA,
0
])
{
cube([BMSHeatSinkIndentWidthA+EPS_SUB,BMSHeatSinkIndentDepthA,BMSHeatSinkHeight*2],center=true);
}
}
// single indent on bottom edge for BMS communication ports
translate([0,BMSTotalDepth*0.5-BMSHeatSinkIndentDepthB*0.5,0])
{
cube([BMSHeatSinkIndentWidthB,BMSHeatSinkIndentDepthB+EPS_SUB,BMSHeatSinkHeight*2],center=true);
}
}
}
module BMSHeatSink()
{
color(c=[0.6,0.6,0.6,1])
{
difference()
{
BMSHeatSinkBase();
BMSHeatSinkNegativeSpace();
}
}
}
module BMSMountPost()
{
cylinder(h=BMSTotalHeight, d = BMSMountPostOuterDiameter, center=true);
}
module BMSMountPostLayout()
{
for(i=[-1:2:1])
{
translate([i*(BMSTotalWidth*0.5-BMSMountPostIndentDepthA),-BMSTotalDepth*0.5+BMSMountPostIndentDepthA, 0.5])
{
BMSMountPost();
}
translate([i*(BMSTotalWidth*0.5-BMSMountPostIndentDepthA),BMSMountPostIndentDepthB, 0.5])
{
BMSMountPost();
}
translate([i*(BMSTotalWidth*0.5-BMSMountPostIndentDepthA),BMSTotalDepth*0.5-BMSMountPostIndentDepthA, 0.5])
{
BMSMountPost();
}
}
}
module BMSTerminalPost()
{
// BMSTerminalPostWidth = 14.7;
// BMSTerminalPostDepth = 14.7;
// BMSTerminalPostHeight = 8.0;
// BMSTerminalPostThickness = 1.4;
translate([0,0,0])
{
difference()
{
// primary post structure
translate([0,0,BMSTerminalPostHeight*0.5])
{
cube([BMSTerminalPostWidth,BMSTerminalPostDepth,BMSTerminalPostHeight], center=true);
}
// negative space subtracted
union()
{
translate([0,0,BMSTerminalPostHeight*0.5])
{
cube([
BMSTerminalPostWidth+EPS_SUB,
BMSTerminalPostDepth-BMSTerminalPostThickness,
BMSTerminalPostHeight-BMSTerminalPostThickness
], center=true);
}
cylinder(h=40, d = BMSTerminalPostHoleDiameter, center=true, $fn=32);
}
}
}
}
module BMSTerminalLayout()
{
// width : i
for(i=[-1:2:1])
{
// depth : j
for(j=[-1:2:1])
{
OffsetWidth = BMSTotalWidth - BMSTerminalPostIndentWidth - BMSTerminalPostWidth;
OffsetDepth = BMSTotalHeight*0.5 - BMSTerminalPostIndentDepth;
// BMSTerminalPostInsetDepth = 55.0;
// BMSTerminalPostSpacingDepth = 32.4;
// translate([i*OffsetWidth*0.5,j*0-BMSTotalDepth*0.5+BMSTerminalPostInsetDepth])
translate([i*OffsetWidth*0.5, -BMSTotalDepth*0.5+BMSTerminalPostInsetDepth + j*BMSTerminalPostSpacingDepth*0.5])
{
BMSTerminalPost();
}
}
}
}
module BMSComplete()
{
BMSCircuitBoard();
translate([0,0,7.6])
{
BMSHeatSink();
}
translate([0,0,-6.7])
{
BMSHeatSink();
}
BMSMountPostLayout();
BMSTerminalLayout();
}
/// end JBD BMS definition
//////////////////////////////////////////////////////////////
CellEightPack();
translate([120,0,CellBodyHeight*1.25])
{
BMSComplete();
}