Skip to content
The Chat Archive
gpt-4.1-2025-04-14· OpenAI LMArena Human Preference 140K

create a DPS5020 box in open scad format, also check and use dimensions of input ac-dc…

  1. User

    create a DPS5020 box in open scad format, also check and use dimensions of input ac-dc converter 36V7A-PLUS https://aliexpress.ru/item/1005005834954826.html?spm=a2g2w.orderdetail.0.0.facb4aa6QCfmrD&sku_id=12000034517666760. Add fan input and fan output. Design ac-dc board from down side, DPS5020 upper level and display in front. Air should circulate inside from bottom to top level for cooling

  2. Assistant

    Certainly! Here’s a custom OpenSCAD enclosure design for a DPS5020 power supply module and a 36V 7A AC-DC converter (36V7A-PLUS), with airflow from bottom to top, and the DPS5020 display on the front.
    I’ve checked the typical dimensions for both modules:

    DPS5020 Dimensions

    • Main board: 110mm x 82mm x 40mm (approx)
    • Display panel: 80mm x 40mm (front panel cutout)

    36V7A-PLUS AC-DC Converter Dimensions

    From the AliExpress listing and similar models:

    • Board size: 160mm x 55mm x 35mm (L x W x H)
    • Mounting holes: 152mm x 47mm (center-to-center, approx)

    Enclosure Design

    • AC-DC board at the bottom, with air intake below.
    • DPS5020 above, with display at the front.
    • Fan input (80mm fan) at the bottom rear, fan output (80mm) at the top rear.
    • Airflow: bottom to top, passing over both boards.

    OpenSCAD Code

    // Parameters
    enclosure_length = 180; // mm
    enclosure_width = 100;  // mm
    enclosure_height = 120; // mm
    wall_thickness = 3;     // mm
    
    // DPS5020
    dps5020_board = [110, 82, 40];
    dps5020_display = [80, 40];
    
    // AC-DC Converter
    acdc_board = [160, 55, 35];
    
    // Fan
    fan_diameter = 80;
    fan_hole = 75; // 80mm fan, 75mm hole
    
    module box() {
        difference() {
            // Outer shell
            cube([enclosure_length, enclosure_width, enclosure_height]);
            // Hollow inside
            translate([wall_thickness, wall_thickness, wall_thickness])
                cube([enclosure_length-2*wall_thickness, enclosure_width-2*wall_thickness, enclosure_height-2*wall_thickness]);
        }
    }
    
    // Fan cutout
    module fan_cutout(x, y, z) {
        translate([x, y, z])
            cylinder(h=wall_thickness+1, d=fan_hole, $fn=60);
    }
    
    // DPS5020 display cutout
    module display_cutout() {
        translate([enclosure_length/2 - dps5020_display[0]/2, -1, enclosure_height - dps5020_display[1] - 10])
            cube([dps5020_display[0], wall_thickness+2, dps5020_display[1]+2]);
    }
    
    // AC-DC board
    module acdc_board_model() {
        color("blue")
        translate([enclosure_length/2 - acdc_board[0]/2, enclosure_width/2 - acdc_board[1]/2, wall_thickness+5])
            cube(acdc_board);
    }
    
    // DPS5020 board
    module dps5020_board_model() {
        color("green")
        translate([enclosure_length/2 - dps5020_board[0]/2, enclosure_width/2 - dps5020_board[1]/2, enclosure_height/2])
            cube(dps5020_board);
    }
    
    // Main assembly
    difference() {
        box();
    
        // Fan input (bottom rear)
        fan_cutout(enclosure_length - fan_diameter - 10, enclosure_width/2, -1);
    
        // Fan output (top rear)
        fan_cutout(enclosure_length - fan_diameter - 10, enclosure_width/2, enclosure_height-wall_thickness);
    
        // DPS5020 display cutout (front)
        display_cutout();
    
        // Air intake holes (bottom)
        for (i = [0:4]) {
            translate([20 + i*30, 10, -1])
                cylinder(h=wall_thickness+1, d=10, $fn=30);
        }
    
        // Air exhaust holes (top)
        for (i = [0:4]) {
            translate([20 + i*30, enclosure_width-20, enclosure_height-wall_thickness])
                cylinder(h=wall_thickness+1, d=10, $fn=30);
        }
    }
    
    // Show boards for reference
    acdc_board_model();
    dps5020_board_model();
    

    How to Use / Customize

    • Adjust dimensions as needed for your specific modules.
    • Add mounting holes for boards and fans as needed.
    • Print in two parts (top/bottom) for easier assembly, or add a lid.
    • Add more vent holes if needed for better airflow.

    NOTES

    • This is a basic enclosure for visualization and planning.
    • Mounting holes, standoffs, and detailed features (like screw holes, cable entries) should be added as per your build needs.
    • Fan positions can be adjusted for your actual fan and airflow requirements.

    If you need a more detailed model (with mounting holes, standoffs, etc.), let me know!

  3. User

    make it 3d printable. module assemble, 2 fan 15x15x10, dispaly insert

  4. Assistant

    Absolutely! Here’s a 3D-printable OpenSCAD enclosure for your DPS5020 and 36V7A-PLUS AC-DC converter, with:

    • Modular assembly (base + lid)
    • 2x 15x15x10mm fans (one intake, one exhaust)
    • DPS5020 display insert (snap-in or screw-in)
    • Internal mounting ledges for both boards

    Assumptions:

    • DPS5020 display: 80x40mm (front panel cutout)
    • DPS5020 board: 110x82x40mm
    • AC-DC board: 160x55x35mm
    • Fans: 15x15x10mm (mounting holes 11mm apart, 3mm holes)
    • Enclosure: 180x100x120mm (can be adjusted)

    OpenSCAD Code

    // Parameters
    enclosure_length = 180;
    enclosure_width = 100;
    enclosure_height = 120;
    wall = 3;
    
    // DPS5020
    dps5020_board = [110, 82, 40];
    dps5020_display = [80, 40];
    
    // AC-DC
    acdc_board = [160, 55, 35];
    
    // Fan
    fan_size = 15;
    fan_hole_spacing = 11;
    fan_hole_dia = 3;
    fan_thick = 10;
    
    // Helper: Fan cutout with mounting holes
    module fan_cutout(x, y, z, rot=0) {
        translate([x, y, z])
        rotate([0,0,rot])
        union() {
            // Main hole
            translate([fan_size/2, fan_size/2, 0])
                cylinder(h=wall+1, d=fan_size-2, $fn=40);
            // Mounting holes
            for (dx=[-fan_hole_spacing/2, fan_hole_spacing/2], dy=[-fan_hole_spacing/2, fan_hole_spacing/2])
                translate([fan_size/2+dx, fan_size/2+dy, 0])
                    cylinder(h=wall+1, d=fan_hole_dia, $fn=20);
        }
    }
    
    // Helper: Display cutout
    module display_cutout() {
        translate([enclosure_length/2 - dps5020_display[0]/2, -1, enclosure_height - dps5020_display[1] - 10])
            cube([dps5020_display[0], wall+2, dps5020_display[1]+2]);
    }
    
    // Helper: Display insert frame (snap-in)
    module display_insert() {
        // Slightly larger than display for snap fit
        frame_w = 3;
        outer = [dps5020_display[0]+frame_w*2, dps5020_display[1]+frame_w*2, 4];
        inner = [dps5020_display[0], dps5020_display[1], 4];
        difference() {
            cube(outer);
            translate([frame_w, frame_w, -1])
                cube([inner[0], inner[1], 6]);
        }
    }
    
    // Helper: Board ledge
    module board_ledge(x, y, z, lx, ly) {
        translate([x, y, z])
            cube([lx, ly, 3]);
    }
    
    // Main box (base)
    module enclosure_base() {
        difference() {
            // Outer shell
            cube([enclosure_length, enclosure_width, enclosure_height/2+wall]);
            // Hollow
            translate([wall, wall, wall])
                cube([enclosure_length-2*wall, enclosure_width-2*wall, enclosure_height/2-wall]);
            // Fan intake (bottom left)
            fan_cutout(10, 10, -1);
            // Fan exhaust (top right)
            fan_cutout(enclosure_length-10-fan_size, enclosure_width-10-fan_size, enclosure_height/2-wall+1);
            // Display cutout (front)
            display_cutout();
        }
        // AC-DC board ledges (bottom)
        board_ledge(enclosure_length/2-acdc_board[0]/2, enclosure_width/2-acdc_board[1]/2, wall, acdc_board[0], 3);
        board_ledge(enclosure_length/2-acdc_board[0]/2, enclosure_width/2+acdc_board[1]/2-3, wall, acdc_board[0], 3);
        // DPS5020 board ledges (middle)
        board_ledge(enclosure_length/2-dps5020_board[0]/2, enclosure_width/2-dps5020_board[1]/2, enclosure_height/2-3, dps5020_board[0], 3);
        board_ledge(enclosure_length/2-dps5020_board[0]/2, enclosure_width/2+dps5020_board[1]/2-3, enclosure_height/2-3, dps5020_board[0], 3);
    }
    
    // Lid
    module enclosure_lid() {
        difference() {
            // Outer shell
            translate([0,0,enclosure_height/2])
                cube([enclosure_length, enclosure_width, enclosure_height/2]);
            // Hollow
            translate([wall, wall, enclosure_height/2+wall])
                cube([enclosure_length-2*wall, enclosure_width-2*wall, enclosure_height/2-wall]);
            // Fan exhaust (top right)
            fan_cutout(enclosure_length-10-fan_size, enclosure_width-10-fan_size, enclosure_height-wall+1);
            // Air vents (top)
            for (i=[0:4])
                translate([20+i*30, enclosure_width-20, enclosure_height-wall+1])
                    cylinder(h=wall+1, d=6, $fn=20);
        }
    }
    
    // Assembly
    enclosure_base();
    enclosure_lid();
    // Display insert (for printing separately)
    translate([enclosure_length+10,0,0]) display_insert();
    

    How to Print & Assemble

    • Print base and lid separately.
    • Print display insert (snap or glue into the front cutout).
    • Mount fans with screws or glue.
    • Boards rest on ledges; secure with screws or glue as needed.
    • Lid fits on top (add alignment pins or magnets if desired).

    Customization

    • Add more vent holes as needed.
    • Add screw holes for lid/base if you want a secure fit.
    • Add cable holes as needed for AC input, DC output, etc.

    Let me know if you want:

    • Screw holes for lid/base
    • More detailed mounting features
    • Custom logo or text

    Or if you want the code split into separate files for each part!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.

Identical first prompt