• 3D Printed Headphones posted on 13 Oct 2012

    The Sony MDR-V500 headphones were marketed as budget DJ headphones. They sound 'good enough' and are extremely durable. Their biggest fault is that they are on-the-ear headphones instead of the more comfortable over-the-ear type. I set out to fix that with a bit of 3D printing.

    Mod Results I did not complete this mod.

    I neglected to take a 'before' picture, so here's one from someone else:

    Source: Playderecord.com

    In-Progress Photos

    Modification Process

    First, I modeled the two part enclosure in Solidworks. When this was complete, I tweaked the dimensions to allow for pads with a diameter 3cm larger than the original.

    To install the larger enclosures, the original enclosures must be removed and the drivers extracted.

    First, remove the pads and the three screws under them. Carefully remove the foam that is glued over the driver.

    Separate the two halves of the enclosure. Flip the inner half around and remove the driver by twisting it slightly.

    Once the driver is free, the headphone wires will need to be removed. Grab a soldering iron and remove the wires one at a time.

    Cut the zip tie inside and pull the wire out from the enclosure. The enclosure can now be removed from the headband.

    Save the nice rubber strain relief piece for the new enclosure.

    Read more...

  • (Linux Mint) Cinnamon Set Workspace Names posted on 13 Oct 2012

    In Cinnamon 1.6, workspaces in the expo can have custom names applied. However, these names are not carried through to the window right click menu (Move to another workspace ->).

    Workspace names in the right click menu are set by the workspace-names key in org.gnome.desktop.wm.preferences.

    For example:

    gsettings set org.gnome.desktop.wm.preferences workspace-names "['Entertainment', 'Projects', 'Programming', 'Learning', 'Homework']" 
    

    (Sadly, these names do synchronize with the expo names, so you'll have to set everything twice.)

    Read more...

  • The Problem with Embedded Development posted on 13 Oct 2012

    Embedded development sits in a remarkably odd position - somewhere between electrical engineering and computer science. It is such an odd position that there isn't even a college degree for it!

    There is one big problem with embedded development today - tools. On the electrical engineering side, there are great tools. An electrical design can be created by a group ranging in size from one person to hundreds, and can be thoroughly simulated, tested, and verified before it is built. Software that runs on full computers is in an even better position. Best practices exist for all common tasks; software written in any language can be thoroughly tested. Every iteration of code can be evaluated based on one metric or another - primarily: do the tests pass?

    In embedded development, none of this is true. Unit testing is almost unheard of. Whether or not the code "works" is defined by (hopefully) a third party (probably, a fellow developer) putting a device through its paces.

    What we need:

    • Unit testing (Desktop based?)
    • A way to put code through its paces on a desktop before it is deployed. I'm imagining a tiny package that defines all of a processor's registers so code will compile and run on a desktop. Bonuses would be a system to generate various interrupts and a robust plugin system that would allow for IO.

    From there, it would be trivial to set up a build server to continuously check the code in a repository.

    Sorry for the unpolished post. Better early than never!

    Read more...

  • Maker Faire 2012 posted on 29 Sep 2012

    A friend asked what got my attention at Maker Faire. My response:

    Everything on the Make Live stage was amazing. Intel's futurist, Brian David Johnson, had a very interesting talk. The makerspace panel was absolutely stunning; life changing, even.

    I was super impressed by the Rostock Max printer (www.SeeMeCNC.com). (re)Designed by a bunch of injection molding guys. They'll be shipping kits of the hard-to-print parts alongside their full kits. These guys had a really neat injection molded business card! I'll post pictures soon.

    Trinity Labs (www.trinitylabs.com) is absolutely AMAZING. They have Mike Payson (maxbots), Triffid Hunter, and Arthur Wolf on the payroll. They're moving forward on the excellent Smoothieboard, and have a very sturdy MendelMax offering. Think: single linear motion extrusion on the y axis rather than a pair. Eric took a lot of time to talk to me; it was pretty cool to connect over our plans to build Rostocks.

    Listened (and asked a lot of questions) to Edward P. Ryan (www.tb-iplaw.com), a patent attorney. He was great, and gave me a few good bits of information that I didn't know before. For example, if you create a PCB that, once populated, will infringe upon a patent, selling the bare PCB puts you at risk for a suit.

    Qu-Bd (http://www.qu-bd.com/) gave me a few feet of their 'nanolinks' mini cable chain. At $3/foot, it's awesome and affordable!

    I enjoyed seeing the DLP resin printers. Stunning resolution, but the cured plastic isn't very rigid. It's also best in one color - red - because they're using visible-color (blue?) curing plastic. I think I'll wait until someone's built a specialized UV projector.

    iDigi gave me a business card with a bare XBee board. If I can find a BOM, I'm going to populate it ;)

    The Shopbot tools on display were impressive - they had a CNC-lathe combo on display! I wouldn't want one for the house, but would definitely reccomend to otherse.

    I glanced the Helios Robot (http://kick.st/Spjaw0). Looked like an interesting toy.

    I enjoyed seeing the AeroQuad (www.AeroQuad.com) multicopters buzzing about all day. They also have very impressive business cards (as much as a paper business card can be impressive).

    Read more...

  • NJIT High School Programming Contest Practice Problems posted on 21 Sep 2012

    NJIT High School Programming Contest Practice Problems Came across some practice problems from the NJIT High School Programming Contest I attended three years ago, thought I'd share.

    Practice Problem 1

    Write a program that reads a line containing one or more positive integers and prints out the even numbers.

    The input is a first line containing one or more positive integers. The output is a single line with each of the even numbers, appearing in the same order as the input.

    For example, if the input is

    77 2046 91 3 405981 378 22228

    then the correct output is

    2046 378 22228

    Practice Problem 2

    Write a program that reads a line containing one or more strings and prints out the strings on a single line with each lower canse letter changed to an upper case and each upper case letter changed to lower case.

    For example, if the input is

    New Jersey

    then the correct output is

    nEW jERSEY

    Practice Problem 3

    Write a program that determines the subset of a list of words that start with a given letter.

    The input is a first line containing a positive integer n and a single letter c. There are n subsequent lines, each containing a word. The output is the number of words that start with c, followed by a list of those words.

    For example, if the input is

    4 d cat dog rabbit donkey

    then the correct output is

    2 dog donkey

    Competition was hosted by http://web.njit.edu/~calvin/

    Read more...

  • Unboxing: Energy Micro EFM32 Tiny Gecko Starter Kit posted on 11 May 2012

    Today I received a Tiny Gecko starter kit (http://www.energymicro.com/tools/efm32-tiny-gecko-starter-kit)

    Thanks to EEVBlog and EnergyMicro for the kit!

    Read more...

  • Electroplating posted on 20 Apr 2012

    As defined by Wikipedia, electroplating is "[a] process in which metal ions in a solution are moved by an electric field to coat an electrode." All it takes to electroplate is a power supply and an ionic bath. Connect the positive terminal to the metallic piece to be deposited - this is the anode, and the negative terminal to the piece to be plated - this is the cathode.

    I began my experiment by making a sodium chloride solution - table salt and water. I used a steel hex wrench as the anode and a penny as the cathode. Both pieces of metal were suspended in the salt bath with precariously balanced alligator clips. My power supply is rated to supply four amps continuously. I turned the power supply on and bubbles started to stream from the cathode. After some time had passed, the bath began to darken. I removed the cathode to see a layer of dark slime; when I wiped it away, a thin layer of copper/zinc was revealed.

    Next, I tried using an aluminum can as the cathode. Due to the large exposed area, this drew a lot of current and warmed the solution. This time, the solution darkened even more quickly.

    You can see how thin the aluminum on the exposed edge became.

    My next target was a metal capped PIC microprocessor. On a whim, I decided to use a new ionic bath. I opted to start with a hydrochloric acid base - vinegar. No additives were necessary; when the electroplating process was started, the anode would be ionized, giving rise to an ionic bath.

    Twenty minutes after beginning the process, the chip slipped away from its clip. Curious, I turned the power supply off and inspected the setup. To my dismay, the alligator clip holding the chip had been electrolyzed! A sad turn of events - but it was worth it! The cover of the microprocessor was removed with no damage to the silicon core inside.

    I wish I could get a better picture of the die.

    Taking the picture through a magnifying glass didn't help.

    Read more...

  • Etching a PCB using Electrolysis posted on 20 Apr 2012

    While playing around with electroplating, I decided to try using a PCB as the anode (the piece that metal is removed from). In theory, this will allow one to etch a PCB without any chemicals.

    I pulled some copper up from the edge so I could get a reliable connection.

    I used sand paper to remove a patch of soldermask from the back of the board. After placing a piece of clear household tape over the bare copper, I cut out the negative of a small sample circuit. Sadly, I don't have any pictures of this process, only the before and after shown below

    Salt bath (vinegar; the blue tint is from copper ions left from a previous electroplating)

    On the first try, I made the gaps too small. Additionally, I neglected to remove all soldermask from the area, and I scratched the PCB with a screw driver. All together, this made for a badly etched board.

    The board after a second try. I made the separation as wide as possible to ensure success.

    The other side of the PCB. The leads on or near ground were removed, others were largely untouched.

    Grinding wheels are no good at removing soldermask.

    I'm not sure I could have chosen a simpler circuit, but I was still stoked when this worked.

    Read more...

  • A Simple USB Audio Device posted on 02 Apr 2012

    About four months ago, I came across the TI PCM2707. The PCM2707 is a standard USB 1.1 audio IC. As such, it can play audio without any custom drivers. My device closely follows the reference design shown in TI's datasheet. The PCM2707 can play 16 bit stereo audio at a maximum sampling rate of 48kHz. It has a built in 175mW headphone amplifier for analog output. Additionally, it can output S/PDIF and I2S digital audio. The former might be used to connect to a consumer audio receiver, while the latter could be used to interface with a more powerful amplifier IC.

    The PCM2707 has a built in 3.3 volt regulator. I was tempted to use this regulator's output to power a separate headphone amplifier, but TI specifically warns against this. Doing so would probably risk blowing the built in regulator or going over USB's 500mA current limit. As I'm not a fan of toasting $10 chips, I opted to stay with the reference design.

    The PCM2707 was brought to market in 2003. While it offers simplicity, it sacrifices a number of attractive features present in modern USB audio devices. The USB 1.1 audio standard has provisions for stereo audio at a bit depth of 16 and a sampling rate of up to 48kHz. If you want more, you need a custom driver. Any of these features is likely to require more bandwidth than USB 1.1 can offer, so you probably need a USB 2.0 device, too. As far as I am aware, there is no USB 2.0 equivalent to the PCM2707 on the market - all solutions seem to be based around a processor with a USB hardware interface and a DAC. I didn't want to bother with an unfamiliar MCU, custom drivers, and expensive development kits - so I picked the dinosaur.

    Hardware

    I did not need any exceptional features, so I opted to use TI's reference design. I copied the schematic into OrCAD and broke out the lines that looked interesting. From OrCAD, I exported a netlist to PADS for hardware layout. (To glue the two pieces of software together, I used the PowerNET netlister.) This workflow was painful to set up, but very efficient once it was operational. I opted to use these two software packages over Eagle because my coworkers are familiar with them.

    The layout was scrapped three times before I arrived at my final design - I planned to buy boards from BatchPCB, so I foolishly forced my design into one square inch. By the time I was done carving bits from my design, I had a haphazardly placed double sided board with no access to a number of useful pins. For the first layout iteration, I hand placed all components and hand routed all traces. For the subsequent layouts, I kept the hand placement and autorouted the traces. This saved neither time nor effort - I spent so much time tweaking and optimizing the traces that it would have been faster to route them manually.

    In my final design, all resistors and ceramic capacitors are 0603 size. I like 0603 because it offers a good compromise between size and hand-solderability.

    Assembly

    When the boards arrived, I performed a quick inspection. BatchPCB's board house had put the silkscreen for both sides on the top! Additionally, the soldermask was thin and uneven. I wasn't too happy - nonetheless, I hurriedly assembled one and plugged it into a USB port. The PCM2707 on-board promptly let out its magical smoke. After a few hours spent debugging, I determined that my USB footprint was numbered backwards and the data lines were swapped. After soldering a USB cable directly to my board, everything worked as expected.

    Once I was satisfied that nothing would spontaneously explode, I printed a small case with my reprap. Because I failed to add mounting holes to my PCB, I designed a case that would contact the perimeter of the PCB while avoiding any nearby components. To help avoid any mistakes, I modeled the assembled part and built a box around it.

    The four small pins visible in the above rendering did not print correctly, so I glued the two halves together.

    Performance

    This little guy sounds great! The "low res" audio sounds stellar on everything from my pair of Sony MDR-V500s to my friend's Sennheiser HD555s. The device is absolutely silent when no audio is playing. It delivers clean mids and highs and a reasonable amount of bass.

    Mistakes

    • Micro USB connector on a prototype
    • Components right next to the edge of the PCB
    • Components on both sides of the PCB
    • Autorouted traces
    • Minimum size traces (6mil)
    • No locating holes or cutouts
    • No revision letter (or number)
    • Ordered a lot of PCBs to 'make up for' the BatchPCB setup fee

    In the future, I will use:

    • Mini USB
    • 0.1" edge clearance for all non-connector components
    • Components on one side
    • Larger traces
    • Manual routing
    • Locating holes
    • DorkbotPDX

    Added 4/7/2012

    I found another bug - the channels are swapped! This issue would be tough to fix by cutting traces, so I solved it by flipping the 3.5mm jack upside-down and wiring its pins to the proper pads. This is fixed in rev B - the files for which will be up as soon as I have verified their integrity.

    Added 4/11/2012

    Gerbers: http://dl.dropbox.com/u/11414619/Gerbers_R16.zip

    Schematic:

    Read more...

  • Hardware Design Workflow: My Mistakes posted on 13 Feb 2012

    During my recent foray into PCB layout, I made a few mistakes. Here are the most egregious:

    The biggest mistake I made was starting to route traces before I was happy with part placement. I can't stress this enough, figure out your part placement before you start routing. Of course, if you have an autorouter available, it is acceptable to use it periodically to gauge your part placement.

    Nail down your schematic before you start laying out your board. If your schematic is a moving target, layout will be impossible.

    If you know you are going to need small parts, use them from the start. On my first design, I started with 0805 passives and had to switch to 0603's when I realized I wasn't going to be able to pack 0805's as tightly as I wanted to. I scrapped the entire 0805 based layout and started from scratch with 0603 parts.

    Take it one step at a time. I may have made this point already, but it is important enough to warrant restating. Do not start placing parts until your schematic is done. Do not start routing traces until you are happy with part placement. Do not write a BOM until your PCB is complete.

    It is a good idea to know the approximate price of parts you are using. If you use prohibitively expensive or unavailable parts on your design, you may have to make changes as far back as the schematic. Essentially, you may have to make changes to every single step. Save yourself the frustration and know the parts you use.

    Read more...