How to: How to

Meta Documentation

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.

Original Idea

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: OK, there's probably even some I'm missing. So what's the overarching theme here? Almost all use 9V batteries and a 7805 (an extremely common linear 5V regulator: makes a solid 5V from 7-18V input). This design works great because, well, 7805's are awesome and 9V's provide 7-9V depending upon how 'dead' they are.

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!

Engineering 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.

Case in point

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:
The PCB-mount one seems to be pretty good, it doesn't have a switch but I don't need one anyway (see quiescient calculations, below).
So I take some measurements...
Looks like I have about 1.25" x 0.7" semicircular PCB space at the top for the circuit board.

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).

Basically I just solder on red and black 6" wires and clip off the PCB through-hole leads. This is actually a little difficult because the plastic melts and you have to sort of keep it in place while you solder. Its not suggested :)
OK looks good.
Now that's done I'm ready to think about what I can cram into that space.

Basic Boost

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.

  1. 8-DIP package
  2. Internal FET switch
  3. 100mA output @ 5V
  4. 2V minimum input voltage

OK, lets search Digikey. I start with "DC/DC converter 8-DIP" and check "items in stock."
I then select 1 output, 8-DIP (to differentiate between 18-DIP) and select all the current-outputs >=100mA and apply the filter. There's still about 40 options. So then I select the all voltage input ranges that start with 2V or less. Also I select all the Adjustable, and 5V-inclusive output voltage options.
Looking over this list, it looks like I have a lot of options so I'm going to go back and select only the chips that can be preset to 5V (as opposed to adjustable ones that use 2 resistors to set the voltage). 5V is very common so every reasonable DC/DC chip will be available with such an option.

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.

Inductive reasoning

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.
That filters it down to about a dozen choices. The SLF inductor is actually surface mount, and we're going to outright ignore the ones that cost more than $2.50. Inductors for small electronics like this should cost around $1-$2, as a guideline. That leaves us with the DN7418-ND "INDUCTOR 27UH POWER AXIAL" and the 6000-220K-RC "INDUCTOR HI CURRENT RADIAL 22UH." Both of these look good, with about ~1.5A saturation current and 0.07 ohm DC resistance.

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.

Rapid prototyping #1

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.
All these parts must fit into the space left over from the battery pack. I make EagleCAD library parts for the inductor and chip (the rest are already there) and lay out the board. I'm not going to detail making library parts in eagle or pcb layout, others have done so already. Use whichever software you want, I like Eagle because there's a free version available for download if you're just making small PCBs.
Since I am know this is just a prototype version, I make the PCB single sided -- for easy etching. I also make the traces really large.

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.

Then I clean off the toner transfer, drill the holes with a dremel drill-press with carbide drill bits, and cut out the shape.
Then I solder the parts in, and fit it into the case with the battery pack, using double-sided foam sticky tape to hold down both the battery holder and the PCB without shorting the PCB to the metal tin.

Testing the prototype

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.
Numbers as soon as the QA dept gets them back to me...

Verifying the math

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:
So we should be getting around 85% efficiency, perhaps a little more. I think the only thing that can really change this number a bit is the inductor. (Below, I verify I'm getting 82% efficiency)

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.
Here are my results, summarized:
DN2474 100mA/3Vin 100mA/2.5Vin 250mA/3Vin 250mA/2.5Vin
Vout 5.01 4.93 4.77 4.62
Iout (calc'd) 100mA 99mA 234mA 231mA
Iin 200mA 245mA 530mA 690mA
Efficiency 83% 80% 70% 62%
18R223 100mA/3Vin 100mA/2.5Vin 250mA/3Vin 250mA/2.5Vin
Vout 4.98 4.93 4.83 4.68
Iout (calc'd) 100mA 99mA 242mA 234mA
Iin 200mA 240mA 480mA 640mA
Efficiency 83% 81% 82% 68%

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.

That means that the self-discharge rate is ~2000mAh / 0.1mA = 20,000 hours, more than 2 years. Most batteries don't last that long! Therefore we don't need a switch, when nothing is plugged in, almost no power is being used.

Kit budgeting

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
1n5818 diode $0.09 $0.09 $0.08
2 x 100uF caps $0.12 $0.10 $0.10
18R223 inductor $1.42 $1.35 $1.29
USB jack $0.52 $0.35 $0.32
AA holder $0.59 $0.53 $0.49
PCB ~$12.50? $7.25 $3.75
PCB tooling N/A $3 $1.5
Antistatic Bag N/A $0.12 $0.12
Sticky tape squares N/A $0.10 $0.10
Total $19.90 $15.75 $10.10
To calculate the PCB costs, I used Advanced Circuit's insta-quote service:
These prices are for 2 PCBs, which I'll cut in two, because it's cheaper (probably because they don't like dealing with very small circuit boards). I usually go with 2 week turn prices. Note that the PCB quote doesn't include the $150 one-time tooling NRE fee, which adds $3 to the /50 price and $1.50 to the /100 price. Advanced Circuits is a little expensive, but they're very good on quality and they're good at catching mistakes. Anyways, you can try going with a cheaper shop but I can only vouch for these guys.

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.

Finishing up

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:
I actually do another etch test, to verify eveything one last time. Then I tile two boards together (cheaper) and generate gerbers.
I use gerbv (free software) for viewing and verifying the gerbers. On windows, I use GC-prevue.
I always check the boards with before I ship them off to be made. I used so it's the same company but even if you don't go with as your PCB manufacturer, it's a neat service.
A week later (depending on your turn time) A box shows up with the circuit boards!
Then I sit in front of a computer and do a lot of website stuff. I also take a lot of photos. A good photo setup will make documentation easy. I have a simple 150W ECT bulb + diffuser setup at EYEBEAM. A tripod is key!

Mintyboost® is a registered trademark of Adafruit Industries

This guide was first published on Jun 11, 2013. It was last updated on Jun 11, 2013.

This page (Process) was last updated on Mar 11, 2013.

Text editor powered by tinymce.