
The LyraMaker Electronics Enclosure Generator builds a project box around your circuit board. Enter the PCB length and width, the position of its mounting holes and how tall the parts are, and the box gets standoffs in the right places, a screw-on lid and openings for cables.
The lid screws go into four posts on the outside corners, so the whole inside is free for the board and the wires. The size line shows the outside size and the free space inside.
The LyraMaker Electronics Enclosure Generator creates a 3D printable project box for a circuit board, with PCB standoffs, a lid fixed with four M3 screws, vent slots, a cable gland hole and a port opening. Download the box and lid as a watertight STL or 3MF.
The standoffs have pilot holes of 2.2 mm for M2.5 or 2.6 mm for M3 screws, so the screw cuts its own thread. The lid uses M3 screws: 3.4 mm holes in the lid and 2.6 mm pilot holes, 12 mm deep, in the corner posts. Screws about 8–10 mm long fit.
The cable gland hole is in one end wall. Common glands need about 12 mm (M12), 12.5 mm (PG7), 15.2 mm (PG9) or 16 mm (M16); check the thread of yours. The hole has a pointed top so the wall prints without support; the gland nut covers the point. The port opening in the other end wall starts 0.5 mm below the top of the PCB, where USB and power connectors usually sit.
Print with 3 walls so the screws have plastic to bite into. Fit the lid: the lip inside the walls has 0.25 mm of clearance and only locates the lid; the screws hold it. Vents let warm air out of the top and the sides; for parts that get really hot, add a fan or use a metal case. We designed the fits from the numbers above and have not test-printed every size.
This box is for low-voltage projects such as microcontroller boards, sensors and small battery devices. Do not use a printed box for mains voltage: ordinary filaments are not flame-retardant and a printed box is not a certified enclosure. Printed boxes are not waterproof, even with a gland; the gland only holds the cable. The standoffs are only at the four corners of the PCB.
Enclosures are built with OpenSCAD WebAssembly in your browser — nothing is uploaded. For other boxes, try the box generator or the hinged box generator; or explore every LyraMaker generator.
Enter the PCB length and width, the distance of the mounting holes from the edge and the height of the tallest part. The box adds the gap, the walls and the corner posts, and the size line shows the result.
M2.5 or M3 screws for the PCB, which cut their own thread in the standoffs, and four M3 screws of about 8 to 10 mm for the lid.
Set the hole to the thread size of your gland: about 12 mm for M12, 12.5 mm for PG7, 15.2 mm for PG9 or 16 mm for M16. Set it to 0 for no hole.
No. Printed boxes are not certified enclosures and most filaments are not flame-retardant. Use it for low-voltage projects only.