Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Best way to run a 328 from a car battery
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Forum Index -> General
Author Message
FFMan



Joined: 09 Jan 2010
Posts: 223

Posted: 17 May 2010, 19:48 PM    Post subject: Best way to run a 328 from a car battery Reply with quote

My little shift light project proved solid and reliable during the weekend race test. So now the prototype needs to get small and most importantly powered from the car (the prototype was powered by a lipo).

The race car doesn't have an alternator but does have an unsuppressed igntion system. I've been using a standard linear reg with the lipo but will this be ok on the batt, and should i place a few capacitors here and there to filter any spikes ?

What circuit should I use to run from the battery ?

The prototype was also in a grounded metal case, is this a sensible carry over to the final verison given the RF emanting from the HT side of the ignition ?

thanks
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 17 May 2010, 20:31 PM    Post subject: Re: Best way to run a 328 from a car battery Reply with quote

FFMan wrote:
What circuit should I use to run from the battery ?
The automotive electrical environment is pretty brutal. Even if you were running on your own separate battery you still have lots of EMI to deal with. To get started understanding the problems and some solutions, you might want to study EMI Design Techniques for Microcontrollers in Automotive Applications.

FFMan wrote:
The prototype was also in a grounded metal case, is this a sensible carry over to the final verison[...]?
It's a good start but every wire into/out of the case provides a path for EMI to get into your circuit. You'll have to provide signal condition on every external input and provide protection on every output. Opto-isolators will help but they cannot be used on every line, e.g. analog inputs/outputs.
Back to top
FFMan



Joined: 09 Jan 2010
Posts: 223

Posted: 17 May 2010, 21:14 PM    Post subject: Reply with quote

that is sobering reading, i must have been lucky so far but i need to take some steps clearly.

thanks don
Back to top
spamiam



Joined: 13 Nov 2005
Posts: 666

Posted: 17 May 2010, 22:41 PM    Post subject: Reply with quote

FFMan wrote:
that is sobering reading, i must have been lucky so far but i need to take some steps clearly.

thanks don


I have used a LM2940 regulator with good results in a harsher than usual automotive environment. Pay attention to the ESR of the cap as the datasheet says.

Big spikes can get through to the electronics. A MOV and/or a TVS can help. Beware that I had a TVS fail as a SHORT (not open). You need a fuse too. I use a polyfuse so it will self-reset if the short condition disappears.

You can use an inductor in the power from the car to help filter.

You can put a low pass filter on VCC to devices. 10-47 ohms resistance and a 4.7uf - 10uf cap can help to damp spikes too.

Put clamping diodes wherever possible on inputs.

Use as few interrupts as possible using external signals. Preferably none.

Put flyback diodes on as many relays & solenoids in the car as you can get to. They cause some huge spikes when they are turned off.

-Tony
Back to top
twesthoff



Joined: 17 Mar 2006
Posts: 191
Location: Fredericksburg, VA

Posted: 17 May 2010, 23:11 PM    Post subject: Automotive applications Reply with quote

Many of the major semiconductor manufacturers now make special IC's for use in automotive applications. TI makes voltage regulators that are designed to withstand the normal automotive environment. One example is: TLE4275 5V regulator. The voltage regulator is only one part of the solution and some of the other ideas suggested may have to be done.

See:
http://focus.ti.com/lit/sg/sgzb002e/sgzb002e.pdf

http://focus.ti.com/apps/docs/appcategory.tsp?appId=209

I'm sure other manufacturers have similar information available.

If you let us know some details about the inputs and outputs you circuit is using, we may be able to suggest what to try.
Tom W.
Back to top
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 18 May 2010, 2:29 AM    Post subject: Reply with quote

Toyota's people that mistakenly believe that the engine control unit is flawless need to that document. And review the how-to on life-critical firmware design and test.
Back to top
FFMan



Joined: 09 Jan 2010
Posts: 223

Posted: 18 May 2010, 7:55 AM    Post subject: Reply with quote

this app is very simple. There is an rpm interface module from Stack (http://www.stackltd.com/index.html) that has a single wire to the switched side of the coil. the interface cleans this up to a nice square wave and this is fed into a pin on a zx24 (to be changed to a 328l or 328n in final model) where i use caputreinput to provide the timing info to work out the rpm. The interface is currently powered from my onboard 11v lipo.

the outputs simply consist of 4 LEDS in a pod each with associated transistor driver.

on the enclosure itself (which is metal at the moment and grounded) there is a 3 position (centre off switch) that starts the code with one of two settings (wet or dry) simply by optionally grounding a pin input.

There is also an activity LED that flashes at various rates but this may be ommitted in the final version.

Any help on how to run this from the 12v batt direct much appreciated.
Back to top
FFMan



Joined: 09 Jan 2010
Posts: 223

Posted: 18 May 2010, 8:05 AM    Post subject: Reply with quote

i should add i used this circuit to good effect before http://www.seetron.com/an_vpwr1.htm to run a picture-in-picture box in the car that used to be 240v powered and used for CCTV. It works a treat but the regulator alone is £20 for the 1 amp version, but i'll be ok with the 400ma verison in this app which uses a cheap linear reg.
Back to top
twesthoff



Joined: 17 Mar 2006
Posts: 191
Location: Fredericksburg, VA

Posted: 18 May 2010, 11:28 AM    Post subject: Reply with quote

That power supply circuit should do well. Use the analog version, that regulator is very cheap. Don't use R1 (as it mentions). Put the regulator circuit and all of the rest of the parts in the metal box and you should be good to go.

Mount the tab of the 7805 regulator to the metal box to act as a heat sink.

The RPM interface module you are using should protect the input lead.

Tom W
Back to top
spamiam



Joined: 13 Nov 2005
Posts: 666

Posted: 18 May 2010, 12:03 PM    Post subject: Reply with quote

I have had a LM7805 fail in my car. It did not have enough protection, but it still is not rated for automotive conditions. It needs to tolerate jump starting, and load dump, at the very least. As I said, I have had good results with a LM2940, and it is reasonably inexpensive!

The zeners are OK in the circuit from Nuts & Volts, but you are probably better served by TVS diodes, which are designed for this purpose. Unidirectional will be fine, rather than bidirectional. They can handle the power of the spikes. A plain old zener may not. Something like a 1.5KExxA, where xx is the breakdown voltage. A MOV (metal oxide varistor) is not a bad idea too.

It is a good idea to have the 6V diode on the output of the regulator too!

When I was designing something recently, I ran my design past a real EE, who does power supply design for Linear. He was not too happy with my use of devices rated for 30-something volts for automotive application. He much preferred 100V ratings if at all available.

A load dump from an alternator is a horrible thing. There is a document somewhere on the web about the subject, and it is quite harsh.

-Tony
Back to top
FFMan



Joined: 09 Jan 2010
Posts: 223

Posted: 18 May 2010, 12:13 PM    Post subject: Reply with quote

thanks for the feedback

fortunately no alternator here but the engine starting process may give rise to some nasty spikes too.
Back to top
twesthoff



Joined: 17 Mar 2006
Posts: 191
Location: Fredericksburg, VA

Posted: 18 May 2010, 12:58 PM    Post subject: Reply with quote

The 5W zener on the input will protect the regulator just fine. I have used similar circuits for many years with no problems. The only thing I might add would be a small series resistor between the fuse and diode, but it would depend on the maximum current the circuit would use and I don't know that.
Back to top
FFMan



Joined: 09 Jan 2010
Posts: 223

Posted: 18 May 2010, 13:02 PM    Post subject: Reply with quote

max current draw is 200ma, mostly down to the ultra bright leds i need to use for outdoor use.
Back to top
sturgessb



Joined: 25 Apr 2008
Posts: 246
Location: Norwich, UK

Posted: 18 May 2010, 13:23 PM    Post subject: Reply with quote

Being the bodger that I am, I just stuck a zx24n, 7805 and xbee under my hood in a solid abs enclosure secured to the bulkhead, connected directly to the 12v battery.

Been using the setup for a few days now, seems fine.

Time will tell i guess
Back to top
twesthoff



Joined: 17 Mar 2006
Posts: 191
Location: Fredericksburg, VA

Posted: 18 May 2010, 13:43 PM    Post subject: Best way to run a 328 from a car battery Reply with quote

It is common to have voltage spikes up to 100V on automotive 12V rails.  You may have problems later.  Some type of high voltage spike suppression should be used.  As a minimum, put a zener or other device (such as Tony suggested) on the input to the regulator.

On 5/18/2010 9:23 AM, General wrote:
Quote:
Being the bodger that I am, I just stuck a zx24n, 7805 and xbee under my hood in a solid abs enclosure secured to the bulkhead, connected directly to the 12v battery.

Been using the setup for a few days now, seems fine.

Time will tell i guess




Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> General Time synchro. with the server - Timezone/DST with your computer
Goto page 1, 2  Next
Page 1 of 2

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group