Print a speaker enclosure: mono, stereo, bass reflex
What does the speaker enclosure generator do?
This generator prints an enclosure for small speaker drivers, the kind used in Bluetooth speakers, doorbells, hobby radios or Raspberry Pi projects. You choose mono or stereo, enter the sizes of your driver and get a box with a sealed chamber for each driver. Optionally it adds a bay for a small amplifier board (PAM8403 and similar), a bass reflex port and a lid. Body and lid sit on one plate, and you can print either alone. The example gallery has finished boxes for drivers from 28 mm to 4 inches.
Everything runs in your browser. Nothing is uploaded, and your design lives entirely in the link you copy with “Share”. The same settings always give the same enclosure.
From driver to enclosure
The key sizes are in your driver’s data sheet or can be taken with calipers. Enter them in the “Drivers” group:
- “Drivers”: mono (one driver) or stereo (two drivers side by side, each in its own chamber).
- “Driver cutout” (15–150 mm): the opening in front of the cone, as in the data sheet.
- “Driver frame” (18–160 mm): the outer size of the frame, square side or diameter. If the chamber is too small it grows automatically and you see a note.
- “Driver depth” (3–100 mm): how far the driver reaches into the box behind the front. If it does not fit behind the front, the generator warns you to make the box deeper.
- “Mount holes”: none, two (left and right) or four (on the diagonals), plus “Hole circle” (18–170 mm) and “Mount hole” (1.5–5 mm). About 2 mm suits small self-tapping screws.
Some common values as a guide: a 28 mm driver needs a cutout around 24 mm, a 40 mm driver around 36 mm, a 2 inch driver around 46 mm, a 3 inch driver around 70 mm and a 4 inch driver around 92 mm. The examples show matching hole circles and box sizes for each.
Front: open or with a grille
“Front” gives you an open cutout or a printed grille in front of the cone: “Round holes”, “Honeycomb” or “Slots”. A grille protects the cone, and the driver is glued in from behind. “Grille pitch” (3–12 mm) is the distance between openings, “Grille bars” (0.8–4 mm) the width of the bars between them. 1.2 mm prints cleanly with a 0.4 mm nozzle. A very fine pitch on a large area would mean a huge number of openings; the generator then raises the pitch and tells you.
The box
The “Box” group sets the inside sizes:
- “Chamber width” (20–170 mm), “Inner height” (20–170 mm) and “Inner depth” (12–160 mm). More depth means more air volume and a little more bass. Below the sliders the generator shows the air volume of one chamber, without the driver.
- “Wall” (1.2–5 mm) for side walls and dividers, “Front panel” (1.6–8 mm) for the front. Thicker fronts resonate less. For small boxes 2 mm walls and a 3 mm front are a good start; from 3 inches up, 2.8 mm and more pays off.
- “Corner radius” (0–20 mm) rounds the vertical edges, “Edge chamfer” (0–3 mm) breaks the front and back edge. The chamfer is limited by the wall so the walls stay strong.
The whole box can be at most 180 mm wide. If it would be wider, the generator narrows the chambers and warns you. If body and lid do not fit on one 180 mm plate, print the lid separately: set “Parts” to “Lid” or “Body”.
The amplifier bay
With “Amplifier bay” the stereo box gets a bay of its own between the chambers, and the mono box beside the driver. It holds a small board by its edges: two arms with a 2 mm slot take it from behind. The bay is 0.6 mm wider than the board.
- “Board width” (10–80 mm) and “Board height” (2–80 mm, the height of the board’s underside above the bay floor).
- “Knob hole” (0–14 mm, about 7 mm for common boards) and “Knob height” (4–160 mm, center of the hole above the bay floor) for the volume pot.
- “Audio jack” (0–14 mm, about 6.2 mm for 3.5 mm) as a hole in the lid.
- “Power socket”: “None”, “USB-C”, “Micro USB” or “DC jack 5.5 mm”, as an opening in the lid, in line with the socket on the board’s back edge.
Check your board with calipers before printing. If an opening does not fit into the bay, the generator leaves it out and shows a message.
Bass reflex port
With “Port” (0–40 mm; 0 means a sealed box) the lid of each chamber gets a tube. “Port length” (0–120 mm) sets how far it reaches into the box. From air volume, port cross-section and length the generator calculates the tuning frequency with the Helmholtz formula and shows it. For a lower tuning use a longer or narrower port or a larger chamber. The port keeps its distance to the driver; if it is too long the generator shortens it and tells you. The formula is an approximation: driver, material and placement shift the result, so treat it as a guide, not a measurement.
A “Cable hole” (0–8 mm) in the lid takes the speaker cable; boxes with an amplifier bay get notches between the chambers and the bay instead. Seal the hole with hot glue, or air escapes.
Lid and fit
Under “Lid” choose “Press fit” or “Screws”. The press-fit lid has plug rings that reach into the chambers; “Plug depth” (2–12 mm) sets how deep and “Fit clearance” (0–0.8 mm) the gap to the walls. 0.2 mm is the starting value. If the lid is too tight, raise the clearance in small steps; if it is loose, lower it. If you open the box often or move it around, take the screwed lid: it adds bosses in the outer corners with a pilot hole of 80 % of the “Screw size” (2–4 mm) for self-tapping screws. With square driver frames the bosses can reach into the frame, and the generator points that out. “Lid thickness” (1.6–6 mm) sets the back panel.
Colors and multi-color printing
The generator has two color slots: body and lid. Give the lid its own color and it becomes a part of its own, in the same file as the body. The parts touch but never overlap.
- PrusaSlicer (MMU3, XL, Core One): “Multi-color 3MF (PrusaSlicer)” assigns the parts to extruders.
- Bambu Studio and OrcaSlicer (AMS): “3MF (Bambu Studio / OrcaSlicer)”.
- Other slicers: “STL per color (ZIP)”, assembled into one object in the slicer.
- Without a multi-material setup, print body and lid one by one in any colors. With a single color the export merges everything into one part.
Multi-color examples are at most 165 mm wide so the Bambu prime tower still fits.
Print numbers from the slicer
For comparison, some values from real PrusaSlicer slices (Prusa MINI, 0.20 mm SPEED, Prusament PLA). None of the examples needs supports.
| Example | Filament | Print time |
|---|---|---|
| Mono cube for 28 mm | 10 g | 34 min |
| Tiny stereo speaker (default) | 43 g | 1 h 24 min |
| Stereo box for 40 mm with honeycomb grille | 62 g | 2 h 13 min |
| Ported box for 2 inch | 57 g | 2 h 4 min |
| Bookshelf speaker for 3 inch | 97 g | 3 h 9 min |
| Enclosure for 4 inch | 130 g | 4 h 30 min |
Printing tips
- The body prints front down, the lid back down. Both lie flat on the bed, so no supports are needed.
- 0.2 mm layers and a 0.4 mm nozzle are enough. For boxes from 3 inches up, three perimeters keep the walls from droning.
- PLA is stiff and easy. PETG handles heat better if the box sits in the sun or gets a lot of power.
- If you do not know your printer’s tolerance, print the lid alone first (“Parts: Lid”) as a quick fit test.
- Glue the driver in with hot glue when you use a grille front. With open cutouts, small screws in the holes are enough.
- A sealed chamber sounds better. Seal the cable hole and joints with hot glue, press-fit lid included.
Origin and credits
The layout of this generator follows the design “Tiny Bluetooth Speaker” by ywabiko (CC-BY-4.0): driver chambers left and right, an amplifier bay in the middle, a front cutout with four mount holes on the diagonals and a plug-in lid with plug rings. The board holder and the knob hole come from “PAM8403 tiny amplifier enclosure” (CC-BY-4.0), also by ywabiko. This project rebuilds both as a parametric model with chamfers instead of rounded edges and a newly designed lid; sizes and layout are taken from the originals. License texts are on the licenses page.
All parameters
The numeric settings of the generator with their default values and allowed ranges. Text, fonts, patterns and colors are set directly in the generator.
| Parameter | Default | Range | Meaning |
|---|---|---|---|
| Drivers | |||
| Driver cutout | 29 mm | 15 – 150 mm | Diameter of the opening in front of the cone, as given in the driver’s data sheet. |
| Driver frame | 32 mm | 18 – 160 mm | Outer size of the driver’s frame (square side or diameter). The chamber grows to fit it. |
| Driver depth | 16 mm | 3 – 100 mm | How far the driver reaches into the box behind the front. The port tube keeps its distance to it. |
| Hole circle | 35 mm | 18 – 170 mm | Diameter of the circle through the centers of the mount holes. |
| Mount hole | 2 mm | 1.5 – 5 mm | Diameter of the mount holes; about 2 mm for small self-tapping screws. |
| Grille pitch | 5 mm | 3 – 12 mm | Distance between the centers of neighboring grille openings. |
| Grille bars | 1.2 mm | 0.8 – 4 mm | Width of the bars between the openings; 1.2 mm prints cleanly with a 0.4 mm nozzle. |
| Box | |||
| Chamber width | 34 mm | 20 – 170 mm | Inner width of one driver chamber. |
| Inner height | 34 mm | 20 – 170 mm | Inner height of the box (all chambers and the amplifier bay). |
| Inner depth | 30 mm | 12 – 160 mm | Inner depth from the back of the front panel to the open back. More depth means more air volume and more bass. |
| Wall | 2 mm | 1.2 – 5 mm | Thickness of the side walls and dividers. |
| Front panel | 3 mm | 1.6 – 8 mm | Thickness of the front panel the drivers are mounted to. Thicker panels resonate less. |
| Corner radius | 3 mm | 0 – 20 mm | Rounding of the vertical edges, 0 = square. |
| Edge chamfer | 1 mm | 0 – 3 mm | Chamfer around the front and the back edge. Limited by the wall so the walls keep their strength. |
| Amplifier | |||
| Board width | 30 mm | 10 – 80 mm | Width of the amplifier board; the bay is 0.6 mm wider and holds the board by its edges. |
| Board height | 2 mm | 2 – 80 mm | Height of the board’s underside above the bay floor. The board slides into a 2 mm slot from the back. |
| Knob hole | 7 mm | 0 – 14 mm | Hole in the front of the bay for the shaft of a volume potentiometer, 0 = none. About 7 mm for common boards. |
| Knob height | 10.5 mm | 4 – 160 mm | Height of the knob hole’s center above the bay floor. |
| Audio jack | 6.2 mm | 0 – 14 mm | Hole in the lid for a 3.5 mm panel jack (about 6.2 mm), 0 = none. |
| Back and lid | |||
| Port | 0 mm | 0 – 40 mm | Diameter of a bass reflex port in each chamber’s lid, 0 = sealed box. |
| Port length | 10 mm | 0 – 120 mm | Length of the port tube inside the box; the tuning frequency is shown below. |
| Cable hole | 3 mm | 0 – 8 mm | Hole in the lid for the speaker cable, or notches between the chambers and the amplifier bay. Seal it with hot glue. |
| Screw size | 2.5 mm | 2 – 4 mm | Screw diameter; the bosses get a pilot hole of 80 % for self-tapping screws. |
| Lid thickness | 2.4 mm | 1.6 – 6 mm | Thickness of the back panel. |
| Plug depth | 4 mm | 2 – 12 mm | How far the lid’s plug rings reach into the chambers. |
| Fit clearance | 0.2 mm | 0 – 0.8 mm | Gap between the plug rings and the chamber walls. Increase it if the lid is too tight. |
Frequently asked questions
Which drivers fit the enclosure?
Round and square drivers from about 28 mm up to 4 inches. Enter cutout, frame size, depth and hole circle from the data sheet; the chamber grows to fit when needed.
Do I need supports?
No. Body and lid lie flat on the bed, and every example was sliced without supports.
How airtight does the box need to be?
As airtight as you can make it. Seal the cable hole and the lid joints with hot glue, or a sealed chamber loses bass. With a bass reflex port, only the port stays open.
How do I tune the bass reflex port?
The generator shows the tuning frequency from the Helmholtz formula. A longer or narrower port lowers it, and so does a larger chamber. It is an estimate, not a measurement.
Can I print body and lid in two colors?
Yes. Give the lid its own color and download the multi-color 3MF for PrusaSlicer or the 3MF for Bambu Studio and OrcaSlicer. Without a multi-material setup, print the two parts separately.
Origin & license
- Tiny Bluetooth Speaker by ywabiko · CC BY 4.0 · code ported – Layout of driver chambers left and right with the amplifier in the middle, front cutout with four mount holes on the diagonals and the plug-in lid (Compo.scad, CE32A_Rev2.scad), rebuilt as parametric z bands.
- PAM8403 tiny amplifier enclosure by ywabiko · CC BY 4.0 · code ported – Board holder of two 2 mm arms around a 2 mm slot and the knob hole (PAM8403.scad) for the amplifier bay.