PopufarePowerAdapterTop.scad 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. difference() {
  17. rounded_rect(_w, _h, _r);
  18. translate([0, _h/2 - conh/2 - 6*_r]) square([conw, conh], center=true);
  19. // housing holes
  20. //
  21. translate([ (_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  22. translate([-(_w/2 - 3*_r), (_h/2 - 3*_r)]) circle(_r);
  23. translate([-(_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  24. translate([ (_w/2 - 3*_r),-(_h/2 - 3*_r)]) circle(_r);
  25. // max232 converter. It has no holes so we'll be using cable ties
  26. //
  27. translate([5,5])
  28. union() {
  29. translate([-_POWER_BOX_STRAP_DW/2, -_POWER_BOX_STRAP_DH/2]) circle(_r);
  30. translate([ _POWER_BOX_STRAP_DW/2, -_POWER_BOX_STRAP_DH/2]) circle(_r);
  31. translate([ _POWER_BOX_STRAP_DW/2, _POWER_BOX_STRAP_DH/2]) circle(_r);
  32. translate([-_POWER_BOX_STRAP_DW/2, _POWER_BOX_STRAP_DH/2]) circle(_r);
  33. }
  34. // PIU rs232 ttl USB out
  35. //
  36. translate([-_w/2+_PIU_USB_HOLE_DE, piu_usb_h + _PIU_USB_HOLE_DW/2])
  37. circle(_PIU_USB_HOLE_R);
  38. translate([-_w/2+_PIU_USB_HOLE_DE, piu_usb_h - _PIU_USB_HOLE_DW/2])
  39. circle(_PIU_USB_HOLE_R);
  40. // various holes for connections
  41. //
  42. translate([-_w/2+_PIU_USB_HOLE_DE*2, piu_usb_h + _PIU_USB_HOLE_DW/2+2*_r])
  43. circle(_r);
  44. translate([-_w/2+_PIU_USB_HOLE_DE*2, piu_usb_h - _PIU_USB_HOLE_DW/2-2*_r])
  45. circle(_r);
  46. translate([0,-_h/4+10]) circle(_r);
  47. translate([10,-_h/4 + 10]) circle(_r);
  48. translate([0,-_h/4]) circle(_r);
  49. translate([0,-_h/4 - 10]) circle(_r);
  50. translate([10,-_h/4]) circle(_r);
  51. translate([10,-_h/4 - 10]) circle(_r);
  52. }
  53. }
  54. PopufarePowerAdapterTopPlate();