Intro: Capacitors in Robotics
The motivation for this Instructable is the longer one being developed, that tracks the progress through Texas Instruments Robotics System Learning Kit Lab Course. And the motivation for that course is to build (re-build) a better, more robust robot. Also helpful is "Section 9: Voltage, Power, and Energy Storage in a Capacitor, DC Engineering Circuit Analysis", available at MathTutorDvd.com.
There are many issues that one must be concerned about when building a large robot, that one can mostly ignore when building a small or toy robot.
Being more familiar or knowledgeable about capacitors could help you on your next project.
Step 1: Parts and Equipment
If you want to play around with, investigate, and draw your own conclusions, here are some parts and equipment that would be helpful.
- different value resistors
- different value capacitors
- jumper wires
- a push button switch
- a breadboard
- an oscilloscope
- a voltmetter
- a function/signal generator
(If you only want the micro-controller board to do your own thing (I am composing a series of Instructables that might be helpful), the MSP432 development board itself is relatively inexpensive at around $27 USD. You can check with Amazon, Digikey, Newark, Element14, or Mouser.)
Step 2: Let's Take a Look at Capacitors
Let's imagine a battery, a push-button switch (Pb), a resistor (R), and a capacitor all in series. In a closed loop.
At time zero t(0), with Pb open, we would measure no voltage across either the resistor or the capacitor.
Why? Answering this for the resistor is easy - there can only be a measured voltage when there is current flowing through the resistor. Across a resistor, if there is a difference in potential, that causes a current.
But since the switch is open, there can be no current. Thus, no voltage (Vr) across R.
How about across the capacitor. Well.. again, there is no current in the circuit at the moment.
If the capacitor is completely discharged, that means there can be no potential difference measurable across its terminals.
If we push(close) the Pb at t(a), then things get interesting. As we indicated in one of the videos, the capacitor starts off as discharged. Same voltage level at each terminal. Think of it as a shorted wire.
Although no real electrons are flowing through the capacitor internally, there is positive charge that begins to form at one terminal, and negative charge at the other terminal. It then appears (externally) as if indeed there is current.
Being that the capacitor is in its most discharged state, right then is when it has the most capacity to accept a charge. Why? Because as it charges, that means there's a measurable potential across it's terminal, and that means it's closer in value to the applied battery voltage. With less of a difference between applied (battery) and it's increasing charge (voltage rising), there is less impetus to keep accumulating charge at the same rate.
The accumulating charge rate lowers as time goes on. We saw that in both the videos, and the L.T.Spice simulation.
Since it is at the very start that the capacitor wants to accept the most charge, it acts like a temporary short to the rest of the circuit.
That means we will get the most current through the circuit at the start.
We saw this in the image showing the L.T.Spice simulation.
As a capacitor charges, and it's developing voltage across its terminals approach the applied voltage, the impetus or ability to charge is reduced. Think about it - the more of a voltage difference across something, the more possibility of current flow. Big voltage = possible big current. Small voltage = possible small current. (Typically).
Therefore as a capacitor reaches the voltage level of the applied battery, it then looks like an open or break in the circuit.
So, a capacitor starts off as a short, and ends up as an open. (Being very simplistic).
So, again, max current at the start, minimum current at the end.
Once more, if you try to measure a voltage across a short, you won't see any.
So, in a capacitor, current is at its greatest when voltage (across capacitor) is at zero, and current is at its least when the voltage (across the capacitor) is at its greatest.
Temporary Storage And Energy Supply
But there's more, and it is this part that could be helpful in our robot circuits.
Let's say the capacitor is charged. It is at the applied battery voltage. If for some reason the applied voltage were to drop ("sag"), perhaps due to some excessive current needs in the circuits, in that case, current will appear to flow out of the capacitor.
Thus, let's say that the input applied voltage isn't a rock-steady level that we need it to be. A capacitor can help smooth out those (short) dips.
Step 3: One Application of Capacitors - Filter Noise
How might a capacitor help us? How can we apply what we have observed about a capacitor?
First, let's model something that happens in real-life: a noisy power rail in our robot's circuits.
We used L.T. Spice, we can construct a circuit that will help us analyze digital noise which could appear in our robot's circuits' power rails. The images show the circuit, and Spice's modeling of the resulting power rail voltage levels.
The reason Spice can model it is because the circuit's power supply ("V.5V.Batt") has a bit internal resistance. Just for kicks, I made it have 1ohm of internal resistance. If you model this but don't make the votage source have an internal resistance, you won't see the rail voltage dip due to the digital noise, because then the voltage source is a "perfect source".