Why use decoupling capacitor with Servo S2309S and how does it work

arduinodecoupling-capacitorservo

I read the following statements in Arduino Projects Book, explaining about the use of decoupling capacitor in a circuit connected to a servo.

When a servo motor starts to move, it draws more current than if it
were already in motion. This will cause a dip in the voltage on your
board.

3 things that I want to know about:

  1. By Ohm's law, increase in current should be proportional with the increase in voltage, no? How can an increase in current causes a dip in voltage?
  2. The dip in voltage referred by the book, is it the voltage between ground and the main power or ground and the control pin of the servo?
  3. Can we observe this dip in voltage in action? I tried to remove the capacitor and still can't see how it affects the movement of the servo.

Best Answer

a power source with some resistors in series Hi Andree,

An increase in current through a resistor does increase the voltage difference across the resistor, but whether the voltage goes up or down at a specific point depends on the situation. Consider the schematic I've shown of three resistors connected in series to a battery. Let's say R2 is your load (servo), R1 is the resistance of the wire that goes between your servo and the positive terminal of the power source, and R3 is the resistance from your servo to ground.

While the load R2 is drawing current, there is going to be a voltage across R1 and R3 due to ohm's law. That means the voltage across your load isn't quite as large as the voltage provided by the supply, because some of that voltage is presenting across R1 and R3 instead. The more current the load draws, the larger the voltage is across R1 and R3... this means a smaller voltage across your load. The problem is also made worse by increasing R1 and R3, for instance powering your servo through a long cable.

In addition to these "resistive losses", the power supply generally can't increase it's current immediately -- it takes it some time to react. This means if the current increases quickly, the battery can actually provide less voltage momentarily. Also, during this current spike the resistive losses from R1 and R3 will be even greater momentarily -- further reducing the voltage across your load. Therefore, the answer to your second question is, it can be both!

The way to fix this is to add a capacitor between the positive terminal of R2 and ground (the negative terminal of the battery). This capacitor will store up charge during normal operation, and if there is a sudden increase in current across the load, this capacitor acts as sort of a "short-term secondary battery" that helps keep the voltage high at R2 until the battery catches up. Note that by keeping this capacitor as close as possible to R2, you can in a sense bypass the extra resistive losses of R1 and R3 that are due to the current spike.

In answer to your last question, a lot of circuits work fine if they are missing a bypass capacitor or two -- it can be hard to see the effects without a good oscilloscope. Just last week I noticed that a circuit board my company produces had been missing a bypass cap in the bill of materials for several years, without it's absence causing any problems! But these capacitors do help stabilize the voltage to various loads in a circuit, and many circuits would become very noisy or even stop working at all without the presence of their bypass capacitors.