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?
Best Answer
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:
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:
[emphasis mine]. That datasheet has nice graphs that show the interdependence of these two output cap parameters (ESR and capacitance):
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:
Now regarding
That's for the decoupling of the STM32F itself
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.