Difference between revisions of "RPi 5V PSU construction"

From eLinux.org
Jump to: navigation, search
m (A 5V power supply for the Raspberry Pi - How To)
(Undo revision 233840 by Pwallis (talk) wrong place for this edit, this is not a power related discussion etc. but a PSU construction howto !)
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== A 5V power supply for the Raspberry Pi - How To ==
+
[[Category: RaspberryPi]]
 +
{{Template:RPi_Hardware}}
 +
 
 +
== A 5V power supply for the Raspberry Pi - Construction How To ==
  
 
Due to various problems with the power supply for the RaspberryPi, a home made PSU might be a solution for some of you.
 
Due to various problems with the power supply for the RaspberryPi, a home made PSU might be a solution for some of you.
Line 5: Line 8:
  
  
I had problems with a cheap 5V/1A adapter from Ebay too (freezing, no LAN, etc.) ...
+
I have had problems with a cheap 5V/1A adapter from Ebay too (freezing, no LAN, etc.) ... The adapter could not provide enough power. It had 5.0xV unloaded, but with RaspberryPi connected I've measured 4.78V and less - dropping to 4.5V on TP1 and TP2 <ref>http://elinux.org/R-Pi_Troubleshooting#Troubleshooting_power_problems</ref>, and that's not good. The voltage drop might be partially caused by the cable, but I've used a branded Nokia cable that looks pretty solid. Anyway, we have to compensate for that too. Also there is some voltage drop on the polyfuse F3 (typically 0.1-0.2V, fuse should have about 0.2 Ohms <ref>http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=19033</ref>), hence don't expect to get >=5.0V on TP1-TP2...<br />
 
 
 
<gallery>
 
<gallery>
 
File:ebay_cheap_5V_adaptor1.jpg|Cheap PSU
 
File:ebay_cheap_5V_adaptor1.jpg|Cheap PSU
Line 12: Line 14:
 
</gallery>
 
</gallery>
  
So I decided to make my own PSU with the popular 7805 - 5V/1A regulator.
+
So instead of looking for another PSU (or cell phone charger), I decided to make my own PSU with the popular 7805 - 5V/1A regulator <ref>http://www.learningaboutelectronics.com/Articles/What-is-a-LM7805-voltage-regulator</ref> <ref>http://www.circuitstune.com/2012/09/7805-voltage-regulator-circuit-7805-pinout.html</ref>. ''(There is also a 2A version available - 78'''S'''05)''
  
  
Line 19: Line 21:
 
[[File:PSU_7805_v01.jpg|none]]
 
[[File:PSU_7805_v01.jpg|none]]
  
The resistors R1 and R2 serve as adjustment of the output voltage. The formula is:  ''V out = V fixed + { R2 [ (V fixed/R1) + I standby] }'', where ''V fixed=5V'' and ''I standby=V fixed/R1'' (or just use 2.5mA). Value of C3 is not critical, I recommend 100-470uF. Same for C4, where for every 1A drawn, use 1000uF of capacity (and add some reserve). Don't forget to put C1 and C2 as close as possible to the regulator. And a heatsink for the regulator is necessary too.
+
The resistors R1 and R2 serve as adjustment of the output voltage (~ 5.25V). The formula is:  ''V out = V fixed + { R2 [ (V fixed/R1) + I standby] }'', where ''V fixed=5V'' and ''I standby=2.5mA'' (for 7805). I calculated for resistors that I had at home, but for best results R1 should be about 470ohm to 1k. Remember that resistors have some tolerance, so results may vary slightly, always measure. Value of C3 is not critical, I recommend 100-470uF. Same for C4, where for every 1A drawn, use 1000uF of capacity (and add some reserve). Don't forget to put C1 and C2 as close as possible to the regulator. And a heatsink for the regulator is necessary too.
 
 
I've used an old 9.5V/1500mA power supply from an printer as the source for this regulator, so no transformer and rectifier etc. was needed in my case. And it works just fine :)
 
  
 +
''I've used an old 9.5V/1500mA power supply from an printer as the source for this regulator, so no transformer and rectifier etc. was needed in my case. And it works just fine :)''
  
'''Here is a schematic of a complete PSU including all components:'''
 
  
(with better filtering and protection)
+
'''Here is a schematic of a complete PSU including all components:'''<br />
 +
(a suggestion, with better filtering and protection)
  
 
[[File:PSU_7805_v02.jpg|none]]
 
[[File:PSU_7805_v02.jpg|none]]
  
Starting from left, we have a transformer (protected by a fuse - F1) supplying about 8-12V AC at 2A (use what you have at home or what is cheaper to buy). Next is a rectifier (or 4 diodes / >1A) with caps (C7-C10, for filtering). Now we should have approx. <AC voltage> x 1.41 - so if we have a 9V transformer, it will be about 12.69V. The 7805 needs at least 2V more on the input than on the output (I use >3V to be sure) for stable regulation, and it can be up to 35V. Main filtering is ensured by C4 (use at least 1000uF for each 1A drawn), another filtering after the regulator is C3 (100-470uF). C1-C6 serve the 7805 for stable function and HF filtering. R1 and R2 adjust the voltage to 5.25V. D1 and D2 are for protection. A transil is used for over-voltage protection on the output, a 5V8 (5.8V reverse standoff voltage and approx. 6.2V breakdown voltage) - use P6KE6.8A or BZW06-5V8. For operation signaling a LED with R3 is used. You may use another fuse - F2 on the output.
+
Starting from left, we have a transformer (protected by a fuse - F1) supplying about 7-12V AC at 2A (use what you have at home or what is cheaper to buy). Next is a rectifier (or 4 diodes / >1A) with caps (C7-C10, for filtering). Now we should have approx. <AC voltage> x 1.41 - so if we have a 9V transformer, it will be about 12.69V. The 7805 needs at least 2V<ref>http://en.wikipedia.org/wiki/78xx</ref> (depending on type/manufacturer) more on the input than on the output (I prefer using a little more, >=3V to be sure) for stable regulation, and it can be up to 35V (but a big difference between input and output voltage means "a lot work" for the regulator and a lot heating). In this case, 8-9V DC measured after the rectifier would be optimal. Main filtering is ensured by C4 (use at least 1000uF for each 1A drawn), another filtering after the regulator is C3 (100-470uF). C1-C6 serve the 7805 for stable function and HF filtering. R1 and R2 adjust the voltage to 5.25V, as described before. D1 and D2 are for protection. A transil is used for over-voltage (peaks) protection on the output, a 5V8 type should be fine (5.8V reverse standoff voltage and approx. 6.2V breakdown voltage) - use P6KE6.8A or BZW06-5V8. For operation signaling (device on) a LED coupled with R3 is used. You may use another fuse on the output - F2.
  
You also may simplify this circuit by leaving out C7-C10, C5, C6, D1, D2, LED and R3, F2 (and the transil, if you don't want any protection).
+
This is a rather fancy circuit, you may simplify it if you like - by leaving out C7-C10, C5, C6, D1, D2, LED and R3, F2 (and the transil, if you don't want any protection). Or leave just some of them. Your choice ;)
  
  
Line 42: Line 43:
  
  
For more info on the 7805 regulator, [http://www.google.com/search?q=7805+datasheet google the datasheet] and see the following resources.
+
=== Resources on 7805 ===
 +
For more info about the 7805 regulator, [http://www.google.com/search?q=7805+datasheet google the datasheet] and see the following resources.
  
Resource links:  
+
<u>Resource links:</u><br />
[http://www.rason.org/Projects/regulator/regulator.htm The Adjustable Voltage Regulator], [http://www.circuitstoday.com/variable-power-supply-using-7805 Variable power supply using 7805]
+
[http://www.rason.org/Projects/regulator/regulator.htm The Adjustable Voltage Regulator],<br />
 +
[http://www.circuitstoday.com/variable-power-supply-using-7805 Variable power supply using 7805],<br />
 +
or [http://www.google.com/search?q=7805+regulator google more]
 +
 
 +
 
 +
=== The testing prototype ===
 +
This is my testing prototype of this PSU, based on the first schematic. It's made of "what was found in the drawer". I've used an old 7805 regulator in TO3 package <ref>http://en.wikipedia.org/wiki/TO-3</ref>, C3 was taken from some broken mainboard, C4 is left out (it's not necessary, because the circuit is powered by a stable power supply from some old printer). The PSU provides stable 5.25V and i have 4.82V on TP1-TP2. My RaspberryPi works OK now :)<br />
 +
<gallery>
 +
File:RPi_5V_PSU_proto1_Pinoccio.jpg|5V PSU prototype
 +
File:RPi_5V_PSU_proto2_Pinoccio.jpg|5V PSU prototype
 +
File:RPi_5V_PSU_proto3_Pinoccio.jpg|5V PSU prototype
 +
File:RPi_5V_PSU_proto4_Pinoccio.jpg|5V PSU prototype
 +
</gallery>
 +
I will make another PSU (for permanent operation) later - new 7805 in TO-220 package <ref>http://en.wikipedia.org/wiki/TO-220</ref>, appropriate heatsink, 1k resistor for R1 and a small pot for R2, new "fresh" caps and a transil, usb connector on PCB ... and I'll put it in some case.
  
  
 
~#Pinoccio
 
~#Pinoccio
 +
 +
 +
== Other PSU options ==
 +
 +
Simple switched PSU ''(with LM2576)'': [http://www.themagpi.com The MagPi - Issue 6] - page 8+9,<br />
 +
And more info on LM2576 <ref>http://www.ti.com/product/lm2576</ref> : [http://www.hobby-hour.com/electronics/lm2576-step-down-switching-regulator.php link], [http://wiringschematic.net/lm2576-switching-regulator/ link], [http://www.siongboon.com/projects/2005-08-07_lm2576_dc-dc_converter/ link]
 +
 +
 +
== Mobile battery power supply options ==
 +
 +
A Battery Elminator Circuit (BEC) should be able provide a solid 5V output at upto 3A which will be plenty to handle the load on a normal RPi
 +
 +
Something like http://www.hobbyking.com/hobbyking/store/__15212__HobbyKing_Micro_UBEC_3A_5v.html
 +
Connect this BEC to a 3S LiPo 5000mAh batter and you should get 15 hours of run time off one full charge.
 +
You could also connect it directly to a 12v car battery for even longer run time.
 +
 +
 +
== Over-voltage protection ==
 +
Here is a nice upgrade for your PSU - a over-voltage protection circuit ''(see [http://blog.3b2.sk/igi/post/Tipy-a-triky-011-Prepatova-ochrana-Voltage-protect-Tips-tricks.aspx original post] in Slovak language)''. It can protect your device (RPi) from unwanted damage by high voltage from a faulty/malfunctioning PSU. In such case, it will short-circuit and burn its fuse immediately.
 +
 +
[[File:5v_overvoltage_protection.jpg|none]]
 +
 +
Steps:
 +
* choose appropriate fuse (according to expected load): 1-1.5A (fast type)
 +
* first don't put the fuse in its holder - you have to initially adjust the circuit, so use a piece of wire (or you can use a lower-current fuse too if you don't mind spending/burning it during the adjustment process)
 +
* set the 2k2 pot (trimmer) to its max. value
 +
* connect protection circuit to a power supply (if available a stabilized lab-PSU is preferred), set to 5.25V output (max. for USB; or exact 5V if you want) and 1-1.5A current limit
 +
* now slowly turn the 2k2 pot until the PSU's current-limiter goes on (or the fuse burns - if you chose that option)
 +
* well done, disconnect, now replace wire with your fuse and you're good to go
 +
 +
 +
== References ==
 +
<references/>
 +
 +
 +
{{Template:Raspberry Pi}}

Revision as of 03:57, 5 June 2013


RaspPi.png Back to the Hub


Hardware & Peripherals:

Hardware - detailed information about the Raspberry Pi boards.

Hardware History - guide to the Raspberry Pi models.

Low-level Peripherals - using the GPIO and other connectors.

Expansion Boards - GPIO plug-in boards providing additional functionality.

Screens - attaching a screen to the Raspberry Pi.

Cases - lots of nice cases to protect the Raspberry Pi.

Other Peripherals - all sorts of peripherals used with the Raspberry Pi.

A 5V power supply for the Raspberry Pi - Construction How To

Due to various problems with the power supply for the RaspberryPi, a home made PSU might be a solution for some of you. You will need some experience with construction of electronic circuits, appropriate tools and a multimeter.


I have had problems with a cheap 5V/1A adapter from Ebay too (freezing, no LAN, etc.) ... The adapter could not provide enough power. It had 5.0xV unloaded, but with RaspberryPi connected I've measured 4.78V and less - dropping to 4.5V on TP1 and TP2 [1], and that's not good. The voltage drop might be partially caused by the cable, but I've used a branded Nokia cable that looks pretty solid. Anyway, we have to compensate for that too. Also there is some voltage drop on the polyfuse F3 (typically 0.1-0.2V, fuse should have about 0.2 Ohms [2]), hence don't expect to get >=5.0V on TP1-TP2...

So instead of looking for another PSU (or cell phone charger), I decided to make my own PSU with the popular 7805 - 5V/1A regulator [3] [4]. (There is also a 2A version available - 78S05)


The basic idea is shown on this schematic:

PSU 7805 v01.jpg

The resistors R1 and R2 serve as adjustment of the output voltage (~ 5.25V). The formula is: V out = V fixed + { R2 [ (V fixed/R1) + I standby] }, where V fixed=5V and I standby=2.5mA (for 7805). I calculated for resistors that I had at home, but for best results R1 should be about 470ohm to 1k. Remember that resistors have some tolerance, so results may vary slightly, always measure. Value of C3 is not critical, I recommend 100-470uF. Same for C4, where for every 1A drawn, use 1000uF of capacity (and add some reserve). Don't forget to put C1 and C2 as close as possible to the regulator. And a heatsink for the regulator is necessary too.

I've used an old 9.5V/1500mA power supply from an printer as the source for this regulator, so no transformer and rectifier etc. was needed in my case. And it works just fine :)


Here is a schematic of a complete PSU including all components:
(a suggestion, with better filtering and protection)

PSU 7805 v02.jpg

Starting from left, we have a transformer (protected by a fuse - F1) supplying about 7-12V AC at 2A (use what you have at home or what is cheaper to buy). Next is a rectifier (or 4 diodes / >1A) with caps (C7-C10, for filtering). Now we should have approx. <AC voltage> x 1.41 - so if we have a 9V transformer, it will be about 12.69V. The 7805 needs at least 2V[5] (depending on type/manufacturer) more on the input than on the output (I prefer using a little more, >=3V to be sure) for stable regulation, and it can be up to 35V (but a big difference between input and output voltage means "a lot work" for the regulator and a lot heating). In this case, 8-9V DC measured after the rectifier would be optimal. Main filtering is ensured by C4 (use at least 1000uF for each 1A drawn), another filtering after the regulator is C3 (100-470uF). C1-C6 serve the 7805 for stable function and HF filtering. R1 and R2 adjust the voltage to 5.25V, as described before. D1 and D2 are for protection. A transil is used for over-voltage (peaks) protection on the output, a 5V8 type should be fine (5.8V reverse standoff voltage and approx. 6.2V breakdown voltage) - use P6KE6.8A or BZW06-5V8. For operation signaling (device on) a LED coupled with R3 is used. You may use another fuse on the output - F2.

This is a rather fancy circuit, you may simplify it if you like - by leaving out C7-C10, C5, C6, D1, D2, LED and R3, F2 (and the transil, if you don't want any protection). Or leave just some of them. Your choice ;)


Also if you prefer to fine-tune the output voltage, you may replace R2 with a small pot (trimmer) as shown here:

PSU 7805 v03.jpg

With this values (R1=1k, R2=100) adjustment from 5V to approx. 5.75V is possible.


Resources on 7805

For more info about the 7805 regulator, google the datasheet and see the following resources.

Resource links:
The Adjustable Voltage Regulator,
Variable power supply using 7805,
or google more


The testing prototype

This is my testing prototype of this PSU, based on the first schematic. It's made of "what was found in the drawer". I've used an old 7805 regulator in TO3 package [6], C3 was taken from some broken mainboard, C4 is left out (it's not necessary, because the circuit is powered by a stable power supply from some old printer). The PSU provides stable 5.25V and i have 4.82V on TP1-TP2. My RaspberryPi works OK now :)

I will make another PSU (for permanent operation) later - new 7805 in TO-220 package [7], appropriate heatsink, 1k resistor for R1 and a small pot for R2, new "fresh" caps and a transil, usb connector on PCB ... and I'll put it in some case.


~#Pinoccio


Other PSU options

Simple switched PSU (with LM2576): The MagPi - Issue 6 - page 8+9,
And more info on LM2576 [8] : link, link, link


Mobile battery power supply options

A Battery Elminator Circuit (BEC) should be able provide a solid 5V output at upto 3A which will be plenty to handle the load on a normal RPi

Something like http://www.hobbyking.com/hobbyking/store/__15212__HobbyKing_Micro_UBEC_3A_5v.html Connect this BEC to a 3S LiPo 5000mAh batter and you should get 15 hours of run time off one full charge. You could also connect it directly to a 12v car battery for even longer run time.


Over-voltage protection

Here is a nice upgrade for your PSU - a over-voltage protection circuit (see original post in Slovak language). It can protect your device (RPi) from unwanted damage by high voltage from a faulty/malfunctioning PSU. In such case, it will short-circuit and burn its fuse immediately.

5v overvoltage protection.jpg

Steps:

  • choose appropriate fuse (according to expected load): 1-1.5A (fast type)
  • first don't put the fuse in its holder - you have to initially adjust the circuit, so use a piece of wire (or you can use a lower-current fuse too if you don't mind spending/burning it during the adjustment process)
  • set the 2k2 pot (trimmer) to its max. value
  • connect protection circuit to a power supply (if available a stabilized lab-PSU is preferred), set to 5.25V output (max. for USB; or exact 5V if you want) and 1-1.5A current limit
  • now slowly turn the 2k2 pot until the PSU's current-limiter goes on (or the fuse burns - if you chose that option)
  • well done, disconnect, now replace wire with your fuse and you're good to go


References