I am building a project where it is supplied via a 3s LiPo battery (12.6V fully charged). I need to supply either an Arduino Nano with 5V or an ATTiny 85 with 3.3V. I have seen various circuits using the AMS117 that fit the bill, however the size and type of capacitors across both the Input and the Output vary widely. My question is, how do I choose which type and what size of capacitor I should use? I'm assuming that they are purely used for smoothing purposes!
I have used the ones linked to and they do just fine for a wide range of uC projects.
Next if you want to better understand the math functions involved with the use of filtering and smoothing capacitors I suggest you give this a read as it's hard to explain in a single post.
Thanks for the quick reply, current will be less than 1A. I did look at an off the shelf buck converter but thought I could make the project board smaller by using an IC. However the one I looked at was a bit bigger than the one to linked to, that might just be an option.
You can roll your own but building one can be tricky down to the board and distance between runs. Personally I have never built one from scratch so maybe a member who has been there and done that will be of more help.
How much less? If the regulator is dropping 12V to 3.3V (8.7V) and current was .9 Amps, a linear regulator would have to dissipate 8.7 * 0.9 = 7.83 Watts.
There is a "stability" note about the output capacitor. It has to be tantalum. (1)
For adjustable regulators there is another capacitor on the adjustment pin, but that pin is grounded on fixed versions so you don't need it. (The datasheet could be better.)
That gets tricky with linear regulators... Often you can't really get the rated current, or you might need a BIG heatsink to get the full 1A. It will probably overheat with 1/2 Amp.
Power (directly related to heat) is calculated as Watts = Voltage x Current. If you have 5V with 1A through the load that's 5 Watts to the load. That means 7V across the regulator with the same current through both, so it has to dissipate 7W of heat and wasted energy.
...The more voltage you "drop" across the regulator the hotter it gets and the less likely you are to get the rated current.
A switchmode buck regulator can be nearly 100% efficient and they generally run cool and handle more current. When you drop the voltage, you actually get more current-out than goes in. And you get more battery life.
(1) A tantalum is recommended because regular aluminum electrolytic capacitors don't "act like" capacitors at high frequencies. Sometimes you'll see a 0.1uF ceramic capacitor in parallel with an electrolytic to "take over" at higher frequencies. But it's usually best to follow the manufacturer's recommendations.
Since the voltage drop is large and you run on batteries, you should use a buck converter. You cannot really build those yourself, so buy one off the shelve.
I have found I can get some inexpensive (less then a buck) buck regulators from my favorite china supplier and so far they have been working great. These cost less than the capacitors you will need with the linear regulator. After several years they are still going strong. You will also notice they operate a lot cooler as voltage is controlled by switching an inductor not as heat in a series pass element.
I have given up on cheap regulators from wherever, certainly if they are to operate anywhere near their aspirational delusional specifications.
And I always recommend testing any regulation scheme with a real life challenge equal to what you expect from it for the project.
Prepare to be disappointed. I also recommend generous over-capacity. Even regulators that will perform to spec seem a lot happier loafing. As am I, usually.
I would buy them from someone who will stand behind the ad claims they make. Which can mean spending a little more, but usually the parts get here faster…
Many thanks for all the advice, I have ordered a couple of Buck converters (thanks for the link Ron) to play about with and will take it from there. It's the lazy option I know, but my time can be better spent designing and programming projects.