element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
  • 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 667 subscribers
  • Views 14892 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
  • 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
  • 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
  • Robert Peter Oakes
    0 Robert Peter Oakes over 8 years ago in reply to gdstew

    Absolute MAX Ratings are not a guarantee of correct operation, only that it won't fry, also it is NEVER recommended to deliberately operate at max ratings.

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

    >Absolute MAX Ratings are not a guarantee of correct operation

     

    I'm still learning how all these things really work (I still don't quite understand why pretty much all my 5v chargers underpower the Pi at idle), so bear with me here...

     

    My understanding is that the 5.25v charger is not out of spec for the Pi, given that 5.25 is still in that "sweet" range. The absolute max rating is just there to protect from the odd unusual situation where it might spike a bit higher. That charger is not operating at 6.5v - at most it's supposed to hit 5.41 due to that possible +3% . As I see it, most of the time it will operate at a max of 5.25v, usually a few specs down from that, and very rarely a touch above it - ie, that odd unusual situation that is slightly above spec, but still well below the absolute max.

     

    Also not sure when that +3% would happen (line voltage fluctuations?), as for the most part I was recording the voltage going down with use, which seems to be what people generally complain about - voltage drops.

     

    I have a feeling this kind of question about hardware is similar to software students asking me why they need to separate out the data models image

     

    -Nico

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

    >Absolute MAX Ratings are not a guarantee of correct operation

     

    I'm still learning how all these things really work (I still don't quite understand why pretty much all my 5v chargers underpower the Pi at idle), so bear with me here...

     

    My understanding is that the 5.25v charger is not out of spec for the Pi, given that 5.25 is still in that "sweet" range. The absolute max rating is just there to protect from the odd unusual situation where it might spike a bit higher. That charger is not operating at 6.5v - at most it's supposed to hit 5.41 due to that possible +3% . As I see it, most of the time it will operate at a max of 5.25v, usually a few specs down from that, and very rarely a touch above it - ie, that odd unusual situation that is slightly above spec, but still well below the absolute max.

     

    Also not sure when that +3% would happen (line voltage fluctuations?), as for the most part I was recording the voltage going down with use, which seems to be what people generally complain about - voltage drops.

     

    I have a feeling this kind of question about hardware is similar to software students asking me why they need to separate out the data models image

     

    -Nico

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

    Components are specified with an "absolute max" rating. Above that, it might fry. No guarantees though.

     

    Depending on the component, you can go beyond the absolute max rating and sometimes you're left with a working component. For example, a 0.25W rated resistor will handle 1kW just fine, as long as it's short enough. On the other hand, I have mosfets rated for 25V, and that is really really close to the point where they break. Around 27V is where they start going bad. Note that I tested just one. So it could very well be that they generally end up tolerating 26-28V and I got a mediocre one.

     

    Anyway, those are absolute max. Then you often see "recommended" ratings. So oldfashioned opamps were specified at "works fine at 15V", and they have an 18V tolerance. I suspect that the 15V is allowed to be 10% high too, so it will probably work fine at 15V+10% = 16.5V. But in theory the component can stop working somewhere between the 15V and the 18V but it should work again next time you turn it on. In practise this is rare. Most components work to just above their absolute max and then simply die.

     

    Now, for the 5V on the pi there are many components involved. If someone found one of them that has a 6.5V absolute max, that's neat, but that doesn't mean that nothing else is connected to that 5V line. So you can't safely put your pi on 6.5V.

     

    To make things work, you have to take tolerances and imperfections into account. So if I have a component that signals a "high" with 3.3V, and another that interprets a signal as "high" starting at 3.3V then intheory things should work. But in practise, the wire between the two might cause the voltage to be only 3.2V at the recieving end, and then we have a problem. So margins dictate that the output is specified in a more strict way than what the input should tolerate.

     

    So powersupplies normally specify 5V nominal +/- 5%. So 4.75-5.25. On input when a device is marked as works-at-5V, then it should tolerate 5V nominal +/- 10%, or 4.5 to 5.5V.

     

    Normally the 0.25V margin allows for a voltage droop in the cable and things like that. The Adafruit 5.25V powersupply will compensate for that "expected" effect by sitting on the high end of the normal tolerances. 

     

    Now adafruit still has to BUILD those devices. We know they are aiming for 5.25V. But they can't make them infinitely accurate. So they have a tolerance on that too. The resistors they use to arrange for the output voltage to be 5.25V are probably specified to 1%. So they could easily end up with 5.25V + 1% = 5.30V (plus a little). So that's more than the 5.25V that we expected from a powersupply.

     

    Now you might say that we could adjust a potentiometer on the power supply in the factory to make it much more accurate. That won't work in practice, as components tend to change value both depending on environmental circumstances as well as due to aging. So if they finetune it to 5.25V +/- 0.1% then it still might end up at +1% when it's hot (or maybe when it's cold).

     

    But on the input side, most devices will tolerate up to 5.5V, so there is still some margin. But we've doubled the "cable droop" margin that we can tolerate. So in practice we'll be ok.

    • 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

    "On the other hand, I have mosfets rated for 25V, and that is really really close to the point where they break. Around 27V is where they start going bad. Note that I tested just one. So it could very well be that they generally end up tolerating 26-28V and I got a mediocre one."

     

    Was the absolute maximum rating for the MOSFET  25V or was that the maximum operating voltage ? If there is no absolute maximum rating in a spec sheet I always use a 10% - 15% reduction from

    the given spec or use a different part to get a proper safety margin when needed.

     

     

    "Now, for the 5V on the pi there are many components involved. If someone found one of them that has a 6.5V absolute max, that's neat, but that doesn't mean that nothing else is

    connected to that 5V line. So you can't safely put your pi on 6.5V."

     

    This part of the discussion was about the Pi power supply being able to safely handle surges when using a power source that was at or near the top end of the nominal working voltage

    not the maximum voltage input allowed for the Pi (still, can't be too careful).

     

    On the newer Pis (B+, 2, 3) the ones without proper schematics I'd like to add, the 5V input also goes directly to the circuit (the one that has never had a proper schematic for it published)

    that is used to handle the USB host 5V supply much better than the original Pis did. So there are other components connected to the Pi 5V input to take into consideration. BK5rA (U13) is

    described in the LAN9514 data sheet as a USB power switch and Googling it as "BK5rA USB power switch" gets a TI data sheet for the LM3525 Single Port USB power switch which has

    an absolute maximum input voltage of 6V. As far as I know (without proper schematics) everything else is 1.8V or 3.3V so it still looks OK.

    • Cancel
    • Vote Up +1 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 may have been this MOSFET that I tested: https://assets.nexperia.com/documents/data-sheet/PSMN1R2-25YL.pdfII

     

    They say they guarantee operation at 25V, provided the temperature is above 25 degrees.

     

    When you design things, taking a 10% margin is appropriate. In this case, stuff like "ground bounce" or inductance in the wires coming from the battery and the capacitors may locally produce voltages above the rated 25V should you try to use these at exactly 25V. Moreover, if you read that datasheet carefully, the maximum voltage goes down, BELOW 25V when the temperature is not 25 degrees C. If you forget to read that, again that 10% margin will save you (it's only a few percent down to -40 degrees).

     

    If you prefer to take 10% margin on the rated 25V of a MOSFET, then you should also refrain from guessing that everything else will be OK... You're right. Things will probably be OK.

     

    Proper engineering says you try to keep a margin against ALL "absolute max" ratings. When pressed you've now come up with a second component we should've checked in the first place. What are the chances that you forgot antoher one?

     

    On the first pi, the 5V also goes to the CPU. The CPU has a built-in switcher to generate its own core voltage. I don't see the tell-tale peripheral components on a PI2 that I had handy. So maybe that's now in the "power circuit". But if that's the case, I don't know how the "overvolting" would still be possible. Is it?

     

    Anyway, with the lack of schematics, it is dangerous to make assumptions about the allowable voltage. If the foundation says 5.25, they know that their users would adjust a powersupply to 5.5V and get burnt by the surges caused by long wiring. So they take some margin. But the real max is likely 5.5V. IF you know what you're doing and have access to the schematics and all the datasheets, you could possibly find an even slightly higher limit. But I find that risky when we don't have a schematic. 

    • 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

    "On the first pi, the 5V also goes to the CPU."

     

    So the immediate question is what is the absolute maximum voltage for these pins and a second question is it also connected to the CPU/SoC on the Pi 2 and 3 ?

     

     

    "The CPU has a built-in switcher to generate its own core voltage"

     

    Core voltage, RAM voltage, and GPU voltage. All of these can be adjusted by that CPU/SoC.

     

     

    "If you prefer to take 10% margin on the rated 25V of a MOSFET"

     

    10% to 15% (at least get that right) maybe more depending on circuit requirements. Where the margin is applied depends on if the 25V rating was

    operational or absolute maximum.

     

     

    "then you should also refrain from guessing that everything else will be OK... You're right. Things will probably be OK."

     

    The "guessing" is based on the specifications of the components provided by the manufacturer for ALL parts used in a circuit and for the environment

    (electrical, thermal, etc.) that the circuit will be exposed to, safety and reliability requirements, and experience with similar components and circuits.

     

     

    "Proper engineering says you try to keep a margin against ALL "absolute max" ratings."

     

    I never said or in any way implied that it wasn't. Once again this is about using  5.25V for the Raspberry Pi power input and trying to determine if

    there is enough margin to prevent problems if ALL the components on the Pi connected to it were to subjected to voltage surges on that line which is

    exactly what you are saying to do so what argument are you trying to make here ?

     

     

    "When pressed you've now come up with a second component we should've checked in the first place. What are the chances that you forgot antoher one?"

     

    I have no idea what your point is. Pressed for what? I simply found another component connected to the 5.25V supplied to the Pi and checked its specification

    to see if it could be a problem. And actually I did forget one, as you mentioned on the original Pis it is connected to the CPU/SoC so I need to check that spec

    too. And if it connected to the newer Pi 2 and 3 those specs needs to be checked as well.

     

     

    "If the foundation says 5.25, they know that their users would adjust a powersupply to 5.5V and get burnt by the surges caused by long wiring."

     

    Citation ?

     

    Most of the power supplies (the wall wort ones at least) are not adjustable although some of the ones that connect to the GPIO connector might be. Also

    every recommendation I've seen (and made in this thread no less) says to keep these wires short, following that advice is optional. I do believe that I have

    seen at least one 5.5V wall wort out there but I would not use it and I would advise anybody else that asked about it in this forum not to use it either.

     

     

    "Anyway, with the lack of schematics, it is dangerous to make assumptions about the allowable voltage."

     

    I don't know about "dangerous". I do know that I would not use a Pi in a critical situation and being wrong could possibly let all the magic smoke out.

    Anyway, the "assumptions" being made are based on the available specifications of the parts known to be connected to it, the absolute maximum

    specifications of many, many, many (...) other different digital ICs from many different manufacturers in use over the past 40 years (and I've got two

    6' shelves stuffed with old data books, real books!, and almost a G Byte of PDF data sheets to prove it). OK, the switching regulator is actually analog

    but it was checked. Since there are no schematics available it is impossible to easily determine with absolute certainty (welcome to the real world) that

    this is not a problem. So I will change it to "probably OK".

     

    Feel better ?

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

    >If the foundation says 5.25...

     

    Interestingly, I can't find a proper datasheet for the Raspberry Pi.  We really shouldn't have to guess at these values, or try to figure them out ourselves.

    (the compute model does have a datasheet, but it seems to be powered very differently)

     

    Raspberrypi.org only says this about power: https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/README.md

    "The Raspberry Pi 3 is powered by a +5.1V micro USB supply"

    Clicking on the link to the "official" power supply gives a 404 not found error.

     

    >I would not use a Pi in a critical situation

    Given the lack of information provided by the foundation, I think that's a good plan.

     

    -Nico

    • Cancel
    • Vote Up 0 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