Connecting Arduino DUE to a 12V car battery

Hey everybody,

I am not a big hero in hardware design so here my probably basic question: Do I have to add additional protection hardware when I want to connect the Arduino DUE (or any other Arduino board) to a car battery?

I have been reading online about the topic, but not finding an exact answer for my question.

Did somebody do this before?

Thanks in advance for any help :)

Should work just OK. If in a running car, there will be some hi-freq. Filter it using a nF-range capacitor. Bevare heating in the onboard regulator. (if arduinos i/o take heavy load)

RPieter: Hey everybody,

I am not a big hero in hardware design so here my probably basic question: Do I have to add additional protection hardware when I want to connect the Arduino DUE (or any other Arduino board) to a car battery?

Yes, lots, car power systems can be extremely noisy and starter motor solenoids etc can throw huge spikes if something is malfunctioning. A good start is a fuse, proper LC line filter, TVS, then a linear voltage regulator rated for high input voltage ("automotive grade" is commonly used to describe such components).

However why not leverage the circuitry in a car USB supply if 5V is all you need?

knut_ny: Should work just OK. If in a running car, there will be some hi-freq. Filter it using a nF-range capacitor. Bevare heating in the onboard regulator. (if arduinos i/o take heavy load)

Can you give me a specific example which I should use for this?

MarkT:

RPieter: Hey everybody,

I am not a big hero in hardware design so here my probably basic question: Do I have to add additional protection hardware when I want to connect the Arduino DUE (or any other Arduino board) to a car battery?

Yes, lots, car power systems can be extremely noisy and starter motor solenoids etc can throw huge spikes if something is malfunctioning. A good start is a fuse, proper LC line filter, TVS, then a linear voltage regulator rated for high input voltage ("automotive grade" is commonly used to describe such components).

However why not leverage the circuitry in a car USB supply if 5V is all you need?

Hi MarkT,

As I said before I am not a big hardware pro, but I am sure willing to learn about it.

A car USB supply is a good alternative (can supply 1A. Enough for the DUE? Max 800mA output), but in the end I want to be able to connect my Arduino directly to the battery 12V. Just so I can learn how to create the power supply myself.

So I started with analysing your list of components.

First the fuse:

TVS -> Is this a transient voltage suppression diode? If I understood it correct, it is to protect against electrical surges and spikes. To choose the right one I need some more info on how it works:

  • Do I need a Unidirectional or a bidirectional? What is the difference?
  • Max Reverse Stand-off Voltage Vrwm -> the voltage below which no significant conduction occurs. A car has a 12V battery, and when the alternator is generating current the voltage is around 14V. What do I have to choose for Vrwm? 8V?
  • Breakdown Voltage Min and Max -> the voltage at which some specified and significant conduction occurs. Is this the range in which the TVS protects the circuitry? So for Min I take around 10V, and for max around 15V?
  • Clamping voltage Vc max -> the voltage at which the device will conduct its fully rated current. For a car battery, should this be 14V or 12V?
  • Peak Pulse Current -> no idea how much to take. Is this about how much current the DUE will use? Or is this against how much current the TVS needs to protect the DUE?
  • Power Dissipation -> is this 12V*current_used_by_DUE or 12V*current_protected_against?

LC line filter -> inductor and capacitor connected in series. Is the goal of the filter to filter out peaks, a range of voltages, or a certain frequency?

  • How to choose the components? How much Henry for the inductor and how much Farad for the capacitor?

Linear Voltage Regulator rated for high input voltage. So this is a DC2DC convertor? 12V to 5V. I have been looking for a suitable component which does this and delivers enough current. Now I understand why all these USB supplies for cars are only 1A. There are not that many cheap voltage regulators for more current. I used Farnell to search for the component and used following values (are these correct?):

Thank you for your help.

Pieter

For an LC line filter you need to know the load in question and how variable it is, and what sort of noise to expect (amplitudes and frequencies).

The inductor mainly filters out high frequency noise, such as alternator whine, and should be able to comfortably handle the DC current of the load. It also helps kill fast spikes from sparking motors and so forth. Larger inductor will have a lower cut-off frequency. However too large and you risk forming a high-Q resonant LC circuit (which you don't really want)

The capacitance value really depends on how much noise you can tolerate - for logic only its not too crucial, if you have analog circuitry it is more important.

But the good news is that having a linear regulator after the filter will do a lot of the work and reduce the need for a good filter - in fact you only really need the LC filter to handle RF noise since linear regulators cover the audio band rather well.

Also a point to note is that most vehicles most of the time have reasonable 12V power - its the need to protect against the rare occasions when the vehicle is really bad (dead battery, broken regulator, faulty motor, bad connection) which makes automotive supplies more complex - you don't want a fault in the car to trash all the electronic components in it, so they have to be robust (this is why automotive MOSFETs have a 55V rating rather than 20V).

Hi MarkT,

Wow a lot of information. It seems I have to gear up and do some electronics studying because at this point it seems my knowledge is too low to develop a save 12VDC-to-5VDC converter for an Arduino board to be used in a vehicle. I for sure do not want to fry it. As an alternative for now I will use a USB-car-charger to power my Arduino until I found a way to deliver a good 5V supply to it without risking to fry it: http://www.amazon.com/USAMS-Compact-High-Output-Charger/dp/B005YOZABQ

I have read this article for people wondering what the electrics of a vehicle can do to their controllers: http://www.maximintegrated.com/app-notes/index.mvp/id/4240

Thanks Mark :slight_smile:

And another one that could be interesting:

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00181783.pdf

Hi,

So I found a good example schematic from the MegaSquirt ECUs. Can someone help me understanding this schematic?

  • MOV1: ERZ-V20D220 --> Panasonic Varistor --> High Surge Current http://uk.farnell.com/panasonic/erzv20d220/varistor-20mm-disc-22v/dp/1845476 --> what is its function?
  • C15: Fixed Capacitor 0,001F --> what is its function?
  • D11 (1N4001 Diode) and D13 (12V 1W Zenerdiode) --> what are they doing?
  • D10 --> 1N4001 Diode --> what is its function?
  • D12 --> 22V 1W Zenerdiode --> what is its function?
  • C16 --> Polarized Capacitor 33F --> what is its function?
  • U5 --> LM2937ET-5.0 --> 500 mA Low Dropout Regulator http://pdf1.alldatasheet.com/datasheet-pdf/view/8827/NSC/LM2937ET-5.0.html --> why exactly did they choose this one for an automotive setup?
  • D9 --> 1N4001 Diode --> what is its function?
  • C17 --> Polarized Capacitor 33F --> what is its function?
  • C18 --> FixedCapacitor 0,1F --> what is its function?
  • F1 --> Polyfuse RXE050 http://datasheet.octopart.com/RXE050-Tyco-Electronics-datasheet-10297.pdf --> Is this an overcurrent protector which is auto-resetable after a certain amount of time?
  • D19 is not important for me because I do not need the Vsyn and Vref --> this is only for combustion engine control which I will not need in my project.

Next to understanding what all these components do, some other questions about this schematic:

  • What do they mean with Sanctioned 12V, Sanctioned 5V and Sanctioned Gnd?
  • When I read the general info on the Arduino DUE it says power can be supplied from an external source. The recommended range is between 7 and 12V. So if I want to use the above schematic for the DUE, do I only need to change the regulator from a 5V regulator into a 12V regulator, and can all other components stay the same with the same values? OR can I use exactly this schematic and input the VCC (5V) into the USB port?

Any directions/help with building this for the DUE to use in a car would be much appreciated :) ;)

Hi, A lot of work has been done on this issue with all the electronics in today cars. Here are a couple of good resources:

Texas Instruments: http://www.ti.com/lit/an/snva681/snva681.pdf

Littelfuse: http://www.littelfuse.com/~/media/electronics_technical/application_notes/tvs_diodes/littelfuse_automotive_circuit_protection_using_tvs_diodes_application_note.pdf

A major problem may be "Load Dump" WikiPedia:

Here's an informative graph showing the challenges in the automotive "12V sort of" environment:

You really need some high-voltage transient suppression! The MegaSquirt is a serious approach to this. Overkill in combat with Bad Stuff that could happen and kill your Fuel Injection system at midnight on Route 95 in New Jersey is not a bad idea.

Good News is that this is such a common problem there are some good solutions. Texas Instruments has a nice voltage regulator, the LM2940 which is available in different output voltages. I would pick 9V output to run to the external power jack on an Arduino. Ti has done some work on the Automotive issue in the 2940:

Designed also for vehicular applications, the LM2940- N/LM2940C and all regulated circuitry are protected from reverse battery installations or 2-battery jumps. During line transients, such as load dump when the input voltage can momentarily exceed the specified maximum operating voltage, the regulator will automatically shut down to protect both the internal circuits and the load. The LM2940/LM2940C cannot be harmed by temporary mirror-image insertion. Familiar regulator features such as short circuit and thermal overload protection are also provided.

The DataSheet:

The part number for 9V and TO220 package: LM2940T-9.0 NS TO-220

So I would start with a little simple protection plus the LM2940 which should be available for about a dollar.

I'll try to go over that MegaSquirt schematic in some more detail soon...

Hi hi !,

Wow Terry! Thanks for the detailed response, this helps me a lot.

terryking228: You really need some high-voltage transient suppression! The MegaSquirt is a serious approach to this. Overkill in combat with Bad Stuff that could happen and kill your Fuel Injection system at midnight on Route 95 in New Jersey is not a bad idea.

That I can believe ;-) Also not here in the Alpes :-)

I have been reading a lot today about this topic. The hazards in a car summed up: - Load Jump -> battery gets disconnected from the power line while the alternator is charging. - Jump Start -> using "double battery" to start the engine when the car battery is low. Then you end up with a voltage of 24V instead of 12V. - Cold crank -> battery voltage can go as low as 5V (oil is thick). - Reverse polarisation -> connecting the battery in the wrong way. - Disturbances from the ignition, injection, alternator, load switching, etc.

I found following solutions during my search: -Discrete protection circuit using a TVS (transient voltage suppressor) or Varistor (for transients like load dump, etc.) in combination with a fuse or Diode (reverse polarisation). For repetitive low-energy negative transients (induced by a relay or a solenoid switch) they use a capacitor to filter. How do you calculate which capacitor should be used? Also how to choose the TVS or Varistor? - Active Transient-Protection: MAX16013. This IC monitors the voltage input on the supply rail, and isolates the load from the the input when transients (or faults in general) occur. This is done in combination with 2 pFETs. Here they also use a capacitor to filter out the low energy higher frequency disturbances.

I also found this one: looks also a good solution: http://www.eeweb.com/news/overvoltage-protection-controller/

terryking228: Good News is that this is such a common problem there are some good solutions. Texas Instruments has a nice voltage regulator, the LM2940 which is available in different output voltages. I would pick 9V output to run to the external power jack on an Arduino.

But your solution looks even easier and cheaper than what I found today. I will go for this one. In this way I only need the LM2940T and 2 capacitors? Do I see this correct? Will this protect my Arduino DUE from all these hazard I listed at the beginning of this post? Or do I need to add other extras as well?

And does the 9V-regulator provides enough current for the Arduino DUE? Its input voltage is recommended between 7-12V. And its current specs say the following: - Total DC Output Current on all I/O lines 130 mA - DC Current for 3.3V Pin 800 mA - DC Current for 5V Pin 800 mA ----> does this mean that the DUE can deliver a total of 800+800+130=1730mA? Than the 1A that the LM2940T delivers would not suffice,...?

One more question -> do I need to use a heatsink with this component?

Thank you for your help :)