element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Capacitor to smooth out Raspberry Pi power dips?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 48 replies
  • Answers 30 answers
  • Subscribers 671 subscribers
  • Views 16104 views
  • Users 0 members are here
  • usb power
  • power supply
  • raspberry_pi
  • pi3
  • raspberry pi
  • usb cable
Related

Capacitor to smooth out Raspberry Pi power dips?

ntewinkel
ntewinkel over 8 years ago

I recently was trying to do a few things with a Pi3, and it consistently hung when I tried to update the system (sudo apt-get update/upgrade). It did everything else well enough, so I wonder if that's power related, with the upgrade making the WiFi work extra hard - maybe not, but I thought I'd look into it.

 

I've also noticed that my older Pi1 will hang once in a while (every few months), and that's a bit of an issue now that I'm using it as my sprinkler controller - reliability has become much more important.

 

While searching for help online, I noticed Robert Peter Oakes did some research and made a nice blog entry explaining the role the USB cables have in the power issues. (Thanks Peter!)

 

In a nutshell, some cables cause a voltage drop that puts the supply too far below the ideal 5v voltage level for the Pi.

The problem is that once in a while the Pi draws enough power to make the voltage dip into the danger zone.

(Some places sell adapters with a higher voltage to compensate. AdaFruit, for example sells a 5.25v adapter for the RPi, and notes that 5.25v is still within the specifications for USB, so even with a perfect no-loss USB cable that should be safe.)

 

One notable item, to me, was that the Pi has some serious power dips on a regular basis, regardless of the cables - just that the better supplies+cables start with higher levels at the Pi and the dips don't take it down too far.

 

So here's my thought - capacitors are supposed to help against dips and spikes, right?

 

Is there a way to add some really big capacitor at the Pi side to help avoid such dips (and maybe spikes too) ?

 

I'm thinking VIN-GND with a 1,000+ uF cap? I have one rated 1,000 at 10v, also I see 1,800 at 16v, both should handle 5v-ish well.

 

Otherwise, maybe splice a USB cable to add the large cap near the micro-USB plug end?

 

Will that cause trouble? Will it help at all?

 

Thanks!

-Nico

  • Sign in to reply
  • Cancel
Parents
  • mcb1
    0 mcb1 over 8 years ago

    I'm thinking VIN-GND with a 1,000+ uF cap

    The rule of thumb for filter capacitors is 1,000 uf per amp as the absolute minimum.

    This assumes the load is constant, but for your power dip issue, you really need to be looking at 10-20,000uF to be sure.

    You can try the other values and stick it across the 5v on the GPIO pins.

     

    You should be able to measure the 5v lines to see what you are actually getting.

    The GPIO is probably a good and easy place to get to.

     

     

    IMO most of the issues are the power supply themselves.

    I've run them from 700mA Samsung chargers with tiny leads while other 'genuine' supplies were below 5v.

    Most of the 'chargers' are simply a device to provide 5 ish volts to a phone to charge a 3.6v lithium battery, and were never designed to be a stable smooth 5.x volt power supply.

     

    You could have a mains issue, but with a switchmode supply (as most are nowdays) it should handle it.

     

     

    I don't suppose it's some dodgy software hobbled together by someone in some small backwater town ... image

    Mark

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • rew
    0 rew over 8 years ago in reply to mcb1

    .... 1000uF / A ....

     

    That rule of thumb is from the old days with linear power supplies. So... to build a 1A 5V powersupply you'd take a 9V tranformer, rectify it and place a cap there. The peaks of the 9V transformer output are near 12.7V. That would put the capacitor near 11.3V. With a linear regulator like a 7805, you n eed 8V at its input. So you have 3.3V to work with. So for a capacitor the formula is: I = C dV/dt = 1000uF * 3.3V / 10ms =  0.33A. Not quite enough yet for 1A of current! Doing the math is better than using the rule-of-thumb.

     

    When you start putting a capacitor on your 5V line, an important question is: How much drop can you tolerate? Well. I've experimented and my raspberry keeps on working fine down to about 3V. But that's the pi only. USB or HDMI peripherals (like HDMI->VGA converters) may require something above that 3V or even 4V.

     

    So we need figures like the extra current draw, how long that happens, and what voltage difference we're going to tolerate. The formula is I = C dV/dt which can be reworked to C = I . dt / dV . Put in numbers like I=2A, dt = 10ms and dV = 0.2V and you get an answer for the capacitor you need. With the numbers I've suggested you need 0.1F, or 100 times more than the 1000uF you suggested... .Math to the rescue.

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • rew
    0 rew over 8 years ago in reply to mcb1

    .... 1000uF / A ....

     

    That rule of thumb is from the old days with linear power supplies. So... to build a 1A 5V powersupply you'd take a 9V tranformer, rectify it and place a cap there. The peaks of the 9V transformer output are near 12.7V. That would put the capacitor near 11.3V. With a linear regulator like a 7805, you n eed 8V at its input. So you have 3.3V to work with. So for a capacitor the formula is: I = C dV/dt = 1000uF * 3.3V / 10ms =  0.33A. Not quite enough yet for 1A of current! Doing the math is better than using the rule-of-thumb.

     

    When you start putting a capacitor on your 5V line, an important question is: How much drop can you tolerate? Well. I've experimented and my raspberry keeps on working fine down to about 3V. But that's the pi only. USB or HDMI peripherals (like HDMI->VGA converters) may require something above that 3V or even 4V.

     

    So we need figures like the extra current draw, how long that happens, and what voltage difference we're going to tolerate. The formula is I = C dV/dt which can be reworked to C = I . dt / dV . Put in numbers like I=2A, dt = 10ms and dV = 0.2V and you get an answer for the capacitor you need. With the numbers I've suggested you need 0.1F, or 100 times more than the 1000uF you suggested... .Math to the rescue.

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • mcb1
    0 mcb1 over 8 years ago in reply to rew

    rew

    I bow to your maths, and yes it was for linear supplies. 

     

    The ripple would have been 5v on mine Vripple = I / 2 x freq x C (F)  or 1 / 2 x 100 x .001F = 5v. which would be below the regulator minimium of 8v.

    Most of the time 5v supplies were not the norm, it was for valve equipment ....

     

     

    I've noted that it is only the HDMi that complains when it gets below about 4.7v or so and that was with the older Pi.

    Presumably Nico is missing the odd cycle or half cycle in his supply, or he has a power supply that can't deliver the goods.

     

    Mark

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 8 years ago in reply to mcb1

    The pi has a voltage-monitor that is used to show the lightning symbol on the screen, and play with the red led. It triggers below 4.65V nominal.

     

    I've measured the pi itself. It runs fine downto below 3V. At 3.3V and lower you're starting to go outside specs for various chips, but they behave well enough to keep things running "outside spec".

     

    But the 5V from the input is passed on to the HDMI as well as to the USB ports. It depends on what you have there if it will keep on working or not. Grab an USB harddisk enclosure, and it won't work on a pi... At all... (at least some of them...) So... it depends on what you have for experience of what you say works and what doesn't work. Below 4.65V you quickly enter the area where things are "out of spec" for the "should be 5V nominal" outputs of the pi on HDMI and USB.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 8 years ago in reply to mcb1

    >Presumably Nico is missing the odd cycle or half cycle...

     

    My wife always says I'm a few cycles shy of a full sine wave image

    (well, she uses knives-in-drawers and bricks-in-loads analogies, as well as elevators-not-quite-going-to-the-top and something about marbles having gone missing)

     

    I do indeed have some crap power supplies. But also some that appear (appear being keyword) to be quality.

    Coupled with crap USB cables that I didn't realize would be a factor.

     

    Mostly my question was because of reading Peter Oakes' findings on how greatly the USB cables affect voltage at the Pi - we're talking drops of a half volt in many cases.

     

    Thanks,

    -Nico

     

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube