1.1 --- a/cartridge.scad Tue Oct 07 19:42:36 2014 +0200
1.2 +++ b/cartridge.scad Tue Oct 07 22:32:35 2014 +0200
1.3 @@ -26,9 +26,20 @@
1.4 TOP_LABEL_INSET = 1;
1.5 GROOVE = 1;
1.6
1.7 + /*
1.8 + Options for checking. Some useful combinations...
1.9 +
1.10 + Check feature alignment: APART = 0; BACK_SURFACE = 0; FRONT_SURFACE = 0;
1.11 + Check PCB alignment: PCB = 1; BACK_SURFACE = 0;
1.12 + */
1.13 +
1.14 BACK = 1; BACK_SURFACE = 1;
1.15 FRONT = 1; FRONT_SURFACE = 1;
1.16 +
1.17 + /* For printing: APART = 1; PCB = 0; */
1.18 +
1.19 APART = 1;
1.20 + PCB = 0;
1.21
1.22 /*
1.23 Rounding/fillet radius and additional margin of subtracted
1.24 @@ -112,6 +123,7 @@
1.25 height = top + int_payload_height + bottom + int_connector_height;
1.26 depth = int_depth + front + back;
1.27 int_payload_upper_extent = height / 2 - top;
1.28 + int_payload_lower_extent = -height / 2 + int_connector_height + bottom;
1.29
1.30 /* Cartridge surfaces. */
1.31
1.32 @@ -235,7 +247,7 @@
1.33 pcb_front_support_height = pcb_back_support_height;
1.34
1.35 /*
1.36 - Features measured from the Stardot Dual ROM Adaptor cartridge board
1.37 + Features measured from the Stardot Dual ROM Adaptor cartridge board
1.38 dimensions diagram. Offsets are from inside the bottom "floor".
1.39 */
1.40
1.41 @@ -257,7 +269,7 @@
1.42 pcb_lug_inner_radius = 1.0;
1.43 pcb_lug_outer_radius = 5.5 / 2;
1.44 pcb_lug_offset_from_bottom = 14.35;
1.45 - pcb_lug_offset_from_outside = 7.55;
1.46 + pcb_lug_offset_from_inside = 5.55;
1.47
1.48 pcb_lug_cross_width = 6.7;
1.49 pcb_lug_cross_depth = pcb_back_support_depth;
1.50 @@ -285,7 +297,7 @@
1.51 translate([xdir *
1.52 pcb_support_offset_from_centre,
1.53 edge_connector_cutout_back_depth,
1.54 - -height / 2 + bottom + int_connector_height])
1.55 + int_payload_lower_extent])
1.56 justify(pcb_back_support_width,
1.57 pcb_back_support_depth,
1.58 pcb_back_support_height,
1.59 @@ -323,10 +335,9 @@
1.60
1.61 module pcb_lug(xdir) {
1.62 translate([xdir *
1.63 - (width/2 - pcb_lug_offset_from_outside),
1.64 + (int_width / 2 - pcb_lug_offset_from_inside),
1.65 back_depth,
1.66 - -height / 2 + bottom + int_connector_height +
1.67 - pcb_lug_offset_from_bottom
1.68 + int_payload_lower_extent + pcb_lug_offset_from_bottom
1.69 ])
1.70 rotate([90, 0, 0])
1.71 difference() {
1.72 @@ -347,10 +358,9 @@
1.73
1.74 module pcb_front_lug(xdir) {
1.75 translate([xdir *
1.76 - (width/2 - pcb_lug_offset_from_outside),
1.77 + (int_width / 2 - pcb_lug_offset_from_inside),
1.78 -int_front_depth + pcb_front_lug_depth,
1.79 - -height / 2 + bottom + int_connector_height +
1.80 - pcb_lug_offset_from_bottom
1.81 + int_payload_lower_extent + pcb_lug_offset_from_bottom
1.82 ])
1.83 rotate([90, 0, 0])
1.84 difference() {
1.85 @@ -394,7 +404,7 @@
1.86
1.87 /* Floor of cartridge. */
1.88
1.89 - cube_at(width, int_front_depth, bottom,
1.90 + cube_at(int_width, int_front_depth, bottom,
1.91 0, -1, 1,
1.92 0, 0, -height / 2 + int_connector_height);
1.93
1.94 @@ -427,7 +437,7 @@
1.95 -1, -1, 1,
1.96 -pcb_support_offset_from_centre,
1.97 0,
1.98 - -height / 2 + bottom + int_connector_height);
1.99 + int_payload_lower_extent);
1.100
1.101 cube_at(pcb_front_support_width,
1.102 pcb_front_support_depth,
1.103 @@ -435,7 +445,7 @@
1.104 1, -1, 1,
1.105 pcb_support_offset_from_centre,
1.106 0,
1.107 - -height / 2 + bottom + int_connector_height);
1.108 + int_payload_lower_extent);
1.109
1.110 /* Circular "lugs" to hold PCBs in place. */
1.111
1.112 @@ -567,7 +577,7 @@
1.113
1.114 /* Floor of cartridge. */
1.115
1.116 - cube_at(width, int_back_depth, bottom,
1.117 + cube_at(int_width, int_back_depth, bottom,
1.118 0, 1, 1,
1.119 0, 0, -height / 2 + int_connector_height);
1.120
1.121 @@ -735,6 +745,94 @@
1.122 fillet(rr, height);
1.123 }
1.124 }
1.125 +
1.126 + /* PCB for checking. */
1.127 +
1.128 + pcb_width = 84.85; pcb_height = 62.5; pcb_depth = 1;
1.129 + edge_connector_width = 56.5; edge_connector_height = 11.85;
1.130 + pcb_position_y = int_payload_lower_extent;
1.131 +
1.132 + pcb_left_hole_offset = pcb_back_support_left_bump_offset_from_bottom
1.133 + + 0.55;
1.134 + pcb_left_hole_width = 2.2;
1.135 + pcb_left_hole_height = pcb_back_support_left_bump_height - 0.55 * 2;
1.136 + pcb_left_hole_offset_from_centre = pcb_support_offset_from_centre +
1.137 + pcb_back_support_width / 2 - pcb_left_hole_width / 2;
1.138 +
1.139 + pcb_right_hole_offset = pcb_back_support_right_bump_offset_from_bottom
1.140 + + 0.55;
1.141 + pcb_right_hole_width = pcb_left_hole_width;
1.142 + pcb_right_hole_height = pcb_back_support_right_bump_height - 0.55 * 2;
1.143 + pcb_right_hole_offset_from_centre = -pcb_left_hole_offset_from_centre;
1.144 +
1.145 + pcb_hole_depth = pcb_depth + 0.2;
1.146 + pcb_hole_start_depth = -0.1;
1.147 + pcb_lug_hole_radius = 3.75;
1.148 +
1.149 + if (PCB)
1.150 + translate([back_displacement, 0, 0])
1.151 + translate([0, 0, pcb_position_y])
1.152 + difference() {
1.153 +
1.154 + /* Mock PCB. */
1.155 +
1.156 + union() {
1.157 + cube_at(pcb_width, pcb_depth,
1.158 + pcb_height - edge_connector_height,
1.159 + 0, 1, 1,
1.160 + 0, 0, 0);
1.161 + cube_at(edge_connector_width, pcb_depth,
1.162 + edge_connector_height,
1.163 + 0, 1, -1,
1.164 + 0, 0, 0);
1.165 + }
1.166 +
1.167 + /* Holes for mounting. */
1.168 +
1.169 + union() {
1.170 + cube_at(pcb_left_hole_width, 1, pcb_left_hole_height,
1.171 + 1, 1, 1,
1.172 + pcb_left_hole_offset_from_centre, 0, pcb_left_hole_offset);
1.173 + translate([pcb_left_hole_offset_from_centre +
1.174 + pcb_left_hole_width / 2, pcb_hole_start_depth, pcb_left_hole_offset])
1.175 + rotate([-90, 0, 0])
1.176 + cylinder(h=pcb_hole_depth, r=pcb_left_hole_width / 2);
1.177 + translate([pcb_left_hole_offset_from_centre +
1.178 + pcb_left_hole_width / 2, pcb_hole_start_depth,
1.179 + pcb_left_hole_offset + pcb_left_hole_height])
1.180 + rotate([-90, 0, 0])
1.181 + cylinder(h=pcb_hole_depth, r=pcb_left_hole_width / 2);
1.182 + }
1.183 +
1.184 + union() {
1.185 + cube_at(pcb_right_hole_width, 1, pcb_right_hole_height,
1.186 + -1, 1, 1,
1.187 + pcb_right_hole_offset_from_centre, 0, pcb_right_hole_offset);
1.188 + translate([pcb_right_hole_offset_from_centre -
1.189 + pcb_right_hole_width / 2, pcb_hole_start_depth, pcb_right_hole_offset])
1.190 + rotate([-90, 0, 0])
1.191 + cylinder(h=pcb_hole_depth, r=pcb_right_hole_width / 2);
1.192 + translate([pcb_right_hole_offset_from_centre -
1.193 + pcb_right_hole_width / 2, pcb_hole_start_depth,
1.194 + pcb_right_hole_offset + pcb_right_hole_height])
1.195 + rotate([-90, 0, 0])
1.196 + cylinder(h=pcb_hole_depth, r=pcb_right_hole_width / 2);
1.197 + }
1.198 +
1.199 + /* Holes for lugs. */
1.200 +
1.201 + translate([
1.202 + -int_width / 2 + pcb_lug_offset_from_inside,
1.203 + pcb_hole_start_depth, pcb_lug_offset_from_bottom])
1.204 + rotate([-90, 0, 0])
1.205 + cylinder(h=pcb_hole_depth, r=pcb_lug_hole_radius);
1.206 +
1.207 + translate([
1.208 + int_width / 2 - pcb_lug_offset_from_inside,
1.209 + pcb_hole_start_depth, pcb_lug_offset_from_bottom])
1.210 + rotate([-90, 0, 0])
1.211 + cylinder(h=pcb_hole_depth, r=pcb_lug_hole_radius);
1.212 + }
1.213 }
1.214
1.215 cartridge();