## Manufacturing @ Home: A rechargeable near-field mic, (almost) from scratch

Some time ago I backed the W-Ear kit on Kickstarter.  Even though they also offer the option of a fully assembled, rechargeable version, I opted for the through-hole kit, which went for much less and also shipped much earlier.  I was originally planning to just 3D print an enclosure, instead of using an Altoids tin.  However, on a whim, I decided to take this a bit further, because… why not?

TL;DR: I went from the PCB on the left, to the device on the right, without ever leaving home. Design files are available here (caveat: I’m not an EE, but I sometimes play one on the web! :).

In addition to the plastic enclosure (designed and 3D printed at home), I also added a boost converter and a LiPo charge controller, so that the device can run off a LiPo battery and can be recharged via a standard micro-USB port.  These days a computer, the right tools, a fair amount of googling, and some common sense go a long way. Much of this is possible by standing on the shoulders of open source, both software (e.g., OpenSCAD and Slic3r) and hardware (e.g., Adafruit’s designs).  Also, CAD and common data formats make it easy to manufacture components, from circuits, to enclosures, to mechanical assemblies (example of this in another post), with just a few mouse clicks (e.g., with a 3D printer or through online services like OSHPark).  Just, say, five years ago, very little of this would be as easy as it is today.  Even Jonathan Jaglom, son of Stratasys’s chairman and CEO of Makerbot, seems to recognize this (via Hackaday), although he doesn’t actually say the “o” (for opensource) word.

Measuring things out. Instead of getting off-the-shelf breakout boards and jamming them in a large enclosure, I decided to streamline everything onto a single PCB, which would fit the overall round shape of the W-Ear. First, I needed precise dimensions of the W-Ear PCB.  Some information (microphone and mounting hole locations) is available on the W-Ear website, but I also needed the board outline and component locations to make the add-on LiPo PCB fit as tightly as possible.  Therefore, I scanned the W-Ear PCB on a flatbed scanner, and traced the outlines using Inkscape (an opensource vector drawing application).  After marking the locations of taller components (capacitors, transistor, and LM386 IC), I also drew the add-on board outline, saved it as DXF, and imported it into Eagle.

Designing the voltage regulator and charge controller PCB. Working with the W-Ear PCB imposed some constraints that are somewhat artificial, the most important of which is that supply voltage needs to be 9V.  The LM386-4 has a minimum supply voltage of 5V, and I also wasn’t sure if the rest of the microphone array circuit would work properly with anything different.  A single-cell LiPo supplies about 3.7V, so a voltage converter was necessary.  I decided to go with the MIC2288, and basically copied the datasheet example circuit (including component placement guidelines, as much as possible).

Next, I needed a charge controller for the LiPo battery.  Adafruit has several, and I chose one of their older designs, based on the MCP73833 IC.  Since this is open source hardware, I could download the schematic, tweak it for my needs (e.g., remove a few headers I didn’t need, change some resistors and thermistors, and switch to an MSOP package so it’s easier to hand-solder), and then lay out my custom PCB.  Isn’t that nice?  In the meantime, I had chosen a couple of LiPo cells off of EBay, and had them shipped from China.  Finally, I laid out the PCB, using the traced board outline and leaving empty space for the LiPo.

In the meantime, I also soldered the W-Ear board and printed my charge controller PCB on paper and cut it out, to make sure that the outline was correct and that it would fit snugly around the various components.  After tweaking the outline’s cutouts by a few fractions of a mm here and there, I shipped the design files off to OSHPark, to have a set of three prototype boards made.  Here are the bare boards (including the add-on fix; see below):

Designing the enclosure. While I was waiting for those to arrive (it takes about 10-14 days), I started designing the 3D printed enclosure, using the actual W-Ear PCB and the paper mockup of my PCB.  I made the enclosure’s cAD design parametric (e.g., total height, slack around the board, position and size of microphone, LED, and socket cutouts, etc), so I could easily tweak it.  A couple of test prints later, I was almost done.  The enclosure measures 79mm in diameter (basically constrained by the diameter of the W-Ear PCB), and 19.5mm thick, which is significantly thinner than would have been possible with the originally supplied 9V battery.  I was actually surprised to realize that the total height is constrained by the electrolytic caps, not by my extra PCB + LiPo “sandwich”!  Much better than I had expected.

One thing that bothered me was the huge volume knob that shipped with the W-Ear kit, so I quickly designed and 3D printed a smaller, nicer-looking one. Finally, somewhere at this point, I placed an order for all the necessary SMD components from DigiKey (these arrive quickly, in just a couple of days).

If you haven’t worked with 3D printing before, it can be like magic at first, but for me it’s now almost routine.  Although there are a number of details in designing a CAD model like this, I’m glossing over them. Here is a render of the final CAD model for all enclosure pieces:

PCB mounting standoffs are part of the enclosure, and the tabs on the back cover (tapered, to make them less likely to break) are meant to hold the LiPo cell in place.

Assembly and initial testing. When everything arrived in the mail, I was ready to put together and test.  I assembled the charge controller board using hot air reflow soldering.  If you’re interested, there are several example videos on YouTube; here is one by Dave Jones, demonstrating on much smaller and trickier (QFN instead of MSOP) components than I used.  Everything fit together almost perfectly (except for the battery’s JST connector that protruded by about 0.5mm, which was easy enough to trim).  The “measure twice (or thrice, or more), cut once” mantra paid off, as usual.

Working around ripple issues.  The circuit worked correctly the first time, much to my surprise (can you tell I have no EE training, or anything beyond high-school physics when in comes to circuits — e.g., see the redundant caps… :).  Except for one thing, which I had feared: there was too much ripple on the switching regulator’s output, and the W-Ear requires a very clean power supply.  After some googling, it seems I had two options: (i) design an appropriate output filter, or (ii) add a linear LDO regulator after the switching regulator. I decided against the first option, for two reasons.  First, it would probably take too much time (days?) and trial-and-error to get a clue on filter design.  Second, I wasn’t entirely sure that, even after all that, I’d get a passive low-pass filter with components small enough to fit in the enclosure.  Therefore, I searched DigiKey for an appropriate LDO, and came up with the ADP7102, which has a very high power-supply rejection ratio (PSRR; a term I hadn’t even heard of before :) and could probably serve as a kind of active filter in this case, I guess.  It ain’t cheap, but that wasn’t a concern, since this is a one-off circuit, mainly for fun.

Getting the PCB done from scratch would cost quite a bit, so I decided to make a tiny add-on board (basically, a breakout for the ADP7102, plus the datasheet-recommended input and output caps), which could be soldered onto the main board with a pin header.  So, instead of paying $29 for another batch of the entire board, I paid only$1.5.  SMD components made the add-on small enough to stay below the top of the LiPo battery.  I designed this tiny board quickly and shipped the files off to OSHPark, once again.  When the boards came back, I assembled them (hot air reflow again), changed the feedback resistor on the switching regulator to increase its output voltage by about 0.2-0.3V (to compensate for the dropout), and put everything together. And it actually worked!  No more hiss and distortion.  Here’s what the final assembly looks like:

Almost everything you see in the picture (except the green printed circuit) was designed and manufactured “at home” (or at least without leaving it)!  Yay for opensource and CAD.

There is one more shortcoming in the design: the switching+linear regulator portion is always enabled, and quiescent current is enough to kill battery within a few days, even if the W-Ear is switched off.  However, I didn’t want (or, rather, I was afraid?) to touch the W-Ear circuit in any way (e.g., tapping into it’s volume potentiometer’s on-off switch).  I can live with this anyway.

The finishing touch was a piece of paracord (cut to length, inserted into the enclosure’s holes for it, then knotted and slightly melted with a lighter to make it stay put), so the finished device could be worn around the neck.  Mission accomplished!

Conclusion.  This side-project was completed over time during the summer of 2014. If I had to guess how long it would have taken if I’d worked exclusively on this, I’d say less than a week (excluding the time waiting for PCBs, but including time spent googling, learning, and collecting all necessary information). Is this a finished product, or even production-ready?  No, but it’s a pretty darn convincing prototype (and would have been even more so if I hadn’t been too lazy to apply a coat of XTC-3D and spraypaint; one of these days :). More so if you consider that it was done in a short period of time, by someone who has no formal training in design or EE, largely by re-using opensource designs on the web, and relying on freely available tools!  And all of this without ever leaving home, and without any major investments in equipment!  Not bad.