Will my USB charger be able to charge an iPhone / iPod? - Page 1
Forum section: electronics / projects

author: microbug
author_rank: Frequent Contributor
timestamp: April 12, 2013, 03:56:50 pm
content: Hi,I am thinking about making a USB charger as a backup iPod power supply. I have some unprotected Li-Ion 18650 cells from laptop batteries, and am wondering whether the circuitry powering the USB port would work (I have yet to order any parts).My concern is that as it sayshere, I will need resistors on the data pins of my USB port to make my iPod charge :This is easily done, but is there anything else I'm missing here? I've got two different ideas for this: using the adafruit mintyboost (http://www.ladyada.net/make/mintyboost/) with a single 3.7 / 3.6v cell (the mintyboost only has 80% efficiency) or making my own (small) circuit using the Traco Power TSR 1-2450 (http://www.adafruit.com/products/1065) with two cells arranged like this -http://learn.adafruit.com/system/assets/assets/000/004/523/original/TwoCells_SimpleBalanced_bb-1024.jpg?1362051092and those resistors on the USB data pins, which should give 94% efficiency. Which one do you think I should go with?

author: Alana
author_rank: Frequent Contributor
timestamp: April 12, 2013, 04:04:38 pm
content: I used 100k and 68k with same circuit and it charged my colleague's iphone 4. If i remember correctly 2V on d+ and d- tells iphone that its 0.5A capable charger.

author: microbug
author_rank: Frequent Contributor
timestamp: April 12, 2013, 04:07:33 pm
content: That's good, 49.9k resistors are pretty rare (and expensive)! I might go with the dual cell circuit then. I assume you used the 100k instead of 75k and 68k instead of 49.9?

author: mariush
author_rank: Super Contributor
timestamp: April 12, 2013, 04:15:01 pm
content: [R1 / ( R1 + R2)] x 5v = 2 vYou can play with R1 and R2 to solve the problem, any resistor sizes will do.R1/(R1+R2) = 0.4R1 = 0.4 (R1+R2) => R1 = 0.4 R1 + 0.4 R2 => 0.6 R1 = 0.4 R2 = > R1 = 0.4 R2 / 0.6 => R1 = 0.66 R2So R2 = 100k , R1 = 0.66 x R2 = 66k (round up to 68k)47k and 0.666 x 47k = 31k (30k + 1k or 27k+3.9k )220k and 0.66x220k = 145ketc etc

author: Alana
author_rank: Frequent Contributor
timestamp: April 12, 2013, 04:55:37 pm
content: This is my chargerhttps://www.eevblog.com/forum/beginners/usb-charger-from-aa-batteries/

author: free_electron
author_rank: Super Contributor
timestamp: April 12, 2013, 05:13:20 pm
content: 49.9k is two 100k ohms in parallel.and 49.9k is no more expensive than any other value.

author: microbug
author_rank: Frequent Contributor
timestamp: April 12, 2013, 05:14:54 pm
content: Oh, what I meant was that I couldn't find a 49.9k resistor except on ebay for £3 per resistor!

author: microbug
author_rank: Frequent Contributor
timestamp: April 12, 2013, 05:16:12 pm
content: This is what I have now - will it work? (image attached)

author: Niklas
author_rank: Frequent Contributor
timestamp: April 12, 2013, 10:00:01 pm
content: The voltage regulator is missing some decoupling capacitors, check the datasheet for appropriate values. Then, the 7805 is not an LDO and will not deliver 5 Volts for the whole range of input voltage from the batteries. It might work when the batteries are fully charged, but somewhere around half empty, the regulator output will start to drop.

author: mariush
author_rank: Super Contributor
timestamp: April 12, 2013, 10:28:46 pm
content: microbug, you don't have to be super-exact with the resistor values. Resistors themselves are 1% accuracy, so for example a 49.9k resistor could be anything between 49.4k and 50.4 kohm. But like free_electron says, you can put two 100k resistors in parallel and you have a 50kohmNiklas has a point: In order to output a reliable, stable 5v, a 7805 linear regulator needs the input voltage to be at least 1.5-2v above the 5v line, so once your battery voltage goes below around 7v, the regulator won't work properly anymore.There are better linear regulators, some can require as low as 0.25-0.5v above the output voltage. I'm fond of MIC2940 and MIC2941:http://uk.farnell.com/micrel-semiconductor/mic2940a-5-0wt/ic-reg-ldo-1-25a-5-0v/dp/1556712http://uk.farnell.com/micrel-semiconductor/mic2941awt/ic-reg-ldo-1-25a-adj/dp/1556737These only needs 0.35v above the output voltage to output 1A of power but they're kind of expensive.If you want something in-between, I'd recommend LD1117V / LM1117T / (they're pretty much same chip, just made by different companies) :http://uk.farnell.com/stmicroelectronics/ld1117v50/ic-v-reg-ldo-5-0v-1117-to-220-3/dp/1087175(fixed 5v)http://uk.farnell.com/stmicroelectronics/ld1117v/v-reg-adj-1-25-15v-1117-to-220/dp/9755829(adjustable)http://uk.farnell.com/texas-instruments/lm1117t-2-5/ic-ldo-800ma-2-5v-3to220/dp/1798354(fixed 5v)http://uk.farnell.com/texas-instruments/lm1117t-adj/ic-v-reg-ldo-adj-1-25-13-8v-1117/dp/9485805(adjustable)You can find them on Digikey and other online stores and also eBay, just search for "1117" and select either fixed 5v version or adjustable version.It's a linear regulator that has guaranteed 0.8 A current and may do a bit more, up to 1.25A. It only needs 1-1.2v above the output voltage, so there's more room for you compared to 7805.Pay attention to datasheets. This 1117 chip needs a capacitor on the output, at least about 12uF, but generally a 100uF is a good value to use with this one, or even with 7805 chips.You also need a decoupling capacitor before the linear regulators, a 0.1 - 0.47uF ceramic capacitor will work.And while not needed, you may find out the battery will last longer if you put a big capacitor before the linear regulator, think 1000uF - 2200uF 10-16v (2-3v above the maximum voltage the battery will ever output)

author: ejeffrey
author_rank: Super Contributor
timestamp: April 13, 2013, 06:02:09 am
content: Quote from: microbug on April 12, 2013, 05:14:54 pm49.9k is a standard E96 value, it should be available anywhere with a complete stock of 1% or better tolerance resistors. For instance:http://www.digikey.com/product-detail/en/MFR-25FBF-52-49K9/49.9KXBK-ND/13414$.10 each down to $.01 in quantity. SMD resistors are even cheaper.The local radio shack or equivalent won't have a full stock, you will be lucky to get E24 values, in which case you can do what free_electron says, but you shouldn't have any problem finding 49.9 if you want it.

author: microbug
author_rank: Frequent Contributor
timestamp: April 13, 2013, 06:59:47 am
content: Sorry, I forgot to say- I wasn't able to remove the 7805 label, the voltage regulator is actually a Traco Power TSR 1-2450 (see the first post). Sorry!

author: peter.mitchell
author_rank: Super Contributor
timestamp: April 13, 2013, 07:30:07 am
content: Ahh, a much better idea; just be sure to add a cap or two to the output; at startup they can be a bit noisy.

author: microbug
author_rank: Frequent Contributor
timestamp: April 13, 2013, 07:31:01 am
content: Rough specs for caps to add?

author: peter.mitchell
author_rank: Super Contributor
timestamp: April 13, 2013, 08:00:53 am
content: say... 0.1-0.5uf 50v ceramic if you plan to turn it on when its already plugged into the phone, and if you plan to plug it in to the phone when its on, maybe a 10-100uf 6.3v electrolyticJust rough specs.

author: microbug
author_rank: Frequent Contributor
timestamp: April 13, 2013, 08:01:36 am
content: Thanks!

author: microbug
author_rank: Frequent Contributor
timestamp: April 13, 2013, 02:23:39 pm
content: This is my design now (attached).

author: microbug
author_rank: Frequent Contributor
timestamp: April 13, 2013, 02:26:52 pm
content: Oops, sorry - this is the latest one. The cap value should be 0.47µf, not 0.5.Edit:Do you think I'm better off with .1% 0.6wcapacitorsresistors or 5% .25w?

author: peter.mitchell
author_rank: Super Contributor
timestamp: April 13, 2013, 08:27:22 pm
content: Quote from: microbug on April 13, 2013, 02:26:52 pmI assume you mean resistors, and for that i'd say whatever is cheapest.