3
\$\begingroup\$

I would like to convert regulated 5V (from USB port) to regulated 3.3V using AMS1117 regulator. Since input voltage is already regulated, are any capacitors needed for the circuit? If so, what kind should I use? What problems should I expect when I won't use them? Could output voltage be less stable than input one?

The datasheet doesn't provide much information about the capacitors but it suggests using 22uF tantalum output capacitor (one of two datasheets I've seen does not tell anything about input capacitor). But I believe that my conditions are just much simpler than usual and I should probably get away with much smaller one and maybe of other type (like ceramic?) or maybe without it at all?

I did see those regulators in use in few cheap voltage converting modules and I'm pretty sure none of them used tantalum capacitors. One of them, for example, uses two 104 and two 106 (probably one of each type for input and one for output) which seems quite arbitrary. Is this bad engineering or it's just OK for most cases? How are does capacitors chosen if not by following datasheet recommendations, empirically?

\$\endgroup\$
  • \$\begingroup\$ What's your current requirements? Going to have much transient peaks? \$\endgroup\$ – Jarrod Christman Nov 12 '15 at 20:54
  • \$\begingroup\$ @JarrodChristman: I'm not sure what "much transient peaks" means. Whan is it "much"? I'm taking about a circuit with a stm32 microcontroller, few blinking leds and some simple sensors, no motors or other high current devices. But the best answer would be general enough so that I would know what I should use when my circuit changes too. \$\endgroup\$ – Krzysztof Adamski Nov 12 '15 at 21:07
  • \$\begingroup\$ Usually,it's good to use some ceramic cap for decoupling because the wire that carries the voltage has some inductance and could cause you some problem with current supply.Be careful that some regulators specifies some capacitor due to their ESR to be stable(especially if it's a LDO regulator). \$\endgroup\$ – Stefan Merfu Nov 12 '15 at 21:27
  • \$\begingroup\$ Stick to what the data sheet says is my advice. \$\endgroup\$ – Andy aka Nov 12 '15 at 21:34
  • \$\begingroup\$ Sorry for the lack of specific terms in my question. As the others have mentioned, you may still want a capacitor for transient/short peaks in the demand for current, depending what's connected to it. Generally a small capacitor is good even for regulated supplies, just to be safe. Last thing you want is odd microcontroller behavior showing up because of supply issues. \$\endgroup\$ – Jarrod Christman Nov 12 '15 at 21:41
4
\$\begingroup\$

The 1117 has been cloned by a lot manufacturers. In general, if they only talk of tanatalum (as AMS does) they probably copied some old datasheet from somebody else. Look in others' datasheet (besides AMS). For example TI's LM1117 has more details:

Output Capacitor: The output capacitor is critical in maintaining regulator stability, and must meet the required conditions for both minimum amount of capacitance and ESR (Equivalent Series Resistance). The minimum output capacitance required by the LM1117-N is 10µF, if a tantalum capacitor is used. Any increase of the output capacitance will merely improve the loop stability and transient response. The ESR of the output capacitor should range between 0.3Ω - 22Ω. In the case of the adjustable regulator, when the CADJ is used, a larger output capacitance (22µf tantalum) is required.

And yes, output cap ESR is critical for the stability of LDOs, not just the capacitance. (Look in the LDO tag for some recent on-site examples; this one in particular has scope traces.) The NCP1117 datasheet is most helpful in this regard:

Frequency compensation for the regulator is provided by capacitor Cout and its use is mandatory to ensure output stability. A minimum capacitance value of 4.7µF with an equivalent series resistance (ESR) that is within the limits of 33 mΩ (typ) to 2.2Ω is required. See Figures 12 and 13. The capacitor type can be ceramic, tantalum, or aluminum electrolytic as long as it meets the minimum capacitance value and ESR limits over the circuit’s entire operating temperature range. Higher values of output capacitance can be used to enhance loop stability and transient response with the additional benefit of reducing output noise.

[emphasis mine]. That datasheet has nice graphs that show the interdependence of these two output cap parameters (ESR and capacitance):

enter image description here

Now the AMS1117 datasheet says nothing about ESR, so you can believe theirs is godly and won't oscillate regardless of that, but I rather doubt that's actually the case. This is all they say, by the way:

The circuit design used in the AMS1117 series requires the use of an output capacitor as part of the device frequency compensation. The addition of 22µF solid tantalum on the output will ensure stability for all operating conditions. When the adjustment terminal is bypassed with a capacitor to improve the ripple rejection, the requirement for an output capacitor increases. The value of 22µF tantalum covers all cases of bypassing the adjustment terminal. Without bypassing the adjustment terminal smaller capacitors can be used with equally good results. To further improve stability and transient response of these devices larger values of output capacitor can be used.


Now regarding

Actually "Getting started with STM32F030xx" recommends using 4.7uF capacitor between VCC and GND (in addition to some 100nF) which is not that much smaller than the recommended one.

That's for the decoupling of the STM32F itself

In addition, each power supply pair should be decoupled with 100 nF filtering ceramic capacitor and a chemical capacitor of about 4.7 μF connected between the supply pins of the STM32F030 device. These capacitors need to be placed as close as possible to, or below, the appropriate pins on the underside of the PCB.

Between the MCU and the regulator you may have non-trivial inductance. The pros simulate the board in a rather expensive EM field simulator to figure out how much exactly. If you can't afford that, you have to go with the rules of thumb from the IC manufacturers' datasheets.

Note that this EM simulation is only about the effect of the board, it does not include things like stability of voltage regs. And if you put the two chips and their caps really close to each other, the lack of trace inductance/resistance between them may actually be a problem for the stability of the LDO: the capacitance it sees grows (sees caps in parallel), but the ESR goes down (resistors in parallel). That moves you to the left in graph in Fig 12 above. That's why nothing is ultimately the substitute for actual prototyping.

\$\endgroup\$
  • \$\begingroup\$ I guess you also answered my other question I wanted to ask - how similar all different 1117 chips are. From what you wrote, it seems like they are all the same physically. My comment about decoupling STM32 was made as a response to a suggestions that I should use output cap to fight short peaks in current consumption which I think would be satisfied by does capacitors. I'm a noob and I don't plan on ever becoming a pro, it's just a hobby so I don't hink I will ever use such simulator:) \$\endgroup\$ – Krzysztof Adamski Nov 13 '15 at 20:07
0
\$\begingroup\$

The MCU decoupling caps are typically 0.1 uf. That's 200 times smaller than the recommended output cap. That should tell you something.

Typically speaking, since you have a regulated 5V output, close to the 3.3v input (1 inch), you can skip the input cap (shared with the 5V output cap). But it's highly recommended you stick with something close to the recommended output cap. There is rarely a time where you should not put it in.

\$\endgroup\$
  • \$\begingroup\$ Actually "Getting started with STM32F030xx" recommends using 4.7uF capacitor between VCC and GND (in addition to some 100nF) which is not that much smaller than the recommended one. Also, I've read that the output capacitor is not for filtering but for loop stability. \$\endgroup\$ – Krzysztof Adamski Nov 12 '15 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.