From 5f5326f9b51d00d1b91ccacbba35022d824c2959 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 21 Aug 2020 10:10:12 +0100 Subject: label everything --- 3d-print/controller.scad | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/3d-print/controller.scad b/3d-print/controller.scad index 8822336..ac0010d 100644 --- a/3d-print/controller.scad +++ b/3d-print/controller.scad @@ -1,3 +1,7 @@ +module label(string) { + translate([0,0,1.1]) linear_extrude(3) text(string,size=4,halign="center"); +} + module via() { cylinder(h=10,r=0.5,center=true,$fn=12); } @@ -8,16 +12,22 @@ module vias100mil(count) { } } +module vias100milL(count,string,hf=-1.3,vf=-2) { + vias100mil(count); + translate([vf,hf+2.54*count/2,0]) rotate([0,0,90]) label(string); +} + // TTGO T7 module esp32() { for(x=[0, 1, 10, 11]) { translate([2.54*x,0,0]) vias100mil(10); } + translate([14,15,0]) rotate([0,0,90]) label("esp"); } // https://learn.adafruit.com/stereo-3-7w-class-d-audio-amplifier/assembly module amp() { - vias100mil(9); + vias100milL(9,"amp",vf=-15); } module wire_pack() { @@ -26,9 +36,10 @@ module wire_pack() { } } -module resistors() { +module resistors(value) { wire_pack(); translate([10,0,0]) wire_pack(); + translate([7,10,0]) rotate([0,0,90]) label(value); } difference() { @@ -38,7 +49,7 @@ difference() { // with the amp vias below translate([12.5,70,0.5]) cube([15,10,3.5]); } - translate([30,67.5,0]) rotate([0,0,90]) amp(); + translate([10,67.5,0]) rotate([0,0,-90]) amp(); translate([6.25,8.5,0]) esp32(); translate([11.5,-1.5,-1]) cube([17,15,3]); @@ -48,18 +59,20 @@ difference() { // row output pins wired here // 220Ω between these // then to pins 3 of each qrd1114 - translate([5,36,0]) resistors(); + translate([5,36,0]) resistors("220Ω"); // same output pins wired here // 10k0Ω between these // then to pins 1 of each qrd1114 - translate([25,36,0]) resistors(); + translate([25,36,0]) resistors("10kΩ"); // columns: ouput pins directly to pins 2&4 of each qrd1114 // connectors for the cable - translate([5,57,0]) rotate([0,0,-90]) vias100mil(5); - translate([25,57,0]) rotate([0,0,-90]) vias100mil(5); - translate([15,60,0]) rotate([0,0,-90]) vias100mil(5); + translate([5,57,0]) rotate([0,0,-90]) vias100milL(5,"led"); + + translate([25,57,0]) rotate([0,0,-90]) vias100milL(5,"pht"); + + translate([15,60,0]) rotate([0,0,-90]) vias100milL(5,"gnd"); } -- cgit v1.2.3