Jump to content
Sign in to follow this  
Taggsladder

Simple automotive question

Recommended Posts

Hello

 

I am working in a msp430 device that is going to be used in a car running of the cars battery. Everything is working fine but I need to know if it is safe to connect a digital input directly from the msp430 to the cars ground via a push button?

 

Best regards

Andreas

Share this post


Link to post
Share on other sites

There can be a lot of noise in automotive systems but I can't imagine ground will be a problem. I assume your MSP430's ground will already be connected to it anyway.

Share this post


Link to post
Share on other sites

Hi Andreas,

No product designed for use in a car would do this.

But you can probably get away with it.

Basically there are two issues.

One is obvious, what happens if the wire contacts 12V? At best, the MSP430 would lose that pin, permanently.

The second issue is that a long wire that leaves your circuit is an antenna. You can get false inputs, and in a bad case, latchup. It is also a minor source of EMI leaving your circuit.

At the very least, please put a low value (470 ohms is a good choice) in series with the MSP430 input pin before it leaves the enclosure.

For full protection, also add a low value (10nF) capacitor from MSP430 input pin to ground. Parallel the capacitor with a small zener diode, 3 to 3.6 V.

Cheers, Bob

Share this post


Link to post
Share on other sites

@@Taggsladder

 

I wouldn't suggest grounding the switch locally. Run a wire back to the MSP430.

 

Besides the issues @@frosting mentions, it is entirely possible to have various ground potential differences within the body / chassis of the vehicle, and some can be quite excessive, particularly if an inductive load happens to ground near your switch. Even an audio amplifier nearby can dump a few volts into the ground system.

 

Other considerations may be how many other devices ground through the body / chassis, and what is the gauge of the wire connecting said grounds to the battery?

 

My 1991 Toyota pickup has a 6" or so section of either 10 or 12 AWG connecting the cab to the battery; cab sets off the chassis on rubber isolation bushings so is electrically isolated from the chassis. All the electrical components external to the engine / chassis ground through the cab and thus through that little piece of wire: headlights, radio, air conditioner / heater blower motor, et cetera. I get a pop in the stereo when turning on / off the headlights, get a pop and hear a whine when turning on the blower, and the door open / lights on buzzer is heard in the stereo too.

 

Overall, it's good design to have a single, common ground point for devices.

 

Back when I was designing and building RV's, each circuit / device had its own ground path back to a single point where everything, including the battery connected. We very rarely tied multiple circuits with dissimilar functions together, the main exception was tying the shore power, inverter/battery charger and load center grounds to the chassis, which was also connected to battery (-), for ground fault protection of the entire vehicle; this also gave GFCI protection to the tow vehicle as well when it was connected to the trailer.

Share this post


Link to post
Share on other sites

Thanks for the reply!

 

I want the setup to be as of a good practice as possible of course. I was a little skeptical about doing it this way but I thought I could get away with it and avoid all problems connected with a positive input (spikes etc.).

 

On the contrary what is the best/min. components, yet good pratice way to use a positive input instead?

 

I am going to make a couple of these devices so I need to take number of components and the time it takes to solder them in to consideration. Best would be if there was a finished PCB to buy that would do the job. Maybe a step down of some sort, will it do?

 

Like this http://www.ebay.com/itm/390855989060

 

Or can it not handle the automotive systems?

 

Or just a 12v relay?

 

Kind regards,

Andreas

Share this post


Link to post
Share on other sites

One thing to realize is that a 12v automotive system is rarely at 12v. It can dip below 10v during starting, and to nearly 15v when charging the battery. Turning headlights on and off can cause the voltage to fluctuate until the charging system can compensate. Malfunctions in the charging system can also take the electrical system to over 50v.

 

If you're averse to building your own solution, an option could be automotive / USB power adapters, but if you need more than 1/4-1/2 Ampere current, that's not viable.

 

If this were something I was planning on selling, or otherwise make it available for others to build / install, I'd consider things like reverse polarity protection- someone, somewhere WILL hook it up backwards eventually, as well as noise filtering and overload protection.

Share this post


Link to post
Share on other sites

Hadn't even thought of the ground bounce issues ... That is pretty amazing @@abecedarian , a little 10-12ga grounding wire :D

I do recall doing a "ground kit" on my previous car that seemed to quiet down the engine noise (could have been all in my head though).  Never bothered to try that with my current vehicles ... now this thread has me wondering if that would be an interesting experiment to try :)

Share this post


Link to post
Share on other sites

 

 

One thing to realize is that a 12v automotive system is rarely at 12v. It can dip below 10v during starting, and to nearly 15v when charging the battery. Turning headlights on and off can cause the voltage to fluctuate until the charging system can compensate. Malfunctions in the charging system can also take the electrical system to over 50v.

 

If you're averse to building your own solution, an option could be automotive / USB power adapters, but if you need more than 1/4-1/2 Ampere current, that's not viable.

 

If this were something I was planning on selling, or otherwise make it available for others to build / install, I'd consider things like reverse polarity protection- someone, somewhere WILL hook it up backwards eventually, as well as noise filtering and overload protection.

I have a base unit that has those features and is working great. This is for a addon to recognize when the ignition is turned over. So just a basic digital input to the msp430. First I thought I could go with a manual push button to GND and avoid all the problems with a positive input but as many said it is not a good manner to do so, so I just need a simple way of converting the automotive positive from the ignition to a simple digital input to the msp430.

 

Best regards

Share this post


Link to post
Share on other sites

I have a base unit that has those features and is working great. This is for a addon to recognize when the ignition is turned over. So just a basic digital input to the msp430. First I thought I could go with a manual push button to GND and avoid all the problems with a positive input but as many said it is not a good manner to do so, so I just need a simple way of converting the automotive positive from the ignition to a simple digital input to the msp430.

It's not bad, either positive or negative requires pretty much the same treatment. I have designed many products used in autos and trucks. A resistor, a capacitor, and a Zener diode is ample protection for an input pin. If you are using the internal pullup or pulldown in the MSP430 then it might influence the choice of resistor value, use a higher value if you are sensing a 12V signal(4.7K or 10K is fine). But the basic three parts are all you need. Use a white or blue LED if you don't have a 3.3V Zener. Or two reds in series.

Regards, Bob

Share this post


Link to post
Share on other sites

The preferred method would be to use an opto-isolator between the auto and MCU systems' switching circuits; guaranteed isolation from 12v spikes.

 

 

 

@@spirilis - yeah, I kind of choked when I saw that. But, I forgot about the #14 that goes from the cylinder head to the firewall / bulkhead so I have more ground capacity than I thought. :D

Share this post


Link to post
Share on other sites

The preferred method would be to use an opto-isolator between the auto and MCU systems' switching circuits; guaranteed isolation from 12v spikes.

 

I'm not trying to start anything here, but if you look inside a car's ECU you will not find a single optoisolator.

Share this post


Link to post
Share on other sites

Back in the 90's it was a common thing to see opto-isolators in all the 68HC11 based engine computers. They were relatively slow.

 

Today, with all that direct injection technology and multiple spark discharge stuff, I bet the opto's would slow the signals down too much.

 

My bet is that you will probably find a ton of current limiting, series resistors and transorbs instead.

 

At least, that's how I would do it.

Share this post


Link to post
Share on other sites

There is a difference between "what works now" and "what works regardless". So no need to argue at all.

 

If I chose "what works now" over "what works regardless", my motorcycle would have been running up and down the streets a year ago.

 

That's all I have to say.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...