Electronic – Decoupling capacitor placements and ratings – how to choose

circuit-designdecoupling-capacitorelectrolytic-capacitor

I am building a circuit with 2 hybrid stepper motors each powered by a stepper motor driver A4988 and both drivers are connected to an Arduino UNO R3.

Before soldering the components together on a PCB, I would like to clear my doubts, confirm what I'm doing and prevent any disasters or improve it, if possible.

I have done some research about the importance of using capacitors, but I still have some unanswered questions.

Here are the specs for each hybrid stepper motor:

Rated current (Amps/Phase): 1.68

Recommended voltage: 12 – 24 V

Holding torque (kg.cm): 4.4

Resistance (Ohms/Phase): 1.65

Inductance (mH/Phase): 3.6

Here are two variants of the section of the circuit schematic relating to the stepper motors and drivers:

A4988 driver capacitor ratings

I have a few questions since during the circuit design, I've been puzzling over several aspects of the decoupling capacitor placements and their respective capacitance and voltage ratings.

  1. I have made two versions of the schematic in the picture above but I can't figure out which one is better. And why? In design B, I have placed a 100nF ceramic capacitor between the 5V and GND of each stepper driver – is it better from a design perspective? Although design B uses one extra 100nF capacitor compared to design A, I am trying to make the best practical circuit possible and explain it coherently.

  2. Why connect a 35 V electrolytic capacitor when only a 9V supply is used to power the motors? How is this 35 V calculated? I found this in a schematic during my search but I want to understand why that value was chosen before i build it.

  3. I have read that as a good rule of thumb to always use a small 100nF ceramic capacitor and a bigger 100uF electrolytic capacitor in parallel to the supply and ground. But in this schematic, there is only a 100 uF between the MV and GND, so should I add a 100nF ceramic capacitor in parallel to improve this design??

  4. Why is a 100nF ceramic capacitor used between the logic voltage 5V (supplied from the 5V output from the Arduino UNO R3) and GND? I read that it filters out high frequency signals. But shouldn't the voltage output from the 5 V pin on the Arduino already be stable??

  5. The recommended voltage for the motor is 12 V, so if I were to use a 12 V DC power supply instead of 9 V, what capacitor voltage ratings should i use? How do I calculate this?

  6. I have set the current limit to each stepper motor to about 500 mA (from my online search, I read that a limit of 500 mA is safe so as not to damage the wires,) so is that something to be considered when choosing the capacitor ratings?

At this point, I am just blindly using what I found in my search online going through several schematics without really understanding why. I would really appreciate some clarifications. Maybe someone with PCB design experience can enlighten me on these issues.

Best Answer

You have posed a very complex question here. It would take me 5 pages to answer this question to the best of my EE knowledge and abilities. So in the space available I can only offer a few guidelines and principles I have learned about the application of bypass capacitors over many years of design experience.

A. You can never have enough of them.

B. There is no practical way to calculate the required value for a given application. (see G below).

C. There is no practical way to quantitatively assess their effectiveness in the final circuit. (I.e. There is no know "Bypassometer" you can connect to the circuit to measure their actual effect.) The best you can hope for is a "works better" - "works worse" comparative analysis.

D. The reason we use bypass capacitors in the first place is different for different circuit applications & the rules are often confused or interchanged by unknowledgeable applicators. E.g. Bypass caps are used/required for one reason in applying bipolar TTL 7400 logic circuits. They are also used/required for a different reason in applying CMOS 74HCT00 logic circuits. In op-amps circuits they are used for an entirely different reason, and in motor controls like yours, yet another reason. Not to mention their use in RF circuits.

E. Allow for different configurations and combinations in your first-cut PCBs. That is add in extras, so you have assembly options when you get to the debug phase of the project. Again, lots of trial and error is necessary, but you can't do that very effectively unless you've planned for it.

F. In general, the lower the frequency of the signals and the larger the currents and resultant energy involved, the larger the bypass capacitors. This the use of electrolytics and tantalums in these situations because they have greater energy storage capabilities and higher current ratings than equivalent capacitance ceramics, plastics and similar wimpy type capacitors.

G. It is practically impossible to calculate the "correct" value for a bypass capacitor because there is no "correct answer" to the problem they are being used to solve. It's a fuzzy problem with a fuzzy solution. You'll encounter this scenario often: One solution fixes certain aspects of the problem, another solutions fixes other aspects of the problem, no single solution seems to solve all aspects.

H. I like this mechanical engineering analogy: Bypass capacitors are like lock washers in mechanical designs. How do you calculate the size or type of lock washer (e.g. internal star, external star, split ring, etc.) required for a given vibration environment? The answer is you can't. You take a guess, if it doesn't work you try the alternatives until you hit on one that gives the desired, or close enough to the desired, results.

You are pretty much on the right track with circuit B - a capacitor per IC. However, I would parallel the 100 nF ceramics with a small tantalum (not electrolytic), say 2.2 to 4.7 MFD (16 WVDC, since your supply is 9 volts, 10 WVDC would be cutting it too close for comfort.) Why? That would take another page or two to explain.

You might submit more focused questions about the same application. E.g. your section #2 would make a good single topic question.

Good Luck and keep your options open!