8

I recently made a USB charger that takes a 9V battery. I've noticed it doesn't work with a lot of devices though. It was very simple though, just a 5volt regulator hooked to a USB plug and 9V battery and a switch.

Note: I'm wanting to use what I have on hand(all sorts of capacitors, resistors, and 5v regulators) so the minty boost is out of the question(requires some components I don't have any of, such as inductors)

So what did I do wrong? I just shorted together the data+/- pins(bad idea now that I've thought about it). Should I have these hooked to something or just left unhooked? Also, should I worry about installing a 500mA PTC fuse? And lastly do I need any kind of capacitors to handle any rippling and such?

Passerby
  • 72,580
  • 7
  • 90
  • 202
Earlz
  • 3,346
  • 15
  • 46
  • 66
  • 1
    A linear regulator wastes 44% of battery energy. Consider using a lower voltage battery (pack), such as 4-5 AA's, and/or a switching regulator. There are even some 7805 pin-compatible packages (3-SIP): http://goo.gl/ly5bw . – tyblu Dec 11 '10 at 01:28
  • @tyb yea, I'm using a simple linear regulator right now. I'm going to be ordering some of these( http://www.sparkfun.com/products/317 ) soon though. – Earlz Dec 11 '10 at 06:06

3 Answers3

7

I just shorted together the data+/- pins(bad idea now that I've thought about it).

Nope. That's the standard, actually. The official USB Battery Charging v1.2 Spec is almost completely unreadable, but it does say:

A Dedicated Charging Port (DCP) is a downstream port on a device that outputs power through a USB connector, but is not capable of enumerating a downstream device. ... A DCP shall short the D+ line to the D- line.

The the current is literally limited by the charger. There is no negotiation of what the device is allowed to draw, the charger just drops its voltage when the device tries to draw more current than it can handle. (And the device then has to lower its draw in response or the charger shuts down?)

Of course, Apple has to do it their own proprietary incompatible way for iPods and iPhones:

The mysteries of Apple device charging

The nice thing about Apple is that they tell the device how much current it's allowed to draw, and it obeys.

And the phone manufacturers had their own ways before the standard, usually using the ID pin:

USB charger specifications and compatibility list

I don't know if there's a circuit that will work with all of the above, but if you find one, let me know.

masterleo
  • 9
  • 4
endolith
  • 28,494
  • 23
  • 117
  • 181
  • yeah, usb charging spec has a resistor between D+ and D- and devices that use it will check for it. – Kortuk Dec 11 '10 at 01:40
  • Well, they always describe it as a resistance ("RDCP_DAT" = "Dedicated Charging Port resistance across D+/-"), but then the spec for that variable is, I think, anything less than 200 ohms, including a short. – endolith Dec 11 '10 at 01:50
  • Yes, the element actually checks for the voltage swing, when pushing a current, being below a certain voltage. – Kortuk Dec 11 '10 at 02:59
4

What devices are you charging?

Latest generation iPod touches and their ilk require some resistors on the data lines; apparently to detect if the charger is an authorised Apple one.

http://www.ladyada.net/make/mintyboost/icharge.html

It's pretty simple - just 4 resistors.

Don't worry about the PTC. Most linear regulators have thermal limiting and current limiting. It's pretty difficult to damage a properly designed linear regulator.

Remember with a linear regulator excess energy is dissipated as heat. Power dissipation in a linear regulator is (Vin - Vout) x Iout. So for 0.5A out, 9V in and 5V out, the regulator is dissipating 2W and providing 2.5W to the device; 4.5W in total, with an efficiency of about 55%, which is pretty poor. But, it may be fine for your application.

Almost all linear regulators require small decoupling capacitors. It varies from regulator to regulator. Most require 100n caps on input and output, but some require larger bulk decoupling. Specifying exactly which regulator you are using would help.

Thomas O
  • 31,546
  • 57
  • 182
  • 320
  • +1 Mintyboost. If you're eligible, sample an LT1302 from Linear. Then the cost is very cheap. –  Dec 11 '10 at 02:52
  • I'm just glad I don't have to worry about iPod charging. I'm mainly just concerned about cellphones(non-iPhone). Also this is my regulator: http://docs.google.com/viewer?a=v&q=cache:g9oqgH4Gsh8J:www.kitronik.co.uk/pdf/7805reg.pdf+l7805cv+pin+out&hl=en&gl=us&pid=bl&srcid=ADGEESi-4ptYS2qa5WNynyYnfyoZ5lg3dUE8eZ4H5KdDs0xFqcy6vp91pnhVCe32gsj3yI9HEE69Fj1o80NSN0pk2LoxnmzXd2OaonbkHNVYhJ49qf9jXhcNYPTRZ9KMR9w-0ivxsbxK&sig=AHIEtbTVfbAOIDbqTQzF6r_thMNAlkyU4A&pli=1 – Earlz Dec 11 '10 at 06:02