Current Surge Capacitor Calculator

Click For Summary

Discussion Overview

The discussion revolves around the challenges of powering a Raspberry Pi setup integrated into a Yoda head, specifically addressing issues related to current surges when multiple components operate simultaneously. Participants explore potential solutions for maintaining stable power supply, including the use of capacitors and alternative power sources.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant describes the setup powered by 3 AAA batteries and notes that switching to a 5VDC AC/DC adapter causes the Raspberry Pi to reboot under load, suggesting insufficient current supply.
  • Another participant argues that a capacitor may not be effective unless power peaks are very short, recommending a larger power supply instead.
  • A participant provides a formula for calculating capacitance needed to prevent voltage drop during high current draw, emphasizing that the capacitance should be placed before the voltage regulator.
  • Concerns are raised about the motor's power consumption being the primary issue, with suggestions to find a higher capacity power supply or to consider using an old printer power supply.
  • One participant advises against adding more capacitors and suggests software modifications for a soft-start feature for the motor to mitigate high current draw at startup.
  • Another participant points out that using 3 AAA batteries results in insufficient voltage for the Raspberry Pi, proposing a LiPo battery solution as an alternative.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of capacitors versus the need for a larger power supply. There is no consensus on the best approach to resolve the power issues faced by the Raspberry Pi setup.

Contextual Notes

Participants mention various assumptions regarding current draw, voltage requirements, and the limitations of the current power supply setup. The discussion includes unresolved calculations and considerations for component specifications.

Freddythunder
Messages
48
Reaction score
1
Hello friends...

I'll jump right into the deal here.. I pranked a friend by putting a raspberry pi into a yoda head like the one on his desk. There's an intro video: and the prank itself: if you are intrigued.

Everything in the head runs off 3 AAA batteries. 1 raspberry pi zero w, 1 small amplifier, 1 motor control board & dc motor. I can't tell you how much current it really uses; but I can tell you 3 AAA works well for about 15 to 20 minutes.

Now that the prank has ended I want to run yoda off of an AC/DC adapter instead of the batteries. When building I was able to use a 12V AC/DC adapter (~4 amps I think) through a 5VDC regulator and everything ran fine then. I found a 2A, 5VDC AC/DC adapter and hooked that in place of the batteries. Everything works until you make Yoda talk (uses motor, speaker, pi processor all at once) and the raspberry pi reboots.

I'm thinking that there isn't enough current to keep voltage up and the pi basically powers down and back up again. I don't know much about electric engineering, but a friend at work said to put a capacitor inline with the power but couldn't tell me what size.

I've googled quite a bit to find a calculator to figure out what I may need, but can't find anything. Any ideas? Thanks. Sorry for the long post.
 
Engineering news on Phys.org
Unless the power peaks are very short in duration, a capacitor won't help. You probably need just a bigger power supply.

If you tell us the exact model of raspberry pi you have, we could look up the power requirements.
 
Capacitance = Charge / Voltage; C=Q/V.
Charge = Current * time; Q=I*t.
So; C = I * t / V.

If you need 0.5 amp for 1 second and cannot have the voltage drop by more than 2 volts then you need at least;
C = 0.5 amp * 1 sec / 2 volts = 0.25 farad.

That capacitance must be on the unregulated supply before the voltage regulator.
 
@anorlunda This is a great guide to show approximate current draws of the raspberry pi, but it's way more than that. The motor is pulling the most current, probably then followed by the audio amplifier, then by the h bridge to run the motor in two different directions. A larger power supply would be great but it's pretty hard to find a small one with more than 2A. Maybe I can find an old printer one that has multiple voltages with one being +5... Hmm.

@Baluncore Thank you for the formulas, I will soak those in and put them next to ohm's law in my head. I'm guessing since one AAA battery could produce 1-2 amps, I would need 6 amps (that seems wrong right off the bat), I'd say 5 seconds @ 5 volts... 6 farad - isn't that one of those giant ones you use in car stereo applications? Maybe a cap is not the right way to go...
 
  • Like
Likes   Reactions: Tom.G
Adding more caps is not the right way to go. You should check the power consumption of the motor and also: do some software tweaking to allow some kind of soft-start for the motor.
The high current draw at 0 RPM will just deplete any (sane sized) cap anyway and bring the input voltage below the starting level of the CPU board.

Alternative is to use a 12V 2A PSU and put the motor on a separate regulator. The power stored in a cap grows with U2, so you would have ~ six times of power to start the motor in a 12V cap.

Ui.: it is also a possible solution to put a diode on the power in of the Pi and add caps after the diode. That would keep up the voltage on the module while the motor starts up. But you have to check the undervoltage threshold of the module first.
 
Last edited:
3 AAA won't give 5 V, so you start with voltage under specification, any load and voltage will drop even further, no wonder it reboots (actually I am rather surprised it starts at all).

If memory serves me well Zero W needs a bit over 1 A. I would think about going LiPo and switcher (capable of delivering several amps) route. 2S LiPo gives 8.4 V when freshly charged, can be safely used down to about 6.6 V, so 2S should be enough.
 

Similar threads

Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
9
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
16
Views
3K
  • · Replies 15 ·
Replies
15
Views
5K
Replies
6
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 15 ·
Replies
15
Views
5K