Is Arduino friends with cars ? Common ground question.

I am working on my project car arduino setup and I came across 2 different statements for grounding.
First please remember I am new to this and i google and develop trough trial and error a lot.

So statement 1 I read was arduino project grounds need ALL to be connected somewhere together.

And statement 2 I read was that cars have a lot of interferances and you should use minimal ammount of common ground and supply voltages as possible. (Somebody went as far as to even use battery powered arduino as car battery voltage will screw signals up ... ?)

So before i continue with my schematics I need to clear up what I can and can not connect to car ground.

I WILL be using car to at least supply my needed 12v to relays and step-down to 5v arduino also.

Project so far:
So far i have button block (5 modes), a height sensor at every wheel (so 4 height sensors), 5 pressure sensors at trunk and 8 channel relay block (12v) also at trunk.
Button block has 2 push-lock switches and one 3-way toggle switch. So one +5v input and 5 output wires (arduino reads if high or low. Ground will be common to chassy, or if needed i will run an 7th wire for ground).
Height sensors have 3 pins: +5v in, ground and signal output (0.5v to 4.6v).
Pressure sensors also have 3 pins: +5v in, ground and signal out (should be allmost same out values).
Relays will have 1 wire per channel (so 8 ) and vcc (+5v)(9 wires total), ground and JD-VCC will be 12v supply from car.
I could provide schematics after I figure out this issue

For example I planned to wire height sensors as follows:
Supply ground from nearest chassy ground point.
Supply +5v from a common 12v to 5v converter to 4 sensors directly (it will supply ALL 9 sensors, buttons and arduino)
And run all 4 signal output wires directly to arduino pins.
Is this a really stupid idea and should I run 2 wires (+5 and ground) from arduino to all 4 sensors and then signal back?

Also I planned to make +12v bus bar (big wire in and to relay supply and solenoids that relays operate) and converted +5v bus bar (9 sensors , 5 buttons and arduino supply).

So, how wrong am I ? :cold_sweat:

//Edit

Relay board 8channel 12v

Pressure sensors:

150 psi

Input: 0-150 psi

Output: 0.5-4.5V linear voltage output. 0 psi outputs 0.5V, 75 psi outputs 2.5V, 150 psi outputs 4.5V

Accuracy: +/-0.5%FS

Thread: 1/8" NPT

Wiring: Red for +5V; Black for ground; Green for signal output

Overload Capacity: 2-4 times of rated pressure

Working Temperature: -40°~+120°

Compensation Temperature: 0°~+80°

Protection Class: IP67

Pressure Medium: Oil, gas and water which is compatible with 316L stainless steel

Load Resistance: ≤(supply power-6.5V/0.02A)Ω

Long-term Stability: Less than 0.1%FS/year

Temperature Effect on Zero: Typical:0.02%FS/°; Maximum:0.05%FS/°

Temperature Effect on Sensitivity: Typical: 0.02%FS/°; Maximum: 0.05%FS/°

Shock Resistance: 1000g

Anti-Shock: ≤+/-0.01%FS(X,Y,Z axes, 200Hz/g)

Response Time: ≤1ms

Insulation Resistance: >100mΩ 500VDC

Explosion-proof Class: ExiaTTCT6

Electromagnetism Compatibility: EN50051-1

Other components dont have more info than I allready described.

Button board I will make myself, nothing mutch to it,as I said allready: 2 latching buttons and one 3 way slide switch. (Sure it needs resistors later to avoid debouncing etc, I learn as I go...)
Heigh sensors are replacement parts, they have 6 pins, are widly used by audi, bmw and mercedes. Have not yet found a datasheet for them, only instructions from where I know pin 1 is ground, 4 is signal and 5 is +5v in. Thats all I need to know.

Note: Will be used in old car w/o a lot of electronics. (1990 Mercedes E-class)

Can't advise from your description. Need to see a wiring diagram and links and or datasheets to relay board + other components.

If NONE of the devices you are describing interact with the existing automobile systems, then all the common or "ground" wires from your devices should return directly to your system and NOT use any automobile chassis or body parts for the return.

Then have a single connection from your system to the automobile chassis ground. Some systems will want you to connect directly to the battery - connection, but modern automobiles have a current sensor between the battery - and chassis so don't connect to the battery - terminal, just to the frame or chassis or whatever MB does.

Paul

Thank you Paul.

Do you also know what is the reason not to use chassis grounds ? Is it resistance or other positive wires manupilating some way ?

Example: Arduino is located in the trunk and its ground connection is directly to the chassis there, and a sensor in lets say engine bay has its ground also directly to chassis but at engine bay.

Also how sensitive is arduino to large speaker magnets, should i try to keep arduino lets say 50cm away or is it even neccesary/better to use some kind of a isolated box (still needs a fan ventilation hole for summers).

I appreciate the contributon !

// Edit.
This now may be a really stupid question but it does not matter if i ground sensor that uses +5v and a solenoid that uses +12v to same point ? (I just have seen lables like -12v and -5v inside a computer power supply, made me doubt.)

kalakonto:
Thank you Paul.

Do you also know what is the reason not to use chassis grounds ? Is it resistance or other positive wires manupilating some way ?

Example: Arduino is located in the trunk and its ground connection is directly to the chassis there, and a sensor in lets say engine bay has its ground also directly to chassis but at engine bay.

Also how sensitive is arduino to large speaker magnets, should i try to keep arduino lets say 50cm away or is it even neccesary/better to use some kind of a isolated box (still needs a fan ventilation hole for summers).

I appreciate the contributon !

// Edit.
This now may be a really stupid question but it does not matter if i ground sensor that uses +5v and a solenoid that uses +12v to same point ? (I just have seen lables like -12v and -5v inside a computer power supply, made me doubt.)

The reason is two things. Yes, one is resistance of the various ground connections and the current that is going through that connection. Any resistance will produce a voltage, Ohm's law, you know! That voltage will either add or subtract from the "ground" that you Arduino is using to evaluate the various pins you read.

The other reason is the connection may act as a diode and will generate harmonics of the frequency of the fluctuating current going through the ground connection. Your Arduino sensor may be susceptible to one of those harmonics. They may only exist for a moment, but that may be an eternity for your program.

I am sure there may be other reasons, but those are the ones I am familiar with.

Magnets will have no effect on your Arduino, but if you use the speakers, the current changes in the wires will certainly effect your system by the magnetic field that is generated and radiated. Keep your Audio wires as far away from any of your sensor wires as possible.

Paul

(I just have seen lables like -12v and -5v inside a computer power supply, made me doubt

When it says this then it is a negitave voltage with respect to ground. Voltage is always measured between two points.

So if you measure between +5V and -5V you will have 10V. You connect the zero Volts or sometimes called ground together. If you connect -5V to ground you will get a short circuit and cause some damage to something.

All right, that clears things up.

Thanks all for the info, I do appreciate it, now I can continue with wiring scematics.

I am not an electrical engineer, and I'm learning along the way, but I've fooled around with micro controllers in cars for over 10 years.

It might be worthwhile to poke around the Megasquirt forums for some insight on electrical noise in cars. Here's an old doc I remember them putting together when the whole MS project was still early.

Some notes:

  • Your arduino will probably work fine if you tie in 12v from car directly to Arduino, but that is asking for trouble and it would be a good idea to step down voltage to 5v through a buck converter. They do a nice job at your first line of defense cleaning up noise getting into the Arduino through the main power system. I'm working on a Nano project right now and did that with a cheap converter. I have not seen any noise in the Arduino. This is on a 98 Toyota 4runner.

  • On an old 61 Pontiac, I put a capacitor on the alternator lug that cleaned up noise, I can't remember how I sized it, but it worked well. An oscilliscope will give you a very good look at what you are looking for. It's a great tool, and for automotive applications, you really don't need a fast one; they are very affordable. That old car schooled me in electrical noise. I went as far as braided ground straps between engine block and body.

  • Any sensors you are using should ground back at the Arduino. This avoids ground loops and will keep your sensors as accurate as possible.

  • Any of your Arduino wiring should avoid proximity to other power wires, especially high current wires, electric motors, or alternator. If you can't avoid them, cross them rather than run parallel along with them.

  • Sensor wires can be twisted to help avoid picking up EMI. A drill makes fast work of it. VR sensor wires are especially susceptible to EMI, but it does not sound like you have any VR sensors. A metal braided shielding sleeve over any wires that do pick up noise can help a lot, it should be grounded at only one end.

  • Automotive sensors are slow and you can put a low pass RC filter in your circuit to eliminate any high frequency blips that might show up on your sensor inputs. For some thermistors I am wiring in, I used 100k resistors with 0.1uF capacitors on a low pass filter which has a cutoff frequency of 15.9Hz and time constant for step response of 10 milliseconds. That's negligible for my thermistors and I'm sure the same for your height sensors.

  • If you trigger mechanical relays from your Arduino, use a flyback diode. The standard Bosch automotive relays I think require 160mA to trigger the coil and close the circuit which is too much for an Arduino pin, but you can use an NPN transistor:

Hi,
What model Arduino are you using?

Tom... :slight_smile: