Has anyone fitted an Arduino in their vehicle and suffered EMI issues?
I've started building an Arduino based dashboard for a 4x4 buggy. I got as far as making the physical dashboard to hold the LCD and Arduino, connecting it via a buck (to protect against surges or high voltage). But when I connected the first sensor, a Hall based speed sensor, the interrupt on falling edge readings went bezerk, presumably due to electromagentic noise. I've ordered some shielded cable to connect the sensor and see if that helps. Any thoughts?
Interestingly, if I connect the same speed sensor to the vehicle ECU (the factory microprocessor that manages the engines injection system), then the ECU reads it just fine. Presumably an ECU has advanced filtering.
More info:
Arduino Mega
Buck converter between vehicle fuse box and Arduino (I was hesitant to connect directly)
Speed sensor is simple hall effect. Currently takes power from vehicle fuse box and ground from chassis. Signal wire is regular auto cable.
I am thinking to power the sensors off the Arduino 5v instead.
I planned to use a 18B20 digital temp sensor to monitor engine temp (inside a brass machined housing)
I hoped to also connect the resistive fuel level sensor and maybe current sensor to monitor winches. And tilt sensor.
I hoped the Arduino could drive the coolant warning light and tilt warning
LCD to display amps, fuel level, temp
I'm thinking I may need to put a filter between the power supply and the Arduino.
You can also try a lower-value pull-up or pull down resistor, depending on the current capability of the hall effect sensor. (You do have a pull-up or pull-down, right?)
1k is probably OK, but when it comes to noise pickup, lower is better.
If that's happening when the engine isn't running it's probably wired wrong or you forgot the pull-up/pull down.
When the engine is off the speed sensor works fine. I'm using the internal pullup. A diode removes the hall sensor highs as the sensor is on 12v at the moment, so the sensor only emits lows. I can remove the diode once I get the sensor running on 5v. The next test is to see if the coolant sensor suffers similar issues.
Low pass filters help a lot on inputs. Low impedance on external wires is best. Do not over design, generally sensing and response is not that time critical.
Automotive electrical system is very noisy and with a lot of spikes, pickup etc. In addition, ground is not the same voltage everywhere. GM tests their electronics to accept a 2.5V difference between the chassis and the battery negative.
Filtering is not too difficult, however physical layout of the wiring is very important.
I'm thinking I may need to put a filter between the power supply and the Arduino.
You will need to put filtering between everything and the Arduino. Every wire that enters the Arduino area is an antenna for noise.
I would suggest you look at NTC resistor instead of the 18B20. Just as accurate and much easier to filter.
For more robustness, every wire should enter the arduino housing at a single point. At that point every wire should have (at the minimum) of a 0.1µf capacitor to a single ground. You want to make a "barrier" at one spot where all lines are filtered.