aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2020-08-20 14:07:21 +0100
committerdakkar <dakkar@thenautilus.net>2020-08-20 14:07:21 +0100
commit116748d9c72e9c2397c05544335d5f0eab32d4ff (patch)
tree02c7759099632cdae751012d190d8a33fb81537e
parentignore more things (diff)
downloadlego-piano-116748d9c72e9c2397c05544335d5f0eab32d4ff.tar.gz
lego-piano-116748d9c72e9c2397c05544335d5f0eab32d4ff.tar.bz2
lego-piano-116748d9c72e9c2397c05544335d5f0eab32d4ff.zip
printed holder for the sensors
-rw-r--r--3d-print/.gitignore1
-rw-r--r--3d-print/qrd-holder.scad60
2 files changed, 61 insertions, 0 deletions
diff --git a/3d-print/.gitignore b/3d-print/.gitignore
new file mode 100644
index 0000000..b662cb0
--- /dev/null
+++ b/3d-print/.gitignore
@@ -0,0 +1 @@
+/*.stl \ No newline at end of file
diff --git a/3d-print/qrd-holder.scad b/3d-print/qrd-holder.scad
new file mode 100644
index 0000000..fcda4ee
--- /dev/null
+++ b/3d-print/qrd-holder.scad
@@ -0,0 +1,60 @@
+use </home/dakkar/3d-models/Lego/LEGO.scad/LEGO.scad>;
+
+
+module qrd1114() {
+ /*
+ 4 holes, 0.4mm diameter, rectangle
+
+ o-o 3.3
+ | |
+ o-o
+
+ 3
+
+ the holes' diameter is larger because:
+
+ - my printer can't reliably print holes smaller than 1 (which
+ ends up being about .4 anyway)
+
+ - there's a "end bump" on the stems of the sensor, and I need
+ those to go through the hole as well
+ */
+
+ width=3;
+ height=3.3;
+ diam=1.2;
+ radius=diam/2;
+
+ module via() {
+ translate([0,0,-5]) cylinder(h=10,r=radius,center=false,$fn=12);
+ }
+
+ place(0.5,0.5) {
+ for (x=[-0.5,0.5],y=[-0.5,0.5]) {
+ translate([x*width,y*height]) via();
+ }
+ }
+}
+
+length=6;
+width=2;
+
+sensors=[0, 1.5, 2.5, 3.5, 5];
+
+difference() {
+ uncenter(width,length) block(
+ type="baseplate",
+ width=width,
+ length=length,
+ roadway_width=1,
+ roadway_length=60,
+ roadway_x=0,
+ // my printer makes the studs slightly small
+ stud_rescale=0.49/0.48
+ );
+ for (x=sensors) {
+ place(0,x) qrd1114();
+ }
+}
+
+