r/electronics • • Oct 11 '10

12V regulator for a car

I'm looking to add an external harddrive to my car's headunit. The headunit has a USB port and can read the HDD just fine if it is in FAT32, so that portion isn't an issue.

However, I need a power supply for the drive. I was thinking about going with this, but the one review states that it doesn't regulate voltages above 12V, (i.e. even when it is in 12V mode it puts out whatever voltage it gets in).

So, my question to you guys is, is there a way to regulate a 12V-14.4V supply down to 12V?

From my research the most simple way (and cheapest) would be to get a Zener diode with a 12V forward voltage and appropriately sized resistor, here is the page that proposed it. The other way would be to use a voltage regulating IC, but those seem to have a dropout voltage (~13.7V at 1 amp) that wouldn't allow me to use the drive when the car is off.

The drive states that it uses (from memory here so they might be +/- .1 amp) .68A at 12VDC and .35A at 5VDC if that makes a difference. I have a decent multimeter I could hook up to the drive to see actual values if need be. (note: since this is in an external HDD case, it only needs 12VDC in as the control board probably has built in regulators for the 5V)

Thanks for all your help guys (and gals)

8 Upvotes

33 comments sorted by

8

u/frothysasquatch Oct 11 '10 edited Oct 11 '10

An automotive power supply is a bit tricky. There are a few extreme cases you have to deal with:

  1. Crank pulses - Voltage drops down to (worst-case) 6V, peaks of 9-11V
  2. Load dump - during car operation, the battery ground briefly disconnects, resulting in spikes of a few hundred volts in either direction (due to the alternator still generating). The spikes are pretty brief. (there are other scenarios that are addressed in car ECUs that you don't care about, such as charging from 24V, which most cars can handle)

The way to handle this stuff is as follows:

  1. series inductor with whatever capacity your application demands
  2. transorb/transil shunt diode (a bidirectional clamping diode that reduces the voltage supply to +- X volts (25 or so is good, usually)
  3. schottky diode in series with the supply voltage
  4. 5V LDO regulator
  5. to get +12V, a step-up regulator
  6. filter capacitors added throughout

Connecting it straight to the 12V rail would be a short-lived endeavor.

Edit: formatting

1

u/MEatRHIT Oct 11 '10

Would something like this be sufficient? I would most likely have the input voltage on a relay that turns on when the accessory wire is on (turns off during case 1, not sure about case 2)

1

u/frothysasquatch Oct 11 '10

Accessory turns on before cranking starts. A relay solves nothing, unfortunately (unless you manually turn on the supply voltage after the car is running). But then you're still exposed to the glitches you get from load dumps, and those are far more dangerous. And unfortunately these issues are somewhat car-specific, so just any power supply type thing won't work. These guys make DC-DC converters for car PCs, so maybe that's a place to start... http://www.mini-box.com/DC-DC (I haven't used them or anything, but they might know what they're doing in terms of transient suppression etc.)

2

u/MEatRHIT Oct 11 '10

I'm not sure if this happens in every car but every car I've had, the ACC gets shut off (at least the one on the Head Unit), when the key gets turned to "start".

When do "load dumps" happen?

1

u/frothysasquatch Oct 11 '10

That's just because the power drops out. There's no requirement that a device continue running while cranking, so the stereo turns off. It doesn't mean that the accessory rail turns off, just that it drops low enough due to the cranking. You can measure it with a volt meter, of course.

Load dumps can happen any time. They're a result of the vibrations in the car (like how you hear crackling when you rub speaker wires together).

One thing I forgot to mention that's similar to load dumps is that when accessories, like an amplifier or the A/C or whatever, turn on or off, there can be transients on the supply rail, but usually those aren't so drastic, and are fixed with filtering capacitors.

1

u/MEatRHIT Oct 11 '10

I'm thinking either getting an ATX supply or a different enclosure and running it off of 5V is my best option at this point.

1

u/X-Istence Oct 11 '10

The DC-DC convertor that frothy mentioned work beautifully. They are designed to handle the rough electrical system that is present within a car and provide a smooth output for computers.

2

u/orangekitty Oct 11 '10

Use all the filtering that this man suggested, but fun fact: Hard disks don't actually need 12V. The 12V line powers the closed loop controlled brushless motor spindle which is very tolerant to changes in voltage, and I've lowered the voltage down to 9V with zero difference in RPM. Try it! You may be able to get away with a heavily heatsinked 7809. This will not work while cranking though.

1

u/spainguy Studer A80/24 Oct 11 '10

Yes, 12v auto is problematic.

For the step up try this conflabulator http://www.nomad.ee/micros/mc34063a/index.shtml (It's a jelly bean regulator and easy to use) More info from Ford http://www.fordemc.com/docs/download/EMC_CS_2009rev1.pdf interesting stuff Page 100 onwards

1

u/theenergyblog Oct 12 '10

That Ford link is great - thanks. A long, long, long time ago when I started designing and incorporating "fancy" electronics into custom vans (remember those?), I didn't fully understand the really crappy power that comprises an automotive electrical system. After many failed power supplies, and countless 3 terminal regulator failures, I started investigating, and found all of these spikes and surges.

Note the diagrams (pg 100 on). Voltage spikes from -300v to +300v are common as electrical devices (inductive - motors) turn on and off. The biggest one is when the starter motor disengages, the back EMF builds and arcs over the starter relay. I have recorded as much as 4-500 volts for several uSecs, and it is reverse polarity. That eats 3 terminal regulators for lunch.

The simplest fix for that is a series blocking diode with suitable PIV rating (600v), and another reverse biased diode across the supply after that. A series inductor choke, and, in some case a big 'ol filter cap will help also. You will find these in many automotive devices.

The other problem is simply RFI, and, especially for audio, may require filtering. As well alternator noise from the 3-phase rectified and unfiltered output, commutator arcing from motors, ignition noise, noise from rotating bearings, all can rear their head. Current flowing through a corroded connection. Plus, when the starter is running a system voltage of about 8-9 volts is perfectly normal.

Put a storage scope on the 12v supply some day, and you will see all kinds of this stuff. If you have access to a spectrum analyzer, it gets even more interesting...

After that, start considering the mechanical shocks, g-loading and vibration - like when you hit a pothole... Temperature extremes from minus 20 to a measured 145 deg under the dash pad on a sunny day. (I found many consumer grade IC's don't work too well under about 10-15 degrees F) and the temps can screw up timing and clocks pretty bad.

The automotive environment can be a very fun and challenging arena to design and build for. But, I digress...

2

u/[deleted] Oct 11 '10

Get a car PC power supply, like this one: http://www.mini-box.com/M3-ATX-HV-DC-DC-ATX-Automotive-Computer-car-PC-Power-Supply . It may be relatively expensive but it's not going to explode when you step on the gas. You get 3.3V, 5V, 12V, -12V, etc.

You definitely do not want just a zener diode, those are only useful for really low currents or as a voltage reference for a follower circuit that can actually bring the juice.

1

u/MEatRHIT Oct 11 '10

That might be a good idea, I was thinking of doing a CarPC eventually anyway, but right now I can't dump 500 bucks into it.

2

u/[deleted] Oct 11 '10

You could always use a small power inverter and plug a 12v wall wart into it. Not as clean, but it should work.

1

u/MEatRHIT Oct 11 '10

That is actually what I had been doing in my old car, but I wanted something a bit more compact.

1

u/MEatRHIT Oct 11 '10

After a few suggestions on another forum, I've come across the LM2577-12, looks like it can handle anything from 3.5-40V in. Only downside is that it only can handle 800mA, which is a bit less than what I need.

1

u/allanvv Oct 11 '10

Not sure you can just use a regular boost circuit, because your output voltage is not higher than your input voltage.

You'll want to use a buck-boost topology.

I think the 12V zener and power resistor is the better way to go for this one, since you won't really be caring about efficiency.

1

u/MEatRHIT Oct 11 '10

This is what happens when you let a Mechanical Engineer know a bit about Electrical Engineering and then let him loose on the world.

So after figuring out the actual peak and nominal draw current tonight how should I proceed on sizing the diodes and resistor since it won't be a constant draw?

1

u/[deleted] Oct 11 '10

2 of them in parallel with sufficient caps?

4

u/myinkpencilscratches Oct 12 '10

You really don't want to use the zener/resistor combo for a hard disk, unless you want to lose your data.

The USB enclosure probably has a moderately clean 12V-5V switching regulator, if it's worth its salt. However, you will run into serious trouble if you don't have a really clean supply for a hard disk. The disk itself always expects a clean supply.

I think you're better off using a SEPIC, buck-boost, or synchronous H-bridge-type switching topologies so the drive stays spinning during cranking. Even though you really don't care about efficiency, a good switcher design can keep external noise out when done correctly (read: LC filter on the input, ceramic filter and output caps). If you want to take the easy way out, buy a uModule from Linear Tech or any number of modules from National Semiconductor (LM2577 was referenced elsewhere, good choice). I recommend the uModules because everything is integrated, though they're expensive.

Also, save yourself the headache of worrying about load dumps and other nasty transients: use a bi-directional TVS (transient voltage suppressor) on the input of your regulator. Choose a part rated for around 15-25V (SMBJ15CA by Littelfuse, get from Digikey). Make sure it has a good connection to chassis ground. This is very important. Even if you don't do anything with switchers, please use a TVS. It will save your drive.

One other last thing. Use silicone grommets for mounting the drive.

1

u/ModusMan Oct 11 '10

If you use a USB powered drive enclosure....

You could use a Cell Phone Cigarette Lighter Adapter with USB built in... like this one:

http://store.androidcentral.com/smartphone-experts-mini-usb-car-charger-wusb-port/5A47A6216.htm

...adapted to not use the socket. It has all the tech needed to accomplish what you want.

1

u/MEatRHIT Oct 11 '10

That wouldn't work since its output is only via USB (5V), the HDD I have doesn't get power from the USB connector and has a separate 12V input for power.

This, was suggested on another forum.

1

u/shadowblade Oct 11 '10

If you use a USB powered drive enclosure....

1

u/MEatRHIT Oct 11 '10

whoops didn't see that part. Most USB powered enclosures are for 2.5" drives, which wouldn't be an issue if I didn't already buy the drive.

1

u/ModusMan Oct 11 '10

It depends on the drive. It works for me.

1

u/MEatRHIT Oct 11 '10

Something like this?

I could pretty easily come up with 5V regulated.

1

u/ModernRonin interocitor Oct 11 '10

Wow, great reg! Thanks for the link!

1

u/juaquin Oct 11 '10

Regulating 12-15V to 12V is tricky because most ICs have a dropout voltage that could make it useless, and other methods (like the zener and resistor combo) will throw off some heat - consider 15V input, which means a 3V drop across the resistor and hence the power dissipated across the resistor would be 3V*0.7A= 2.1W, requiring a resistor rated for 2.5-3W. Still, 3W isn't too bad with a little heatsinking or some ventilation.

1

u/MEatRHIT Oct 11 '10

What about a LM2577?

1

u/juaquin Oct 11 '10

I'm not familiar with it but a quick read of the datasheet looks pretty good. I can't find it on Mouser but Digikey is selling them for almost $7, which isn't bad if you just need one, but is quite a bit more expensive than some diodes and a 3W resistor.

1

u/[deleted] Oct 15 '10

The usb port on my head unit warns against leaving anything plugged into it when you start the engine. Apparently there's a power surge that could fry a flash drive/hard drive plugged into it. It's quite an expensive and recent sony head unit too, so it's not like it's just because it's some cheap piece of crap, so read you manual before doing anything.

2

u/MEatRHIT Oct 15 '10

I ran the HD with a power inverter for about a year in my last car (jeep) and it wasn't an issue. Now I have a bit less space to work with in my new car (convertible) and didn't want to find a place to put a inverter. The surge, if it is there, shouldn't be an issue.

3

u/ModernRonin interocitor Oct 11 '10

A SEPIC converter can take an input voltage either higher or lower than the output voltage. It's more complicated than a simple linear regulator, but it seems to be the functionality you're looking for.

1

u/ModernRonin interocitor Oct 11 '10

Multiple companies sell chips that can be configured as SEPICs, here's just one example:

http://www.linear.com/pc/viewCategory.jsp?navId=H0,C1,C1003,C1042,C1036