psgarcha92
Posts: 16
Joined: Fri Oct 12, 2012 5:19 am

Why not a DIY Power Supply?

Thu Oct 18, 2012 8:42 pm

Hey guys....

I have been looking around on the internet, reading how most of the problems a Raspi user encounters, are caused by power supplies....i too am having trouble getting a legitimate Power Adapter for the Pi. At the same time, i am tempted to think, why hasn't anybody come up with a DIY Power supply yet?? First off, i was thinking a 230-12V Transformer, using a diode bridge converted to DC and then a 7805 regulator. But the 7805 can only provide a little less than 1A (and is only about 50% efficient). Then i thought of another Regulator, the LM123 (3A, but again less efficient, dissipates lots of heat). What do u guys say? and if we are more about power savings, efficiency, how about a 230-12V transformer, feeding a IN4007 bridge, feeding this(link provided) Efficient LM2576 circuit? it can provide 3A, so i would think plenty of current here. Am i wrong here somewhere?? missing something maybe?

http://www.eleccircuit.com/5v-3a-switch ... by-lm2576/

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Why not a DIY Power Supply?

Thu Oct 18, 2012 11:07 pm

LM7805's are very old fashioned, and LM123's even more so.
If I would built such an Linear regulator I would at least use a low drop regulator such as the LM2940-5, which is a direct replacement for the LM7805 but needs less input voltage and thus dissipates less energy, With a 12V rectified supply it can handle a greater amount ripple on the bulk-elco, so the eleco can be smaller (but at least 4700uF 16V).

1N4001 diodes are Okay for a bridge, but more often replaced with a sigle 4-pin bridge like the B80C1000 circular diode bridge.

But then again, why settle for such a DIY solution, if for a few dollar you can buy a cigar plug (for in the car's cigarette lighter plug) converter with an USB output plug. These convert 12V to 5V at 1.2A without getting warm. Open them up and the contain a tiny switcher, the tip of the plug is the +12V input.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Why not a DIY Power Supply?

Thu Oct 18, 2012 11:30 pm

If you can provide the current and voltage requirements of a PI then a DIY power supply or commercial alternative shouldn't matter.

I wouldn't bother with LM7805 linear regulators they tend to run hot furthermore the output voltage needs to be slightly higher than 5v i..e 5.2v to compensate for voltage losses across polyfuse F3.
If you want to power the PI with homebrew supply I would recommend a variable step-down regulator module from eBay (LM2596).
They usually come with connector leads or solder pads and their voltage output can be adjusted with a trimmer pot.

Richard S.

psgarcha92
Posts: 16
Joined: Fri Oct 12, 2012 5:19 am

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 11:45 am

@mahjongg...youre right. It would be better with a variable voltage regulator like the LM2596. But now i am thinking of having the RasPi and its power supply with a fan in the same casing. The fan i want to run at full RPM always. So can i power the fan from after the diode bridge before the Regulator (parallel to the capacitor at the bridge). The cap i would keep around 4700uf only. Do u guys think it will be a good idea? This way i will have a fan and heatsinks for the raspberry pi as well as the power supply and regulator. A good idea?

User avatar
PeterO
Posts: 5829
Joined: Sun Jul 22, 2012 4:14 pm

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 11:56 am

A bit of overkill I admit, but I'm using one of these to power three RPIs from a single 12V source. In my case I'm using a 12V battery but it could just as easily be your transformer/bridge/capacitor arrangement.
http://www.skpang.co.uk/catalog/dcdc-co ... p-537.html
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
exartemarte
Posts: 376
Joined: Sat Mar 03, 2012 3:51 pm
Location: Middle England
Contact: Website

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 12:44 pm

1. Don't forget that, as well as a bridge rectifier after your transformer, you will need a decent smoothing capacitor.

2. If I remember rightly, 1N4000 series diodes are rated are at 1A. You should use heftier diodes if you are thinking in terms of a 2A/3A supply.

3. In the current issue (No6) of The MagPi there is an article describing a DIY LM2576 3A switch-mode regulator. You can also find similar modules from China on eBay, probably for less than you would pay for the components buying them singly.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 1:52 pm

I'm not sure if having the PI and transformer circuit enclosed in the same space such a good idea because of the risk of introducing noise / rf interference.
If you must do so make sure the transformer + power supply circuit are enclosed in their own metal (Faraday) cage and the power supply cable going to the PI is lopped a few times around a clip-on ferrite core to suppress RF noise in the power line.

Richard S.

User avatar
PeterO
Posts: 5829
Joined: Sun Jul 22, 2012 4:14 pm

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 2:17 pm

redhawk wrote: and the power supply cable going to the PI is lopped a few times around a clip-on ferrite core to suppress RF noise in the power line.
Richard S.
Adding inductance to the DC side of the supply is a bad idea as it will convert the variations in the current drawn by the PI into variations in the supply voltage. TBH at the power/current levels involved with running a PI I doubt there is any need.

But if you are concerned then the ferrite choke goes on the mains cable to the transformer.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 3:03 pm

I don't see anything wrong with using ferrite cores a few turns is hardly comparable to the 1000s inside a relay coil so any magnetic field if any would be very small.
Furthermore any current induced in the wire due to the collapse of the magnetic field would ultimately flow down +ve and -ve at the same time and cancel out at the PI.
I have many dc power supplies i.e. flatbed scanner, USB hard drive, video camera etc with built-in ferrite cores so it can't be all that bad if they use them to block out RF interference too.

Richard S.

User avatar
PeterO
Posts: 5829
Joined: Sun Jul 22, 2012 4:14 pm

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 3:19 pm

redhawk wrote:I don't see anything wrong with using ferrite cores a few turns is hardly comparable to the 1000s inside a relay coil so any magnetic field if any would be very small.
It's not the magnetic field that is the issue. It's the changes in supply voltage caused by changes in current passing through the inductance. Bearing in mind there are things running at 100s of Mhz on the PI, then you only need a small inductance added to the supply lines to create a problem.

Furthermore any current induced in the wire due to the collapse of the magnetic field would ultimately flow down +ve and -ve at the same time and cancel out at the PI.
I have many dc power supplies i.e. flatbed scanner, USB hard drive, video camera etc with built-in ferrite cores so it can't be all that bad if they use them to block out RF interference too.
Richard S.
But they are most likely fitted before the final voltage regulation which happens within the device. There is no regulation for the 5V supply on the PI board.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 5:56 pm

There won't be variations in the DC current of the kinds of frequencies (hundreds of MHz) that would have any effect on the Ferrite clamp. All such frequencies are shorted with capacitors on the board.
If such frequencies were on the power cable, it wouldn't have passed EMC testing.

So using a ferrite clamp, of ferrite ring with a few turns through it cannot hurt at all.

In fact any well designed (switching) power supply would have ferrite filters in its DC output, exactly to block any HF switching noise.

User avatar
Vindicator
Posts: 314
Joined: Sat Sep 17, 2011 11:10 pm
Location: Susanville Ca USA
Contact: Website

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 6:27 pm

Lob0426 bought 5 of the 2596s boards from ebay as a package for less than $2 each one was damage and I repaired this one and still use it for experiments they claim to work 1.25v to 30 volts and up to 2amps and so far mine has easily functioned within this limits.

The link below has the same picture as the one I have there are more listed at much cheaper than this one and some listed as being up to 3amps.

I do not think I could recreate this from parts for the cost of even some more expensive listings.

http://www.ebay.com/itm/DC-DC-35V-to-33 ... 4d04fe75d3.

When the model A comes out I am going to use this one to power input into my keyboard project and power a hub and the raspi from it inside the keyboard.

I am going to use a 12 volt wall wart to supply the project as I have about a dozen 12v power supplies lying around the house to use.
If you are more worried about ,spelling, punctuation or grammar you have probably already missed the point so please just move on.

User avatar
PeterO
Posts: 5829
Joined: Sun Jul 22, 2012 4:14 pm

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 6:49 pm

mahjongg wrote:There won't be variations in the DC current of the kinds of frequencies (hundreds of MHz) that would have any effect on the Ferrite clamp. All such frequencies are shorted with capacitors on the board.
Those are not perfect capacitors.
If such frequencies were on the power cable, it wouldn't have passed EMC testing.
EMC testing sets maximum allowable levels of radiation. These are not zero!
So using a ferrite clamp, of ferrite ring with a few turns through it cannot hurt at all.
In fact any well designed (switching) power supply would have ferrite filters in its DC output, exactly to block any HF switching noise.
But the switching rates are much lower.
There are pulses in the order of a few nS wide and tens of mV high across the input capacitor so there certainly is not zero noise there !
The problem is that adding series L can only increase the impedance of the power supply. Since the 5V supply is not regulated further on the board this has to be a bad thing. Adding additional parallel C across the 5V supply would be a much better idea.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Why not a DIY Power Supply?

Fri Oct 19, 2012 7:26 pm

On the input alone there are three decoupling caps 220uF (the big "tophat elco") for low frequency noise (few Hz to a few Megaherz, 100nF for intermediate frequencies 1 to 100 MHz, and another 1nF for the really high frequencies, (in the GHz range) these three together I would say indeed form a near perfect capacitor. Then there are numerous 100nF capacitors on +5V all over the board. And that is only for the +5V which is barely used directly, as most logic is powered by the 3V3 regulator.

EMC signals that are below EMC tolerated levels are a few millivolt, at most, For it to be troublesome for logic they must be hundreds of times larger.

Any ferrite clamp will have no influence at all on decoupling of the board, even the inductance of the USB lead itself, a few millihenry, would prevent any additional HF decoupling of the +5V on the board, adding a ferrite clamp has no influence on decoupling of any signal levels on the PI.

psgarcha92
Posts: 16
Joined: Fri Oct 12, 2012 5:19 am

Re: Why not a DIY Power Supply?

Sat Oct 20, 2012 5:28 am

And how about putting a fan on the Diode bridge? Would that cause any kind of noise for the pi? Please note the fan would be placed on the output of the diode bridge.


Regards

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Why not a DIY Power Supply?

Sun Oct 21, 2012 10:40 pm

modern fans do not use carbon brushes, so they dont generate HF signals by sparking, so it should not be a problem to power them by the 5V power, if there is enough current for them. But then fans are really unnecessary for a device that uses just 2 Watt, even when over-clocked, in fact as long as the chips do not burn up its easier to over-clock them when they are hot, overheating just affects the longevity of the device, not worsens the speed it can reach, in fact its to the contrary.

psgarcha92
Posts: 16
Joined: Fri Oct 12, 2012 5:19 am

Re: Why not a DIY Power Supply?

Mon Oct 22, 2012 7:53 pm

@mahjongg
my prime concern is running the setup all day long might heat it up a little bit. With ambient temperatures high around here, and the Overclock limit set on the Raspi, i would like to keep it cool incase something makes it reach the 85 degrees Celsius where it will be underclocked again below 1GHz. Plus, its a nice project. Experience. I am going to log temperature data of the SoC, LAN chip, and the power supply using an Arduino, with and without fans. Just want to see how much of a difference fans are going to make.

Regards

Return to “Other projects”