This page details how I went through the process of coming up with the idea, hardware, design, etc. for this project. It's not 100% correct but it's pretty close. Since this project only took 2 days (on & off) to design/test/release, it's a lot easier to keep track of than something enormous like the x0xb0x.
This tutorial is quite old and the Mintyboost has gone thru many revisions since then. We suggest that after you read this you go on to read our "Apple Charging Secrets" tutorial which will take you from v1 (here) to the latest v3.
OK so where does an idea come from anyways? It's the only important question & the most difficult. I guess I'd have to say it was prompted by looking at these half-dozen projects:
- Aaron Dunlaps 9V USB charger
- Another 9V + 7805 USB charger (Instructables)
- Jason Streigel's 9V+7805 USB 'battery' (hackaday)
- Ians Firewire switching charger (Instructables)
- Chris DiClerico's 9V+AA's firewire charger
However, there's one thing about 9V's that I've learned (from lots of bad experiences). One is that they don't have a lot of amp-hours: that is, how much current (amps) they can provide and for how long (hours). A duracell 9V provides -about- 500mAh over its lifetime. That's 500 mA (or .5A) for one hour or 100mA for 5 hours. That number is somewhat idealized but it's a good starting point.
Another problem is that they don't like to supply a lot of current, because they have high internal resistance (~2ohms), but basically that just means that if you want a lot of current (say to resuscitate a drained device) the 9V wont provide all 500mAh, but maybe more like 400. (Say you're drawing 250mA, then .25A*2ohm = 0.5V lost to internal resistance. For more info on 9V, read the duracell datasheet.)
Another problem with the 9V+7805 scheme is that a 7805 is a linear regulator. That means if you want 100mA at 5V (basically, USB power) then you're taking 100mA at 9V and then losing the 4V*100mA = 400mW (.4W) difference as heat.
As the battery wears down to 7V the heat loss goes down to (7-5V)*100mA=.2W but you're still getting bad efficiency. At best the efficiency is 72% (5V/7V) and at worst it's 55% (5V/9V) That means you're losing about a third of the battery power to heat!
I'll also throw out that the 7805 itself has a quiescent current of about 5mA so you're always losing 5% (5mA/100mA) efficiency just for regulation! (& that's at least since if you're trickle charging the battery at 50mA then the 5mA quiescent is 10%)
OK so basically the 7805+9V solution works but the efficiency is startlingly low, say 60% or so, and provides only 300mAh at 5V.
We can engineer better!
From experience, I know that AA's are great. They are cheap, have lots of power, very low internal resistance and are easily available everywhere. Whereas a 9V has 500mAh (for a total of 9*500 = 4.5Wh power) two AA's have 3000mAh each for a total of 2 * 1.5V * 3000mAh = 9Wh, about twice as much power. The only problem is that 2xAA's provide 3V and what we need is 5V. With a 9V battery we can use a linear regulator because 5V < 9V but, sadly, we cant use a linear regulator to turn 3V into 5V. Instead we will need to use a boost regulator (also known as a DC/DC switching/step-up regulator).
The process of how a boost regulator works is somewhat beyond the scope of this document, suffice to say they work great but are a little more annoying than linear regulators because you have to pick out an inductor and wire up some extra parts. You can get a lot more info about Boost Converters at wikipedia.
So at this point I start thinking about enclosure and size. Most people think of this last, and that's a bad idea. If there's one thing I've learned from hacking on electronics, it's that you should try and select the case first because it dictates a lot of the electronics and interface.
I know that the parts for the kit must be all through-hole (no surface mount) and easy to work with. I also want AA batteries, 2 is good although I know from experience that most boost converters will work with any number from 1 and 3 just fine. I have a predilection for Altoids tins and I also know that I can fit ~2 AA's into a gum tin so I pull out a tin and take some measurements:
I also try out another battery holder I have, this gives me more space, 1.25"x0.85"...but the batteries go in sideways so one would have to remove the holder to change the batteries. I'd prefer that you can just take them out directly, so I don't go with this one (it also turns out I don't need that extra space).
I now do a little hack to turn the PCB mount 2xAA battery holder into a wire-lead one. Like this product photo (for "HOLDER BATTERY 2CELL AA 6"LEAD" from Digikey).
So now it's time to design the boost supply. Since I don't have much space, I'm going to try to make my circuit as tiny as possible but still be easy to solder. That means I want a boost chip that is 8-DIP (smallest though-hole), with an internal MOSFET switch (1 less part) and is high frequency (to keep the inductor small). I also need to be able to supply 100mA at 5V and it should run on as low as 2V input. Also I want to be able to buy it online from a common supplier.
- 8-DIP package
- Internal FET switch
- 100mA output @ 5V
- 2V minimum input voltage
OK, lets search Digikey. I start with "DC/DC converter 8-DIP" and check "items in stock."
Now there are about a dozen options.The LT1073, LT1111, LT1173 and LT130x as well as the MAX751 & MAX756. They're all pretty much the same, so I basically make my choice based on price at 100 pieces (since I'm planning to kit it up). I also know that Maxim is great about sending samples so I decide to go with the MAX756 (datasheet) which is $2.32/100. Note that I could have gone with any of them, so this a somewhat arbitrary choice.
According to the datasheet, I can supply up to 200mA @ 5V, run off input voltages as low as 0.7V and the efficiency is about 85% with 2 AA batteries. The chip also runs at 500KHz which is pretty fast and means that the inductor can be pretty small (~22uH) Anyway, I've used this chip before and it's worked out well for me.
The next step is to choose an inductor. This can be a bit of a pain, and there is a lot of math you can throw at the problem. However, the datasheet suggests (under "inductor selection") to get a 22uH inductor, with a ~1.2A saturation limit, and DC resistance of 0.02 ohms.
What we want is through-hole, which actually means it's going to be hard to find an inductor; almost all inductors are surface mount. But I'll take a look at what digikey has to offer. I search for "fixed uH inductor ~smd ~smt" which means I don't want SMT/SMD (surface mount) and I want a non-adjustable inductor that is in the uH range (not mH or nH). I then filter out inductors with 1-3A current and 18-27uH inductance.
I also check out Mouser. The online search for mouser isn't as nice as Digikey's so I end up looking at the paper catalog instead. I only found one inductor, really, the 18R223C (22uH radial power inductor) and/or the 18223C (axial version) that also has plenty of power capacity and a 0.03ohm DC resistance.
So, order 2 of each of these.
In reality, what I did was look through the Digikey catalog, where I only found the DN7418 inductor (the other one was somewhat hidden in the RF inductor section). And it showed up before the Mouser box, so I spent an hour or two making up a prototype.
The circuit itself is simple, I want one large electrolytic cap for low frequency smoothing on the battery, and an output cap pair (electrolytic and one ceramic cap for high freq. smoothing). I also need the chip, a reference voltage capacitor, the inductor and a schottky diode to finish off the boost regulator. I happen to have some 1N5818's, which are often used as schottky diodes in boost regulators. I also need a USB type A female jack, of course, and two holes to solder the battery pack into.
I print out a paper version of the PCB and punch the parts through to verify that they're the right shape/package.
I get my etching setup together, turn on the heater for the etching tank, and print out a bunch of tiled PCB layouts on toner transfer. I transfer the toner onto a single sided PCB and etch it in the tank.
Now we test to see if it works! With the two batteries inside, I measure the voltage on the USB connector: about 5V, which is good. I send off this version to a friend with once of each kind of iPod, including the newest 4G video iPod, for real-world testing: Both to verify the iPod will charge and also how long it will run with the additional pack.
So, in theory, we should be able to calculate the efficiency of the boost converter from datasheet info. We're basically boosting 2.5-3VDC -> 5VDC at around 50mA-100mA. Looking at the MAX756 datasheet, this is the efficiency graph:
If we're getting 82% efficiency conversion from 2 x 3000mAh Duracells, that means we get (2 * 1.5V) * 3000mAh * .83 = 7.38 Watt hours. Compare that to a single 9V as we calculated before: (1 x 9V) * 500mAh * .65 = 2.93 Wh. So we're going to get about 2.5x more power out of these two AAs than a single 9V. With rechargeable batteries, we get (2 * 1.25) * 2200mAh * 81% = 4.45 Wh (about 50% more than an alkaline 9V and 3x more than a rechargeable 9V)
Next, lets verify the efficiency using test equipment, and try out the different inductors to see if they make a difference. Instead of using batteries, I'll provide 3V from a bench supply that will also tell me how much current is being drawn. And instead of an iPod I'll fake the load with a resistor. Since the standard USB current draw is 100mA from 5V, that means I need a 5V/.1A = 50 ohm load. I can't just use a tiny resistor because 5V * .1A = 1/2W and most resistors are 1/4W. So instead I take two large 100ohm 'power' resistors, and twist them together. I also check the resistance to verify that together they are 50ohms. I also find a 20ohm power resistor. This will allow me to not only test a 100mA load but also a 250mA load.
I perform 4 tests with 2 inductors: 100mA load for both 2.5V in and 3V in (rechargeable and disposable batteries) and 250 load for both. All the images are up on Flickr for viewing, here is one example one...inductor #1 (DN2474) with 100mA load and 2.5Vin.
It looks like inductor #2 is little more efficient, probably due to the fact it has a lower DC resistance (30 milliohms instead of 70mohm of the other inductor). It's also a bit cheaper so I'll go with that inductor.
Regardless, it looks like the efficiency is around 82% which is about what I expected.
Another thing to note is that I don't put an on/off switch in like you'd need with a 9V+7805 regulator. That's because the quiescent current of the MAX756 is very low, on the order of 100uA (0.1mA). I measured this myself and got about 75uA.
So now that I've verified that the project works, I have to figure out whether I want to sell it, how many I expect to sell, and how much I want to charge. Lots of people have different techniques for this. I tend to go with my 'gut' which usually means there's a lot of information I use but it's difficult to express it.
I tend to decide whether I want to sell something based on how popular/useful/easy it is. I think that this kit will be pretty popular and useful because lots of people have stuff that charges/powers over USB. Also, it seems like other people are selling similar things (like the 9V + 7805 type charger, or Griffin's 9V charger, or Belkin's 4xAA charger) It's easy to make because all the parts are through-hole and there's not a lot of them.
I'm going to basically assume I'll sell 200 or so within a few months, and I'll order parts in batches of 100, so I should budget that way. (I often buy more than 100 PCBs at a time because of the scale economies involved in PCB manufacture, as I show later.) It turns out so far that I can sell a couple hundred units of a kit in a few months, particularly if it gets picked up by a blog or web site. This may or may not be true for you, however if you can't afford to make 25 kits at once you're going to find that it's hard to make any money in the process.
To figure out how much to charge, I make up a table with different quantity prices:
|Part||Price / 1||Price / 50||Price / 100|
|Boost chip MAX756||$4.62||$2.79||$2.32|
|2 x 0.1uF caps||$0.10||$0.10||$0.10|
|2 x 100uF caps||$0.12||$0.10||$0.10|
|Sticky tape squares||N/A||$0.10||$0.10|
There's also shipping prices included, maybe $1/per. In general, I double the parts cost to come up with the 'retail' cost. In this case, I'll charge $19.50. Anything less than $10 or $20 is great because $20 are considered to be stuff/food coupons, really.
There's a bit more work to do. First, I redesign the board since I'm going with a radial inductor instead of an axial one:
Mintyboost® is a registered trademark of Adafruit Industries