PopufarePowerAdapterTop.scad 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 = 0;
  19. buck_cy = -_h/12;
  20. difference() {
  21. union() {
  22. rounded_rect(_w, _h, _r);
  23. translate([buck_cx,buck_cy]) rounded_rect(buck_dw + 5*buck_r, 5*buck_r, 2*buck_r);
  24. }
  25. // power connector access
  26. //
  27. translate([0, _h/2 - conh/2 - 6*_r]) square([conw, conh], center=true);
  28. // buck converter screw holes
  29. //
  30. translate([buck_cx-buck_dw/2, buck_cy]) circle(buck_r);
  31. translate([buck_cx+buck_dw/2, buck_cy]) circle(buck_r);
  32. // housing holes
  33. //
  34. translate([ (_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  35. translate([-(_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  36. translate([-(_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  37. translate([ (_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  38. // max232 converter. It has no holes so we'll be using cable ties
  39. //
  40. translate([5,5])
  41. union() {
  42. translate([-_POWER_BOX_STRAP_DW/2, -_POWER_BOX_STRAP_DH/2]) circle(_r);
  43. translate([ _POWER_BOX_STRAP_DW/2, -_POWER_BOX_STRAP_DH/2]) circle(_r);
  44. translate([ _POWER_BOX_STRAP_DW/2, _POWER_BOX_STRAP_DH/2]) circle(_r);
  45. translate([-_POWER_BOX_STRAP_DW/2, _POWER_BOX_STRAP_DH/2]) circle(_r);
  46. }
  47. // PIU rs232 ttl USB out
  48. //
  49. translate([-_w/2+_PIU_USB_HOLE_DE, piu_usb_h + _PIU_USB_HOLE_DW/2])
  50. circle(_PIU_USB_HOLE_R);
  51. translate([-_w/2+_PIU_USB_HOLE_DE, piu_usb_h - _PIU_USB_HOLE_DW/2])
  52. circle(_PIU_USB_HOLE_R);
  53. // various holes for connections
  54. //
  55. translate([-_w/2+_PIU_USB_HOLE_DE*2, piu_usb_h + _PIU_USB_HOLE_DW/2+2*_r])
  56. circle(_r);
  57. translate([-_w/2+_PIU_USB_HOLE_DE*2, piu_usb_h - _PIU_USB_HOLE_DW/2-2*_r])
  58. circle(_r);
  59. translate([0,-_h/4+10]) circle(_r);
  60. translate([10,-_h/4 + 10]) circle(_r);
  61. translate([0,-_h/4]) circle(_r);
  62. translate([0,-_h/4 - 10]) circle(_r);
  63. translate([10,-_h/4]) circle(_r);
  64. translate([10,-_h/4 - 10]) circle(_r);
  65. }
  66. }
  67. //PopufarePowerAdapterTopPlate();