Electronics > Projects, Designs, and Technical Stuff

USB charger circuit for car

<< < (5/8) > >>

Charybdis:
Thank you Madires, I'll make the circuit when I'll receive the material :)

mariush:
Some comments about that schematic :

C1  (100uF)

- should be rated for minimum 25v, because a car's battery/alternator often provides up to around 13.8v..14.5v, which is fairly close to 16v rating, so a higher value should be used.
- 100uF is just a common value, it's not critical.. it can be a bit higher and even a bit lower.

The battery is very close and you only need some capacitance to provide a bit of smoothing out of the input voltage and a bit of filtering (the wires between the battery and regulator can act as very small value inductors so capacitor acts also as a filter, taking care of variations in voltage from battery).
Point is you don't need exact values ... you could use something very common like 470uF 25v if you want to... but anything higher than let's say 1000uF would be pointless.

R1 and R2 set the output voltage of the regulator - datasheet tells you the formula  Output voltage = 1.25v (the reference inside regulator) x ( 1 + R2/R1)  = 1.25v ( 1 + 820/270) = 1.25x(1+3.037) =  5.04v

Some linear regulators need at a minimum of current in order to output a smooth voltage on the output pin... and you control that amount of current with the R1 value. If the circuit doesn't work right, lower that R1 to 100-120 ohm, and adjust the R2 value to maintain that ratio .. for example use 330 ohm and 100 ohm ... that gives you 1.25v x ( 1 + 330/100) = 1.25v x 4.3 = 5.375v maximum, which is good enough.  All USB devices are designed to handle up to around 5.6v, and you'll probably lose 0.1v..0.2v in the cables between the usb connector and whatever you have plugged in)

C3 ( 10uF) doesn't hurt anything, but also doesn't do much. Normally it's recommended to be used when you change R2 to a potentiometer to make the output voltage adjustable. As it is right now, it won't make any difference, it may smooth out the output voltage a tiny bit but basically not noticeable.
You could remove it completely if you can't buy it.
ZD1 is more or less a protection measure ... if somehow the regulator dies and outputs more than 5.6v. the diode "activates" and protects everything.

C4 and C5 - there's no benefit to having one 1uF before the zener diode and one 10uF after the diode. If they're both electrolytic capacitors, it really makes no difference. There may be some benefit to adding a 1uF CERAMIC capacitor there, because it would filter stuff that the electrolytic capacitor can't filter so well.
As for C5 ...  most regulators say at least 10uF is recommended... there's nothing preventing you from using slightly higher capacitance, but it also often doesn't bring any benefits.
In your case, to save money, you could reuse a 100uF 25v rated capacitor, for example you may get a better price ordering 5 100uF 25v capacitors instead of ordering 1x100, 1x10, 1x1uF.

While you could use capacitors rated for 6.3v, since the output voltage should be 5v, unless you're space constrained it makes no sense, 6.3v rated capacitors are often not cheaper than 10v rated or 16v or even 25v/35v rated capacitors at such low capacitance values.

Some regulators will only output a stable voltage on the output as long as there's at least something connected to it consuming some current, let's say 5mA or something like that.
A bit of that is consumed by the adjustment mechanism (those 2 R1 and R2 resistors) but you also make the circuit constantly "busy" with your led.
The resistor R3 controls the amount of current going through the led... you can estimate the value depending on the led's forward voltage and current desired :

Input voltage - Forward Voltage of led = Current x Resistance
So for example if you're using a red led with a forward voltage of 2v and you want minimum 5mA (0.005A) you know the resistor will be R =  (5v - 2v) / 0.005A = 3 / 0.005 = 600 ohm.
In your circuit, a value of 330ohm with a red led would probably let around 10mA go through the red led, which may be too bright. You may find out that even 470ohm will be too small, led could still be very bright.  You could try raising that value to 1000 ohm / 1 kOhm




 

Charybdis:
I'm really ASTONISHED Mariush ! There is a bunch of enthusiast forum in Italy like Grix.it or Electroyou but they are full of selfish people, reluctantly to reply to "silly" questions and they deleted the same post I wrote in here !!! I have a lot of savaged capacitor and I already bought a kit on eBay so I can spend extra cap in this project ;)
I will carefully follow your suggestions, but I have few questions:

-I'll put a ceramic 1uF as C4, but as for C5 is it true that "the higher (capacity) the better"?
-Are the diodes in the right orientation ?
-Do I have to use only one 1.5KE15A as above mentioned or I have to replace EVERY diode in the scheme with these 1.5KE15A ?

Thank you very much ! I truly apreciate your help !!  ^-^ ^-^
Lorenzo

mariush:
If you use a ceramic 1uF for C4, it should be rated 50v or higher.  It really won't make much of a difference if it's there or not.

The diodes seem to be in correct layout to me.
You only need the "special" diode at the input of the regulator, to protect it from transients and crap produced by the car's alternator as it charges the battery of your car.
The other two diodes can be any kind of cheap diode, as long as they're rated for more than the output voltage of the regulator.  It could be something as simple as an 1n400x diode, where x can be 1,2..7.. difference is just maximum voltage supported by diode .. so 1n4001 would be max 50v, 1n4002 would be max 100v ... 1n4007 would be max 1000v

The D3 diode is really only needed if you use the C3 capacitor, and it's there to protect the regulator from voltage coming back into the regulator.
D2 is also kind of optional, but a good idea to be there if you use a big capacitor on the output (or devices connected to the usb have big capacitors inside)
Since you don't know what you'll plug in the connector, it's better to have that diode always there.

See datasheet of LM338 : http://www.ti.com/lit/ds/snvs771c/snvs771c.pdf
See page 12, section 8.2.1.1 Design Requirements where it explains the role of those components.  See also chapter "protection diodes", section 8.2.1.2.3 (page 14).

It explains there... but I can try to explain it... Let's say you have a big capacitor and it's charged with energy and there's 5v on the capacitor. Now imagine you suddenly disconnect the battery or whatever powers the circuit. So on the input the voltage suddenly drops down to 0, but you have 5v on the output and now the energy tries to go back from the output back to the input ... if it goes through the chip, the chip can be damaged. So by placing the diode between the output pin and the input pin, you create a more direct path for the energy from the capacitor to go instead of going through the chip.
The components inside the regulator in theory can handle up to 25v as the datasheet says, but that may vary depending on who makes the chips... there's lots of companies making LM338 regulators.

Also, keep in mind that some of these datasheets were written 10-20 years ago and the text can be vague ... for example the datasheet I linked to is copyright 1998-2016, and while the text of such datasheets is often updated and revised, it's better to stay on the safe side.

For example, the text on page 14 says "Most20-μF capacitors have low enough internal series resistance to deliver 20-A spikes when shorted." - but were they talking about regular electrolytic capacitors from the 1990s or 2000s which have worse specifications than the modern 2010-2020 electrolytic capacitors, or did they update the text with the modern components in mind? Or, were they thinking of tantalum capacitors or ceramic capacitors? Tantalum capacitors were often favored back then because they had better characteristics compared to electrolytic capacitors.

Linear regulators don't need a lot of capacitance. Some regulators require a certain minimum of capacitance, like 10uF for this particular regulator.
Some regulators (due to their internal design) require some capacitance as long as some other requirements are met.
For example, datasheets of regulators in the 1117 series recommend having a capacitor with ESR between 0.1 ohm and 1 ohm at the output...
A 10uF 16v electrolytic capacitor may have an ESR value that's higher than 1 ohm, but a 47uF 25v electrolytic capacitor may have around 0.3-0.5 ohm ESR and the regulator would work fine. It's not just the capacitance but also the volume of the capacitor, often capacitors rated for higher voltage are also a bit larger.
An electrolytic capacitor that's too big, could have too low ESR .. for example a 820uF 10v capacitor could have ESR below 0.1 ohm and that's not good for a 1117 regulator.
Polymer (solid) capacitors can have very low ESR.. for example you may have a 100uF 16v polymer capacitor with ESR below 0.1 ohm .. that could cause the regulator to not work right.
Also, ceramic capacitors typically have very low ESR, under 0.1 ohm so it's not safe to just use a 1uF or 10uF ceramic capacitor with a 1117 linear regulator.
Some old datasheets don't even mention this ESR thing, but simply say "a 10uF capacitor is enough for stability" - because datasheet was written in the days where tantalum capacitors were more popular and a 10uF tantalum capacitor of that age had an ESR value higher than 0.1 ohm for sure (and ceramic capacitors were maybe too expensive to consider back then).

So you have the be aware of the minimum requirements but you have some room to "optimize" the components to make your circuit cheaper by using slightly bigger capacitor, or a different diode, things will work unless you have some very strict requirements (efficiency, heat produced, noise produced by regulator etc)

The capacitance is more important when it comes to other types of regulators .. switching regulators, inverters, charge pumps.. these function in a different way and capacitors are more important
Maybe this video can help you understand some things


Charybdis:

--- Quote from: mariush on April 10, 2019, 08:16:46 pm --- See datasheet of LM338 : http://www.ti.com/lit/ds/snvs771c/snvs771c.pdf
See page 12, section 8.2.1.1 Design Requirements where it explains the role of those components.  See also chapter "protection diodes", section 8.2.1.2.3 (page 14).
--- End quote ---

Actually the original schematic came after the very datasheet you mentioned !
I thought it was kinda safe but it turned out in this forum it was not suited for automotive spikes. I watched the video you posted but I didn't undersand everything  |O I found Dave made a video on linear regulators and that was somehow easier to me.
Thank you very much Mariush :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod