Housing for a bench power supply made from a PD Buddy Sink and a DPH3205. https://hackaday.io/project/21278-usb-pd-bench-power-supply
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dph.scad 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. include <MCAD/polyholes.scad>;
  2. include <MCAD/units.scad>;
  3. /*
  4. * Hole for mounting the DPH3205 control panel.
  5. *
  6. * The hole is positioned so that the origin is the center of the cutout on the
  7. * panel. Epsilons are included as required.
  8. */
  9. module dph_panel_hole(h=26*mm, grip_thickness=2*mm, grip_lip=2*mm,
  10. clearance=0.35*mm) {
  11. hole_x = 71.5*mm + clearance;
  12. hole_y = 39*mm + clearance;
  13. grip_x = 76*mm + clearance;
  14. grip_y = 13*mm + clearance;
  15. /* The panel body cutout */
  16. translate([0, 0, h/2])
  17. cube([hole_x, hole_y, h + 2*epsilon], center=true);
  18. translate([-grip_x/2, -grip_y/2, -epsilon]) {
  19. /* The grip cutout at the panel */
  20. cube([grip_x, grip_y, grip_thickness + epsilon]);
  21. /* The rest of the hole, above the grip */
  22. translate([-grip_lip, 0, grip_thickness])
  23. cube([grip_x + 2*grip_lip, grip_y, h - grip_thickness + 2*epsilon]);
  24. }
  25. }
  26. /*
  27. * Holes for mounting the DPH3205 board itself.
  28. */
  29. module dph_mounting_holes(h, bolt_tolerance=0.3*mm, layer_thickness=0.25*mm) {
  30. spacing = [86*mm, 64*mm];
  31. board = [93*mm, 71*mm];
  32. translate([board[0]/2, board[1]/2, 0])
  33. for (x = [-1, 1])
  34. for (y = [-1, 1])
  35. translate([x*-spacing[0]/2, y*-spacing[1]/2, -epsilon]) {
  36. /* Bolt hole */
  37. translate([0, 0, 4*mm + layer_thickness + epsilon])
  38. polyhole(d=3*mm + bolt_tolerance, h=h + 2*epsilon);
  39. /* Cap hole */
  40. polyhole(d=5.5*mm + bolt_tolerance, h=4*mm + epsilon);
  41. }
  42. }
  43. /*
  44. * Boxes for mounting the DPH3205 board itself.
  45. */
  46. module dph_mounting_boxes(h, bolt_tolerance=0.3*mm) {
  47. spacing = [86*mm, 64*mm];
  48. board = [93*mm, 71*mm];
  49. translate([board[0]/2, board[1]/2, 0])
  50. for (x = [-1, 1])
  51. for (y = [-1, 1])
  52. translate([x*-spacing[0]/2 - 4*mm, y*-spacing[1]/2 - 4*mm, 0]) {
  53. cube([8*mm, 8*mm, h]);
  54. }
  55. }
  56. /*difference() {
  57. cube([84, 48, 5]);
  58. translate([42, 24, 0])
  59. dph_panel_hole();
  60. }*/
  61. difference() {
  62. dph_mounting_boxes(h=5);
  63. dph_mounting_holes(h=5);
  64. }