# I need to get 12volt down to 5volt, is there any easy way?



## SaiZo (Jun 26, 2013)

Ok, first of all.. What I'm currently building isn't really computer related. It is however _electronics_ related.

I'm searching right now if I have a 5v AC/DC adapter, but if I do not find it, how can I get the 12v down to 5volts?

*Why am I doing this?* Mainly because I want a small "box" to have a USB port that can provide with 5volts. It's a little side project I have been working on, when it's done, I'll post pictures and perhaps even a video.

*What do I have so far?*
Well, I do have the USB port itself, and some sort of "holder" for it - usefull when placing it in the projects "box". I even have several AC/DC "input" jacks, one is already there but it's for the other thing in the project..

I do have several 12volt AC/DC adapters, but I was asking on another forum dedicated to electronics and they said: _It's smarter not to mention, easier to just buy a 5volt AC/DC adapter and use it._

Please take your time to answer, I'm in no rush. Also, I'm currently installing Electronics Workbench, so I can make a diagram of how all should be put together.


----------



## FordGT90Concept (Jun 26, 2013)

SaiZo said:


> I do have several 12volt AC/DC adapters, but I was asking on another forum dedicated to electronics and they said: _It's smarter not to mention, easier to just buy a 5volt AC/DC adapter and use it._


I concur with this opinion although I'm no expert.

Random thought just smashed my head in: Car jacks are 12V DC.  I know there are car jack USB chargers out there that have to convert from 12V DC to 5V DC.  Maybe you could salvage what you need from one of them?

12V AC/DC -> 12V DC/5V DC



Obligatory warning: this stuff could trash everything it is plugged into and I accept no responsibility for any of it.


----------



## Aquinus (Jun 26, 2013)

I have to agree with what others on the other forum said, it is vastly easier just to buy an adapter to do it for you. I bought a 12v to 2x USB adapter for $10 USD for my car almost a year ago.

If you really want something simple that you can do yourself, you could add a resistor(s) to the circuit in series before the load to reduce the voltage, but energy is lost to heating the resistor using this method. You also would need to calculate the amount of resistance you need to bring the voltage to an acceptable level.


----------



## cadaveca (Jun 26, 2013)

USB has 5V on red wire(pin #1).


Not sure on available amperage there though, I think like 500ma.


I too think separate power source is best.


----------



## Frick (Jun 26, 2013)

How much current do you need? Voltage regulators can do that.

http://www.digikey.com/product-detail/en/L7805CDT-TR/497-7255-2-ND/1038234

EDIT: @ dave yes it's 500ma. USB 3.0 can do more though, don't remember how much.


----------



## Sasqui (Jun 26, 2013)

http://www.sportsimportsltd.com/12v...ogleproducts&gclid=CNub_oafgrgCFUei4Aod-zkAYQ

That one is only 1A, USB 2.0 Std.... Google 12v to 5v converters


----------



## de.das.dude (Jun 26, 2013)

use a voltage requlator?

search for afrotechmods on youtube. he has an epic voltage regulator tutorial.

voltage regulators are inefficient but cheap and effective.


----------



## Frick (Jun 26, 2013)

Or if you have resistors lying around do what aquinus said.







Shamelessly stolen from here.

So 12V x 1ko / 1ko + 1.4ko = 5V.


----------



## cadaveca (Jun 26, 2013)

Frick said:


> How much current do you need? Voltage regulators can do that.
> 
> http://www.digikey.com/product-detail/en/L7805CDT-TR/497-7255-2-ND/1038234
> 
> EDIT: @ dave yes it's 500ma. USB 3.0 can do more though, don't remember how much.



Pretty sure it doubled it to 1 amp, now that you mention it. Some boards offer more, but I don't think that's how this will be used, sounds like he just wants external USB-based power source.


----------



## de.das.dude (Jun 26, 2013)

which would work until you put a load on it XD
works with setting the base voltage for transistors only afaik.


----------



## Frick (Jun 26, 2013)

de.das.dude said:


> which would work until you put a load on it XD
> works with setting the base voltage for transistors only afaik.



Possibly. Don't remember much of that.  

But yeah voltage regulators ftw.


----------



## TheoneandonlyMrK (Jun 26, 2013)

Usb 3 now supports upto 1A and usb2 half that, depending on load id go with either a Fused voltage regulator to limit what it can put out or take in Or A dc to dc converter 12-5 which is the same but with complimentary circuitry for regulation and protection.


----------



## de.das.dude (Jun 26, 2013)

dont think votlage regulators need a regulation ckt. just put some caps between the three XD
lol

but it will get hot. 12-5 = 7V, so if you draw 2 amps its like 14 watts dissipated as heat


----------



## SaiZo (Jun 26, 2013)

Many thanks for the replies!
Ok, so I have found the perfect source of power, cheap aswell.
It gives me 5volt and 1000 milliAmpere. Price? 40:-SEK (around 4US$ or 4€uro).

Going to see if they have any in the store tomorrow. 
The USB is going to be used for a very simple thing - to charge an E-Cigarette. The rest of the "project" is something different, I'll just have to show it when it's completed.


----------



## de.das.dude (Jun 26, 2013)

put up  project log


----------



## W1zzard (Jun 26, 2013)

You want a 7805 voltage regulator. it's just one part, any half decent electronics store should carry it

http://www.ebay.co.uk/sch/i.html?_t....X12v+to+5v&_nkw=12v+to+5v&_sacat=0&_from=R40
most of these just use a 7805 inside, if you want to avoid some soldering and pay a huge premium for a plastic case


----------



## Ralfies (Jun 26, 2013)

A 5V zener regulator would be easiest and would work well, but using a voltage regulator like w1z said will give you the most stable voltage at all loads.

Edit: If you're just using it to charge an e-cigarette a zener regulator would work fine. It's just a resistor in series with the voltage, then a 5V zener diode to ground in parallel with a filter cap. The resistor can be calculated with ohm's law if you know how much current the e-cig draws.


----------



## SaiZo (Jun 26, 2013)

W1zzard said:


> You want a 7805 voltage regulator. it's just one part, any half decent electronics store should carry it
> 
> http://www.ebay.co.uk/sch/i.html?_t....X12v+to+5v&_nkw=12v+to+5v&_sacat=0&_from=R40
> most of these just use a 7805 inside, if you want to avoid some soldering and pay a huge premium for a plastic case



Interesting, I'll look into that. However, they seem to be a bit big, hopefully they have something at one of our electronics stores so I can see the size (it does matter, the box for the "project" is rather small). I will not order anything over eBay (can't do that..).



Ralfies said:


> A 5V zener regulator would be easiest and would work well, but using a voltage regulator like w1z said will give you the most stable voltage at all loads.
> 
> Edit: If you're just using it to charge an e-cigarette a zener regulator would work fine. It's just a resistor in series with the voltage, then a 5V zener diode to ground in parallel with a filter cap. The resistor can be calculated with ohm's law if you know how much current the e-cig draws.



Yeah, I was counting on that, I'll have to look how much the E-Cig draws. I don't think it's much however, but it's good to know.


----------



## Deleted member 24505 (Jun 26, 2013)

Here's a circuit for using the 7805 voltage regulator, you could make this pretty small.


----------



## Ralfies (Jun 26, 2013)

SaiZo said:


> Yeah, I was counting on that, I'll have to look how much the E-Cig draws. I don't think it's much however, but it's good to know.


In general, you can charge with any current but less current means a longer charge time. For the zener regulator I would limit the current to ~150mA using a 50R 2W resistor. It seems e-cig batteries have at most a capacity around 300mAH, so with a 150mA charger it would take 2 hours to charge the battery. For more current you'd have to use a resistor greater than 2W which will be physically large. If you need more current it'd be best to use an IC regulator like the 7805 above.


----------



## de.das.dude (Jun 27, 2013)

if you are charging a li-ion battery you need a special IC. i have one of those, but i dont remember the name. the special part is the trickle charge part from 3.9-4.1 volts.
google it, theres plenty of tutorials.


----------



## Ralfies (Jun 27, 2013)

de.das.dude said:


> if you are charging a li-ion battery you need a special IC. i have one of those, but i dont remember the name. the special part is the trickle charge part from 3.9-4.1 volts.
> google it, theres plenty of tutorials.



I think it must be built into the adapter, since it plugs in to a regular usb port.


----------



## W1zzard (Jun 27, 2013)

tigger said:


> Here's a circuit for using the 7805 voltage regulator, you could make this pretty small.
> 
> http://img.techpowerup.org/130626/download.jpg



no need for the capacitors, they just smooth out voltage which should be smooth enough already


----------



## Deleted member 24505 (Jun 27, 2013)

W1zzard said:


> no need for the capacitors, they just smooth out voltage which should be smooth enough already



Does the 1n4007 diode just prevent reverse voltage then as it is all DC?


----------



## W1zzard (Jun 27, 2013)

tigger said:


> Does the 1n4007 diode just prevent reverse voltage then as it is all DC?








not needed imo


----------



## itsakjt (Jun 27, 2013)

Use the L7805CV transistor and step the voltage down from 12V to 5V. As for the current it will give 1.0 ampere output. I think some resistors will bring it down to 500mA.

http://in.mouser.com/ProductDetail/STMicroelectronics/L7805CV/?qs=9NrABl3fj/qplZAHiYUxWg==


----------



## de.das.dude (Jun 27, 2013)

dont forget to put a sink


----------



## dorsetknob (Jun 27, 2013)

why don't you send off for a free starter kit for an electronic ciggi kit
They come with usualy 
2 cigs 
1 USB charging adaptor
Pack of tips/filters

Problem solved

ps i got an old one (usb Ciggerex brand ) you can have if you pay postage


----------



## SaiZo (Jun 28, 2013)

tigger said:


> Here's a circuit for using the 7805 voltage regulator, you could make this pretty small.
> 
> http://img.techpowerup.org/130626/download.jpg



Hey, yeah.. I was trying to find the LM7805 over at ELFA, couldn't find it.
Can't I use an LDO voltage regulator, more specific: *XC62KN5002MR*
Here are the values for it:

_Output voltage: 5V
Output current: 0.1A
Input voltage max: -12V
Dropout voltage max: 0.38V
Package SOT-23_

I did find one made by Fairchild, but it's the KA7909TU, and the values are all wrong.
The ordinary store where I usually purchase electronic components, they don't have such things there.

_However..._
I do have a lot of PCBs from various electronical equipment, so maybe I already have the LM7805.. Or similar.



itsakjt said:


> Use the L7805CV transistor and step the voltage down from 12V to 5V. As for the current it will give 1.0 ampere output. I think some resistors will bring it down to 500mA.
> 
> http://in.mouser.com/ProductDetail/STMicroelectronics/L7805CV/?qs=9NrABl3fj/qplZAHiYUxWg==
> 
> http://shop.chinaglobaltrader.com/i.../L7805CV Three-terminal Voltage Regulator.JPG



Thanks! Now that one I did find: https://www.elfa.se/elfa3~eu_en/elfa/init.do?item=73-262-42&toc=0&q=L7805CV 
Is this the one I want? If so, then I'll go there tomorrow morning if I can get a ride.



de.das.dude said:


> dont forget to put a sink


No problem, I have a bunch of heatsinks in various sizes. Mostly salvaged from other electronic equipment.



dorsetknob said:


> why don't you send off for a free starter kit for an electronic ciggi kit
> They come with usualy
> 2 cigs
> 1 USB charging adaptor
> ...



I didn't say there is no charger. I just said, I wanted to build something extra for my project. In this case - an USB port capable of charging the E-Cig.
I'm mostly doing this to let my hands and brain do something, it's also good practice (soldering small components, using the dremel etc.), but thanks anyway.


----------



## itsakjt (Jun 28, 2013)

SaiZo said:


> Thanks! Now that one I did find: https://www.elfa.se/elfa3~eu_en/elfa/init.do?item=73-262-42&toc=0&q=L7805CV
> Is this the one I want? If so, then I'll go there tomorrow morning if I can get a ride.



Exactly that one.


----------



## Irony (Jun 28, 2013)

You can also get 5v from your power supply, it provides 3.3v 5v and 12v. Unless the whole idea was to make it USB


----------



## Aquinus (Jun 28, 2013)

Irony said:


> You can also get 5v from your power supply, it provides 3.3v 5v and 12v. Unless the whole idea was to make it USB



To expand upon this, if you have an old power supply sitting around, you could just open it up and use the outputs and grounds off an old PSU. It's pretty easy just to power up a PSU and use it. That way you have the works, +3.3v, +5v, +12v, -5v, and -12v. I wouldn't use the negative voltages for much more than circuits with enhancement mode transistors though.


----------



## Geofrancis (Jun 28, 2013)

I use these ajustable regulators for lots of things up to 30v in and 24-1.5v out @1A
http://www.ebay.co.uk/itm/DC-Buck-S..._Measurement_Equipment_ET&hash=item3f2689488c


----------



## Brusfantomet (Jun 28, 2013)

Geofrancis said:


> I use these ajustable regulators for lots of things up to 30v in and 24-1.5v out @1A
> http://www.ebay.co.uk/itm/DC-Buck-S..._Measurement_Equipment_ET&hash=item3f2689488c



A buck DC/DC inverter is the best option here, a simple voltage regulator will just use the exes voltage itself, but a DC/DC regulator actually changes the voltage down to desired levels. if ELFA is your ting and you want to build the device from the ground up you could use a MAX774, there is a example circuit in the spec sheet.


----------



## Geofrancis (Jun 28, 2013)

Brusfantomet said:


> A buck DC/DC inverter is the best option here, a simple voltage regulator will just use the exes voltage itself, but a DC/DC regulator actually changes the voltage down to desired levels. if ELFA is your ting and you want to build the device from the ground up you could use a MAX774, there is a example circuit in the spec sheet.



I don't understand what you mean.


----------



## SaiZo (Jun 28, 2013)

Irony said:


> You can also get 5v from your power supply, it provides 3.3v 5v and 12v. Unless the whole idea was to make it USB



Well that would be great. However, this project actually has nothing to do with computers. However, at the end I guess it could charge things like the E-Cigarette, PS3 controllers, phones etc. via the USB connectors.. But it will not even be near a computer.



itsakjt said:


> Exactly that one.



Say.. If I was to add more USB ports to my project box do I need more parts, or is it sufficent with only one providing the 5volts to several other USB ports?
I was thinking I might just expand the entire thing, say charge smartphones as well.. It will truly be a fun (for me) project building/soldering everything.

As for cooling, the "box" itself has a fan, heatsinks will be mounted, not come that far as to _where_, but it should work out good.

I'm a bit tired right now, have been working on a neighbours motorcycle and just came home, I'll read more and see if I can get all the right parts tomorrow (could say that project is 90% completed, just need to get the USB port/ports up and running).


----------



## itsakjt (Jun 29, 2013)

SaiZo said:


> Well that would be great. However, this project actually has nothing to do with computers. However, at the end I guess it could charge things like the E-Cigarette, PS3 controllers, phones etc. via the USB connectors.. But it will not even be near a computer.
> 
> 
> 
> ...



One transistor should be enough for 3 ports. The L7808CV is capable of giving out 1.5 amperes. So you can safely connect three resistors in each of the 3 outputs to keep the current <=500mA(0.5 A) each port.

As for the resistors, we know V=IR
V=Voltage,
I=Current,
R=Resistance.
So here V=5, I = 0.5
Therefore R = V/I = 5/0.5 = 10 ohm. 
So you need three 10 ohm resistors.


----------



## de.das.dude (Jun 29, 2013)

normal USB chargin ports deliver 900mA.
So for two, if you intend on charging, you will need a better voltage regulator.


----------



## Ralfies (Jun 29, 2013)

itsakjt said:


> One transistor should be enough for 3 ports. The L7808CV is capable of giving out 1.5 amperes. So you can safely connect three resistors in each of the 3 outputs to keep the current <=500mA(0.5 A) each port.
> 
> As for the resistors, we know V=IR
> V=Voltage,
> ...



Won't limiting current like that cause a voltage drop once a load is connected? For example, assume a load of 100mA. This will cause the resistor to drop V = IR = 10R*0.1A = 1V. So every 100mA increase in current draw will cause a 1V drop across the resistor. Also, at maximum load(500mA) the resistor will dissipate 2.5W. Using the convention of doubling the power requirement for longevity and safety, you'd need 5 watt resistors which are quite large if the op has space limitations. Wouldn't it be better to just connect the three USB ports in parallel since a device designed for USB 2.0 wont draw more than 500mA anyways? Or am I missing something?


----------



## itsakjt (Jun 29, 2013)

Ralfies said:


> Won't limiting current like that cause a voltage drop once a load is connected? For example, assume a load of 100mA. This will cause the resistor to drop V = IR = 10R*0.1A = 1V. So every 100mA increase in current draw will cause a 1V drop across the resistor. Also, at maximum load(500mA) the resistor will dissipate 2.5W. Using the convention of doubling the power requirement for longevity and safety, you'd need 5 watt resistors which are quite large if the op has space limitations. Wouldn't it be better to just connect the three USB ports in parallel since a device designed for USB 2.0 wont draw more than 500mA anyways? Or am I missing something?



True. Very good point.  Then your idea is it. No resistors will be needed.


----------



## Brusfantomet (Jun 30, 2013)

Geofrancis said:


> I don't understand what you mean.



A DC/DC buck converter drives the voltage down, like that ting you linked form e-bay, a DC/DC boost raises the voltage. Both are different form a regulator (both series and parallel) in their operating function. My link was just a controller so that he could make one himself. 

A series regulator like a 7805 acts as a variable resistor that ensures that the voltage on the output is the desired value, the rest from the input is spent over the regulator. On a 12V input the regulator will adapt the internal resistance so that 7V is lost over it, and only 5V are left for the output, so if you have 12V 1A input you can theoretical have MAX 5V 1A output (less A in real life as there is always some loss in the regulator).

A DC/DC converter works in a different way, they use capacitors, a diode and inductors together with a switch to create the new voltage,  Wiki article. the end result is that they are MUCH more efficient (100 % is doable), in the example above, a 12V 1A input can be converted to 5V 2,4A output (given 100% efficiency)


----------



## Geofrancis (Jun 30, 2013)

Brusfantomet said:


> A DC/DC buck converter drives the voltage down, like that ting you linked form e-bay, a DC/DC boost raises the voltage. Both are different form a regulator (both series and parallel) in their operating function. My link was just a controller so that he could make one himself.
> 
> A series regulator like a 7805 acts as a variable resistor that ensures that the voltage on the output is the desired value, the rest from the input is spent over the regulator. On a 12V input the regulator will adapt the internal resistance so that 7V is lost over it, and only 5V are left for the output, so if you have 12V 1A input you can theoretical have MAX 5V 1A output (less A in real life as there is always some loss in the regulator).
> 
> A DC/DC converter works in a different way, they use capacitors, a diode and inductors together with a switch to create the new voltage,  Wiki article. the end result is that they are MUCH more efficient (100 % is doable), in the example above, a 12V 1A input can be converted to 5V 2,4A output (given 100% efficiency)



That makes sense I tried a series regulator to run a solar powered router but the amount of power it wasted was unacceptable. Now it's running off one of those little converters. 2x 18v solar panels in parallel dropping down to 4.2v to run the router and charge the 9000mah lithium cell.


----------

