Sfoglia il codice sorgente

wip

* changed license for scad files from AGPL to CC0
* added inner top and backing plate
* export hacking for gcode feed and speed
* .gitignore to ignore some cruft (gnuplot and gcode files)
clementinecomputing 6 anni fa
parent
commit
514b8ede38

+ 6 - 0
.gitignore

@@ -28,3 +28,9 @@ send_magstripe
 config.log
 config.status
 libtool
+
+# cruft from OpenSCAD conversion to NGC and related formats
+#
+*.gp
+*.ngc
+

+ 7 - 20
experiment/production/housing/v2/PopufareHousingBack.scad

@@ -1,23 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
-
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 include <PopufareHousingCommon.scad>
 

+ 7 - 20
experiment/production/housing/v2/PopufareHousingBottom.scad

@@ -1,23 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
-
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 include <PopufareHousingCommon.scad>
 

+ 71 - 25
experiment/production/housing/v2/PopufareHousingCommon.scad

@@ -1,22 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 $fs = 1.0/64.0;
 
@@ -28,15 +16,18 @@ POPUFARE_HOUSING_DEPTH = 180;
 //POPUFARE_HOUSING_HEIGHT = 150;
 POPUFARE_HOUSING_HEIGHT = 150;
 
-POPUFARE_GLAND_DIAMETER = 31.5;
-POPUFARE_SCREEN_WIDTH = 118;
-POPUFARE_SCREEN_HEIGHT = 70;
+POPUFARE_GLAND_DIAMETER = 37;
+POPUFARE_SCREEN_WIDTH = 118 + 1;
+POPUFARE_SCREEN_OUTER_WIDTH = 122;
+POPUFARE_SCREEN_HEIGHT = 70 + 1;
+POPUFARE_SCREEN_OUTER_HEIGHT = 78;
 
 //POPUFARE_FRONT_HEIGHT = 35;
 POPUFARE_FRONT_HEIGHT = 60;
 
-POPUFARE_FIXTURE_DX = 42.5;
-POPUFARE_FIXTURE_DY = 42.5;
+POPUFARE_FIXTURE_DX = 65;
+POPUFARE_FIXTURE_DY = 65;
+POPUFARE_FIXTURE_SCREW_D = 7.5;
 
 POPUFARE_BRACKET_CX = 20;
 POPUFARE_BRACKET_D = 5;
@@ -44,6 +35,38 @@ POPUFARE_BRACKET_D = 5;
 POPUFARE_BRACKET_DS = 100;
 POPUFARE_BRACKET_DE = 40;
 
+POPUFARE_INNER_PLATE_WIDTH = 90;
+POPUFARE_INNER_PLATE_HEIGHT = 70;
+
+POPUFARE_INNER_PLATE_HOLE_WIDTH = POPUFARE_SCREEN_OUTER_WIDTH + 0;
+POPUFARE_INNER_PLATE_HOLE_HEIGHT = POPUFARE_SCREEN_OUTER_HEIGHT + 20;
+
+// Raspberry Pi measurements
+//
+_RASPBERRY_PI_B_HOLE_DX = 58;
+_RASPBERRY_PI_B_HOLE_DY = 48;
+
+_SCREEN_HOLE_DX = 93;
+_SCREEN_HOLE_DY = 69;
+
+
+// Center for raspberry pi from screen
+// that sits on top of it.
+//
+_SCREEN_OUTER_CENTER = [ POPUFARE_SCREEN_OUTER_WIDTH/2, POPUFARE_SCREEN_OUTER_HEIGHT/2 ];
+
+// offset of left screen m2 screws
+// as seen from the back, front ribbon down
+//
+_SCREEN_LL_M2_C = [ 5,5 ];
+_SCREEN_UL_M2_C = [ 5, POPUFARE_SCREEN_OUTER_HEIGHT - 4 ];
+
+_SCREEN_CX = _SCREEN_HOLE_DX/2 + _SCREEN_LL_M2_C[0] - _SCREEN_OUTER_CENTER[0];
+_SCREEN_CY = _SCREEN_HOLE_DY/2 + _SCREEN_LL_M2_C[1] - _SCREEN_OUTER_CENTER[1];
+
+_RASPBERRY_PI_B_CX = (_SCREEN_HOLE_DX - _RASPBERRY_PI_B_HOLE_DX/2) + _SCREEN_LL_M2_C[0] - _SCREEN_OUTER_CENTER[0];
+_RASPBERRY_PI_B_CY = (_SCREEN_HOLE_DY - _RASPBERRY_PI_B_HOLE_DY/2) + _SCREEN_LL_M2_C[1] - _SCREEN_OUTER_CENTER[1];
+
 // ...
 //
 _MATERIAL_THICKNESS = 1.0/8.0;
@@ -61,4 +84,27 @@ _M5 = 5.0;
 _M5r = 5.0/2;
 
 
-
+// Bounding box width of rouned rect is w and h,
+// so this function compensates for the rounded corner
+// radius.
+//
+// w - width or rectangle
+// h - height of rectangle
+// r - corner radius
+//
+// rounded rectangle has center of mass (center) at (0,0)
+//
+module rounded_rect(w,h,r) {
+  _w = w-2*r;
+  _h = h-2*r;
+  
+  x2 = _w/2;
+  y2 = _h/2;
+  
+  hull() {
+    translate([-x2, y2]) circle(r);
+    translate([ x2, y2]) circle(r);
+    translate([ x2,-y2]) circle(r);
+    translate([-x2,-y2]) circle(r);
+  }
+}

+ 7 - 19
experiment/production/housing/v2/PopufareHousingFrontAngle.scad

@@ -1,22 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 include <PopufareHousingCommon.scad>
 

+ 7 - 19
experiment/production/housing/v2/PopufareHousingFrontBottom.scad

@@ -1,22 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 include <PopufareHousingCommon.scad>
 

+ 100 - 0
experiment/production/housing/v2/PopufareHousingInnerBack.scad

@@ -0,0 +1,100 @@
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
+
+include <PopufareHousingCommon.scad>
+
+// when looking down (to negative z-axis)
+// it's as if you're looking at the back of the panel,
+// screen facing outwards, front ribbon on screen
+// going 'down' (negative y-axis).
+//
+module PopufareHousingInnerBackPlate() {
+  _r = 3;
+  _outr = 16;
+  
+  hole_width  = POPUFARE_INNER_PLATE_HOLE_WIDTH;
+  hole_height = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
+
+  w2 = hole_width/2;
+  h2 = hole_height/2;
+  x = hole_width + _outr;
+  y = hole_height + _outr;
+  
+  rpi_hole_c = [_RASPBERRY_PI_B_CX, _RASPBERRY_PI_B_CY];
+  rpi_hole_dx = _RASPBERRY_PI_B_HOLE_DX;
+  rpi_hole_dy = _RASPBERRY_PI_B_HOLE_DY;
+  
+  screen_hole_c = [_SCREEN_CX,_SCREEN_CY];
+  screen_hole_dx = _SCREEN_HOLE_DX;
+  screen_hole_dy = _SCREEN_HOLE_DY;
+  
+  
+  d_pi_screen = [screen_hole_dx - rpi_hole_dx, screen_hole_dy - rpi_hole_dy];
+
+  access_left_w = 25;
+  access_left_h = screen_hole_dy - 10;
+  access_left_c = [ rpi_hole_c[0] - rpi_hole_dx/2  - d_pi_screen[0]/2, screen_hole_c[1] ];
+
+  access_middle_w = rpi_hole_dx - 16;
+  access_middle_h = rpi_hole_dy - 16;
+  access_middle_c = [_RASPBERRY_PI_B_CX,_RASPBERRY_PI_B_CY];
+
+  access_right_w = hole_width/2 - (rpi_hole_c[0] + rpi_hole_dx/2);
+  access_right_h = 5*hole_height/8;
+  access_right_c = [ (rpi_hole_c[0] + rpi_hole_dx/2) + access_right_w/2 + _r, 0];
+  
+  access_top_w = rpi_hole_dx - 25;
+  access_top_h = 12;
+  access_top_c  = [rpi_hole_c[0], rpi_hole_c[1] + rpi_hole_dy/2 + access_top_h/2 + 4];
+  
+  access_bottom_w = rpi_hole_dx - 25;
+  access_bottom_h = 24;
+  access_bottom_c  = [rpi_hole_c[0], rpi_hole_c[1] - rpi_hole_dy/2 - access_bottom_h/2 - 8];
+
+  sx2 = hole_width/2;
+  sy2 = hole_height/2;
+  difference() {
+    rounded_rect(x,y,_r);
+    
+    translate(rpi_hole_c) translate([ rpi_hole_dx/2, rpi_hole_dy/2]) circle(_M2r);
+    translate(rpi_hole_c) translate([ rpi_hole_dx/2,-rpi_hole_dy/2]) circle(_M2r);
+    translate(rpi_hole_c) translate([-rpi_hole_dx/2,-rpi_hole_dy/2]) circle(_M2r);
+    translate(rpi_hole_c) translate([-rpi_hole_dx/2, rpi_hole_dy/2]) circle(_M2r);
+    
+    // access to bottom of rpi
+    //
+    translate(rpi_hole_c) rounded_rect(3*rpi_hole_dx/4, 3*rpi_hole_dy/4, _r);
+
+    // access middle portion, in case we need a heat sink
+    //    
+    translate(access_left_c) rounded_rect(access_left_w,access_left_h, _r);
+    
+    // access right portion, ethernet cable and USB cables
+    //
+    translate(access_right_c) rounded_rect(access_right_w, access_right_h, _r);
+    
+    translate(access_top_c) rounded_rect(access_top_w, access_top_h, _r);
+    translate(access_bottom_c) rounded_rect(access_bottom_w, access_bottom_h, _r);
+
+    translate(screen_hole_c) translate([ screen_hole_dx/2, screen_hole_dy/2]) circle(_M2r);
+    translate(screen_hole_c) translate([ screen_hole_dx/2,-screen_hole_dy/2]) circle(_M2r);
+    translate(screen_hole_c) translate([-screen_hole_dx/2,-screen_hole_dy/2]) circle(_M2r);
+    translate(screen_hole_c) translate([-screen_hole_dx/2, screen_hole_dy/2]) circle(_M2r);
+    
+    translate(rpi_hole_c) rounded_rect(3*rpi_hole_dx/4, 3*rpi_hole_dy/4, _r);
+    
+    translate([-hole_width/2, -hole_height/2]) circle(_M3r);
+    translate([ hole_width/2, -hole_height/2]) circle(_M3r);
+    translate([ hole_width/2,  hole_height/2]) circle(_M3r);
+    translate([-hole_width/2,  hole_height/2]) circle(_M3r);
+
+  }
+}
+
+
+PopufareHousingInnerBackPlate();

+ 40 - 0
experiment/production/housing/v2/PopufareHousingInnerTop.scad

@@ -0,0 +1,40 @@
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
+
+include <PopufareHousingCommon.scad>
+
+module PopufareHousingInnerTopPlate() {
+  _r = 3;
+  _outr = 16;
+
+  hole_width  = POPUFARE_INNER_PLATE_HOLE_WIDTH;
+  hole_height = POPUFARE_INNER_PLATE_HOLE_HEIGHT;
+
+  w2 = hole_width/2;
+  h2 = hole_height/2;
+  x = hole_width + _outr;
+  y = hole_height + _outr;
+
+  w2 = hole_width/2;
+  h2 = hole_height/2;
+  difference() {
+    rounded_rect(x,y, _r);
+    
+    rounded_rect(hole_width-_outr, hole_height-_outr, _r);
+    
+    translate([-hole_width/2, -hole_height/2]) circle(_M3r);
+    translate([ hole_width/2, -hole_height/2]) circle(_M3r);
+    translate([ hole_width/2,  hole_height/2]) circle(_M3r);
+    translate([-hole_width/2,  hole_height/2]) circle(_M3r);
+ 
+
+  }
+}
+
+//PopufareHousingInnerTopPlate();
+

+ 7 - 20
experiment/production/housing/v2/PopufareHousingSideLeft.scad

@@ -1,23 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
-
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 include <PopufareHousingCommon.scad>
 

+ 7 - 20
experiment/production/housing/v2/PopufareHousingSideRight.scad

@@ -1,23 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
-
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 include <PopufareHousingCommon.scad>
 

+ 7 - 19
experiment/production/housing/v2/PopufareHousingTop.scad

@@ -1,22 +1,10 @@
-/*
- * Copyright (c) 2019 Clementine Computing LLC.
- *
- * This file is part of PopuFare.
- *
- * PopuFare is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * PopuFare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
- *
- */
+// License: CC0
+//
+// To the extent possible under law, Clementine Computing LLC has waived
+// all copyright and related or neighboring rights to this file.
+//
+// This work is published from: United States.
+//
 
 include <PopufareHousingCommon.scad>
 

+ 5 - 2
experiment/production/housing/v2/export/export-all

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-VERSION=0.1.0
+VERSION=0.1.1
 
 function ngc_position {
   ifn="$1"
@@ -24,7 +24,7 @@ function ngc_position {
 
   tfn=`mktemp`
 
-  echo "G0 F3000" > $tfn
+  #echo "G0 F5000" > $tfn
   grecode -shift "$shiftx" "$shifty" $ifn | \
     grep -v '^(' >> $tfn 2> /dev/null
   mv $tfn $ifn
@@ -50,6 +50,9 @@ for fn in `ls ../Popufare*.scad  | grep -v PopufareHousingCommon.scad ` ; do
   svg2ngc "$svg" 2> /dev/null
   ngc_position "$ngc" 2> /dev/null
 
+  sed -i 's/F800/F600/g' "$ngc"
+  sed -i 's/G0/G0 F5000/g' "$ngc"
+
 done
 
 rm $tmpfn

+ 10 - 1
experiment/production/housing/v2/housing_layout.scad

@@ -8,6 +8,9 @@ include <PopufareHousingSideRight.scad>
 include <PopufareHousingTop.scad>
 include <PopufareHousingBack.scad>
 
+include <PopufareHousingInnerBack.scad>
+include <PopufareHousingInnerTop.scad>
+
 spacing = 10;
 
 dw = POPUFARE_HOUSING_WIDTH;
@@ -27,4 +30,10 @@ translate( [ 0, -(dz/2 + hh/2 + spacing)] ) PopufareHousingFrontBottomPlate();
 translate( [ 0, -(dz + hh + 2*spacing)] ) PopufareHousingFrontAnglePlate();
 
 translate( [ 0, dz + spacing  ] ) PopufareHousingBackPlate();
-translate( [ 0, dz + hz + 2*spacing] ) PopufareHousingTopPlate();
+translate( [ 0, dz + hz + 2*spacing] ) PopufareHousingTopPlate();
+
+//---
+
+translate([  (dw+spacing), dz ]) PopufareHousingInnerBackPlate();
+translate([  150+(dw+spacing), dz]) PopufareHousingInnerTopPlate();
+