First draft of Rebel case

This commit is contained in:
Matt McWilliams 2023-03-28 19:41:35 -04:00
parent 5f941e91b5
commit 7813a8c904
2 changed files with 836 additions and 8 deletions

View File

@ -1,13 +1,29 @@
include <./arduino.scad>;
include <./nano.scad>;
include <./common/common.scad>;
CaseX = 40;
afficher_nano = "x";
CaseX = 64;
CaseY = 85;
CaseZ = 35;
CaseD = 8;
CaseSplitZ = 30;
RelayModuleX = 28;
RelayModuleY = 40;
RelayModuleZ = 1.6;
RelayModulePosition = [12, -5, -9];
ArduinoNanoPosition = [-17, 17, -(CaseZ/2) + 8];
AudioJackPosition = [15, CaseY/2, 0];
ButtonPosition = [-15, -CaseY/2, 0];
LEDPosition = [15, -CaseY/2, 0];
module arduino_nano_mount (pos = [0, 0, 0]) {
X = 18.2;
Y = 43.9;
@ -15,7 +31,7 @@ module arduino_nano_mount (pos = [0, 0, 0]) {
BOARD_Z = 1.5;
translate(pos) difference () {
//outer
cube([X + 4, Y + 4, Z], center = true);
cube([X + 6, Y + 6, Z], center = true);
//inner void minus corners
difference () {
cube([X - 1, Y - 1, Z + 1], center = true);
@ -31,6 +47,15 @@ module arduino_nano_mount (pos = [0, 0, 0]) {
}
}
module usb_mini_void (pos = [0, 0, 0]) {
translate(pos) {
translate([0, 25, 2]) {
cube([8, 10, 5], center = true);
translate([0, 5, 0]) cube([12, 10, 8], center = true);
}
}
}
module case_shell (pos = [0,0,0]) {
$fn = 50;
translate(pos) difference () {
@ -43,6 +68,24 @@ module case_shell (pos = [0,0,0]) {
}
}
module audio_jack_void (pos = [0, 0, 0]) {
$fn = 60;
translate(pos) rotate([90, 0, 0]) {
cylinder(r = R(7.7), h = 8, center = true);
translate([0, 0, -3]) cylinder(r = R(10), h = 8, center = true);
}
}
module button_void (pos = [0, 0, 0]) {
D = 6.9;
translate(pos) rotate([90, 0, 0]) cylinder(r = R(D), h = 10, center = true, $fn = 60);
}
module LED_void (pos = [0, 0, 0]) {
D = 5.1;
translate(pos) rotate([90, 0, 0]) cylinder(r = R(D), h = 10, center = true, $fn = 60);
}
module case_bottom () {
difference () {
union () {
@ -53,9 +96,15 @@ module case_bottom () {
//bolt
//translate([0, BoltY, -(CaseZ/2)+(3.5/2)-0.01]) cylinder(r = R(5.6), h = 3.5, center = true, $fn = 30);
//bolt_void([0, BoltY, -(CaseZ/2)], 20);
//usb mini
usb_mini_void(ArduinoNanoPosition);
audio_jack_void (AudioJackPosition);
button_void(ButtonPosition);
LED_void(LEDPosition);
}
esp32_mount(ESP32Position);
arduino_nano_mount(ArduinoNanoPosition);
relay_module_mount(RelayModulePosition);
}
module case_top () {
@ -73,12 +122,51 @@ module case_top () {
}
}
module debug () {
case_bottom();
module relay_module_mount (pos = [0, 0, 0]) {
Z = 7;
translate(pos) translate([0, 0, -(Z/2) + (RelayModuleZ/2)]) rotate([0, 0, 180]) {
difference() {
cube([RelayModuleX + 6, RelayModuleY + 4, Z], center = true);
translate([0, -2, 0]) cube([RelayModuleX - 4, RelayModuleY - 8, Z + 1], center = true);
cube([14.75, RelayModuleY - 3, Z + 1], center = true);
translate([0, 0, (Z/2) - (RelayModuleZ/2)]) cube([RelayModuleX+ 0.2, RelayModuleY + 0.2, RelayModuleZ + 0.1], center = true);
}
translate([(RelayModuleX/2) - 3.5, (RelayModuleY/2) - 3.5, Z/2]) cylinder(r = R(2.6), h = RelayModuleZ + 1, center = true, $fn = 40);
translate([-(RelayModuleX/2) + 3.5, (RelayModuleY/2) - 3.5, Z/2]) cylinder(r = R(2.6), h = RelayModuleZ + 1, center = true, $fn = 40);
}
}
if (PART == "case_bottom") {
module debug_relay_module (pos = [0, 0, 0]) {
translate(pos) {
difference () {
union () {
cube([RelayModuleX, RelayModuleY, RelayModuleZ], center = true);
//relay
translate([0, 0, (15.5/2) + (RelayModuleZ/2)]) cube([15.25, 18.8, 15.5], center = true);
//terminal
translate([0, -(RelayModuleY/2) + (7.75/2), (10/2) + (RelayModuleZ/2)]) cube([15.6, 7.75, 10], center = true);
}
translate([(RelayModuleX/2) - 3.5, (RelayModuleY/2) - 3.5, 0]) cylinder(r = R(2.9), h = RelayModuleZ + 1, center = true, $fn = 40);
translate([-(RelayModuleX/2) + 3.5, (RelayModuleY/2) - 3.5, 0]) cylinder(r = R(2.9), h = RelayModuleZ + 1, center = true, $fn = 40);
}
}
}
module debug () {
difference () {
case_bottom();
//translate([(CaseX/2)+20, 0, 0]) cube([CaseX, CaseY + 1, CaseZ + 1], center = true);
}
translate([0, 0, 4]) translate(ArduinoNanoPosition) rotate([0, 0, 90]) nano_328_v1();
debug_relay_module(RelayModulePosition);
}
PART = "case_top";
if (PART == "case_bottom") {
case_bottom();
} else if (PART == "case_top") {
case_top();
} else {
debug();
}

740
scad/nano.scad Normal file
View File

@ -0,0 +1,740 @@
//Arduino Nano 328 et 168
//______________________VARIABLES___________________________________________
afficher_nano ="o"; //"o","n"
type_nano ="t"; //1,2,3,4,"t","n"
afficher_pin = "o";//"o","n"
rotation_360 ="f"; //"x","y","z","f","n"
mouvement_hauteur = "n";//"o","n"
longueur = 43.10;
largeur = 17.65;
epaisseur = 1.55;
//______________________CONDITIONS/MOUVEMENTS______________________________
if(afficher_nano =="o")
{
if(rotation_360=="x" && mouvement_hauteur=="n")rotate([360*$t,0,0])
{
modele_nano();
}
else if(rotation_360=="y" && mouvement_hauteur=="n")rotate([0,360*$t,0])
{
modele_nano();
}
else if(rotation_360=="z"&& mouvement_hauteur=="n" )rotate([0,0,360*$t])
{
modele_nano();
}
if(rotation_360=="x" && mouvement_hauteur=="o")rotate([360*$t,0,0]) translate([0,0,-50]) translate([0,0,50.3*$t])
{
modele_nano();
}
else if(rotation_360=="y" && mouvement_hauteur=="o")rotate([0,360*$t,0]) translate([0,0,-50]) translate([0,0,50.3*$t])
{
modele_nano();
}
else if(rotation_360=="z"&& mouvement_hauteur=="o" )rotate([0,0,360*$t]) translate([0,0,-50]) translate([0,0,50.3*$t])
{
modele_nano();
}
else if(rotation_360=="n" && mouvement_hauteur=="o") translate([0,0,-50]) translate([0,0,50.3*$t])
{
modele_nano();
}
else if(rotation_360=="f")
{
modele_nano();
}
else
{
}
}
//______________________MODULES___________________________________________
module modele_nano()
{
if(type_nano==1)nano_328_v1();
if(type_nano==2)nano_328_v2();
if(type_nano==3)nano_168_v1();
if(type_nano==4)nano_168_v2();
if(type_nano=="t")
{
nano_328_v1();
translate([0,25,0]) nano_328_v2();
translate([0,50,0]) nano_168_v1();
translate([0,75,0]) nano_168_v2();
}
}
module nano_328_v1()
{
difference()
{
//plaque
color("blue") translate([0,0,epaisseur/2]) cube([longueur,largeur,epaisseur],center=true);
for (i = [-7:7])
{
//trous à gauche
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-7:7])
{
//trous à droite
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-1:1])
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessous
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessus
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessous
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessus
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
translate([19,4.6,2.6]) cube([3.1,1.6,2],center=true);
translate([-19+6.6,2.55,2.6]) cube([3.1,1.6,2],center=true);
color("black") translate([-19+6.6,-2.5,2.6]) cube([3.1,6.8,2],center=true);
color("black") translate([8.6,0,2.6]) cube([10,3.8,2],center=true);
color("grey") translate([-2.54*2+1.60,0,-0.5]) cube([3.7,6.5,1],center=true);
color("white") translate([-2.54*2+1.60,0,-0.85]) cube([3.7/2,6.5/2,1],center=true);
color("black") translate([6,0,-0.34]) rotate([0,0,45]) cube([7.5,7.5,0.7],center=true);
for (i = [-1:2])
{
//trous icsp
color("lightblue") translate([-12.0,i*1.94-0.96,-0.3/2]) cube([2.4,1.1,0.3],center=true);
}
//sortie USB
difference()
{
color("orange") translate([16.5+1.1,0,-4.15/2]) cube([9.2,7.8,4.15],center=true);
color("lightblue") translate([16.9+5+1.1,0,-4.15/2]) cube([9.2,7.8-1.5,3.0],center=true);
}
module pin_15()
{
for (i = [-7:7])
{
//pins à droite
color("lightblue")translate ([i*2.54,largeur/2-1.2, 4/3.5+2.30]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
}
//pins à gauche
for (i = [-7:7])
{
color("lightblue")translate ([i*2.54,-largeur/2+1.2, 4/3.5+2.30]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
}
for (i = [-7:7])
{
color("black")translate ([i*2.54,-largeur/2+1.2,(4/3.5)+1.51]) cube ([2.40+0.10,2.40,2.30], center=true );
}
for (i = [-7:7])
{
color("black")translate ([i*2.54,largeur/2-1.2,(4/3.5)+1.51]) cube ([2.40+0.10,2.40,2.30], center=true );
}
for (i = [-1:1])
{
// pins icsp
color("lightblue")translate ([-longueur/2+1.2,i*2.54,-1.90]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
color("lightblue")translate ([-longueur/2+1.2+2.54,i*2.54,-1.90]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
}
for (i = [-1:1])
{
color("black")translate ([-longueur/2+1.2+2.54,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30], center=true );
color("black")translate ([-longueur/2+1.2,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30], center=true );
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey")translate ([i*2.54,-largeur/2+1.2,-21.95]) translate([0,0,20]) cylinder($fa=12,$fn=60,h=1.93,r1=0.6,r2=1.1,center=false);
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey")translate ([i*2.54,largeur/2-1.2,-21.95]) translate([0,0,20]) cylinder($fa=12,$fn=60,h=1.93,r1=0.6,r2=1.1,center=false);
}
//soudure cylindrique icsp
for (i = [-1:1])
{
color("grey")translate([-longueur/2+1.2,i*2.54,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
color("grey")translate([-longueur/2+1.2+2.54,i*2.54,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
}
if(afficher_pin=="o")pin_15();
}
module nano_328_v2()
{
difference()
{
//plaque
color("blue") translate([0,0,epaisseur/2]) cube([longueur,largeur,epaisseur],center=true);
for (i = [-7:7])
{
//trous à gauche
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-7:7])
{
//trous à droite
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-1:1])
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessous
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessus
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessous
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessus
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
translate([19,4.6,2.6]) cube([3.1,1.6,2],center=true);
translate([-19+6.6,2.55,2.6]) cube([3.1,1.6,2],center=true);
color("black") translate([-19+6.6,-2.5,2.6]) cube([3.1,6.8,2],center=true);
color("black") translate([8.6,0,2.6]) cube([10,3.8,2],center=true);
color("grey") translate([-2.54*2+1.60,0,-0.5]) cube([3.7,6.5,1],center=true);
color("white") translate([-2.54*2+1.60,0,-0.85]) cube([3.7/2,6.5/2,1],center=true);
color("black") translate([6,0,-0.34]) rotate([0,0,45]) cube([7.5,7.5,0.7],center=true);
for (i = [-1:2])
{
//trous icsp
color("lightblue") translate([-12.0,i*1.94-0.96,-0.3/2]) cube([2.4,1.1,0.3],center=true);
}
//sortie USB
difference()
{
color("orange") translate([16.5+1.1,0,-4.15/2]) cube([9.2,7.8,4.15],center=true);
color("lightblue") translate([16.9+5+1.1,0,-4.15/2]) cube([9.2,7.8-1.5,3.0],center=true);
}
module pin_15()
{
for (i = [-7:7])
{
//pins à droite
color("lightblue")translate ([i*2.54,largeur/2-1.2,-1.90]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
}
//pins à gauche
for (i = [-7:7])
{
color("lightblue")translate ([i*2.54,-largeur/2+1.2,-1.90]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
}
for (i = [-7:7])
{
color("black")translate ([i*2.54,-largeur/2+1.2,-(4/3.5)]) cube ([2.40+0.10,2.40,2.30], center=true );
}
for (i = [-7:7])
{
color("black")translate ([i*2.54,largeur/2-1.2,-(4/3.5)]) cube ([2.40+0.10,2.40,2.30], center=true );
}
for (i = [-1:1])
{
// pins icsp
color("lightblue")translate ([-longueur/2+1.2,i*2.54,-1.90]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
color("lightblue")translate ([-longueur/2+1.2+2.54,i*2.54,-1.90]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
}
for (i = [-1:1])
{
color("black")translate ([-longueur/2+1.2+2.54,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30], center=true);
color("black")translate ([-longueur/2+1.2,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30], center=true);
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey")translate ([i*2.54,-largeur/2+1.2,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey")translate ([i*2.54,largeur/2-1.2,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
//soudure cylindrique icsp
for (i = [-1:1])
{
color("grey")translate([-longueur/2+1.2,i*2.54,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
color("grey")translate([-longueur/2+1.2+2.54,i*2.54,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
}
if(afficher_pin=="o")pin_15();
}
module nano_168_v1()
{
difference()
{
//plaque
color("blue") translate([0,0,epaisseur/2]) cube([longueur,largeur,epaisseur],center=true);
for (i = [-7:7])
{
//trous à gauche
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-7:7])
{
//trous à droite
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-1:1])
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessous
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessus
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessous
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessus
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
color("black") translate([-19+4.8,0,-0.25]) cube([4.6,2.35,1.25],center=true);
color("black") translate([3.9,0,-1.0]) cube([3.8,10,2],center=true);
color("grey") translate([-2.54*4+0.2,0,-0.5]) cube([3.20,4.00,1],center=true);
color("black")translate ([-2.54*4+0.2,0, -0.85]) cylinder (r=0.80, h=1.25, $fn=60, center=true);
color("black") translate([-3.1,0,-0.34]) rotate([0,0,45]) cube([5.5,5.5,0.7],center=true);
for (i = [-1:0])
{
//trous icsp
color("lightblue") translate([-13.1,i*1.30+4.30,-0.3/2]) cube([2.4,1.0,0.3],center=true);
}
for (i = [-1:0])
{
//trous icsp
color("lightblue") translate([-9.6,i*1.30+5.60,-0.3/2]) cube([2.4,1.0,0.3],center=true);
}
//sortie USB
difference()
{
color("orange") translate([16.5+1.1,0,-4.15/2]) cube([9.2,7.8,4.15],center=true);
color("lightblue") translate([16.9+5+1.1,0,-4.15/2]) cube([9.2,7.8-1.5,3.0],center=true);
}
module pin_15()
{
for (i = [-7:7])
{
//pins à droite
color("lightblue") translate([i*2.54,largeur/2-1.2, 4/3.5+2.30]) cylinder (r=0.35,h=10.95,$fn=60,center=true);
}
//pins à gauche
for (i = [-7:7])
{
color("lightblue") translate([i*2.54,-largeur/2+1.2, 4/3.5+2.30]) cylinder (r=0.35,h=10.95,$fn=60,center=true);
}
for (i = [-7:7])
{
color("black") translate([i*2.54,-largeur/2+1.2,(4/3.5)+1.51]) cube ([2.40+0.10,2.40,2.30],center=true);
}
for (i = [-7:7])
{
color("black") translate([i*2.54,largeur/2-1.2,(4/3.5)+1.51]) cube ([2.40+0.10,2.40,2.30],center=true);
}
for (i = [-1:1])
{
// pins icsp
color("lightblue") translate([-longueur/2+1.2,i*2.54,-1.90]) cylinder (r=0.35,h=10.95,$fn=60,center=true);
color("lightblue") translate([-longueur/2+1.2+2.54,i*2.54,-1.90]) cylinder (r=0.35,h=10.95,$fn=60,center=true);
}
for (i = [-1:1])
{
color("black") translate([-longueur/2+1.2+2.54,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30],center=true);
color("black") translate([-longueur/2+1.2,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30],center=true);
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey") translate([i*2.54,-largeur/2+1.2,-21.95]) translate([0,0,20]) cylinder($fa=12,$fn=60,h=1.93,r1=0.6,r2=1.1,center=false);
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey") translate([i*2.54,largeur/2-1.2,-21.95]) translate([0,0,20]) cylinder($fa=12,$fn=60,h=1.93,r1=0.6,r2=1.1,center=false);
}
//soudure cylindrique icsp
for (i = [-1:1])
{
color("grey")translate([-longueur/2+1.2,i*2.54,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
color("grey")translate([-longueur/2+1.2+2.54,i*2.54,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
}
if(afficher_pin=="o")pin_15();
}
module nano_168_v2()
{
difference()
{
//plaque
color("blue") translate([0,0,epaisseur/2]) cube([longueur,largeur,epaisseur],center=true);
for (i = [-7:7])
{
//trous à gauche
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-7:7])
{
//trous à droite
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
for (i = [-1:1])
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-1:1])
{
difference()
{
//trous icsp
translate([-longueur/2+1.2,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
difference()
{
translate([-longueur/2+1.2+2.54,i*2.54,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([-longueur/2+1.2+2.54,i*2.54,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessous
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à gauche dessus
difference()
{
color("DarkGray") translate([i*2.54,largeur/2-1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,largeur/2-1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessous
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,epaisseur-0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
for (i = [-7:7])
{
//trous à droite dessus
difference()
{
color("DarkGray") translate([i*2.54,-largeur/2+1.2,0.0499]) cylinder(r=0.45+0.1,h=0.1,$fn=60,center=true);
translate([i*2.54,-largeur/2+1.2,epaisseur/2]) cylinder(r=0.45,h=4,$fn=60,center=true);
}
}
color("black") translate([-19+4.8,0,-0.25]) cube([4.6,2.35,1.25],center=true);
color("black") translate([3.9,0,-1.0]) cube([3.8,10,2],center=true);
color("grey") translate([-2.54*4+0.2,0,-0.5]) cube([3.20,4.00,1],center=true);
color("black")translate ([-2.54*4+0.2,0, -0.85]) cylinder (r=0.80, h=1.25, $fn=60, center=true);
color("black") translate([-3.1,0,-0.34]) rotate([0,0,45]) cube([5.5,5.5,0.7],center=true);
for (i = [-1:0])
{
//trous icsp
color("lightblue") translate([-13.1,i*1.30+4.30,-0.3/2]) cube([2.4,1.0,0.3],center=true);
}
for (i = [-1:0])
{
//trous icsp
color("lightblue") translate([-9.6,i*1.30+5.60,-0.3/2]) cube([2.4,1.0,0.3],center=true);
}
//sortie USB
difference()
{
color("orange") translate([16.5+1.1,0,-4.15/2]) cube([9.2,7.8,4.15],center=true);
color("lightblue") translate([16.9+5+1.1,0,-4.15/2]) cube([9.2,7.8-1.5,3.0],center=true);
}
module pin_15()
{
for (i = [-7:7])
{
//pins à droite
color("lightblue") translate([i*2.54,largeur/2-1.2,-1.90]) cylinder(r=0.35, h=10.95, $fn=60,center=true);
}
//pins à gauche
for (i = [-7:7])
{
color("lightblue") translate([i*2.54,-largeur/2+1.2,-1.90]) cylinder(r=0.35, h=10.95, $fn=60,center=true);
}
for (i = [-7:7])
{
color("black") translate([i*2.54,-largeur/2+1.2,-(4/3.5)]) cube([2.40+0.10,2.40,2.30],center=true);
}
for (i = [-7:7])
{
color("black") translate([i*2.54,largeur/2-1.2,-(4/3.5)]) cube([2.40+0.10,2.40,2.30],center=true);
}
for (i = [-1:1])
{
// pins icsp
color("lightblue") translate([-longueur/2+1.2,i*2.54,-1.90]) cylinder (r=0.35, h=10.95, $fn=60, center=true);
color("lightblue") translate([-longueur/2+1.2+2.54,i*2.54,-1.90]) cylinder (r=0.35, h=10.95, $fn=60,center=true);
}
for (i = [-1:1])
{
color("black") translate([-longueur/2+1.2+2.54,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30], center=true );
color("black") translate([-longueur/2+1.2,i*2.54,-(4/3.5)]) cube([2.40+0.10,2.40,2.30], center=true );
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey") translate([i*2.54,-largeur/2+1.2,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
//soudure cylindrique à gauche
for (i = [-7:7])
{
color("grey") translate([i*2.54,largeur/2-1.2,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
//soudure cylindrique icsp
for (i = [-1:1])
{
color("grey") translate([-longueur/2+1.2,i*2.54,1.55]) cylinder($fa=12, $fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
color("grey") translate([-longueur/2+1.2+2.54,i*2.54,1.55]) cylinder($fa=12,$fn=60,h=1.93,r1=1.1,r2=0.6,center=false);
}
}
if(afficher_pin=="o")pin_15();
}