2
\$\begingroup\$

Is this a solid solution for an automotive 12 V-to-5 V circuit to power an ATtiny? I've been trying to come up with a solution for my needs that can handle the automotive environment that is so scary some places won't even talk about it.

From recommendations, scouring datasheets and lots of googling this is what I've come up with so far. It will be placed inside the cabin of a vehicle (not the engine bay) and everything selected is AEC qualified, but I don't know if it will actually work as intended or if I don't have enough protection (the ESD/TVS should kill most of the automotive nightmare right?). The other part of my circuit (not shown) is an ATtiny that will operate some auxiliary lighting.

Please don't say just use a USB 12 V adapter, because I'm not trying to couple multiple boards together hence trying to nail this circuit so I can include it on my device's PCB, but other than that please school me if I have anything incorrect.

**Also note the resistor for the LED is incorrectly rated in the schematic. It's supposed to be 150 ohm like the component list.

My circuit

Components:

-- Optional, for testing (not really important) --

  • R1: ERJ-U06J151V (150 ohm)
  • LED1: 150080GS75000
\$\endgroup\$
  • 1
    \$\begingroup\$ It would be better if you specified the expected current draw. From your text circuit get about (5-1.2)/95 = ~40mA. (B.T.W Your text says 150 ohm, your diagram says 95 ohm...) \$\endgroup\$ – Oldfart Oct 8 '18 at 7:32
  • 4
    \$\begingroup\$ There are "cigarette lighter" adapters available with selectable voltage outputs... \$\endgroup\$ – Solar Mike Oct 8 '18 at 7:35
  • 1
    \$\begingroup\$ @Oldfart eek! I changed LEDs and guess I missed updating the schematic, the schematic should be 150ohm just as the component list. The circuit on the other end of the regulated 5v 1A shouldn't be more than 0.8A \$\endgroup\$ – dawm Oct 8 '18 at 7:41
  • 4
    \$\begingroup\$ They come in a complete package - not "multiple boards" and tend to be very compact and efficient providing a clean supply, and I found the one I bought has been perfect for the multiple uses I have given it. \$\endgroup\$ – Solar Mike Oct 8 '18 at 7:43
  • 3
    \$\begingroup\$ @dawm I will let you do it your way - however, as I was a vehicle electrician in a previous life I would be looking at various options personally. You will need some cabling somewhere... \$\endgroup\$ – Solar Mike Oct 8 '18 at 7:50
15
\$\begingroup\$

You specified a current draw of 800mA. The voltage drop is 12-5=7V thus the regulator will consume 0.8*7=5.6 Watts. That will likely burn your regulator from the board.

Even if you take a different type and a heat sink, you don't want a big heat source in your car.

I strongly suggest you use a ready-made 5V switching regulator. They come in a bit larger TO220 housing.

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ One of my earlier ideas was with a switching reg but the extra components just to drive it properly took up a lot of real estate on the board design (unless I never came across the one pictured that is all in one?), a friend of mine has been using the AZ1117CH-5.0TRG1 which is the non-automotive version of the ZLDO1117 in a similar application (used on ATVs and circle track cars) with no heat issues (claims it doesn't even get warm) but his circuit lacks the protection i'm trying to figure out. \$\endgroup\$ – dawm Oct 8 '18 at 8:13
  • 1
    \$\begingroup\$ All you do is add the protection to the regulator, just as you did with the ZLDO1117QK50TC. See it as a drop-in replacement for the ZLDO1117QK50TC \$\endgroup\$ – Oldfart Oct 8 '18 at 8:27
  • 4
    \$\begingroup\$ @dawm Try this digikey category: digikey.com/products/en/power-supplies-board-mount/… There's a parametric search option for "linear regulator replacement", too (under the "type" field), which tends to be devices like the one Oldfart suggested; drop-in replacements for linear regulators. \$\endgroup\$ – Hearth Oct 8 '18 at 10:49
  • 4
    \$\begingroup\$ @dawm Don't follow the red herring. Safely dissipating 5W takes way more real estate. \$\endgroup\$ – Agent_L Oct 8 '18 at 16:42
7
\$\begingroup\$

Your major problems are:-

  • The +12V can actually be close to +30V. Car batteries are charged at around +14V, and tow trucks use two batteries in series to deliver a nominal +24V to really crank that starter motor, even if they need to use long jump leads. Your regulator needs to survive continuous overvoltage, or you need to add protection for it.
  • The +12V can actually be -12V if the inputs are reversed. (Or -30V, see above.) Can your regulator and electrolytic capacitor handle this? If not, add a diode.
  • The +12V can actually be shorted together, or during cranking can drop to substantially less than +12V, discharging any capacitors in front of the regulator, and discharging any capacitors behind the regulator back through the regulator. You may need a diode to stop this, and/or remove your 10uF cap.
  • The +5V supply may draw more current than the regulator can supply. You may need an output-side fuse.
  • The whole circuit may draw more current than the wiring from the +12V can supply. (A car battery can supply a lot, but remember this typically goes through a fuse box and relays.) You may want an input-side fuse, or give an explicit warning that you will rely on the car's own fuse box.
  • Your +5V supply will have instantaneous current spikes, and the regulator and 100uF will not be able to keep up. (Electrolytic caps are pretty slow.) Normal practise for this is to parallel an electrolytic with a faster, smaller capacitor (typically the same you'd use for decoupling) to handle the transients.
  • The capacitors will give you a huge inrush current. A resistor in the +12V supply is a good idea, and also helps solve some of your shorting-out issues.
  • Heat, as already covered by other answers.

Some of your circuit protection issues could be taken care of by using an automotive-spec regulator like an LM2940. Others are still an issue. Similarly, changing to a switch-mode regulator will help you with some problems but not others, and can introduce different problems too (not least noise/ripple on the supply line).

Figuring out solutions to these issues is left as an exercise for the OP, since it may well be coursework. :)

\$\endgroup\$
  • \$\begingroup\$ I don't know where the idea that tow trucks jump with 24 volts comes from... it would cause all sorts of problems, especially in hybrid cars. I think the misconception is that tow trucks, in North America, are diesel pickups and those always use two 12 V batteries in parallel due to the high cranking and glow plug loads. Heavy duty, like 18 wheelers and construction equipment, do use 24 V systems, but never in tow truck class vehicles. \$\endgroup\$ – user71659 Oct 9 '18 at 6:15
  • \$\begingroup\$ @user71659 Yes, jump starting a 12V car with a 24V battery will make the 12V battery explode. Please don't do that. \$\endgroup\$ – Jeroen3 Oct 9 '18 at 6:28
  • \$\begingroup\$ @user71659 Worked in automotive electronics for about 10 years. I know what we designed our electronics for, and the reasons we were told. I'll happily admit I've no first-hand experience of a 24V tow truck though, and that it's possible the guys teaching us didn't explain it quite right. I'm mainly software,, after all. :) I agree with Jeroen's comment if you directly short the 12V battery - although do remember you don't attach both jump leads to the battery. \$\endgroup\$ – Graham Oct 9 '18 at 6:59
6
\$\begingroup\$

If you must use a linear regulator (Oldfart is right about the unwanted dissipation), then you don't need a LDO. LDO's withstand maybe 20V input voltage; the standard 7805 is rated at 35V, which for automotive applications is desirable. I would also suggest a fuse on the input; if this is undesirable, then possibly a 1-ohm 1W resistor to take the edge off a spike. Finally, a solid ground connection is essential.

\$\endgroup\$
  • 1
    \$\begingroup\$ a fuse will be added, just haven't looked into what size/type..etc I'm going to require. I thought that using the TVS would help reduce the chance of higher voltages reaching the LDO. \$\endgroup\$ – dawm Oct 8 '18 at 8:20
4
\$\begingroup\$

The most common solution is to use a switching regulator. Switching regulators dissipate a lot less heat than linear regulators, especially when there is a large voltage drop. The down side is that they produce more noise, but this can be mitigated by following them with a linear regulator to produce a fairly clean supply.

Texas make some good switching regulators and have a free design tool on their site which will produce a schematic, select components and recommend a PCB layout. Alternatively you can buy a module from vendors like Recom and Meanwell, which is literally a black box that sits on the PCB taking 12V in and generating a selectable output voltage.

If your system does not need a low noise supply you could use a 5V output switch more supply. If it does then you could select a 6V output and use a 5V LDO to further regulate and clean the supply. A popular technique is to use the output of the switching regulator to drive high power devices that aren't sensitive to noise, such as lights or battery chargers, and have only the sensitive parts run from the LDO to keep heat generation down.

\$\endgroup\$
2
\$\begingroup\$

I would use unidirectional TVS at the input so that negative spike goes through with minimal residual voltage.

Also note that TVS has to protect 12V input which can be also 15V in normal conditions. You have choosen 5V TVS, which is wrong. Use a SMA6J18A 18V.

\$\endgroup\$
  • 2
    \$\begingroup\$ Sorry I'm still confused on how TVS diodes operate, using the SMA6J18A with 18V working and clamping at 28.3V to 33.2V that seems to exceed protecting the regulator from higher than needed voltage. Would the TPD1E10B09QDPYRQ1 be better suited?, its working voltage is 9V and clamping is 13V, with the ZLDO1117's SOA curve peak being 10V for 1A that would put me in the SOA during clamping and normal operation right? Datasheet says Vin -Vout on the SOA curve chart, 9-5 = 4V, 13-5 = 8V for a safe 5V 1A output. \$\endgroup\$ – dawm Oct 8 '18 at 7:35
  • 1
    \$\begingroup\$ Or do I completely misunderstand TVS diodes completely? Does current flow past a TVS untouched at the working voltage, then starts getting clamped when it goes over the breakdown voltage? That's how I understood it, that is why I picked the SMA6J5.0CA-TR, I thought it would allow at least 5V through it and start clamping it to 9V-13.4V after it reached the breakdown. \$\endgroup\$ – dawm Oct 8 '18 at 7:35
  • 1
    \$\begingroup\$ @dawm Look at the diagram on page 2 of the datasheet. Because the diode is normally used in reverse direction only the left half of the diagram is of interest. If you're going to use e.g. an SMA6J15A you get V[WM]=15V, where at 15V only 1µA will leak through the diode, and beyond the breakdown voltage V[BR]=18.5V (max.) the device will act like a resistor in the order of 0.1...0.2Ohms. \$\endgroup\$ – JimmyB Oct 8 '18 at 11:12
  • 2
    \$\begingroup\$ You will want to include a fuse in the supply line before the TVS which blows in case the overvoltage is not just spurious or the supply gets reversed to prevent the TVS from creating a short curcuit and burning out. \$\endgroup\$ – JimmyB Oct 8 '18 at 11:15
2
\$\begingroup\$

Just adding my two cents, if you care :) I've designed 3 systems which are automotive powered. They were for GE (I don't work for GE, I work for an OEM who they contract to).

  • People have suggested a diode for reverse polarity and transient feedback protection. Instead, use a P-Channel Enhancement MOSFET on the high-side, or a N-Channel Enhancement MOSFET on the low-side. Great video on the concept here, showing how easy it is to do, and how much more efficient it is. Make sure the Vds rating on the MOSFET is over 30V.
  • Add a common-mode choke on the two lines coming in, to remove common-mode noise. Make sure the current rating is acceptable for the current you expect.
  • Add a ferrite on the 10-28V line, to remove differential-mode noise. Again, make sure the current rating is acceptable for the current you expect.

Best of luck with your design!

\$\endgroup\$
2
\$\begingroup\$

I've designed military automotive power supplies in the past, and most rules apply here as well. I suggest you download some after the mil specs to see what you should look at. You can ignore the EMP strikes and nuclear events, that is not likely in a car, besides I think that your power supply failing would be the last of your problems in that scenario. I agree with the suggestions above where it is recommended to use a P channel Mosfet, a fuse, common mode choke, Ferrite and Fuse, although if you cannot reach the the fuse you could opt for a resettable fuse. TVS diode will help with the spikes, although what I have designed had to use a multi stage approach, where the input spikes were progressively reduced to more reasonable voltages i.e. 80V then 18V and finally 5V on the output. With the first one taking the biggest hit. Obviously the position of each is important so it should be a sequence of In-Fuse-80V TVS - Y class capacitor to limit the HF spikes - common mode choke - Y class capacitor - 18V TVS Mosfet - electrolitic cap - switching regulator - electrolitic cap -ceramic cap and 5V TVS. And Bob's your uncle.

The reality is that there is a bit more work in this can of worms, but it is up to you how far you want to go down the rabbit hole.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.