How to get a clean 12V from car battery?

Hi all. I am interested in building a circuit that utilizes a small alphanumeric LCD screen and the Arduino, plus some additional hardware. Here's where it gets tricky, the circuit must operate in a car and is supplied from the car's 12V battery. The circuit requires 12V and several amps and is sensitive to voltage changes on the input (ie, needs a clean 12V), so I need some regulating/conditioning device to ensure a clean 12V signal is passed from the car battery to the circuit.

I know that car batteries within cars can fluctuate quite a bit, so I'm struggling with a way to condition the output. Initially I thought about picking up a DC to DC converter with say input 9-36V and output 12V. Anyone with any experience with these? Will the DC to DC also convert the low end of the input (9V) up to 12V without problem? Any particular model anyone would suggest?

Would be grateful for any advice!

Read especially the tips from Grumpy_Mike

I would use some capacitors on the 12v to "decouple" it, and it will act as a low pass filter on the noise. Defanitly read the post's by Grumpy_Mike.

12V and several amps

Presumably then it is not running when the motor is turned off ? In which case as long as you can detect a running motor, say from the alternator, you don't have to worry about the voltage being too low.

That still doesn't give you clean 12v power but at least removes much of the problem.


Could also go DC/DC converter route & ditch all the big capacitors.
From Car DC, a switching regulator to create clean 5V (or whatever lower limit is you when cranking if needed for example), then a boost regulator to bring it back to clean 12V.

step down to 5V

boost to 12V

I am using the 2nd one now to create 12V from 5V to drive strings of 5 LEDs in series.

Thanks for all the tips folks. The circuit will be connected to the 12V battery indefinitely, whether the car is on or off. So upon starting the engine, the circuit will indeed be starved of it's required voltage, and voltage spikes can definitely a problem as I blew a 12V LCD screen with a voltage spike.

After doing a bit of research, I found this really neat buck boost converter that should do exactly what I need (sort of what you suggested CrossRoads, but combines both in one nice package). It takes an input of 6-24V and outputs a clean 12V with up to 15A capacity (up converts when under 12V, down converts when above 12V). Strangely enough the device doesn't seem to have a heat sink, which is unusual as the DC to DC converters at this power typically contains large ones. It's quite cheap so I might just take a gamble and see what happens. Here's the link in case anyone else is interested:

Thanks again everyone, really nice to have such an active community here!

several amps

connected to the 12V battery indefinitely

What's going to keep the battery charged? I live with 10 batteries and I couldn't leave "several amps" running all the time.


The car’s alternator will charge the battery when the car is running, however when the car is off it’s only a matter of time until the 12V is drained. Luckily the car’s built-in controller will control when my circuit is active and when it should be in ‘sleep’ mode (it’s a fancy controller with digital I/O, so it can control a relay to cut the power), so when the car is off, the circuit should only be drawing a few hundred mA at most.

Don't discount "a few hundred mA at most" as not being able to drain a car battery!

There is no typical rating for a car battery AFAIK - I've seen some claim 100aH but 30-50 is probably more likely for standard OEM batteries.

So with 30000mAh a 200mA draw is going to get you 150 hours - not quite a week.

Don't get me wrong, car batteries have a lot of capacity but it'd be a mistake to think a few hundred mA is inconsequential, especially if you go on vacation or something and leave your device on.

Would probably be good to have something along these lines: a relay onboard the circuit you’re building that is normally open to cut power to all but the arduino, have the arduino go into powerdown sleep mode when the car is off so it draws <1mA and lets the relay stay open, and use the car’s fancy controller to wake the arduino and have the arduino enable the relay to wake up everything else.

You’re right, eliminating the power draw has entered my mind and it’s something I would like to eliminate, although my setup gets a bit tricky. With the few hundred mA draw estimate, I’m also including a small fan-less nettop PC which I’ll be operating in tandem. What I’m aiming to do is to use the Arduino as a ‘middleman’ between the fancy automotive controller and the PC, and it’s purpose is to serve as a timer and controller of the PC’s power. Here’s how I’m envisioning it will work:

On cold start (ie, car has been off for 24+ hours):

  1. Car is turned on
  2. Automotive controller starts up and immediately sends a command via digital I/O to Arduino
  3. Arduino receives command and triggers relay which provides power to the PC
  4. Arduino shortly afterward (<1s) triggers a second relay which triggers the momentary contact switch to start the PC
  5. PC (which was completely shut down) starts up and initializes the custom in dash display

On warm start (ie, car has been off for less than 24 hours):

  1. Car is turned on
  2. Automotive controller starts up and immediately sends a command via digital I/O to Arduino
  3. Arduino triggers a relay which triggers the momentary contact switch to start the PC
  4. PC (which was in sleep mode) starts up and initializes the custom in dash display

On turning off car:
When the car is turned off, the automotive controller sends a command to the Arduino to inform of the change in state. The Arduino then begins timing. Once the Arduino times 24 hours it will trigger the relay which separates the PC from main power, hence killing any power draw the PC requires for sleep mode.

A couple of potential issues that I foresee. Firstly, Killing the PC’s power from sleep mode is an inelegant solution, will have to think about fixing this. And more importantly, how good is the Arduino for timing for a prolonged period of time? Is it able to count up to 24 hours without issue?

All you have to is count in milliseconds, right?
so 24 hrs x 60 min/hr x 60 seconds/min x 1000 ms/sec = 86,400,000 decimal = 05 26 5C 00 hex
so just need 4 bytes to keep track of how many mS have gone by.

Am sure there is a more elegant way:

x=0 on shutdown

if (x < 0x 05 26 5c 00) // if code won’t do this directly, break this into four loops, each counting 00 to FF and incrementing the next byte when it rolls over
delay (1000);
kill pc power relay

Thanks CrossRoads, that's a nice simple solution. Any tips for choosing an appropriate power relay? I'm under the impression that relays change state upon an applied voltage, but then bounce back to the default state when the voltage removed (default being closed/off). Are there any relays that act more like switches, such as when voltage is applied the state is toggled? Wouldn't make much sense having the Arduino continually feed a voltage to the relay to keep it active.

Are there any relays that act more like switches, such as when voltage is applied the state is toggled?

Latching relays.

There you go - nice description of latching relay on wikipedia also.
Don't know how much current your PC etc. draws, so hard to guess at the relay needed.
They can be had pretty inexpensively tho. Example for $4.24:

This one appears to have the two pins that the switched voltage goes thru.
Then 3 smaller pins that are hard to see in the picture - Set+, Reset+, and Common- for them.
Models that will run from 5V too.

Excellent, just what I was looking for. CrossRoads, couldn't find that model for purchase, so I found an alternative from Digikey which looks like a nice choice:

It's rated for AC, but in the data sheet it is capable of passing DC as well (30VDC, 5A). I should probably first test the current draw of my system to ensure this isn't exceeded, can always spec out another if need be.

Thanks again for all the help folks

Omron have a whole range of latching relays, you can find them at Farnell and probalby all the other suppliers.