PopufarePowerAdapterTop.scad 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // License: CC0
  2. //
  3. // To the extent possible under law, Clementine Computing LLC has waived
  4. // all copyright and related or neighboring rights to this file.
  5. //
  6. // This work is published from: United States.
  7. //
  8. include <PopufareHousingCommon.scad>
  9. module PopufarePowerAdapterTopPlate() {
  10. _w = _POWER_BOX_WIDTH;
  11. _h = _POWER_BOX_HEIGHT;
  12. _r = _POWER_BOX_R;
  13. conw = _POWER_CONNECTOR_WIDTH;
  14. conh = _POWER_CONNECTOR_HEIGHT;
  15. piu_usb_h = _POWER_BOX_PIU_USB_H;
  16. buck_dw = _PIU_BUCK_DW;
  17. buck_r = _PIU_BUCK_R;
  18. buck_cx = _w/2 + 2*buck_r;
  19. buck_cy = -_h/12;
  20. difference() {
  21. union() {
  22. rounded_rect(_w, _h, _r);
  23. translate([buck_cx-3*buck_r,buck_cy]) square([6*buck_r, buck_dw+5*buck_r], center=true);
  24. translate([buck_cx,buck_cy])
  25. rounded_rect(5*buck_r, buck_dw + 5*buck_r, 2*buck_r);
  26. //rounded_rect(buck_dw + 5*buck_r, 5*buck_r, 2*buck_r);
  27. }
  28. // power connector access
  29. //
  30. translate([0, _h/2 - conh/2 - 6*_r]) square([conw, conh], center=true);
  31. // buck converter screw holes
  32. //
  33. translate([buck_cx, buck_cy - buck_dw/2 ]) circle(buck_r);
  34. translate([buck_cx, buck_cy + buck_dw/2 ]) circle(buck_r);
  35. // housing holes
  36. //
  37. translate([ (_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  38. translate([-(_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  39. translate([-(_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  40. translate([ (_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  41. // max232 converter. It has no holes so we'll be using cable ties
  42. //
  43. translate([5,5])
  44. union() {
  45. translate([-_POWER_BOX_STRAP_DW/2, -_POWER_BOX_STRAP_DH/2]) circle(_r);
  46. translate([ _POWER_BOX_STRAP_DW/2, -_POWER_BOX_STRAP_DH/2]) circle(_r);
  47. translate([ _POWER_BOX_STRAP_DW/2, _POWER_BOX_STRAP_DH/2]) circle(_r);
  48. translate([-_POWER_BOX_STRAP_DW/2, _POWER_BOX_STRAP_DH/2]) circle(_r);
  49. }
  50. // PIU rs232 ttl USB out
  51. //
  52. translate([-_w/2+_PIU_USB_HOLE_DE, piu_usb_h + _PIU_USB_HOLE_DW/2])
  53. circle(_PIU_USB_HOLE_R);
  54. translate([-_w/2+_PIU_USB_HOLE_DE, piu_usb_h - _PIU_USB_HOLE_DW/2])
  55. circle(_PIU_USB_HOLE_R);
  56. // various holes for connections
  57. //
  58. translate([-_w/2+_PIU_USB_HOLE_DE*2, piu_usb_h + _PIU_USB_HOLE_DW/2+2*_r])
  59. circle(_r);
  60. translate([-_w/2+_PIU_USB_HOLE_DE*2, piu_usb_h - _PIU_USB_HOLE_DW/2-2*_r])
  61. circle(_r);
  62. translate([0,-_h/4+10]) circle(_r);
  63. translate([10,-_h/4 + 10]) circle(_r);
  64. translate([0,-_h/4]) circle(_r);
  65. translate([0,-_h/4 - 10]) circle(_r);
  66. translate([10,-_h/4]) circle(_r);
  67. translate([10,-_h/4 - 10]) circle(_r);
  68. }
  69. }
  70. //PopufarePowerAdapterTopPlate();