Thursday, April 20, 2006

High-efficiency 9V powered USB device charger

Why:
I bought a new bike computer recently (to go with my new bike, but that's another post). It's a Garmin Edge 305, and does everything I need it to, plus some extras. In particular, it's got a GPS on it. While this is a good way to keep track of speed and distance traveled, it can also give you a map, automatically trigger the lap counter at specific locations, show your progress against a previous workout or desired pace, etc. The only downside in the reviews I read was that the internal rechargeable lithium-ion battery would only last about 4-5 hours, which is fine most of the time, but is a bit short for those really epic rides or races.
The Garmin charges through a mini-USB port. I'd seen altoids-case battery USB chargers here and there on the net, and thought it'd be simple enough to build. But after looking at available designs, I was unsatisfied. The standard 3 terminal regulator, while really the only necessary component, has to bleed off a lot of heat and will drain a battery quite a bit faster than necessary. A switching power supply has the advantage of being quite a bit more efficient, but requires more components. I hadn't seen anyone try to make a teeny switching supply for USB, so it was into the abyss!

Design:
I started with my trusty Horowitz and Hill. If you mess with electronics, and don't have a copy of The Art of Electronics, just go get it right now. From there I went looking for parts at Jameco, and perused some switching IC specs. I ended up with a design based on the reference design of the switching IC I ended up using.


Parts:
1 - Altoids Gum tin. Flavor is up to you.
1 - 9V battery
1 - LM2672N-5.0 Switcher IC (National Semiconductor) - 290765
1 - 100 uF HT Electrolytic Capacitor - 330747
1 - 47 uF HT Electrolytic Capacitor - 158246
1 - .01 uF Ceramic Capitor - 15230
1 - 47 uH High Current Toroid Inductor - 371821
1 - Schottkey Diode - 177949
1 - USB socket (female) - 161023
1 - 9V battery clip - 11279
1 - small proto board
and jumper wires, solder, epoxy, electrical tape, etc.

Jameco part numbers and links included above.


Construction:
I started by breadboarding the circuit. DC output of 5V, no discernible ripple on the oscilliscope, so it looked like it was going to work.


Next I soldered it together on a proto board. I kept things really compact... I wasn't sure I'd be able to fit it in the Altoids tin. In particular the inductor takes up a lot of space. The 9V is in the shot for perspective, and the USB socket, while unconnected, lies to the left of the circuit.


Next step was cutting the small section of proto board out, and getting the USB socket attached. I rounded the corners of the proto board as necessary to fit in the tin.


Hey look! It works!


Here's the hole cut in the side of the Altoids tin for the USB plug. This was done with a dremel for the rough cut, and cleaned up with an ignition file.


I put these two slots in the sides of the case (and matching ones on the other side) so that I could strap the case onto the handlebars of my bike. The slots are in the area that the battery sits inside the case.


Epoxy time! I epoxied the proto board into the tin. Unfortunately, due to the tight fit, the USB plug had to extend a bit beyond the case. However, it is solidly epoxied in place. I also insulated the underside of the proto board with a layer of electrical tape (suspended in the epoxy) which prevents the circuit from shorting on the case.


A closeup of the circuit end of the case.


I used velcro cable ties for straps, threaded through the case. They also pad the battery a bit, which might have a tendency to rattle around just a bit. You can see how everything fits in the case in this pic.


Hey, the lid even shuts. Actually, the lid shuts tightly enough that I'm not worried about it falling open accidentally. Those Altoids tins are well constructed. The metal case also acts as a faraday cage for that rapidly oscillating magnetic field in there...


Strapped onto the handlebars.


A final shot of it working.


Post-Mortem:
It works, and while I have not field tested it yet, I'll do that soon and post the results soon. I'm curious how long the 9V can power the circuit. I'm also curious about the efficiency of the circuit. In theory, it's up in the low 90s, but I'd like to test and find out.
Also, if I do this again, I'll probably go ahead and do a custom PCB rather than put it together on a protoboard. But we'll see.
Comments more than welcome!

Wednesday, April 19, 2006

Quick Bike Update

I got out for an 18 mile ride this evening. My first thought about the bike, about a mile in, was 'This thing really floats over the road'. Lots of vibration damping. My next thought, a few miles later, was 'This thing is really fast'. Maybe I'm just thinking it's fast, or maybe because my last few rides have been pulling Bud in a trailer, but it really seems to scream along. It coasts unbelievably well.

Shifting was a little tricky (getting used to Campy), and the front derailleur needs a little tuning - it was a little slow to get into the big ring, and I dropped the chain off the inside once. Can't wait to get the new brake calipers... my seatpost is supposed to be in tomorrow, so I'll take the bike in to swap out the post and the brake calipers will be all that's left.

Tuesday, April 18, 2006

New Bike

It's here! It's here! The waiting is finally over. My new bike frame arrived today, and the shop had it built up by evening. My brake calipers and seatpost are still on order, so I've got subs right now: the seatpost is a loaner from the shop, and the brakes I'm using are cannibalized from my old ride.

The frame is a Calfee Dragonfly (standard road geometry). And boy is it pretty. Mostly Campy Record components, with an FSA compact carbon crankset, Campy Eurus wheels, (eventually) Zero G brakes, Thomson seatpost and stem, Easton handlebars, and a SSM Aspide Arrowhead saddle. Some pics:

The bare frame in the shop


A closeup of the dropouts (machined titanium!)


And the bottom bracket


The first build up. The coming brake calipers will look much better.


The drivetrain


The sexy seattube cluster


The headtube cluster and stem


Can't wait to get some miles on it!