This tutorial will demonstrate using EasyEDA to layout Lego Technic Frame enclosures. My USB C PD converter for my CPAP will be used in the example.
EasyEDA (stanard edition) is a printed circuit board layout program, provided by JLCPCB, that works really well to layout panels for these enclosures. This program is free and has a shallow learning curve.
I've made EasyEDA footprints (templates) for the useful Lego frames, These templates make it quick and easy to layout the panels for these enclosures. These parts can form the basis of enclosures in many styles and sizes.
The holes in these frames accept 3mm heat-stake thread inserts to allow attaching panels, replacing the typical slots and tabs of laser-cut enclosures. Panels are typically 3mm acrylic or plywood.
The enclosure shown below was my initial plan for the CPAP power supply but recently discovered pieces on AliExpress make a smaller version possible. From the picture, you can see how the frames secure the panels.
The frames are based on a 4mm spacing, with alternating holes in both directions of member. Holes in the same plane are (generally) on 8mm centers. The frames are 8mm thick, and the members 8mm wide.
I came across the L frames on AliExpress, which allow for a smaller enclosure. I want to use a cable gland on the end of the enclosure for the CPAP cable. Using two 3×5 L frames, I can make a small enclosure that provides just enough clearance for the packing gland nut between the frames as shown below. The grid lines in the pictures are 4mm apart. The dashed lines indicate holes in the other plane.
3×5 L Frame
End Panel Arrangement
The length of the DC-DC converter will determine the length of the enclosure. The DC-DC converter will sit between the frames as shown in the side view below. I allowed some clearance to the frames, and positioned the frames with 80mm between the faces. This is convenient because it keeps the frames on the same 4mm grid.
The pieces shown at either end of the power supply are side views of the frames; notice that the dashed lines of the front view are shown as holes in this view. Notice these pieces are offset end-to-end to match the L positions.
The next step is laying out the panels. Here, we have to decide how we want the panels to overlap. I want the end panels to overlap the top, bottom and side panels, which are 3mm thick. The yellow rectangle shows the end panel extending 3mm past the frame on all sides.
The small yellow circles are 3,2mm holes to provide clearance for the 3mm panel attachment screws. These holes are easy to position with the snap grid set to 4mm.
The large yellow circle is the mounting hole for the PG7 cable gland
The top and bottom panels will overlap the sides. It's 3mm wider than the frame, but the length is the end-to-end distance of the frames. As above, the yellow rectangle is the panel size, and the small circles are 3.2mm holes for the attachment screws.
The side panels will be overlapped on all four sides, so no overhang is needed on any side.
It's a little easier to visualize seeing all the panels are once. This is an exported view from EasyEDA showing the panels and the frames. The end panel with the USB connector has been added.
Exporting only the yellow layer to an SVG file results in a file ready for laser cutting. Top and bottom panels are identical, as are the side panels. Two must be cut of each.
Start by downloading EasyEDA Standard Edition and install it on your computer. Download the EasyEDA files (coming soon) and take the following steps to install them.
Open the library file,
Select the file, and click "Import File and Select Libs"
Select all files and click "Add To Library"
Open EasyEDA Library File
Select File, And Add to Library
Select files and click "Add To Library"
Ok, we're almost there! We need to create a new PCB from the File menu. Cancel the board outline.
Create New PCB
Cancel Board Outline
Next, we need to set the units to millimeters, and set the grid and snap to 4mm. The icons at the top center control screen zoom. Select the desired Layer in the Floating Layer menu, and drawing tools in the floating Tools menu.
Set Units to Millimeters, and Snap and Grid
Layers and Tools Floating Menus
I recommend using the Document layer for construction lines, notes and other items that won't be laser-cut. The Top Silkscreen layer should be used for the panel outline, holes and features that will be laser-cut,
The line tool is at the upper left in the Tools menu. By default, lines can be run at 45° or 90°. This can be changed to Free Angle in the menu panel on the right. I usually draw rough lines, and use the X, Y coordinate entry boxes on the right panel to make the exact placement.
Circles and arcs can be drawn with the tools at center; arcs can be used to round corners. The square on the bottom is used to draw squares and rectangles. Turn off Fill in the right hand menu.
Layer and Tool Menus
footprints
NOT FINISHED YET