I wanna use 3.3v and 5v on a board that I'm building and searched circuit with that regulator,
as i know arduino use that kind of regulators on their boards so i want to give a try use them too.
What I found is this :
I found it on Internet and this is in the AMS datasheet too, is this the right types of components?
should i add a diode for more protection?
If that's what the datasheet says, yes. That's the standard circuit for a regulator (with differences in the type and value of caps depending on the regulator and operating parameters).
Some regulators get unhappy if the input is not powered while power is applied to the output from some other source. In these cases, put a diode from the output to the input (with band towards output, ofc).
However, if the exact model of 1117-alike (they're made by many companies) you're looking at says it requires tants, I'd pick a different regulator, one that works with ceramic caps (it will state in the datasheet what type of capacitors are appropriate, and suggest values - there are plenty of 1117-like regulators, often with the number 1117 in the part number, which work with ceramics).
Tants are expensive and have a (somewhat undeserved) reputation for spectacular failures - ceramic caps cheaper and more common, and don't catch fire if you connect them backwards or expose them to excessive voltage.
I use the ZLDO1117 regulators most of the time myself - they're cheap, and per datasheet they work with either ceramic or tantalum caps, and are rated for an amp with only 1.1v dropout. They also don't seem to mind mind if the circuit is powered while the regulator input is not.
The regulator used on the Arduino Uno board itself is frankly really disappointing, and presents a real pain point for users. Because the dropout is >1v, you can't get ~5v out of it from a set of 4 alkaline batteries. So what do people do when they see the 7v-12v spec? They reach for a 9v battery, the small rectangular ones with the snaps on them; but these have horrible current handling capacity, and you can find tons of threads on here where we have to tell people that that's the cause of the problem they're having (the 9v battery can't take the load).
That design is inconsistent with the specifications provided by the manufacturer in the datasheet for the NCP1117 series regulator - they specify a ceramic or tantalum capacitor of 10uF or more, Arduino provided a 47uf electrolytic cap. The second cap in parallel with it (assuming it's actually in that part of the board, not one of the 0.1uf decoupling caps between power+ground next to other ICs) is probably to improve stability, which might not have been an issue if they'd used the right kind of filter caps in the first place.
I would not copy Arduino's design for reasons mentioned above, instead would use ceramic (or tantalum) caps as recommended by the manufacturer in the regulator's datasheet. They indicate that 10uf is sufficient for most applications, as well.
You should not depart from the recommendations of the datasheet without good reason - the manufacturer is far more familiar with their product than we are. Some regulators (particularly old designs) only work with electrolytic caps, some only work with tants, some want tants or ceramic, and some strongly recommend ceramic.
Domino60:
Would be there a problem to use electrolitic capacitor instead of tantalium or ceramic?
Yes, the ceramic bypass is essential.
If you have the ceramic one fitted, then you may use an aluminium electrolytic as well.
Generally if the board is properly designed, with the ceramic bypasses immediately adjacent to the regulator, you should not need a large output capacitor because the regulator should regulate as the load fluctuates.
So avoiding problems (electrolitic caps)..
I'm gonna use AMS1117 3.3v and 5v, using ~10uF (25v would be fine?) tantalium or ceramic caps and
a diode at input (any suggested diode?) to protect the circuit.
The AMS1117 datasheet states that you need to use tants. (this is not the case for the NCP1117 or ZLDO1117 - they both specify tants OR ceramic - some regulators don't like ceramics)
The 1117's have similar specs, but different particular requirements for caps and details like this; you should always read the datasheet for the parts you're considering using.
What is the purpose of the diode on the input? Protect it against what?
Per datasheet, they recommend a diode between output and input (band towards input) if the input may be shorted to ground (which would otherwise damage the regulator).
If you think the input might be connected backwards, you'd want a diode to protect against that...
The concern with tants is that when they fail, it is catastrophic - they short out, and usually catch fire. If you've got that connected straight to a LiPo battery, that's a lot of power available to set itself on fire.
So, don't use a tant on the input side. The input side is usually much less picky that the output side.
What I personally do for my power supply is something like this:
ZLDO1117 regulator - because it's cheap, low drop out (1.1v @ 1A), and C1 and C2 can both be ceramics. Oh, and you do care about dropout, because if you need 5v, when the lipo's are almost dead, you've got around 6v to work with, not 7.2..
D1 is only needed if it's possible for the input to get shorted to ground.
D2 is only needed if you fear the power may be connected backwards
C1 (output cap) is 10uF ceramic, rated a bit above the expected voltage (ceramics don't explode like tants when you exceed voltage spec, so you don't have to derate them)
C2 (input cap) is 1-10uf ceramic. If the power supply is far away or has poor transient response, use a higher value capacitor, or even a ceramic in parallel with an electrolytic - this isn't an issue with your LiPo's though...
C3 - optional additional output cap - normally not needed, but might be - if you expect lots of sharp changes in current, and you care about a little ripple, think about this. Tants or even electrolytic might be appropriate.
F1 PTC polyfuses are a good idea to protect against short circuits - I recommend using one if you're designing a board. They're cheap, and a good way to prevent damage from screwups.
Because I'm designing my own circuit (well made) and gonna cover it with heat resist film there no gonna be any possible ways to short my circuit by mistake, only if i really need to short it
So in this case as you described the components (thanks for that a lot) I'm gonna use the
regulator you suggested me (ZLD01117), gonna use Diode (D2) to be sure no one will plug by mistake the
battery in the other way, about the (D1) it's not really needed in my case and about the (C3) when you mean if I expect lots of sharp changes in current I maybe add extra one to be sure and safe.
And the last one (F1) Polyfuse I never used one before but I think everything will be fine without it
If you are bound and determined to use a LiPo, you really should incorporate some type of fusing between the battery and the regulator. Also be careful to not draw the battery down too far... Lipo's just love to be shorted out, they puff up and just explode with excitement. Over discharge can lead to the same results. Lots of fun. really good way to leave your mark on the world, and the furniture, and the walls,,, and so on.
Yeah - the PTC is a nice protection measure - the ZLDO's claim to have an overcurrent cut-out in them, but I try not to rely on that as a first line of defense. If the batteries themselves were protected (some LiPo's sold are, some aren't - they've gotten the protection pcbs really tiny and cheap, so protected LiPo cells are quite common), I'd consider skipping the PTC fuse, but... they're the size of a 1206 resistor and cost ten cents....
Well thanks for warning
I know how LiPo's works and as I described above I'm gonna use Li-Po or Li-Ion, as I know from experience
you can draw all the current from Li-Ion and there not gonna be a problem, 95% of nowadays devices use Li-Ion batteries.
About the regulator I'm gonna use it like that :
I got a bit hard time to understand why there is only 3 pins after looking the datasheet, found
out that the "flat" pin is Vout as the middle one:
What the heck is that drawing?
Where is the regulator?
What is that transistor doing?
If you're using the transistor as a standin for a regulator (There is a library included with eagle named "v-reg" that has a part for a 1117-series regulator), you still have it wired way wrong. The Adj/Gnd pin goes to ground, and you need a capacitor between the output and ground.
no gonna be any possible ways to short my circuit by mistake,
No I think you are missing the point. A tantalum capacitor can fail all by itself, at any time, like most electronic components can, we are not talking about you shorting out anything.
When a tantalum capacitor fails it can fail open circuit or short circuit depending on the failure mechanism. If it fails short circuit and is being powered directly by an unrestricted current source it WILL burst into flames. So a design without a fuse or some other current limiting device is a fire hazard.
This is recognised by UL and they will not sanction any design that has this flaw, and neither should you now that you have been told.
What the heck is that drawing?
Where is the regulator?
What is that transistor doing?
That's the same thing I said when i saw it
The ZLDO1117 is described as SOT223 from online sellers and in the Eagle library.
in the Schematic the components is visualized like that:
in the actual board the component is like that :
C6
Yes i done a mistake, should of connect the cap on the output too and I found the normal schematic looking regulator :D, it's hard to find something in the Eagle lib.