by nothinglabs, published

SpeakerGen by nothinglabs Sep 9, 2014



SpeakerGen by nothinglabs is licensed under the Creative Commons - Attribution license.

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag


Thing Statistics

24573Views 1626Downloads Found in Audio


More info and demo -Video- for this project at:

3d print your own speaker enclosures!
This OpenSCAD / Customizer script lets you:

  • Generate a box of any desired volume / ratio / wall thickness
  • Determine optimal sealed box size for any driver using Thiele / Small parameters (Qts, Vas and Fs)
  • Include cutouts for speaker / terminals (and screw holes)
  • Include a bass port of any dimensions
    With a wide variety of inexpensive full-range drivers - you can easily 3d print a set of speakers that sound great.
    Note: If running locally - you'll need HarlanDMii's Write.scad library: http://www.thingiverse.com/thing:16193


Required parts:

Speaker drivers
Polyfill from fabric store (highly recommended)
Loudspeaker Enclosure Design in 30 seconds
SpeakerGen provides a built-in tool that can automatically create an optimized sealed box for your driver's parameters.
Speaker drivers' acoustic properties are described using "Thiele/Small" parameters (Qts, Fs and Vas). You can use these parameters to help determine what kind of box will work well for your speakers.
Sealed Boxes

Sealed boxes are the simplest to design with primarily one variable: size. They are also very flexible. A speaker driver that sounds good in a 1.0 sealed liter box probably sounds pretty decent in a 1.25 sealed liter box.
A sealed box / driver system is acoustically described using a number of parameters - an important one being "Q." A box's Q describes behavior around its resonance frequency - and hence helps dictate F3 value (bass frequency with a 3db drop in response).
Sealed box speakers commonly have Q values in the 0.7 to 1.4 range. The Q of a sealed enclosure system will always be larger than its driver's Qts.
The Q of a box decreases as its size goes up - and vice versa.
A Q of 0.7 provides the lowest possible F3 value - and by that argument is the optimal value for sealed speaker design. That said - accepting a larger Q value (say 0.9) allows of a significantly smaller box - with only some loss in bass response. Larger Q values still (say 1.4) result in a further loss in low-end response - but also introduce an upper-bass response peak - which can result in a boomy sound.
SpeakerGen uses some simple math to estimate what box size a given driver needs to obtain a certain Q value - and what F3 frequency that will result in. It works similarly to other online closed box calculators - such as this one:
Ported Boxes

"Ported" boxes utilize a tuned port to enhance bass response (aka bass reflex, vented, etc.). These boxes are more finicky to design - and aren't too hard to get "wrong" (thin bass, boomy bass, etc.). Diameter and length of the port need to be calculated with a moderate degree of precision - otherwise things can go very badly (don't guess).
Ported boxes tend to be larger (and hence take longer to print). However - they can significantly extend the bass range of smaller full-range drivers - which can make them a good choice for a 3d printed single-driver system.
SpeakerGen can easily produce a speaker box including a bass port of any specification you can print. However - since the math is a bit trickier - I'm leaving it up to other people who know better. To determine the correct dimensions for your vented box and bass port - check out these resources:
Print Tips / Pictured Speaker

The pictured speaker uses an AuraSound NS3-193-8A in a 1.7 liter enclosure with a bass port tuned to 70hz. This provides a calculated F3 frequency of 66hz - not bad for a 3" driver! It sounds great - but falls off a bit over 12khz - so treble adjustment is recommended.
The speaker box weighs about 1lbs - and took about 17 hours to print.
For my first attempt - I printed a box at 10% infill with only 2 shells. The speaker sounded OK - but subjectively seemed a bit flimsy.
For my second print (the one pictured) - I used 20% infill and 3 shells. This produced a solid feeling speaker cabinet. I think these are reasonable settings for smaller speakers (maybe under 1.75 liter). Larger speakers may do better with more infill / thicker walls.
Both prints were at 300 micron with 7mm walls. The inside top of the first print came out a little flimsy feeling (I believe due to having to "bridge" such a large area). For the second print I increased the floor and ceiling thicknesses from the default 0.8mm to 1.5mm - this seemed to address the issue. My gut is this might not be needed for a 200 micron print.
Driver Selection

There are lots of great full-range speakers available on parts-express.com in the $10-30 range. A few good candidates:

Cabinet assembly is pretty easy! Jut use wood screws to mount the speaker. Be careful not to over-tighten to avoid cracking. If the screws seem difficult to screw-in - try chasing out the holes with a drill bit.
Stuffing your cabinet with "polyfill" is highly recommended as it can reduce resonances - and slightly increase the effective size of your enclosure.

More from Audio

view more

All Apps

Upgrade this Thing with Thingiverse Apps


Edit, personalize, or revise this Thing

Customizer is the easiest way to take great 3D printable designs and make them your own. Make your OpenSCAD designs infinitely more valuable by empowering the community to customize them.

App Info Launch App
Customizer Thing App
Comments deleted.

Not bad but you are missing one of the main advantages to using 3D printing to make speaker cabinets. Parallel walls = Standing Waves thus you should make everything curved for example like the Klipsch Pro Media 2.1 satellite speakers. Even the fronts are curved to make them act as Point Source Monitors which is what you really want for a desktop system for better stereo separation.

The main reason speakers are traditionally cubes is because they were made from wood boards not because they work better, they do not.

yup - spherical speakers have advantages...

my other project can be used to make them:



NOMOON Speaker Generator

This and the spherical ones are great, thanks for sharing them. With the spherical ones the build area size needed to get the volume is an issue for me. I've got a 4" subwoofer I want to make a box for and the calculations make it too big to 3d print on my printer, this cuboid design can get closer to the desired volume of around 5 litres, looks like I can get to around 4 litres, not sure how much difference it makes to the sound. what would be nice is a design with slightly curved sides,

Now if only we all had round rooms to put them in instead of cubed shaped rooms ......

Could always build a dome room as your home theatre. Ah, if only. Renting and being broke sucks

Nice code. Will be printing a small subwoofer box soon based on SpeakerGen.
Suggestions: Add terminal and speaker hole offset option.

Just finished my second active speaker with this model. Good Job, Nothinglabs!

awesome! - got any pics? (you can add them to this thing as a "made" if you like)


Did you use supports during your print?

Would you mind clarifying some terminology.

You said that you printed a box at 10% infill with only 2 shells. and your second print (the one pictured) - used 20% infill and 3 shells.

With regard to 3d printing, could you please explain the 2 terms:


Dana church

Shell - the number of times the printer runs around the inner surface of the object
Infill - the space between the shells. An infill of 100% means you're printing a solid piece. 50% would mean he gap inside is 50% plastic, 50% air. 25% infil and you're at 25% plastic inside the object, etc.

If you wanted a tougher outer surface of an object, you add shells at the cost of a longer print time

You... probably shouldn't be printing.....

This is definitly a very good idea!
But a speaker enclosure should be as heavy as possible, to avoid resonances. So, instead of generating a full printed box, why not use wood panels, and only print parts? The corners to assemble panels, the tube for bass reflex, a screw box for connections... This would give a nice kit ;o)

I would have thought the enclosure should be as stiff as possible - that subtle (but pedantic, i admit) difference in terminology aids in better design. While certain woods do make better cabinets, understanding why can help use other materials more effectively.

For example, where there are larger surfaces that may resonate, would adding ribs to the structure provide adequate stiffness?

Or maybe another idea to experiment with would be varying the thickness, or even density, of the walls to change the harmonics of the wall and cause the resonances to effectively cancel each other.

You are right, the enclosure should be stiff. And yes, adding ribs is a very good idea! People do this in subs...