8
\$\begingroup\$

I recently attached a servo to my Arduino for the first time. I ended up needing a 470uF capacitor wired like this tutorial shows because my servo was freaking out and causing my laptop to throw "power surge" warnings (I have my Arduino connected to my laptop via USB).

Although I'm glad I got this working, this leaves me with several concerns.

  • Why was a capacitor necessary to "stabilize" my Arduino? In other words, why was it the solution to my Arduino being able to properly power my servo?
  • In that tutorial I linked above, there is a Fritzing diagram of the circuit with the capacitor. Can I assume this is a capacitor wired in parallel with the servo? Why parallel and not series?
  • What's so special about a 470uF capacitor (vs., say, 100uF)? I just used a 470uF because thats what the tutorial said to use, but what math could this number have been based on? In other words, how might I have arrived at this number myself?
  • I've heard capacitors can be extremely dangerous to work with, after all they store power. I'm now afraid to even touch the capacitor on my breadboard! How can I tell if its safe to remove the capacitor (even after I've disconnected the Arduino from its power source)? I have a multimeter but I'm not sure what setting/range I could set it to.
\$\endgroup\$
2
  • 1
    \$\begingroup\$ Big capacitors can be dangerous, small ones not so much. You might get a tiny spark. \$\endgroup\$ Commented Aug 27, 2018 at 1:17
  • \$\begingroup\$ Arduino should not power a standard servo or bigger. Its not design for that power draw. \$\endgroup\$ Commented Apr 5, 2024 at 11:25

2 Answers 2

16
\$\begingroup\$
  • "Why was a capacitor necessary to "stabilize" my Arduino?"

A servo motor draws a substantial current in short peaks. And USB power is not designed to provide such current peaks (and the cable makes it worse), hence the current peaks cause the voltage to vary, which the Arduino is not designed for. A capacitor acts as a buffer for current, so as long as the USB power can deliver the average current, the capacitor will help by smooth out the current peaks.

  • "Why parallel and not series?"

Think of a capacitor as a reservoir. But beware of overinterpreting anlogies, better read a decent electronics beginners book.

  • "What's so special about a 470uF capacitor (vs., say, 100uF)?"

The uF figure is the amount of buffering. Enough is enough, but better be on the safe side (for this use, more is OK). The value of 470 uF is probably based on experience. Just by accident, it is the same value I let my students use :)

  • "I'm now afraid to even touch the capacitor on my breadboard!"

Capacitors can be dangerous if they store either a high voltage or a large amount of energy that can be released in a very short time. In your case neither applies, so don't worry. But you might see a small spark when you short the leads of your capacitor, even after you have removed the USB power. A resistor (for instance 1k) in parallel to the capacitor solves this.

\$\endgroup\$
0
0
\$\begingroup\$

I did some testing recently and tried 0, 100uF, 470uF and 1000uF. I hadn't thought much about it but these aren't large enough to really smooth the current for a tiny servo - they just take the edge of it. You can see the servo current in my video powered by a cheap 2.25A wall-wart PSU, the yellow trace: Youtube: Examining current vs control pulses for a servo and effect of capacitors using an Arduino UNO R3

Some screen grabs, no capacitor.

Servo control pulse (cyan) and current (yellow) with no capacitor

And 470uF, you can see it recharge at end of motor pulse.

Servo control pulse (cyan) and current (yellow) with 470uF capacitor

One surprise to me in YouTube: Examining voltage drop for a micro servo powered by an Arduino UNO R3 using USB and 2.1mm jack is the same (switch-mode) PSU reacting to the servo motor turning and off. With this timebase you can see about 50mV overshoot when the motor stops. The capacitor helps with this.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.