S&B Volcano vaporizer remote control with Pi Pico W
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * case.scad
  3. *
  4. * https://github.com/kauzerei/OpensCadaver/blob/main/models/pico_stuff.scad
  5. *
  6. * Copyright (c) 2023 Kauzerei (openautolab@kauzerei.de)
  7. * Copyright (c) 2023 Thomas Buck (thomas@xythobuz.de)
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation, either version 3 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * See <http://www.gnu.org/licenses/>.
  20. */
  21. // https://www.waveshare.com/wiki/Pico-LCD-1.3
  22. lcd_w = 52.0;
  23. lcd_h = 26.5;
  24. lcd_d = 1.0; // todo
  25. // https://www.printables.com/model/210898-raspberry-pi-pico-case
  26. use <pico_case.scad>
  27. p_w = 21;
  28. p_h = 51;
  29. p_t = 1.0;
  30. p_usb_h = 2.8;
  31. pico_header_h = 2.5; // todo
  32. lcd_header_h = 10.0; // todo
  33. header_h = pico_header_h + lcd_header_h;
  34. part="OPT_assembly"; //[bottom,top,button,print,OPT_assembly]
  35. wall=1.5;
  36. extra=4; //lip on the lid that presses top pcb down
  37. thread=3;
  38. air=0.5;
  39. bissl=1/100;
  40. button=4;
  41. joystick=6;
  42. height=16.8+air+extra;
  43. width=52.4+1.5+2*air;
  44. length=26.7+2*air;
  45. $fa=1/1;
  46. $fs=1/2;
  47. total_width = width+2*wall;
  48. total_len = length+4*wall+2*thread;
  49. module lcd() {
  50. color("blue")
  51. translate([-lcd_h / 2, -lcd_w / 2, 0])
  52. cube([lcd_h, lcd_w, lcd_d]);
  53. }
  54. module hw() {
  55. translate([0, 0, header_h])
  56. lcd();
  57. translate([p_w / 2, -p_h / 2, 0])
  58. rotate([0, 180, 0])
  59. pico();
  60. }
  61. module bottom() {
  62. difference() {
  63. cube([total_width, total_len, height + wall]);
  64. translate([wall,2*wall+thread,wall])cube([width,length,height+bissl]);
  65. for (tr=[[wall+thread/2,wall+thread/2,height/2+wall],
  66. [wall+thread/2,length+3*wall+1.5*thread,height/2+wall],
  67. [width+wall-thread/2,wall+thread/2,height/2+wall],
  68. [width+wall-thread/2,length+3*wall+1.5*thread,height/2+wall]])
  69. translate(tr) cylinder(h=height/2+bissl,d=thread);
  70. translate([wall/2,2*wall+thread+length/2,3-bissl])cube([wall+bissl,8,6],center=true);
  71. translate([0,2*wall+thread+length/2,wall+7])rotate([0,90,0])cylinder(d=button,h=2*wall+bissl,center=true);
  72. }
  73. }
  74. module top() {
  75. difference() {
  76. cube([total_width, total_len, wall]);
  77. for (tr=[[wall+thread/2,wall+thread/2,-bissl],
  78. [wall+thread/2,length+3*wall+1.5*thread,-bissl],
  79. [width+wall-thread/2,wall+thread/2,-bissl],
  80. [width+wall-thread/2,length+3*wall+1.5*thread,-bissl]])
  81. translate(tr) cylinder(h=wall+2*bissl,d=thread);
  82. translate([wall+1.5,2*wall+thread,-bissl])
  83. for (tr=[[47.7+air,5.5+0],
  84. [47.7+air,5.5+5.7],
  85. [47.7+air,5.5+2*5.7],
  86. [47.7+air,5.5+3*5.7],
  87. [6.7+0.5,13.8+air]])
  88. translate(tr) cylinder(h=wall+2*bissl,d=button);
  89. translate([wall+1.5+6.7+air,2*wall+thread+13.8+air,-bissl]) cylinder(h=wall+2*bissl,d=joystick);
  90. translate([wall+13.5+1.5,2*wall+thread,-bissl])cube([31,27,wall+2*bissl]);
  91. }
  92. translate([wall+13.5+1.5-2,2*wall+thread,-extra])cube([2,27,extra]);
  93. translate([wall+13.5+1.5+31,2*wall+thread,-extra])cube([2,27,extra]);
  94. }
  95. module button() {
  96. cylinder(h=1,d=5);
  97. cylinder(h=5,d=3);
  98. }
  99. module bottom_assm() {
  100. %translate([0, 0, wall + p_t + p_usb_h])
  101. rotate([0, 0, 90])
  102. hw();
  103. translate([-total_width / 2, -total_len / 2, 0])
  104. bottom();
  105. }
  106. if (part == "bottom") {
  107. bottom_assm();
  108. } else if (part == "top") {
  109. rotate([180, 0, 0])
  110. top();
  111. } else if (part == "button") {
  112. button();
  113. } else if (part == "print"){
  114. translate([0, 10, 0])
  115. bottom();
  116. translate([0, -10, wall])
  117. rotate([180, 0, 0])
  118. top();
  119. for (i = [1 : 4])
  120. translate([-10, -25 + i * 10, 0])
  121. button();
  122. } else {
  123. difference() {
  124. union() {
  125. bottom_assm();
  126. translate([-total_width / 2, -total_len / 2, height + wall])
  127. top();
  128. }
  129. translate([-total_width / 2 - 1, 0, -2])
  130. cube([total_width + 2, total_len / 2 + 2, height + wall + 4]);
  131. }
  132. }