## 12v to 5v

wranzzon
Posts: 25
Joined: Mon Feb 20, 2012 7:51 pm

### Re: 12v to 5v

So I´ve heard that the RasPi runs on 5v.

My situation is like this; I have a transformer fromm 230v to 12v - 3800mA. And now i Want to get those 12v down to 5. So I need a resistor of some kind, but how do I calculate how many ohm the resistor should have?

### Re: 12v to 5v

A resistor is not the way to do this.

A regulator for 5VDC, or a switching convertor like: http://www.micrel.com/_PDF/lm2576.pdf

with an inductor and a couple of capacitors would do reasonable job.

Or adapt a good quality 12V DC to 5V DC in car phone charger.

DesOToole
Posts: 6
Joined: Wed Jan 04, 2012 4:07 pm

### Re: 12v to 5v

Here's another option

http://www.ebay.co.uk/itm/10-X.....230848a6f0

As stated above, a simple resistor is not the best way of doing it

drgeoff
Posts: 11111
Joined: Wed Jan 25, 2012 6:39 pm

### Re: 12v to 5v

Des101 said:

Here's another option

http://www.ebay.co.uk/itm/10-X.....230848a6f0

As stated above, a simple resistor is not the best way of doing it

That will be dissipating about 5 Watts and will need a decent heat sink.

http://cgi.ebay.com/ws/eBayISA.....0650881112 is a ready made switcher but it is variable voltage so you'll need a voltmeter to adjust to 5 volts before connecting to the RP.
Quis custodiet ipsos custodes?

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

### Re: 12v to 5v

wranzzon said:

So I´ve heard that the RasPi runs on 5v.

My situation is like this; I have a transformer fromm 230v to 12v - 3800mA. And now i Want to get those 12v down to 5. So I need a resistor of some kind, but how do I calculate how many ohm the resistor should have?

That gives you 12vAC, the RPi needs 5vDC, there is a whole bunch of stuff you need to do to change AC into DC, and a simple resistor will lead to fried Pi (this would be bad).

Buy a simple USB charger with a micro USB plug on it, the kind of thing designed for charging any modern mobile phone (except an iPhone).  They are cheap as chips and will do the job without you frying Pis.

DesOToole
Posts: 6
Joined: Wed Jan 04, 2012 4:07 pm

### Re: 12v to 5v

drgeoff said:

Des101 said:

Here's another option

http://www.ebay.co.uk/itm/10-X.....230848a6f0

As stated above, a simple resistor is not the best way of doing it

That will be dissipating about 5 Watts and will need a decent heat sink.

http://cgi.ebay.com/ws/eBayISA.....0650881112 is a ready made switcher but it is variable voltage so you'll need a voltmeter to adjust to 5 volts before connecting to the RP.

I was thinking that the Pi had a very low current draw but I can't seem to find where I read that now. Even so, I suppose if the OP needs to use high power usb peripherals then I agree a switcher is the way to go.

riggsre
Posts: 52
Joined: Fri Feb 10, 2012 5:25 pm

### Re: 12v to 5v

Quote:

I was thinking that the Pi had a very low current draw but I can't seem to find where I read that now. Even so, I suppose if the OP needs to use high power usb peripherals then I agree a switcher is the way to go.

*********

I think the FAQ or the Wiki says 700ma for the B series.

drgeoff
Posts: 11111
Joined: Wed Jan 25, 2012 6:39 pm

### Re: 12v to 5v

Des101 said:

I was thinking that the Pi had a very low current draw ....

Compared to an x86 PC it certainly is!
Quis custodiet ipsos custodes?

rurwin
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

### Re: 12v to 5v

Des101 said:

Here's another option

http://www.ebay.co.uk/itm/10-X.....230848a6f0

As stated above, a simple resistor is not the best way of doing it

The circuit is very simple, and a nice introduction to building electronics, but it does need some designing. So I thought I'd show you what you need to do. It's worth noting at the outset that a 7805 by itself will only supply 1 amp, but that is enough for a RaspPi.

You will also need a heat sink of several square inches, a full-wave rectifier rated for well over 1 amp at over 18 volts, a large capacitor, and a 0.1 microfarad capacitor to stabilise the 7805.

There are three calculations you need to do:

First a 12V transformer is 12V RMS, not peak-to-peak, so your transformer will output 12 x sqroot(2) = 17V peak to peak. When you put that through the full-wave rectifier it will drop by maybe 0.7V, but it's still high.

Then the capacitor has to supply current while the full-wave rectified signal is too low for the regulator, so assuming the power is delivered only at the peak of the waveform at 10ms intervals, 1A for 0.01s = 0.01 Coulombs, Q=CV, C = Q/V

The 7805 requires that the input voltage stays above 7.5V, So the maximum voltage drop you can live with is 8V. So C = 0.01/8 = 1,250 microfarads. And when you buy that monster, remember your voltage is the best part of 20V.

Then you will want a large enough heatsink to dissipate 17-5=12volts at 1 amp = 12 watts. If you want it to only get to about 40 Celsius, you're looking for 20 Celsius/12watts = 1.6 C/watt. Like this one.

Here's the circuit diagram.

jojopi
Posts: 3317
Joined: Tue Oct 11, 2011 8:38 pm

### Re: 12v to 5v

rurwin said:

First a 12V transformer is 12V RMS, not peak-to-peak, so your transformer will output 12 x sqroot(2) = 17V peak to peak. When you put that through the full-wave rectifier it will drop by maybe 0.7V, but it's still high.
The transformer will output 12Vrms only when operating at its rated current -- 3800mA according to OP.  This is when the voltage drop due to copper resistance in the windings is at its maximum.

When the transformer is operating well below its rated current the copper losses will be much lower and the output voltage higher.  Maybe as high as 17Vrms giving 24Vdc.

drgeoff
Posts: 11111
Joined: Wed Jan 25, 2012 6:39 pm

### Re: 12v to 5v

rurwin said:

The circuit is very simple, and a nice introduction to building electronics, but it does need some designing. So I thought I'd show you what you need to do.

For safety reasons I never recommend that an introduction to building electronics involves mains electricity.

In my first reply in this thread I mistakenly assumed that the OP meant he had a commercially produced PSU in an enclosed casing of the style that comes with most notebook PCs.
Quis custodiet ipsos custodes?

fireraisr
Posts: 81
Joined: Wed Nov 23, 2011 2:34 am

### Re: 12v to 5v

I agree. Is a \$5 5v adapter really too expensive to risk your life? If you need high power capacity just buy a powered hub for another \$10.

The highest V rating I've felt comfortable working with was 72v, and even then is was mains isolated.

If the OP intends to go forward with the project I hope he has the sense to have a buddy that knows where the circuit breaker is working with him.