Monday, December 10, 2012

TV-B-Gone Redesign Part III: Assembly

     After receiving the sheets, the next logical step is to put everything together.  Between the time I ordered the PCBs and when they came, I ordered the parts to solder on.  Here's a side-by-side of the parts I used, and the parts LadyAda used, hers are on the left, mine on the right.
Micro:   ATTINY85V-10-PU     ATTINY85V-10SU
Oscillator:   CSTLS8M00G53Z-B0     CCR8.0MXC8T
Cap_1:   UBR0J221MDD     2x: LMK316BJ106KL-T
Cap_2:    C315C104M5U5TA     N/A
EU Resistor: 1/4W, 5%, 10K     N/A
Status LED Resistor: 1/4W, 5%, 1K     MCR10ERTF1000
Output LED Resistor: 1/4W, 5%, 1K     2x: ESR10EZPJ8R2
Narrow LED:   2x: EL-IR333-A     SFH 4545
Wide LED:   2x: 638-IR333C/H0/L10     OED-EL-1L2
Tact Switch:   FSM4JH     PTS645SK43SMTRLFS
Leading Transistor:   PN2907ABU     FDN335N
LED Transistor:   PN2222BU     N/A
JTAG Header:   961206-6404-AR     N/A
Battery Holder:   2463K-ND     22-0421-R-GR
     All of my parts can be found on Digi-Key, except for the battery pack, which can be found on Mouser.
     The sheets had 50 units per sheet, so I had to separate them somehow.  Now you may ask yourself 'Why didn't you order the boards with holes punched in them, so you could break them apart by hand?'  The reason is, that sequentially punched holes like that are against the agreement when ordering boards, and you'll either have to pay a huge price for it, or you won't get the boards.  So I had to use a bandsaw.
     Lucky for me, my old man used to do woodwork, so our entire basement is basically a woodshop.  Also lucky for me, he had a bandsaw blade with teeth fine enough that roughly two and a half teeth fit into the board at any time, which he said was required for safety reasons.  After a simple blade swap, I began cutting the boards.  Unfortunately, I suck at cutting straight (the boards went under the guide), so I ended up with some pretty ugly units.  However, after a couple hours of sanding, all 50 boards looked decent.
     Now I'm stuck with a bunch of incredibly tiny parts, and 50 boards.  Another wave of help from the old man comes when he brings home some magnification glasses, a board holder, and tweezers.  The largest part is less than a quarter inch in length, so maneuvering the parts into place is hilariously difficult.  Each part is so small that the mere static from your finger will keep it from landing on the board.  Tweezers were a godsend.  The magnification glasses were very helpful in the beginning, but as I got into the rhythm of things, I found myself using them less.  The board holder is something I also love.  It allowed me to (at my peak) work on six boards at once, a far cry from the one I would be working on otherwise.
     Soldering methods range wildly depending on experience, part type, and personal preference.  I found it easiest to solder one pad, then remelt the pad while placing the part into it with the tweezers.  Then I could go around and solder the other pads down, making it especially easy to solder the microcontroller down.
     I generally did the micros first, then did a couple parts at a time, and the LEDs were second to last followed by the battery pack.  Sit back, pop on some music on Pandora, and solder away for a few hours.
     The buttons had to go on last.  I thought I was clever when designing the boards, placing the JTAG programming header under the button.  I thought I could program it from the reverse side of the board.  Unfortunately, without rewiring the header (alright, that's a 5 minute solution, but still) that's not possible.  Not a big deal.  Just solder all the parts, program, then solder the button on.
     To package it up, I had to clip the wires from the battery pack to be a half-inch and solder them to the boards.  The boards were mounted with double-sided tape onto the battery housing, so that the LEDs sat on the edge of the housing, avoiding any bending that may occur. Pop in the batteries, and it's done!

Sunday, May 20, 2012

TV-B-Gone Redesign Part II: Design

     I had two major redesigns in mind: make the parts smaller, and make them 'better'.  Making the parts smaller was simple: choose something with the same values, but in a surface mount package, instead of through hole package.  This means that instead of putting the part through a hole and soldering it into place, you put the part on the surface, and solder it into place via its pad.  Making the parts 'better' was also simple enough: choose more powerful LEDs, and collapse the transistors.
     The reference design used a whopping 5 transistors.  One was used to power the other four, which were used to power their respective LED.  My design replaced this system with a single FET.  A FET is a Field Effect Transistor, which fires based on the field of electricity, not the flow of it.  This means that you may lose an electron or two every second.  Incredibly efficient.  It can also handle a very high throughput of power: enough to power two nice LEDs.
     After choosing all the parts (I'll detail these later), I had to design the solder pads for each part.  This means going through the spec sheets for all of them, and finding where the pins are located, so I can design a PCB that will route all the parts together.  It turns out there exists a standard package size for resistors and similar parts.  The 0805 package allowed me to place five identical pads: four resistors, and one LED.  Eventually I chose the parts around the package, allowing me to make a more mainstream design where I could choose cheaper, more common parts because I chose a popular package.
     I had to start connecting all the parts then, in a meaningful manner.  This process begins with creating a schematic, and ends in the routed PCB (Printed Circuit Board).  The schematic is simple enough: make the schematic symbol for every part, and connect them in the order they should be connected.  Here's a picture of what it ended up looking like.
     Next I had to work on designing the actual boards.  This isn't the easiest thing in the world: the program I used to design it (PCB Artist) is a piece of crap.  I chose it because they offer a deal where I get five sheets of 60 square inches of PCB for around $135.  If I just wanted one unit it would have cost me close to $75, so it was a no-brainer kind of a choice.  When you're dealing with 'actual' engineering stuff I guess the price breaks are pretty extreme.  Regardless, routing the PCB means that you're given the pads you dimensioned earlier, and, using the connections you noted in the schematic, you dictate where the metal traces will go. Since it's such a simple board, there's only two routable layers: top and bottom.  To make life easier  it's tradition to 'flood' the top of the board with ground, and the bottom with VCC (power).  This makes it vastly easier to give parts the power they need.  If a part needs power, you route it to a via, which connects to the other side of the board to give it power.  The end product looked like this.  The brighter red is either a trace, or part of the board flooded with ground.  The dark(er) red represents the pads to which the parts will be soldered.  The cyan  is seen where nothing is traced on the top layer, so it shows the bottom layer--cyan is power.  The yellow circles are vias, connecting the two layers.  Finally, the thin yellow lines are lines that say "dude, you should totally connect these parts, otherwise it won't work".  The program was buggy, and I promise you the final product works.
     After uploading the part file, I received the final product in a week or so.  I assumed it would be a chinese-type operation to save money, but it actually is based out of Boulder, Colorado.  Also, out of nowhere, they sent me a bag of "Butter Lover's" popcorn, along with the five sheets of boards.  To optimize my return on investment, I laid out 50 units per sheet, giving me 250 boards for the price of 5.
     In the end, it looks like a regular PCB, and functions as it should, withhold one problem: I accidentally reversed the flooded polarity.  The top really is ground, and the bottom is power, but double check your battery back before putting the batteries in.  I broke one unit by putting the batteries in regularly.  For the second batch, I bought battery packs with wires instead of metal leads.  This way I could cross the (insulated) wires and connect everything as it should.

Edit 10/18/2013:
As requested, I've uploaded the full board design writeup.  I'll try and keep the file up for a few months, but I can't promise I'll remember not to delete it.  Just ask again if the link goes dead:
https://dl.dropboxusercontent.com/u/9034340/Board%20Design.doc

Saturday, May 19, 2012

TV-B-Gone Redesign Part I: Overview

     For my highschool senior project I decided to redesign the TV-B-Gone, using Ladyada's model as a reference (http://www.ladyada.net/make/tvbgone/index.html).
     The reference model was great, and still continues to function after two years.  The problem was that it's too big.  It's got a healthy nice heavy feel to it, but it's too large and fragile for the purpose it serves.  Before I critique the design too much, I should note it's designed to be large so that it's easy for beginners to solder together.
     Because it's supposed to be easy to solder, nearly every part is through-hole.  Easy to solder, but huge and fragile.  After putting it in my pocket a few times, a couple of the transistors broke off, rendering the outer two LEDs useless.
     But I liked the idea, so I took on the challenge of redesigning it.  Originally I hoped to have three designs: wide short range, narrow long range, and a combination.  Each was to be powered by a coin cell or two, making the entire unit the size of your thumbnail.  Unfortunately, while coin cells can deliver the required voltage they don't come even close to delivering the required amperage.  Back to regular cells, and ultimately I settled on downsizing to two 'AAA' cells.