Monday, April 21, 2008

AA to USB, part III

This is the continuation of my little project to build a device to power a USB port off a pair of AAs. Click for part I, part II.

It is a wonderful thing to work where I do. I could just bop in this weekend, grab a couple of resistors and capacitors from the large and varied stock on hand, fire up the soldering iron, and see if I can't this here board working. Don't worry about misappropriating company resources: the resistors go for about $0.02 apiece, and maybe $0.10-$0.50 for the capacitors. The inductor might be a whole dollar...I'm not sure - it's the big red thing that clearly doesn't belong there. My intended design uses a surface mounted inductor that is much smaller (a footprint a tad larger than the chip in the middle). I used this red bo-huncker because I didn't get around to ordering my own parts from Digikey until just yesterday. (It's a handy thing that Digikey is located in Thief River Falls, MN. It means that I'll probably have my parts delivered by the USPS tomorrow without having to pay for expedited shipping.)

The unsightly orange wire (ok, a LOT of it's unsightly, but that's the process of creation) is a jumper that bypasses some components I didn't feel like putting on this first prototype. The red and grey wires coming in from below are the input power; the ones on the left side are the 5V output. Again, I would have put an actual AA battery holder and USB port on this board, but I didn't have them on hand. Besides, with free wire leads, it was easier to hook the board up to a power supply and multimeter for testing the input and output, respectively.

The red LED I threw in there to tell me if I'm getting any power out of the thing. In my ultimate design, that LED will shine on the side of the case, and will be green instead of red. Again, this was just a stopgap to expedite the testing.

Ok, on with the testing. Turns out that I initially soldered that orange wire in the wrong place - shorting the input power and ground together. So, it was a good thing that I was testing the board with a power supply instead of actual batteries - a power supply can be reigned in and deal with short circuits gracefully without blowing up. Batteries, on the other hand, don't like short circuits very much. Even if it isn't as potent as a shorted out laptop battery, a shorted AA can get dangerous and toasted in a real hurry.

I suppose I shouldn't have been surprised. Even simple circuits rarely work right the first time. I'm glad I didn't burn anything at least. A bit of troubleshooting, a little more soldering, and eventually I realized my mistake. After that, when I turned the power on, I got a nice glowing red LED and a multimeter readout of 5 V. Mmmmmm, glowing light!

Of course, an LED doesn't really require all that much power to light up, which is why they'll eventually replace compact fluorescents. One of my goals with this doohickey is to be able to supply the full 500 mA of current at 5 V that the USB spec call for - 2.5 W of power. So, to push things a bit further, I ganged together a bunch of resistors to force the device to supply more current. I'm pleased to say that it did so without a hiccupy.

Ok, so this at least proves that I can still follow a chip's datasheet and do a circuit layout. What next? Well, I already mentioned that I ordered parts - enough to populate a couple more boards. I am also working on a new revision of the circuit board in the hopes of making it smaller. This board would have copper traces and parts on both the top and bottom. I think I'll also pay to have this board fabricated for real, which means it won't be bare copper, but also have the familiar green coating on top and white markings and such. I'll post when again I get that sorted out.

No comments: