Skip to content

Instantly share code, notes, and snippets.

@hedefalk
Created February 15, 2017 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedefalk/74cdf38cc3cb7f855e743bc8d5c8b389 to your computer and use it in GitHub Desktop.
Save hedefalk/74cdf38cc3cb7f855e743bc8d5c8b389 to your computer and use it in GitHub Desktop.
OctoPI mount
*color("red") translate([-5, 96.5, 0]) rotate([90, 0, 0])
import("/Users/viktor/Downloads/Support.STL");
*color("red") translate([-80, 96.5, 0]) rotate([90, 0, 0])
import("/Users/viktor/Downloads/Support.STL");
hole_height = 5;
M3_diam = 2.8;
module raised_hole(innerdiam) {
difference() {
cylinder(h = hole_height, d1 = 8, d2 = 6, $fn = 20);
cylinder(h = hole_height, d = innerdiam, $fn = 10);
}
}
module M3_hole() {
raised_hole(M3_diam);
}
module M25_hole() {
raised_hole(2.5); // Drilled to 2.75 on PI, needs to be less here?
}
module M3_just_hole() {
cylinder(h = hole_height, d = M3_diam, $fn = 10);
}
module UM2_plate() {
r = M3_diam/2;
pad = 10;
translate([0, 90, 0]) rotate([0, 0, -90]) linear_extrude(3) {
minkowski() {
polygon(points = [[0, 0], [29.5 + r, 94.2], [67.5 + r, -10.8]]);
circle(5);
}
}
}
module UM2_holes() {
translate([0, 90, 0]) rotate([0, 0, -90]) {
// 94.2, 29.5 + r,
// 67.5+r, -10.8
M3_just_hole();
translate([29.5 + M3_diam/2, 94.2, 0]) M3_just_hole();
translate([67.5 + M3_diam/2, -10.8, 0]) M3_just_hole();
}
}
module PI_mount() {
// 58*49
// https://www.raspberrypi.org/documentation/hardware/raspberrypi/mechanical/RPI-3B-V1_2.pdf
// size 85*56
translate([0, 20, 0]) {
M25_hole();
translate([49, 0, 0]) M25_hole();
translate([0, 58, 0]) M25_hole();
translate([49, 58, 0]) M25_hole();
}
translate([-4, -5, 0]) rounded_plate(56, 85);
}
module rounded_plate(width, height) {
linear_extrude(3) minkowski() {
square([width, height]);
circle(5);
}
}
module relay_mount() {
//holes 20.5*28
// 26*34 size
M3_hole();
translate([20.5, 0, 0]) M3_hole();
translate([0, 28, 0]) M3_hole();
translate([20.5, 28, 0]) M3_hole();
translate([-20, -3, 0]) rounded_plate(40, 50);
}
module step_down_mount() {
// two diagonal holes 34 mm.
// 16^2+30^2 = 34^2
// 21*43 size
M3_hole();
translate([16, 30, 0]) M3_hole();
translate([-2.5, 0, 0]) rounded_plate(21, 38);
}
difference() {
union() {
translate([-2, 6, 0]) PI_mount();
translate([72, 10, 0]) relay_mount();
translate([90, 65, 0]) rotate([0, 0, 90]) step_down_mount();
UM2_plate();
}
UM2_holes();
linear_extrude(5) {
translate([3, 8]) circle(10);
translate([27, 8]) circle(10);
translate([46, 8]) circle(7);
translate([23, 50]) circle(28);
translate([70, 60]) circle(15);
translate([64, 24]) circle(12);
translate([86, 24]) circle(8);
translate([8, 83]) circle(5);
translate([20, 84]) circle(4);
translate([30, 84]) circle(4);
translate([40, 84]) circle(3);
translate([47, 75]) circle(5);
translate([84, 80]) circle(6);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment