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 16208 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
  • ntewinkel
    0 ntewinkel over 8 years ago

    Here's an update...

     

    I received one of the new power adapters a few days ago and tried it last night.

    It's a Keyestudio 5.25v / 2.4A "highly regulated switching power supply". The first feature it mentions is compatibility with Raspberry Pi requirements. It's intended as a proper power supply - the cable is directly attached, and it says the wires are 20awg.

     

    I put my multimeter on 5v and GND and saw that at startup it was at exactly 5.25v, which then goes to about 5.20v while running, and down to about 5.16v while doing work.

    This is at multimeter display refresh, so there may be quick details I can't see without an oscilloscope of course.

     

    The point is that I no longer see the power-warning lightning bolt, and the WiFi connection appears to be much more stable - although it did disconnect once still during testing.

     

    Also, it wasn't my SD card as I first thought - I was able to run the updates for both SD cards I tried it with.

     

    So I think the lesson here is to use proper power supplies, not chargers (as so many people have said so many times!).

     

    And the other part of the lesson is to not blame the power supply for everything - in my case the dropped WiFi was causing my troubles, because due to it being a remote-desktop connection it became inaccessible, making it look like it was hanging.

     

    Cheers,

    -Nico

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

    Another update, in case people are curious...

     

    My sprinkler Pi2 went unresponsive again on the weekend (last reset was 2 weeks earlier), so I decided that was a good time to switch power supplies for it - I had been using a 5v 2A tablet charger, so I now have it on the aforementioned Keyestudio power adapter.

     

    I then took the tablet power supply and put it on my Pi1 cat-video system (it plays videos for cats, LOL yes). It right away showed the coloured block at the top right indicating poor power supply.... hmmm interesting!

     

    So for the Pi1 I went back to a 2-usb-port charger supply (a cheap eBay one) that I'd been using for it, and the video flickers constantly, sometimes even keeping a blank screen - but no power-warning icon. So that video flicker issue I was trying to fix by changing config settings appears to be due to the poor power supply too. (ps, it's an old monitor with HDMI-to-DVI adapter)

     

    I have a different power adapter still on the way, but it's taking the scenic route. I'm curious as to how it will perform.

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 8 years ago

    It still comes down to the power supply in your case. Increasing the power supply to 5.25 is compensating for the voltage drop on the cables from the brick to the PI. Also the brick can in itself be dropping volts under load. Still within specifications but still adding to the issue.

     

    A USB Tablet adapter is a funny thing, some are really good quality and have regulated outputs (Geniune Apple Tablet ones for example or Samsung) but not all. Adding a capacitor at the PI end can help but it can also hinder in that during power up it can draw too much current and cause the brick to current limit while it tries to charge those big ass caps. Depending on the power brick this can recover or spin into a loop of shut down and power up

     

    Any USB type charger that is used also has a big question over the quality of the USB lead between it and the PI, if it does not say the wire gauge on the plastic sleeving then it may be a crap one, good enough for charging a phone or for data usage but not powering something that relies on the delivered power levels, In my testing I found some horrific ones and a few good ones. also a common trick is to use thin wire and really thick insulation to give the illusion of a good lead. loading the PI end with a 5 ohm or 2.5ohm resistor will quickly identify a bad lead / power brick in a way that can easily and reliably be measured (1A or 2A load but steady load), if this does not pass then there is no way it will pass on the PI reliably either.

     

    So, I have found that the purpose built power supplies for the PI are a good way to go, I would still be hesitant to go to 5.25V as this is right on the 5V +-5% limit and any surge could cause a problem. Most of the official PI ones are 5.1V and 2.5A and only have a figure 8 cable (Two separate multi strand conductors, think speaker cable), not USB cable, and the wire is pretty thick, at a whopping 18AWG.

     

    24AWG is 0.025 Ohms per foot

    22AWG is 0.016 Ohms per foot

    18AWG is 0.006 Ohms per foot

     

    so for a typical 6 foot lead (12 feet of wire, remember the return path too) at 2 Amps

     

    24 AWG = 2 * .025 * 12 = 600 mV lost... ouch

    22 AWG = 2 * .016 * 12 = 384 mV lost

    18 AWG = 2 * .006 * 12 = 144 mV lost

     

    So as you can see, even without physical measurement the 24 awg cable is a lost cause to supply a PI under load unless it is less than 1 foot long and this is assuming the power supply itself maintains the 5V out under load, some dont. The official PI PSU with 18AWG can easily supply 2A and more on a 6 foot lead.

     

    So in conclusion, the PI is designed with a USB connector for its supply, this does not mean unfortunately that the PI will work with all the range of the USB specifications, not even close

      • USB Specification for volts MAX  nominal volts = 5.00 +0.25 −0.60 V  so anything from 4.4V to 5.25, this is MAX not under normal operation too and if you use a 5.25V supply, your risking your pi or other USB device you may connect to it.
      • raspberry PI is 5V +0.25 - 0.25 or to put it another way, 4.75 to 5.25V
      • The one thing I have not yet mentioned is that if a power supply for the PI is a full functioning USB specification PSU, it may limit the power delivered even though it is able to supply more, if the PI does not signal the current requirements. I dont know if t does.
    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • gdstew
    0 gdstew over 8 years ago in reply to Robert Peter Oakes

    "Also the brick can in itself be dropping volts under load"

     

    I've found quite a few of the cheap USB chargers will not produce 5V at the rated current. I've seen as low as 4.6V which is of course well out of spec. I personally want

    at least 4.9V - 4.95V at rated current before I will use it.

     

     

    "if it does not say the wire gauge on the plastic sleeving then it may be a crap one"

     

    I've found quite a few that do have the wire gauge printed on them that are still crap, usually 28 AWG on all conductors, sometimes 28/26-24 AWG. At least you can tell

    by looking at them. I've also noticed that some of the current "Pi rated" supplies use a 4 ft. power cable instead of 6 ft. which helps a little.

     

     

    "I would still be hesitant to go to 5.25V as this is right on the 5V +-5% limit and any surge could cause a problem"

     

    Most ICs have a maximum voltage rating in their specs that is well above 5% of the nominal rating, usually around 6V to 7V for 5V devices specifically to handle surges on the power

    supply. It is not a good idea to test this specification on a regular basis.

     

     

    "So in conclusion, the PI is designed with a USB connector for its supply, this does not mean unfortunately that the PI will work with all the range of the USB specifications, not even close"

     

    and

     

    "The one thing I have not yet mentioned is that if a power supply for the PI is a full functioning USB specification PSU, it may limit the power delivered even though it is able to supply more, if

    the PI does not signal the current requirements. I dont know if t does."

     

    No USB host device is required to work with all the range of the USB specifications. The specification was specifically designed to allow a range of minimum current requirements (the

    minimum amount of current required to be supplied by a USB host is 50 mA) mainly to allow battery powered or otherwise low powered devices to use USB. A USB host device should always

    provide 5V +- %5. The 4.4V voltage rating is for hub devices to allow for voltage drops through chained hub devices powered by the USB host. I believe that two chained hubs is the maximum

    and 4.4V is the minimum for the second hub in the chain.

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

    Some minor corrections:

    A device is allowed to draw up to 100mA before negotiating the "upgrade" to 500mA. The host is allowed to refuse to upgrade, meaning the device should stay in the lower-power-consumption mode.

     

    An official host is supposed to work with all conforming USB slaves (and the other way around). Restrictions may apply. So a host supporting 12mbps (USB 1.0 and 1.1!) will not communicate any faster than 12mbps with a more recent USB slave. And with the power... the host is allowed to refuse to provide anywhere between the minimum of 100 and 500mA, and it should refuse to negotiate more if it can't provide it.

     

    Your statement is more from the actual situation: many hosts and slaves were designed to go outside the specifications. As a simple example we all know, the raspberry pi has an USB connector for power. The datapins are not connected, so the pi will not negotiate anything (=not conforming to spec). The pi will draw whatever it wants without negotiation (=not according to spec), and it will potentially draw more than 500mA (=not allowed by the spec).

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

    "The datapins are not connected, so the pi will not negotiate anything (=not conforming to spec). The pi will draw whatever it wants without negotiation (=not according to spec),

    and it will potentially draw more than 500mA (=not allowed by the spec).  "

     

    The Pi power connection is NOT a USB device nor was it ever intended to be used as one, it simply uses a USB connector. The USB connector was chosen mainly because

    of the availability of USB chargers which also (usually) not USB devices. The USB A type connector is capable of handling 2A/pin, the micro connector 1.8A/pin (I was surprised

    when the Pi 3 spec said that it could pull 2A since it is using the USB micro connector) so it is obvious that someone figured out that it might be used for other purposes.

     

    Thanks for the corrections on current negotiation, my memory ain't what it used to be and I couldn't find the chapter on power in my USB spec. But if I remember correctly, the

    amount of current negotiated for is actually 100 mA  to 500 mA in 100 mA increments?

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

    I think it's 0-500mA in 2mA increments. There is a byte with a value of 0-250 that specifies how much current the device needs. For GETTING less than 100mA you don't need the negotiation. but I think you can still declare say: I need only 20mA, so that with two such devices a third device on an unpowered hub may be allowed to use 100mA + 2*80mA...

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 8 years ago in reply to Robert Peter Oakes

    Thanks for the feedback, Peter, and for the article you wrote that sparked my questions! (and answered a lot of my earlier questions)

     

    >Peter writes...

    >I would still be hesitant to go to 5.25V as this is right on the 5V +-5% limit and any surge could cause a problem

     

    AdaFruit sells a 5.25v supply specifically for SBCs. They're what I consider a reputable company, so I feel the risk isn't that high. (I may be wrong).

    https://www.adafruit.com/product/1995 https://www.adafruit.com/product/501

    "the perfect choice for powering single-board computers like Raspberry Pi"

    "...specifically designed to provide 5.25V not 5V ... to solve a problem that occurs often with USB-powered gadgets: they draw so much current that the resistance of the cable causes a voltage drop"

     

    The Keyestudio one I picked up is rated 5.25v +/- 3% (which seems to come to max of 5.41v then). It has 20AWG wires too.

     

    For the Pi end of things, I also kind of feel that any quality product designed for a specification max of 5.25v should easily be able to handle the additional 0.16 volts. Isn't there an engineering multiplication factor that gets applied, like ratings of snow-loads and bridges? I may be wrong there too image

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • niteowl12
    0 niteowl12 over 8 years ago in reply to ntewinkel

    -Nico,

     

    The datasheet from the step down DC/DC shows that input voltage operating range is 2.5 to 5.5V and thats at the dc/dc input after a reverse protection FET/Diode and the wire from the wall unit to the board. I think you are safe even in the event of a surge.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • gdstew
    0 gdstew over 8 years ago in reply to niteowl12

    The absolute maximum input voltage for the part is 6.5V so yes it is OK. As I wrote earlier, most parts are built to withstand voltages beyond the normal operating range

    that you list. I will add to that as long as the maximum power rating for the device is not exceeded. These specs are normally found under the heading of Absolute

    Maximum Ratings.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject 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