Click to Visit           

Saturday, September 13, 2014

SpeakerGen - Parametric 3d Printed Speaker Enclosures

3d print your own speaker enclosures!

This OpenSCAD / Thingiverse 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 / terminal (and screw holes)
- Include a bass port of any dimensions

Click Here to use SpeakerGen online or download the OpenSCAD script.

With a wide variety of inexpensive full-range drivers - you can easily 3d print a set of speakers that sound great.

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.

While printing speaker boxes is slow - and only really an option for smaller enclosures - it has several advantages. Assembly is almost instant - and printed enclosures intrinsically don't have issues with panel fit. They are almost certain to be air-tight. If your speaker doesn't seem solid enough - just reprint with a higher infill percent!

So far I've only printed in enclosures in PLA. I can only speculate how boxes made with materials like rubber, wood, nylon or bronze would perform.

Notes on loudspeaker design / printing

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 liter sealed box probably sounds pretty decent in a 1.25 liter sealed 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.


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.

Driver Selection

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

Have fun!

Monday, July 7, 2014

Introducing BlinkyBird (for Google Glass)

I've been intending to write some kind of Google Glass app for the last several months - but was having trouble getting inspired.

Then it hit me - how about a Flappy Bird clone that uses Glass's eye sensor for blink-to-flap awesomeness? Done.

BlinkyBird is based on Cocos2d-x - and borrows code from Early Bird.

BlinkyBird uses Glass's eye sensor - just double-blink to flap!

Google doesn't expose support for the eye sensor in the SDK - but thorikawa and kaze0 came up with some tricks to get access to it.


  • Double-blink to flap (single-blink detection isn't enabled in the current version of Glass).
  • Be sure to calibrate the eye sensor in Google Glass settings. Try repositioning Glass on your face if calibration doesn't work.
  • Don't double-blink too fast - with practice - near 100% blink detection is possible.
  • If you're having trouble with "blink" mode - try "tap" mode. It works pretty much like classic Flappy Bird.
  • For now BlinkyBird is free.

    UPDATE: Looks like Google made changes to the blink-detection code on Glass XE20.1 which breaks GlassyBird. I'll post an update here when I get time to fix.

    Download the BlinkyBird APK here!

    Instructions on installing an APK on Glass

    Friday, January 10, 2014

    Radioactivity and Lasers at Ada's Books

    A few weeks ago I gave a presentation at Ada's Technical Books on two of my favorite projects:

    Peltier Cooler Based Cloud Chamber
    Arduino Powered Laser Show

    Thanks to Ada's for hosting and the great write-up in their blog and awesome photos.

    If you're in the Seattle area - definitely checkout Ada's. Their new location / cafe are spectacular with great food - a huge selection of technical books, electronic projects and interactive art.

    Wednesday, November 6, 2013

    3d Printed Hook / Loop Fasteners (ElastoStraps)

    I'd been thinking about better ways to attach things like lights and pumps to my bike for a while.

    Click Here to check out ElastoStraps on!

    I recently saw some commercially available bike lights that had elastic-style fasteners built into their design - and figured there might be a way I could make my own on my 3d printer.

    Over the next several days I developed "ElastoStraps" - reusable hook / loop fasteners 3d printed in soft PLA.

    Just stretch them around two things you want to hold together - and push the mesh over the hooks (don't worry if all the hooks don't catch).

    ElastoStraps have not been tested extensively - I can make no promises about durability. However - I will say that soft PLA is surprisingly tough stuff.

    So far - I've only printed ElastoStraps in "Flex EcoPLA" brand soft PLA available from If you try other brands / filament types - please let me know how it goes!

    I created ElastoStraps in OpenSCAD. You can easily use the Customizer on Thingiverse to make ElastoStraps of any size you like without needing to know OpenSCAD.

    Click Here to check out ElastoStraps on!

    Printing in soft PLA can be a bit tricky - this presentation has some tips:

    Friday, September 20, 2013

    Introducing ProfTweak - a MakerWare profile editor

    I'm a big fan of MakerWare and the MakerBot slicer.

    The recent improvements in rafts, supports and general slicing quality are impressive.

    That said - the one thing it doesn't do is provide a UI to access all the juicy goodies that let you really tweak print quality and get good results with alternative filaments.

    Sometimes I need to do things like:

    - Turn the filament fan off
    - Adjust filament diameter
    - Make the infill cats
    - Change individual feedrate options (infill vs outlines)

    Further - I often want to take an existing profile - and change a single variable as an experiment. For example - I might have a profile for Nylon that works well - but I want to try boosting the temperature up to 255c (and not have to create a new profile or risk messing-up the one that already works well).

    So - I present ProfTweak:

    Source and binaries (Windows, Mac, Linux) for ProfTweak are available on GitHub.
    Tip: Look for the "Download Zip" button to quickly grab everything.

    Source and binaries (Windows, Mac, Linux) for ProfTweak are available on GitHub.
    Tip: Look for the "Download Zip" button to quickly grab everything.

    What ProfTweak Does:

    - Provides a simple GUI to access MakerWare slicer profile settings
    - Toggle between a complete list of settings (there are a lot) and a smaller "Common Settings" list
    - Add notes to your profiles
    - Option to save as "ProfTweakTemp" profile for one-off experiments
    - Windows, Mac and Linux versions (someone let me know if the Linux version actually works...)

    ProfTweak was written in Processing using the G4P GUI library (these are great resources - but next app I will probably try something not Java-based).

    ProfTweak requires Java (32-bit). If ProfTweak won't run - you may need to install it.

    ProfTweak is licensed under

    General Notes and Usage (aka documentation)

  • I've tested ProfTweak - and it seems to work for me. But there may be bugs - awful bugs! I can't say with certainty it won't do something terrible to your brand-new Replicator 2x.

  • Don't bug the nice people at MakerBot support about issues you encounter while using profiles generated by ProfTweak.

  • ProfTweak requires an existing custom profile to start with. You might want to create an unadulterated custom profile from inside MakerWare based on the "Standard" (and maybe "Low" / "High") to base future profiles on. ProfTweak won't modify the built-in MakerWare profiles.

  • When you create a new profile from within ProfTweak it copies the supporting files (end.gcode, start.gcode, profile.json) to a new folder - as well as writing out a new miracle.json file based on your modifications.

  • ProfTweak stores its settings in proftweak.json found in the DATA folder under the folder where the app is installed.

  • ProfTweak should generally find your MakerWare profile folder - but if it doesn't - you can specify it manually in proftweak.json (Linux users will probably need to do this).

  • If you're a Windows user and find you need to set your profile folder - format it like this: "C:/Users/Rich/My Things/Profiles/"

  • If you want to add / remove common items you can do so by modifying proftweak.json.

  • Mac users - if you get an error " is damaged and can't be opened" - it's likely due to your Gatekeeper settings requiring apps be signed. See here for the solution.

  • If you associate .json files with ProfTweak - MakerWare will launch it automatically when you select "Edit profile." The Windows setup package can do this for you automatically.

  • ProfTweak reformats the .json in any profile it edits. This makes it less human-readable (MakerWare seems OK with it).

  • When you modify a number - ProfTweak deals with it as a float. As a result .15 becomes 0.15000000596046448. This shouldn't make a meaningful difference when slicing - but it might make a small one.

  • Saving in ProfTweak is always a manual operation. If you close without saving - you've closed without saving!

  • Have fun!!! Don't hesitate to contact me ( about issues.

    Monday, September 16, 2013

    Filament Roundup! (3D printing in all sorts of stuff)

    I recently gave a presentation on "alternative" filaments you can use with your 3d printer.

    My focus was on filaments you can print without a heated build platform (HBP) - mainly due to my own printer (a Makerbot Replicator 2) not having one.

    A common misconceptions is that without an HBP - you're limited to printing in PLA. In reality you can get great results with materials like Laywoo-D3, Taulman t-glase / Nylon 618, Soft PLA and others.

    The presentation has a lot of in-depth info on print settings for each filament and their strengths / weaknesses - more info that I can easily included here. I also cover some general printing tips and ways to make your print into other materials by casting.


    Here's a few highlights:

    Soft PLA is PLA modified with something that makes it soft, super-tough and rubber-like. Yes - the duck floats! If you're interested in printing with soft PLA - check out the presentation for some very important notes on getting reliable print results at reasonable speeds.

    Laywoo-D3 is plastic filament with wood particles added. LayBrick includes some kind of mineral substance. They aren't super-strong - but they both produce stunning results which don't look like traditional 3d-prints. These owls were printed at 150 micron layer height.

    Taulman Nylon 618 is a very tough filament - the toughest I've worked with. I used the clip above to secure a bag to my bike rack - it can support a surprising amount of weight. You can also color it using fabric dye! Printing in Nylon 618 requires some tricks for good results - see the presentation for some important notes (I haven't figured out how to get reliable results with the transparent Nylon 645 variant yet).

    PET is a very clear, rigid filament - however is fairly brittle. It prints easily with good adhesion and minimal curling.

    Taulman offers a PET variant (PETT) under the name of "t-glase." It's not clear exactly what it is - but it seems significantly tougher than the other PET filament I've printed with. It prints easily - and is probably your best option for transparent prints without a HBP. If you have adhesion issues - try moving your nozzle closer to the build plate.

    Obri-tech PLA 45 (no U.S.-based source yet) is another kind of modified PLA. It's much tougher than regular PLA while still being reasonably hard. It's also highly resistant to curling which makes it great for solid prints (like this bike part). It is not quite as tough as Nylon 618 - but is much easier to print. Note how the octupus legs are bent - but not broken.

    No - you can't print in metal at home (yet) - but you can easily cast. I used silicone molding putty and ROTO281F (a lead-free low melting temperature metal) to produce the nut / bolt from a Laywoo-D3 print (PLA should be fine too). My father used trickier lost-wax (lost-PLA) style casting to make the sterling silver tea pot.

    I printed a mold for these octopi in soft PLA and then cast them in urethane resin.

    Have fun! New nozzles are only about $5 on ebay....

    Tuesday, July 23, 2013

    Biking the STP using a 3D Printed Shifter

    About a week ago I finished my first major organized bike ride - the Seattle to Portland Bicycle Classic - or STP.

    It's 204 miles from start to finish - about 210 if you count starting at my house. Most people do the ride in 2-days - and camp in Centralia (around mile 100). Some hardcore people do the ride in 1-day.

    I figured it was a great chance to acid-test my 3d printed friction shifter (which to cut to the chase - worked great the entire time).

    STP Day 1

    I hate getting up early for stuff - and I'm not a big fan of crowds. So - I figured I'd bypass the official start-line - and join up with other riders a few miles south around 7:30 (when the start line closes).

    I also don't like people messing with my stuff - so I opted to avoid using the luggage-trucks - and packed all my gear on my bike. This included my tent, sleeping bag, sleeping pad, half-gallon of gatorade, bike tools and a bunch of other crap.

    I hate spandex so I just wore the cargo shorts I usually do.

    All of this came back to haunt me a bit...

    I'm not sure exactly how much the loaded bike slowed me down - but it was a lot more than I expected.

    Being slow caused me to fall towards the back of the surprisingly-sparse pack of late-starters - leaving me without people to draft off of - making me slower still.

    I eventually got far enough behind where the event-provided rest/food stops were packing up by the time I arrived. This left me without proper nutrition besides some powerbars and chewy-sugary-things (thanks Beth).

    I had a few aches / pains from specific body parts by mile 50 or so - but these mostly went away after I made a few adjustments to my bike. While I think I was staying well-hydrated - this ride was leaving me much more depleted than the unloaded 60-ish mile rides I commonly do.

    As it got past 6pm - I saw fewer and fewer people on the route. It was honestly getting a bit spooky. I came across a cyclist with a flat (who I stopped to help) - making me a bit later still.

    I finally made Centralia about 6:45pm. I may not have literally been the last one to roll-in - but it certainly felt like it.

    I setup camp - then scarfed down 1.5 hamburgers and some beer mixed with lemonade.

    While exhausted - I actually felt decent for having just biked 100+ miles in one-day with a full load of camping gear. I had some aches - but nothing serious.

    The shifter worked perfectly for the first 100 miles.

    What concerned me was that my bus from Portland back to Seattle left at 7pm the next day. If I repeated Day 1's performance - I might be stuck in Portland without a hotel room.

    STP Day 2

    I was planning on getting up around 5am - but the noise of other people packing up camp started around 4am.

    After I packed up - I tossed most of my stuff on the luggage truck. I was not repeating that mistake.

    I took advantage of the pancake breakfast being offered - having another real meal felt good.

    I hit the road about 5:15am and shortly after realized riding 100 miles the prior day in cargo shorts had taken its toll. I dropped into a gas station and purchased some duct tape. The field repairs were generally successful.

    It was amazing how much faster I went without all my camping gear. I was keeping up with pack - and hence able to draft and save energy. I was able to cover large distances quickly in a way I haven't been able to when cycling alone.

    I also greatly appreciated having the rest stops actually be open / serving small amounts of food (PBJ - yum!). Much more fun than the first day.

    While the first half of the second day went pretty easily - the second half seemed to drag on. I had always associated Oregon border with being a few miles from Portland - and via I-5 it is. However - the path the STP takes crosses the border about 50-miles from Portland - a long ways from done.

    The later part of the ride also transitions from scenic country roads towards more monotonous riding along side the highway.

    The last few-dozen miles went like molasses. It turns out the finish line isn't at the edge of Portland - but rather after about 8 miles of traffic-light filled biking inside Portland. I can't explain how ripped off I felt when I realized that "Portland 15 miles" really means 23-miles to the finish line. There are few things more frustrating than biking 200+ miles to then be stuck in traffic - just a few miles from your destination.

    I finally rolled across the finish line around 5:15pm. Surprisingly my total time for Day 2 was pretty similar to Day 1's - but I spent a lot more time stopped at rest areas.

    I felt pretty good when I finished - although a bit dizzy and totally spent. It took about 1.5 days to fully recover post-event. It was far more exercise than I've ever gotten in such a relatively short period.

    The shifter worked great - it didn't need any adjustments for the entire ride. So far I've put about 400 miles on the latest version - with no signs of major wear.

    Lessons for other STP Participants:
    - If you're slow - start as early as possible
    - Pack light - use the luggage trucks
    - Proper bike attire is probably a good idea
    - Have some experimental bike hardware you want to try out? Give it a go - it'll probably work fine!

    And Now - A Brief Diatribe on Bike Gearing

    My bike is setup with a single front chainring (38 tooth) and a 12/32 7-speed cassette in back. This results in a range of 266% compared to around 375% for a typical road bike.

    Out of my various challenges on the ride - I was able to make it up the worst hill (Puyallup) with all my camping gear and only "spun-out" from lack of higher gearing a few times. Further - you can actually get up to about 310% range with an 8-speed cassette - still using a single front chainring / no front-derailer.

    In short - I think a large part of bikes having front-derailers is about marketing - so they can claim "27-speeds" - even though 1/3rd of those gears aren't usable and most people don't need them. Yes - I'm aware of the efficiency loss from having a less-straight chainline - but it seems like a minor price to pay for the reduction in mechanical complexity and user interface.