Author Topic: USB charger circuit for car  (Read 5230 times)

0 Members and 1 Guest are viewing this topic.

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
USB charger circuit for car
« on: April 04, 2019, 05:47:25 pm »
Hi there, lurking through some technical datasheet of LM338 I've come with this scheme of a USB 1A charger to be installed in my glorious Fiat Panda ;)
What do you think about it ?
Any suggestion?

I've replaced the 1N4xx diode with smth that can handle safely 1A, and this is what TME sells..
Thank you for your advice!!
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: USB charger circuit for car
« Reply #1 on: April 04, 2019, 06:01:58 pm »
At 1A that circuit would produce about 7-8W heat and it requires a matching heatsink. Is there any particular reason why you are going for a linear voltage regulator? In most cases a simple buck converter makes more sense.
« Last Edit: April 04, 2019, 07:30:29 pm by madires »
 

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #2 on: April 04, 2019, 06:11:47 pm »
Basically because I'd like to learn something :D
Thanks I didn't consider that at all !
 
Do you think this " FISCHER ELEKTRONIK FK 222 SA " 20K/W  will do the job ?
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: USB charger circuit for car
« Reply #3 on: April 04, 2019, 07:40:52 pm »
Sorry, that heatsink is much too small. Another thing to consider is the ambient temperature in your car. During the summer time it could be about 50°C. So you would need a fairly large heatsink to cool the LM338. I'd suggest to use a buck converter for the car and the LM338 for a simple lab PSU.
 
The following users thanked this post: Charybdis

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: USB charger circuit for car
« Reply #4 on: April 04, 2019, 07:52:59 pm »
Basically because I'd like to learn something :D
Thanks I didn't consider that at all !
 
Do you think this " FISCHER ELEKTRONIK FK 222 SA " 20K/W  will do the job ?

In the interest of „learning something“: The 20K/W spec means that each Watt of power which the heatsink has to dissipate, will cause its hot side (i. e.  your voltage regulator) to get 20 degrees warmer than ambient temperature. Hence, at 7-8 W power dissipation and 50 C ambient temperature, your regulator would run at 200 C.

Way too hot!! As stated earlier, you would need an unpractically large heat sink too cool the linear regulator properly. Hence the suggestion to use a buck converter, which has negligible power loss in comparison.
 
The following users thanked this post: tooki, Charybdis

Offline mc172

  • Frequent Contributor
  • **
  • Posts: 490
  • Country: gb
Re: USB charger circuit for car
« Reply #5 on: April 04, 2019, 08:23:56 pm »
Basically because I'd like to learn something :D
Thanks I didn't consider that at all !
 
Do you think this " FISCHER ELEKTRONIK FK 222 SA " 20K/W  will do the job ?

In the interest of „learning something“: The 20K/W spec means that each Watt of power which the heatsink has to dissipate, will cause its hot side (i. e.  your voltage regulator) to get 20 degrees warmer than ambient temperature. Hence, at 7-8 W power dissipation and 50 C ambient temperature, your regulator would run at 200 C.

Way too hot!! As stated earlier, you would need an unpractically large heat sink too cool the linear regulator properly. Hence the suggestion to use a buck converter, which has negligible power loss in comparison.

50°C ambient! Come on, Germany isn't THAT warm.

The heatsink wouldn't have to be impractically large, especially if you just wanted to use this as a messing around with electronics exercise. Here's one that would probably do the job, according to the RS website data entry person: https://uk.rs-online.com/web/p/heatsinks/7226915/
It's a bit on the large side relative to the equivalent switching type converter, but not ridiculous.
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: USB charger circuit for car
« Reply #6 on: April 04, 2019, 08:35:17 pm »
50°C ambient! Come on, Germany isn't THAT warm.
You can easily exceed 40+C inside a car parked in direct sunlight even in Europe.
 
The following users thanked this post: tooki, mc172, drescherjm

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: USB charger circuit for car
« Reply #7 on: April 04, 2019, 08:37:42 pm »
50°C ambient! Come on, Germany isn't THAT warm.

The heatsink wouldn't have to be impractically large, especially if you just wanted to use this as a messing around with electronics exercise.

It‘s meant to be operated in a car, and in routine (unattended) use. It can easily get that warm in a car parked in the sun, even in Germany. And for unattended use I would want more safety margin than the 5K/W heatsink you suggest.

Ok, maybe not impractically large — how about „annoyingly large“? ;-)
 
The following users thanked this post: mc172

Offline mc172

  • Frequent Contributor
  • **
  • Posts: 490
  • Country: gb
Re: USB charger circuit for car
« Reply #8 on: April 04, 2019, 09:04:39 pm »
That's a fair point that I hadn't considered!
 

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #9 on: April 05, 2019, 11:15:57 am »
In the interest of „learning something“: The 20K/W spec means that each Watt of power which the heatsink has to dissipate, will cause its hot side (i. e.  your voltage regulator) to get 20 degrees warmer than ambient temperature. Hence, at 7-8 W power dissipation and 50 C ambient temperature, your regulator would run at 200 C.

Way too hot!! As stated earlier, you would need an unpractically large heat sink too cool the linear regulator properly. Hence the suggestion to use a buck converter, which has negligible power loss in comparison.

Thank you so much !! I've read a tutorial online now on how to calculate correctly what correct size you need and that has been interesting. I found in my datasheet that Tj has to be maximum 125°C with absolute max of 150°C. I found a bunch of dissipator and I'll be the circuit because the room in my old car is soooo huge compared to the fancy new car.

Given that what do you think of the design itself ?
Is it safe ?
Thank you all guys !!
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4321
  • Country: us
  • KJ7YLK
Re: USB charger circuit for car
« Reply #10 on: April 05, 2019, 12:05:02 pm »
That circuit seems pretty vulnerable to normal vehicle power transients.

Automotive Line Transient Protection Circuit  http://www.ti.com/lit/an/snva717/snva717.pdf

https://www.eevblog.com/forum/projects/battery-protection-circuit/

Probably many more resources about vehicle power protection....
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: USB charger circuit for car
« Reply #11 on: April 05, 2019, 01:41:21 pm »
No need for over-engineering, a TVS diode (1.5KE or P6KE) would be sufficient.
 

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #12 on: April 06, 2019, 03:43:52 pm »
That circuit seems pretty vulnerable to normal vehicle power transients.

Automotive Line Transient Protection Circuit  http://www.ti.com/lit/an/snva717/snva717.pdf

https://www.eevblog.com/forum/projects/battery-protection-circuit/

Probably many more resources about vehicle power protection....

LOL, thank you for you reply: I'll take a look at the material you posted.
But this is what my 21years old glorious Car looks like.
I think that the circuit I'm building will be 20 years innovative than the rest of the stuff that's inside  ;D ;D ;D electrical engineer in Fiat didn't even put some relays on the headlights   :-\ and I'm going to fix this in few months
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 4135
  • Country: 00
Re: USB charger circuit for car
« Reply #13 on: April 07, 2019, 01:26:47 am »
I think there is needed for some kind of protection from high voltage pulses which may be present in the vehicle power line.
These pulses may be up to kilovolts, and it may damage expensive iPhone with no protection from high voltage pulses.
 

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #14 on: April 07, 2019, 11:52:56 am »
No need for over-engineering, a TVS diode (1.5KE or P6KE) would be sufficient.

Do you think that this 1.5KE15A  one will be fine ?

Type of diode    transil    
Power dissipation    1.5kW    
Max. off-state voltage    12.8V    
Breakdown voltage    15V    
Max. forward impulse current    71A    
Semiconductor structure    unidirectional

I modified the circuit with the diodes mentioned. Are they in the correct position ?
« Last Edit: April 07, 2019, 11:58:42 am by Charybdis »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: USB charger circuit for car
« Reply #15 on: April 07, 2019, 12:20:16 pm »
The TVS goes between Vcc and Gnd, like a Zener. Simply put it in parallel with C1. 15V could be a tad low. I'd suggest 18V.
 
The following users thanked this post: Charybdis

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: USB charger circuit for car
« Reply #16 on: April 07, 2019, 12:21:32 pm »
If you want to learn something, use a MC34063 switching regulator to get your input voltage down to 5v, or down to around 6-7v and then down to 5v using a linear regulator
Plenty of documentation for it in datasheets (the chips are made by various companies, just download several datasheets and look at the instructions, notes etc in them),
there's online calculators for parts : http://www.nomad.ee/micros/mc34063a/  and  https://www.electronicproducts.com/DC-DC_Circuit_Calculator.aspx
and even software for it for ex. https://sourceforge.net/projects/mc34063uc/ 

All parts are cheap and can be bought from TME and others... all through hole... My advice would be design it for 11v..14v input, 6v output  and then use a linear regulator to get 6v down to 5v

With 34063, you'd get up to around 0.75A of output current... here's an example:



The inductor value is odd, but it's a minimum - you can use slightly higher value, for example in this case 27uH or 33uH would be super common and standard values, bigger may mean slightly lower efficiency but you don't care about this. The hardest part to get would probably be the 0.12 ohm resistor for Rsc, but you can obtain it using two or three resistors in parallel ... for example you can use 2  x 0.22 ohm in parallel which gives you 0.11 ohm which is close enough

Then just get a 5v Linear regulator with a voltage drop lower than 1v at 0.75A ... for example LM2941 ... or loads of other regulators out there which are cheaper.

You still learn a lot and make your own circuit, but you don't have as big of a heat issue (you'll only have to dissipate 0.75w - 1v at 0.75a max)
« Last Edit: April 07, 2019, 12:29:23 pm by mariush »
 
The following users thanked this post: Charybdis

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #17 on: April 07, 2019, 06:02:53 pm »
Thank you so much my friend mariush !!
Unfortunately as for now I'm not so skilled to fully understand everything.
But i truly apreciate your post :)
 

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #18 on: April 07, 2019, 06:14:25 pm »
Sorry to bother you, Madires. But do you think that this will be fine ?
I changed the diode and left the other 3 normal. Is it ok now ?
Thank you very much
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: USB charger circuit for car
« Reply #19 on: April 07, 2019, 07:16:12 pm »
Yep!
 
The following users thanked this post: Charybdis

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #20 on: April 09, 2019, 10:44:44 pm »
Thank you Madires, I'll make the circuit when I'll receive the material :)
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: USB charger circuit for car
« Reply #21 on: April 10, 2019, 09:51:03 am »
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




 
 
The following users thanked this post: Charybdis

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #22 on: April 10, 2019, 07:00:36 pm »
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
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: USB charger circuit for car
« Reply #23 on: April 10, 2019, 08:16:46 pm »
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


 

Offline CharybdisTopic starter

  • Contributor
  • Posts: 27
  • Country: it
Re: USB charger circuit for car
« Reply #24 on: April 13, 2019, 12:36:09 am »
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).

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 :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf