# Help building a voltage regulator. 5v to 3v

#### Critical Jeff

Joined Jan 2, 2012
5
I want to attempt to hack a set of wireless headphones to accept direct DC voltage from a USB cable. Currently the headphones accept 3 volts from two AAA batteries. I'm looking to build a small cuircut board to regulate 5v to 3v @ around 500ma (i think, need to measure first). I have no idea where to start when engineering this type of circuit, but i have the basic idea and skills to build it myself.

Any pointers to tips on where to start would be awesome. I'm basically just asking for a diagram that I can build from.

#### studiot

Joined Nov 9, 2007
4,998
500mA is too great a draw from normal USB ports.

You would need a powered hub for this.

Joined Apr 30, 2011
1,578
I can't see your linked info since I'm doing this on a dumb, not smart phone. You can use an ordinary LM317 adjustable voltage regulator in it's normal configuration as shown in the datasheet. Be careful of the pin numbering as the schematics show a different order than the actual device. This has tricked many novice builders. I always redraw the schematic with the pins in their physical order to avoid confusion. Your headphones probably don't draw more than 100mA even at full volume. If they did you'd be deaf and your hair would be on fire.

Joined Apr 30, 2011
1,578
Have you calculated your resistor value?

#### Critical Jeff

Joined Jan 2, 2012
5
yes i have, i used an online calculator.

Joined Apr 30, 2011
1,578
The correct answer is 336 but the standard value 330 will be fine assuming R1 is 240. If that's what you got, you get a gold star.

#### parkerea

Joined Oct 16, 2011
4
Since the headphones are originally driven from a pair of AAA batteries, there is no way they draw 500 ma -- that would drain the batteries in minutes. They probably draw a few ma at most, so don't worry about powering them from USB. BTW, the USB 2.0 spec says the port must be able to deliver 500 ma (100ma/unit * 5 units):
http://en.wikipedia.org/wiki/Usb#Power

#### thatoneguy

Joined Feb 19, 2009
6,359
Since the headphones are originally driven from a pair of AAA batteries, there is no way they draw 500 ma -- that would drain the batteries in minutes. They probably draw a few ma at most, so don't worry about powering them from USB. BTW, the USB 2.0 spec says the port must be able to deliver 500 ma (100ma/unit * 5 units):
http://en.wikipedia.org/wiki/Usb#Power
That is only if you have a peripheral that negotiates for more current. A wire plugged into a proper USB jack will only be allowed 100mA until it identifies itself as a USB device of some sort, and can then ask for more power.

These days, however, most board makers haven't bothered with the negotiation (though they do with USB 3), and you can pull over an amp from a USB port without negotiation, they simply tie USB power to the 5V power line through a PTC fuse in some boards. Those are the boards that people accidentally destroy when making some sort of USB powered <insert anything here, from fan to self-winding clock>

Joined Apr 30, 2011
1,578
If your headphones need less than 100mA you can use the LM317LZ (TO-92 package) and fit the whole regulator circuit into a space the size of a AAA battery. I built a 1.5V regulator that way as a battery substitute running from an old cell phone charger.

Last edited:

#### studiot

Joined Nov 9, 2007
4,998
BTW, the USB 2.0 spec says the port must be able to deliver 500 ma (100ma/unit * 5 units):
So a laptop with 6 USB ports should be able to output greater than 3 amps continuously, without sustaining damage.

Studio T receives a good deal of repair business from laptop owners who disprove this.

Joined Apr 30, 2011
1,578
Well, what good is it owning a laptop if you can't use it to power your coffee warmer, drink chiller, dancing Santa, desk lamp and personal fan?!

#### studiot

Joined Nov 9, 2007
4,998
Well, what good is it owning a laptop if you can't use it to power your coffee warmer, drink chiller, dancing Santa, desk lamp and personal fan?!
Mostly I use a stack of dead on arrival ones to prop up the short leg on the workbench.