Author Topic: Powering Arduino and switches from 12V automotive battery  (Read 18368 times)

0 Members and 1 Guest are viewing this topic.

Offline ApexM0EngTopic starter

  • Contributor
  • Posts: 12
Powering Arduino and switches from 12V automotive battery
« on: May 21, 2015, 09:22:17 pm »
Hello,

I am new to the EEV forums and also to the type of design I wish to do. I would like to post a project I am working on and hopefully get some feedback and ideas bounced around.

So background: My end goal is to have an Arduino controller chip operate a valve and throttle. There will be several switches used for settings. The power is supplied by a 12V
automotive battery and the for this purpose the environment is considered automotive as well. Some of the components will be run at 5V others need 12V.

The Arduino and switches will be circuit board mounted.
Operating temp for parts on the PCB should be -10 to 60 °C.

Here is a basic drawing of what I have so far as I work this out.



Parts Speced so far:

Valve: KZValve 10D20-P01 http://kzvalve.com/1-ss-direct-mount-2-way-3-piece/
Switches: C&K K12ABK25N http://www.digikey.com/product-search/en?x=9&y=19&lang=en&site=us&keywords=K12ABK25N
Regulator: TI MC33063AQDRQ1 http://www.digikey.ca/product-search/en/integrated-circuits-ics/pmic-voltage-regulators-dc-dc-switching-regulators/2556570?k=automotive%20regulator

So, hopefully I am moving in the right direction, but if anyone sees any miss-steps I have made please educate me.

Some formal questions I have, though, are:
  • The valve in the picture takes 12V for both power and trigger. I imagine I will have to use a relay if the Arduino only outputs 5V, so I can trigger the Valve. Should I worry about over-voltage for the valve since it is not on the regulated side?
  • Will the regulator be enough to handle inconsistencies in the supply voltage, or is extra protection needed after it?
  • http://www.analog.com/media/en/technical-documentation/data-sheets/ADP2370_2371.pdf This is the Regulator guide. Figure 8.2.4 is the circuit I plan to use... Haven't thought of a food question for this point... maybe does this look right?
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1334
  • Country: gb
    • bitdynamics
Re: Powering Arduino and switches from 12V automotive battery
« Reply #1 on: May 21, 2015, 09:28:37 pm »
I give the same two suggestions to anyone starting to design automotive electronics:

1) Google "automotive load dump"


2) buy some cheap (often broken) production electronics(ebay is your friend), like an engine control unit, or instrument cluster, or a fuel pump driver module, or anything really.  Take it apart and investigate what components are fitted and understand why!


As our illustrious leader is want to say "Don't turn it on, take it APART"!

 :-+
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Powering Arduino and switches from 12V automotive battery
« Reply #2 on: May 21, 2015, 09:39:07 pm »
Before you go too much further, I'd suggest reading a lot more about the electrical and operating environment found in vehicles..

Voltage sags & spikes, open circuit voltages, noise and temperatures/vibration will pull the teeth out of your design at the worst possible time.

Also the indication of 'throttle' in your napkin sketch - suggests some more thought about testing the environment for safe operating conditions... e.g seatbelt on, oil pressure etc.

I'm looking forward to reading more, good luck.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline Asmyldof

  • Regular Contributor
  • *
  • Posts: 148
  • Country: nl
  • Freelancer - Persnicketist - Do'er of stuff
    • Asmyldof's Home. It's old, not quite impressive, but it's there.
Re: Powering Arduino and switches from 12V automotive battery
« Reply #3 on: May 21, 2015, 09:47:08 pm »
The regulator is definitely not going to be enough to protect to all mess a car can make on its power rails.

You probably want a transient suppression diode, to short away any very unwanted peaks. Breakdown not too close to 12V, not too far above 30V I would guesstimate. (The double linking about the regulator confuses me a little, but you are going to want a regulator with at least an upper limit of 36V as you drew, preferably more if possible)
Some form of inrush limiting might be an idea, to share some burden with the TVS in case of extended overvoltage, calculations would need to be based on the dynamics of your loads as well.

An extra filter isn't a bad idea all the way at the begin, closely followed by an "oopsie" filter, I generally call fuse.

My late-evening lazy me couldn't quickly find a full datasheet of the pump, but I'm not looking very well right now. If the pump is a normal type reasonably rugged DC motor, as the page suggests, it should not be bothered too much by the average car-noise, provided it does handle a continuous 16V ~17V. Doesn't happen often or very likely, but it might and it could melt a very tightly specified 12V motor.

Your question about the relay is pretty much its own answer, if you want to keep all car noise away from the Arduino, a relay is pretty much the most affordable way of changing your I/O voltage side to the "12V" pump side.

Other than those answers to what you ask, the suggestions given about do lots of research before you start building are absolutely spot on.
If it's a puzzle, I want to solve it.
If it's a problem, I need to solve it.
If it's an equation... mjeh, I've got Matlab
...
...
(not really though, Matlab annoys me).
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 2038
  • Country: us
Re: Powering Arduino and switches from 12V automotive battery
« Reply #4 on: May 21, 2015, 09:54:26 pm »
NEVER buy those 5V relay boards when you have 12V available and certainly don't power them off the same 5V regulator if you do.  Run the uno off a separate 9V (5V reg with bump up).  If you use the A/D don't let the laptop USB power it.  Get a cable and cut the 5V lead.  Cal values will certainly change.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: dk
Re: Powering Arduino and switches from 12V automotive battery
« Reply #5 on: May 21, 2015, 09:59:14 pm »
automotive power is the power from hell,  http://www.littelfuse.com/data/en/application_notes/an9312.pdf

many automotive rated regulators are rated for 40V and still need protection
 

Offline ApexM0EngTopic starter

  • Contributor
  • Posts: 12
Re: Powering Arduino and switches from 12V automotive battery
« Reply #6 on: May 21, 2015, 10:52:18 pm »
automotive power is the power from hell,  http://www.littelfuse.com/data/en/application_notes/an9312.pdf

many automotive rated regulators are rated for 40V and still need protection

Currently giving a read.

Thought: I've been reading posts on the Arduino forums all day. People over there seem to not have much difficulty hooking an Arduino up to 12V automotive batteries.
There were a number of fixes provided; de-coupling, varistors, regulators. It is difficult for me to filter through what information the best option is to just have clean 5V side.

Edit: Figure 8 of that article. Isn't that just like this: http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html? Where you get a really high impedance from an inductor to choke.

Would that not mean that I could have a filtering circuit which feeds into the regulator?
« Last Edit: May 21, 2015, 11:22:23 pm by ApexM0Eng »
 

Offline Niklas

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: se
Re: Powering Arduino and switches from 12V automotive battery
« Reply #7 on: May 21, 2015, 11:33:43 pm »
automotive power is the power from hell,  http://www.littelfuse.com/data/en/application_notes/an9312.pdf

many automotive rated regulators are rated for 40V and still need protection

Currently giving a read.

Thought: I've been reading posts on the Arduino forums all day. People over there seem to not have much difficulty hooking an Arduino up to 12V automotive batteries.
There were a number of fixes provided; de-coupling, varistors, regulators. It is difficult for me to filter through what information the best option is to just have clean 5V side.
Before we run away to far in either direction, can you specify the operating environment? Is it only being powered from a 12 V battery and not located in a car OR is it something that is powered from the 12 V in a car?

Regarding drivers for the valve, have a look at "high side switch" or "low side switch" which are MOSFETs with added protection. Some of them can be controlled directly from an I/O on the microcontroller without any MOSFET driver.
http://www.digikey.com/product-search/en?s=44716&s=39106&s=44604&s=44641&FV=fff40027%2Cfff801f6%2C3fc007b%2C3fc007c&k=high+side+switch&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Powering Arduino and switches from 12V automotive battery
« Reply #8 on: May 22, 2015, 12:12:24 am »
I guess - the following question would be - Why a car battery?
Do you need the massive instantabneous current...?
A 'standard' SLA may be a much better alternative for modest current requirements.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline ApexM0EngTopic starter

  • Contributor
  • Posts: 12
Re: Powering Arduino and switches from 12V automotive battery
« Reply #9 on: May 22, 2015, 06:44:47 pm »
Hopefully I can answer both SL4P & Niklas question. The environment is not a car, but a something like a small tractor.
Consider this http://www.louisianasportsman.com/classifieds/pics/p1353581054510177.jpg.

So the power supply must be a 12V source. I figure that if I can design something that can withstand a standard
car environment, it should be robust enough for something posted above. So there will be harsh transients.
Load dump/Jump start etc. I suspect though they won't be as bad.

Regarding drivers for the valve, have a look at "high side switch" or "low side switch" which are MOSFETs with added protection. Some of them can be controlled directly from an I/O on the microcontroller without any MOSFET driver.

So this would replace the need for any relays to control the high power side?
 

Offline Niklas

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: se
Re: Powering Arduino and switches from 12V automotive battery
« Reply #10 on: May 22, 2015, 08:35:49 pm »
Hopefully I can answer both SL4P & Niklas question. The environment is not a car, but a something like a small tractor.
Consider this http://www.louisianasportsman.com/classifieds/pics/p1353581054510177.jpg.

So the power supply must be a 12V source. I figure that if I can design something that can withstand a standard
car environment, it should be robust enough for something posted above. So there will be harsh transients.
Load dump/Jump start etc. I suspect though they won't be as bad.
Have a look at the circuit in Figure 1. I have used that for a 28V system with 174V unclamped load dump without any issues and passed EMC immunity testing. Just add a TVS and a wrong polarity protection diode in front of it and hook up the LDO at its output. A 200V bidirectional TVS, a 600V rectifier diode with low forward voltage drop and a 500V rated MOSFET. 
http://www.eetasia.com/ART_8800475657_765245_NP_f0ccb955.HTM

So this would replace the need for any relays to control the high power side?
Yes, and you will get short circuit protection and no arcing relay switches as a bonus.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4706
  • Country: au
  • Question Everything... Except This Statement
Re: Powering Arduino and switches from 12V automotive battery
« Reply #11 on: May 22, 2015, 08:51:34 pm »
cars are a hellish place for electronics, tractors even worse, as there are a number of them still running around with coil / points and 5 year old batteries because they where oversized for a long life,

if the tractor was under 2-3 years old, most of the spikes and crap would not be present to the same amplitude, what the document gives you is what you have to design for when the starter motor needs a few extra turns to get things running, when the engine is a bit dry on oil after sitting unused for 2 weeks, and when the batteries get old and start going more and more open circuit,


personally for a throw-away project in older holden and ford vehicles i have used a 5V recom switching regulator, and there is about 40 of them rolling around aus now powering an indicator gauge with none yet to return, but i would not rely on them to last more than 5 years when the batteries get older seeing as they where all fully restored vehicles when fitted,
 

Offline ApexM0EngTopic starter

  • Contributor
  • Posts: 12
Re: Powering Arduino and switches from 12V automotive battery
« Reply #12 on: May 22, 2015, 09:16:53 pm »
Hopefully I can answer both SL4P & Niklas question. The environment is not a car, but a something like a small tractor.
Consider this http://www.louisianasportsman.com/classifieds/pics/p1353581054510177.jpg.

So the power supply must be a 12V source. I figure that if I can design something that can withstand a standard
car environment, it should be robust enough for something posted above. So there will be harsh transients.
Load dump/Jump start etc. I suspect though they won't be as bad.
Have a look at the circuit in Figure 1. I have used that for a 28V system with 174V unclamped load dump without any issues and passed EMC immunity testing. Just add a TVS and a wrong polarity protection diode in front of it and hook up the LDO at its output. A 200V bidirectional TVS, a 600V rectifier diode with low forward voltage drop and a 500V rated MOSFET. 
http://www.eetasia.com/ART_8800475657_765245_NP_f0ccb955.HTM

So this would replace the need for any relays to control the high power side?
Yes, and you will get short circuit protection and no arcing relay switches as a bonus.


THEN

THEN


Like this? And I would find a Zener diode (D2) @ 5V to control the last circuit?

Also I was reading this thread. http://www.electro-tech-online.com/threads/automotive-power-supply-regulator-circuit.128070/

OP's solution was a TVS diode coupled with a http://www.mouser.com/ProductDetail/Micrel/MIC2941AWU/?qs=kh6iOki%2FeLGmGYXm9JNyAw%3D%3D.

« Last Edit: May 22, 2015, 09:21:02 pm by ApexM0Eng »
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Powering Arduino and switches from 12V automotive battery
« Reply #13 on: May 22, 2015, 09:49:06 pm »
TVS, zeners, and other shunt protectors are of little value w/o at least SOME small resistance between the source. You can rely on wiring and source impedance but that is risky. In my experience a fuse, a penny 1n4007, and a big cap, followed by generic 7805 will last years in typical automotive environment. I'm talking hundred volt transients here too.

Certification and liability issues a different story.
 

Offline Niklas

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: se
Re: Powering Arduino and switches from 12V automotive battery
« Reply #14 on: May 22, 2015, 10:17:10 pm »
Transient suppression diode at the input
Use a bidirectional TVS to clamp both positive and negative transients. Also notice the maximum clamping voltage as that can be much higher than the breakdown voltage. A 200 V TVS can have over 300 V of clamping voltage. That clamping voltage also sets the minimum reverse breakdown voltage of the wrong polarity protection diode and the MOSFET.
One more thing about TVS in general. Check the fine print about what they really can withstand in terms of pulse width and energy. Short ESD pulses are "easy", but an unclamped load dump pulse can fry the poor TVS. The standards dictate 10 load dumps at 1 minute intervals for a pass and each pulse will increase the die temperature and the clamping voltage.

Zener diode D2
The upper limit for the zener diode is approximately the maximum input voltage for the LDO, but you can select a lower zener voltage also. In my application I selected a zener that would make the voltage clamp circuit bypass all normal operating battery voltages and just clamp overvoltages. The output voltage of the clamping circuit is not as regulated and smooth as the output from an LDO.
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Powering Arduino and switches from 12V automotive battery
« Reply #15 on: May 22, 2015, 10:24:59 pm »
IMO zeners TVS etc can actually reduce reliability. In this field it's common for the fix to cause more trouble than than the problem it's trying to prevent. AKA " the cure worse than the disease". Some of these internet Rube Goldberg proposals are entertaining though.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 2038
  • Country: us
Re: Powering Arduino and switches from 12V automotive battery
« Reply #16 on: May 22, 2015, 10:33:54 pm »
Once more the sky is falling.  In my day we would just build things.  If they blew up then we would search for a reason.  I always put something in series to absorb the spike or slow it down (inductor or resistor) and a big cap.  If you listen to everyone here you will never get anything done.  Just don't put 5V relays on the same power as a micro.

Wisdom comes from knowledge.
Knowledge comes from experience.
Experience comes from bad decisions.
 

Offline ApexM0EngTopic starter

  • Contributor
  • Posts: 12
Re: Powering Arduino and switches from 12V automotive battery
« Reply #17 on: May 22, 2015, 10:36:20 pm »
TVS, zeners, and other shunt protectors are of little value w/o at least SOME small resistance between the source. You can rely on wiring and source impedance but that is risky. In my experience a fuse, a penny 1n4007, and a big cap, followed by generic 7805 will last years in typical automotive environment. I'm talking hundred volt transients here too.

Certification and liability issues a different story.

?
EDIT: Forgot to draw in ground/power on arduino
« Last Edit: May 22, 2015, 10:44:39 pm by ApexM0Eng »
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: Powering Arduino and switches from 12V automotive battery
« Reply #18 on: May 22, 2015, 11:37:13 pm »
Assuming this is for personal use it's very close to what I would do. Maybe a regular penny 1n4007 in series before that zener to help with reverse voltage but the main point is KISS philosophy prevails. Not exactly Arduino but I've had more than a dozen of those mega chips similar setup in vehicles for nearly 20 years now with not one failure. Since you have a real Arduino you might consider a 9v reg instead of 5v and take advantage of the Arduino regulated in for double isolation and safety.  No direct experience with the 2940 in automotive nor do I see the need for LDO (I used 7805) but I do like the basic idea behind that setup.

ps. Is that a fuse after the zener? If so probably better to put that first in the chain. Many don't know those may be an ohm or two and make very good "small R".

« Last Edit: May 22, 2015, 11:49:56 pm by paulie »
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 2038
  • Country: us
Re: Powering Arduino and switches from 12V automotive battery
« Reply #19 on: May 23, 2015, 01:43:53 pm »
The diode is nice to have because in some 12V applications the 12V will drop to 7V for a short period.  The cap can supply voltage for a short time and not be discharged by external loads.

Relays are always a safe bet in these applications. Just drive a 12V relay with a FET or transistor and put a diode across the coil.
« Last Edit: May 23, 2015, 02:01:46 pm by Seekonk »
 

Offline ApexM0EngTopic starter

  • Contributor
  • Posts: 12
Re: Powering Arduino and switches from 12V automotive battery
« Reply #20 on: May 25, 2015, 03:35:53 pm »
The diode is nice to have because in some 12V applications the 12V will drop to 7V for a short period.  The cap can supply voltage for a short time and not be discharged by external loads.

Relays are always a safe bet in these applications. Just drive a 12V relay with a FET or transistor and put a diode across the coil.

Yup. Our project group was just about to roll with this too. I'll put the diode in for reverse voltage, switch the location of the fuse, and it looks like we are good to go to start specing the rest of the parts.
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1334
  • Country: gb
    • bitdynamics
Re: Powering Arduino and switches from 12V automotive battery
« Reply #21 on: May 25, 2015, 06:55:33 pm »
I guess you realise an automotive "12v" system doesn't actually operate at 12v yeah?

(typically, the alternator / generator will regulate to between 13.8V and 14.7V, which is dangerously close to your 15V TVS.  I'd recommend at least a 22V zener as the main clamp device........)
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1562
  • Country: 00
Re: Powering Arduino and switches from 12V automotive battery
« Reply #22 on: May 25, 2015, 07:14:53 pm »
many automotive rated regulators are rated for 40V and still need protection
maybe it could be done easier by using tricky galvanic insulation from car 12V automotive battery using... two banks of supercapacitors, where powered electronics runs on disconnected charged caps, while another caps are charged from 12V automotive battery and this can be done quite easy using step down buck converters and high voltage rated mosfets  ;)
Maybe using something oldschool like magamp in those insulated power sources could help easy deal with possible transients without worry to damage mosfets, etc, but i haven't tested it yet, so it is still rather concept, not a solution I've used for years or so  :popcorn:
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline ApexM0EngTopic starter

  • Contributor
  • Posts: 12
Re: Powering Arduino and switches from 12V automotive battery
« Reply #23 on: June 05, 2015, 07:01:26 pm »


Fuse for current protection (small internal resistance).
Reverse voltage diode.
LC current limiter and transient suppression.
TVS cutoff over voltage protection (14.5VWM)
Small C for high freq.

Sources.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
http://electronics.stackexchange.com/questions/71698/diy-protection-for-12v-electronics-wired-directly-to-a-marine-12v-battery-system
http://linuxcar.sone.jp/reg.en.html
http://www.maximintegrated.com/en/app-notes/index.mvp/id/4240



Tried simulating this. The lowest TVS diode I could find in the library was a 24V one :-//, and the gen diode library was small. Had some errors and might not be set up completely right, but if that's the response I get, then great.

« Last Edit: June 05, 2015, 09:35:16 pm by ApexM0Eng »
 

Offline ozwolf

  • Regular Contributor
  • *
  • Posts: 166
  • Country: au
Re: Powering Arduino and switches from 12V automotive battery
« Reply #24 on: June 06, 2015, 09:19:35 am »
Well this will piss off a few people.  We just shoved 12vdc (+-3vdc) into a Freetronics "Eleven" inside a VW Golf GTI to run a gear shift indicator for track days.  It's my step-son's daily driver, and no problems so far.  It's been running for many months now.

I emailed Freetronics early in the project, and they didn't think there would be a problem.

As said earlier, sometimes you just build it and see what happens.

Ozwolf
I reject your reality and substitute my own.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf