Forget using a 7805 regulator unless you have one on hand, and have room for a fat heatsink. Go to a "dollar store", thrift store, or flea market, and buy an obsolete car charger for a cellular phone. These typically contain an a small circuit consisting of about a dozen components, primarily a MC34063 switchmode-regulator chip (an 8-pin integrated circuit) that is much more efficient than a 7805 (and therefore waste less energy as heat). If you take it out of the case (insulate it with a piece of heatshring or bicycle tube), a typical 12->5v phone charger circuit is no larger than a 9v battery and can handle about 1 ampere of current. You can't build one for the price you'll pay at a junk store. You can change the output voltage to anywhere from 12v to 1v by changing one of the resistors (google mc34063 datasheet for details).

I'm looking to run a usb port on an ebike to run pc speakers. The battery is 12 volts and the speaker takes 5 volts through usb port. How can I run a line off of one battery (bike uses 4 of them) and make this happen so I don't have to keep using a battery pack that only lasts 1/2 an hour

I suggest you us a lm317 voltage regulator . Have a simple circuit (LM317 , resistor , Pot) . You can also use Pot to replace all resistor Input Voltage 1.5 - 40v

One related scenario is bringing down 12v power source to a 5v device.

In one situation, a user wanted to use a 5v DC power digital voltmeter or ammeter. His power source could be either a 9v dry cell or use in 12v vehicle battery. The quickest way is to use a serial resistor to bring down the voltage for 9v or 12v to around 5v. The actual voltage does not need to be exactly 5v. There is usually some tolerance. I guess around 4.75v to 5.25v is a good target range.

One could use a 1k Ohm potentiometer to dial in required resistor value. (VERY IMPORTANT) Set the potentiometer to the HIGHEST value. (VERY IMPORTANT) Put the pot in series with the meter and the voltage source. Turn the potentiometer down very very slowly till the voltage across the voltmeter is at 5v. Turn off the circuit. Isolate the potentiometer and use an Ohm meter to determine the resistance (Ohms). Now use the resistor and confirm final voltage.

If not already offered, ask seller if he could provide free resistor and shrink wrap to their 5v meters. Let seller know what is your source voltage.

Some of the "dollar store" car chargers / USB chargers promise to provide a maximum current of 2A which seems to be far from the truth. If you need more than 500 mA it is a lot safer to buy one of the many UBEC converters which have a low power loss and stronger current (some up to 5A). Search for UBEC in one of the many online gadget stores - there are plenty of them available.

True, however we do need to realise what load we are going to apply this 5 volts to. for example, so we use a voltage divider, say, a 5 ohm in series with a 7 ohm. now if we measure accross the 5 ohm resistor we get 5 volts. ace, now lets just connect it to my load. this load is also 5 ohms. now are we applying 5 volts to the load. NO.

now we have connected the 5 ohm load in paralel to the 5 ohm part of the potential divider, its total ohmage is now 2.5 ohms (product over sum) now if we use the potential divider sum, Vpd = 12 volts *2.5/(2.5+7) = 3.16 volts.

I hope that helped. another thing, assuming that we were only chargng one thing, and took that into account when calculating what resistors to use. (assuming we are still having a 5 ohm load.) that would give us a potential divider ratio of 2.5ohm:3.5ohm (with the 2.5 reprisenting a 5 ohm resistor in paralel with our load) we would get 5 volts. The problem with this is the wasted energy diserpated. The current drawn by this circuit is 12/6 = 2 amps. that is assuming the connecting wires have no resistance. now if we work out how much energy is disarpated at the 3.5 ohm resistor the formula is Watts = I^{2*R = 10.5 watts, wasted. a percentage of usefull energy used (efficiency)} total wattage = IV = 2*12 = 24 watts the useful current is 1 amp, as the current is split between the 5 ohm resistor and load) useful = I^{2*R = 1*5 = 5 watts.} efficiency = 21%

i hope that this made sense, that i was polite, not teaching to suck eggs, not too advanced.

any questions message me, if i cant answer you il know someone who can.

There are several things to do depending how effiecient you want to be, or how smooth you want the output to be. i have posted below against using a voltage divider as its load regulation is very poor. I have had a thought that i would like to thing about.

LM7805 is a 5V regulator and maxes at 1Amps output. its the simplest and cheapest for you, unless you can find the parts unixbigot is talking about. the LM7805's dissipate the power through heat. so its a cheap and easy solution, but there very inefficient.

You need a 7805 regulator to do the job - HERE'S a circuit which will give you up to an amp, although if you're going near that you'll need a heat sink on it. There are similar regulators around for higher currents.

PDF Downloads As a Pro member, you will gain access to download any Instructable in the PDF format.
You also have the ability to customize your PDF download.

Have a simple circuit (LM317 , resistor , Pot) .

You can also use Pot to replace all resistor

Input Voltage 1.5 - 40v

In one situation, a user wanted to use a 5v DC power digital voltmeter or ammeter. His power source could be either a 9v dry cell or use in 12v vehicle battery. The quickest way is to use a serial resistor to bring down the voltage for 9v or 12v to around 5v. The actual voltage does not need to be exactly 5v. There is usually some tolerance. I guess around 4.75v to 5.25v is a good target range.

One could use a 1k Ohm potentiometer to dial in required resistor value. (VERY IMPORTANT) Set the potentiometer to the HIGHEST value. (VERY IMPORTANT) Put the pot in series with the meter and the voltage source. Turn the potentiometer down very very slowly till the voltage across the voltmeter is at 5v. Turn off the circuit. Isolate the potentiometer and use an Ohm meter to determine the resistance (Ohms). Now use the resistor and confirm final voltage.

If not already offered, ask seller if he could provide free resistor and shrink wrap to their 5v meters. Let seller know what is your source voltage.

- John

for example, so we use a voltage divider, say, a 5 ohm in series with a 7 ohm. now if we measure accross the 5 ohm resistor we get 5 volts. ace, now lets just connect it to my load. this load is also 5 ohms.

now are we applying 5 volts to the load.

NO.

now we have connected the 5 ohm load in paralel to the 5 ohm part of the potential divider, its total ohmage is now 2.5 ohms (product over sum) now if we use the potential divider sum, Vpd = 12 volts *2.5/(2.5+7) = 3.16 volts.

I hope that helped. another thing, assuming that we were only chargng one thing, and took that into account when calculating what resistors to use. (assuming we are still having a 5 ohm load.) that would give us a potential divider ratio of 2.5ohm:3.5ohm (with the 2.5 reprisenting a 5 ohm resistor in paralel with our load) we would get 5 volts. The problem with this is the wasted energy diserpated. The current drawn by this circuit is 12/6 = 2 amps. that is assuming the connecting wires have no resistance. now if we work out how much energy is disarpated at the 3.5 ohm resistor the formula is

Watts = I

^{2*R = 10.5 watts, wasted. a percentage of usefull energy used (efficiency)}total wattage = IV = 2*12 = 24 watts

the useful current is 1 amp, as the current is split between the 5 ohm resistor and load)

useful = I

^{2*R = 1*5 = 5 watts.}efficiency = 21%

i hope that this made sense, that i was polite, not teaching to suck eggs, not too advanced.

any questions message me, if i cant answer you il know someone who can.

pin 1 is input +, pin 2 is ground, and pin 3 is output +. this guy is also useful for a variety of voltage inputs and uses

There are similar regulators around for higher currents.