aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2020-08-20 16:19:29 +0100
committerdakkar <dakkar@thenautilus.net>2020-08-20 16:19:29 +0100
commit33a2af7c697cc21a37e73907d725f3caec217057 (patch)
tree33188808bc0726f237a75a1117a8f6ef2fc93ad5
parentjust submodule, it's easier (diff)
downloadlego-piano-33a2af7c697cc21a37e73907d725f3caec217057.tar.gz
lego-piano-33a2af7c697cc21a37e73907d725f3caec217057.tar.bz2
lego-piano-33a2af7c697cc21a37e73907d725f3caec217057.zip
the other board
-rw-r--r--3d-print/controller.scad50
-rw-r--r--wiring.rst.txt41
2 files changed, 91 insertions, 0 deletions
diff --git a/3d-print/controller.scad b/3d-print/controller.scad
new file mode 100644
index 0000000..cf8a850
--- /dev/null
+++ b/3d-print/controller.scad
@@ -0,0 +1,50 @@
+module via() {
+ cylinder(h=10,r=1,center=true,$fn=12);
+}
+
+// TTGO T7
+module esp32() {
+ for(x=[0, 1, 10, 11]) {
+ for(y=[0 : 9]) {
+ translate([2.54*x,2.54*y,0]) via();
+ }
+ }
+}
+
+// https://learn.adafruit.com/stereo-3-7w-class-d-audio-amplifier/assembly
+module amp() {
+ for(x=[0 : 8]) {
+ translate([0,2.54*x,0]) via();
+ }
+}
+
+module wire_pack() {
+ for(x=[0 : 4]) {
+ translate([0,4*x,0]) via();
+ }
+}
+
+difference() {
+ cube([40,80,1.25]);
+
+ translate([6.25,5,0]) esp32();
+
+ // rows
+
+ // row output pins wired here
+ translate([5,35,0]) wire_pack();
+ // 220Ω between these
+ translate([15,35,0]) wire_pack();
+ // these go to pins 3 of each qrd1114
+
+ // same output pins wired here
+ translate([25,35,0]) wire_pack();
+ // 10k0Ω between these
+ translate([35,35,0]) wire_pack();
+ // these go to pins 1 of each qrd1114
+
+ // columns: ouput pins directly to pins 2&4 of each qrd1114
+
+
+ translate([30,60,0]) rotate([0,0,90]) amp();
+}
diff --git a/wiring.rst.txt b/wiring.rst.txt
new file mode 100644
index 0000000..9280536
--- /dev/null
+++ b/wiring.rst.txt
@@ -0,0 +1,41 @@
+25 sensors
+
+5 rows × 5 columns
+
+pins (`see SparkFun`_)::
+
+ 14
+ 23
+
+1. phototransistor collector, to pull-up for row
+2. phototransistor emitter, to ground for column
+3. led anode, to limiter for row
+4. led cathode, to ground for column
+
+so…
+
+::
+
+ aM aM aM aM aM cN cN cN cN cN
+ 14 14 14 14 14 14 14 14 14 14 …
+ 23 23 23 23 23 23 23 23 23 23 …
+ Mb Mb Mb Mb Mb Nd Nd Nd Nd Nd
+
+
+ /---------- input1
+ a -+-10kΩ--+- output1
+ b ---220Ω--/
+
+ /---------- input2
+ c -+-10kΩ--+- output2
+ d ---220Ω--/
+
+ …
+ …
+
+ M ------------ output6
+ N ------------ output7
+
+
+.. `see SparkFun`:
+ https://learn.sparkfun.com/tutorials/qrd1114-optical-detector-hookup-guide/all