Sizing a project box around a board
The box has to fit the board, every connector that sticks out of it, and the wiring that has to bend inside. The table below gives starting internal dimensions for common boards. Measure your own board before cutting — clone boards vary by several millimetres, and headers add height.
| Board | Board footprint | Suggested interior | What drives the size |
|---|---|---|---|
| Arduino Uno (Rev3) | 68.6 × 53.4 mm | 80 × 70 × 30 mm | USB-B and barrel jack protrude past the short edge; headers add height. |
| Raspberry Pi 4 | 85 × 56 mm | 100 × 72 × 35 mm | USB and Ethernet ports stick out past the long edge; the port stack needs 35 mm. |
| Raspberry Pi Pico | 51 × 21 mm | 65 × 32 × 20 mm | USB on the short edge; soldered headers set the height. |
| ESP32-DevKitC | 54.4 × 27.9 mm | 70 × 40 × 25 mm | USB on the short edge; keep the antenna end clear of metal. |
Those numbers assume the board sits flat with no standoffs. Add 4–6 mm to the height for a standoff, and add the height of the tallest component on the board.
The measurement that actually matters
- Length and width — board footprint, plus 2–3 mm clearance per side, plus whatever protrudes: USB plugs, barrel jacks, pin headers, screw terminals. Connectors are usually the reason a box that looked big enough does not close.
- Height — PCB thickness (1.6 mm) + standoffs (5–10 mm) + the tallest component (an electrolytic capacitor or relay can be 12–15 mm) + 2–3 mm so the lid does not press on anything.
- Wire bend radius — leave at least 10 mm behind any connector that has wires plugged into it. A cable that has to bend immediately at the plug will pull the connector off the board.
Type the interior number into the generator. It adds the wall thickness outwards, so the finished outside is larger by two walls on each horizontal axis and one wall underneath.
Wall thickness for an enclosure
| Method | Wall | Notes |
|---|---|---|
| Laser-cut plywood | 3 mm | Cheapest and most forgiving. Finger joints give a strong box; seal or paint it if it will see damp. |
| Laser-cut acrylic | 3 mm | Lets you see the board and status LEDs. Solvent-weld the joints for a rigid box. |
| FDM 3D print | 1.6–2.4 mm | Use a multiple of the nozzle width — 2 mm is five perimeters at 0.4 mm and a good default. |
| FDM with screws | 3 mm | Gives the wall enough material for a threaded insert or a self-tapping screw. |
For a printed enclosure that will sit near a voltage regulator, PETG or ABS is a better choice than PLA — PLA softens at around 60 °C, which is reachable inside a closed box.
What this generator does not add
Be clear about the boundary before you cut: BoxGen generates the shell and its lid. It does not generate:
- Port cutouts — USB, Ethernet, barrel jack, HDMI, SD card, power switch, display window.
- Vents or fan holes — including the screw holes for a fan grille.
- PCB standoffs or screw bosses — there is nothing inside the box to mount the board to.
- Internal dividers, rails or cable tie points.
All of these are quick to add after export, and doing it by hand is usually faster than modelling a whole enclosure:
- Laser cut — import the SVG or DXF into LightBurn, Illustrator or Inkscape and draw the cutouts on the panel that needs them. Identify panels by size: front and back are outer length × height, sides are (outer width − 2 × thickness) × height, the bottom is outer length × outer width, and the lid matches the opening. Add screw holes as small circles and glue or bolt a standoff behind them.
- 3D print — most modern slicers (PrusaSlicer, Orca, Bambu Studio, Cura) let you add a negative volume or cutting mesh to a model without editing the STL. Place cylinders where the ports go. For real screw bosses, import the STL into Tinkercad, Fusion 360 or Onshape and add them there.
The generated STL is a watertight shell, but it is a starting point for an enclosure, not a finished mechanical design. Expect to spend a few minutes adding the features your project needs.
Laser-cut or 3D printed enclosure?
For a flat board with panel-mounted parts, laser-cut acrylic is hard to beat: you can see the board, the cutouts are easy to draw, and a 3 mm sheet cuts in minutes. It is also the cheaper route if you already have access to a laser.
Printing wins when the enclosure needs curved surfaces, internal ribs, integrated standoffs or a shape that is not a rectangular box. A printed box is one part with no assembly, but it is slower per unit and limited by the bed size — past roughly 200 mm on the longest side, splitting the model becomes the main design problem.
Custom box or off-the-shelf project box?
| Off-the-shelf project box | Generated box | |
|---|---|---|
| Cost | A few dollars, in stock | Sheet material or filament, plus machine time |
| Size | Fixed increments; often too deep or too shallow | Any size, to the millimetre |
| Cutouts | Drill or file by hand; alignment is fiddly | Draw them in the cut file before cutting |
| Rating | Often IP-rated, flame-retardant, UL/CE listed | None — joints are not sealed |
| Best for | Mains-powered, outdoor, production or anything that must be certified | Prototypes, one-offs, panel-mounted controls, visible boards |
Safety: do not put mains voltage inside a laser-cut wooden or 3D-printed box. Use a certified enclosure with proper creepage distances, strain relief and grounding. This generator is for low-voltage DC projects.
Frequently asked questions
Can I import my PCB or a STEP file?
No. The generator works from three numbers, not from a board model. Measure the board and its connectors, then enter the interior size. That keeps the tool fast and works for boards you designed yourself and have no model for.
Does it add mounting holes or standoffs?
No. It generates the outer shell, the finger joints and an optional lid. Standoffs and screw holes have to be added after export — in your laser software for a flat box, or in a slicer or CAD tool for a printed one.
Is the enclosure waterproof?
No. The finger joints and the lid gap are not sealed, and neither material is weatherproof on its own. For outdoor or wet use, add a gasket and use a certified IP-rated enclosure instead.
Can I use it for a mains-powered project?
No. Use a listed enclosure designed for mains voltage. A laser-cut plywood or printed plastic box does not provide the insulation, flame rating or strain relief that mains wiring requires.
Is this the same as a parametric OpenSCAD enclosure?
The idea is the same — dimensions drive the geometry — but there is no script to edit. Change a number and the panels or STL update immediately. If you need features like snap fits, bosses or arbitrary shapes, a parametric CAD model will take you further.
Is anything uploaded?
No. All geometry is generated in your browser. The page makes no network requests after it loads.
Other box generators
- Box generator with lid — inset versus flat lids, fit and kerf.
- Laser cut box generator — kerf measurement and importing the cut file.
- 3D printed box generator — wall thickness and print orientation for FDM.
- Box generator with dimensions — inner versus outer dimensions, with worked examples.