Editorial credit: Ollyy / Shutterstock.com
Some people like to say that, “ignorance is bliss.” If you don’t need to understand something, why bother? Personally, that idiom doesn’t jive with me, I enjoy learning about new things and find that seemingly unrelated knowledge can often help me in my work or life in general. As a software developer you may not have concerned yourself much with the world of electromagnetic interference (EMI). It’s typically a subject for PCB designers and electrical engineers, but I think you’ll find that delving into EMI can give you a more complete understanding of how the systems in a connected car interact. Vehicles with advanced driver assistance systems (ADAS) are stuffed to the brim with electronics, many of which have a high risk of propagating EMI. There are a variety of design best practices that can be implemented to mitigate this electronic noise, but they may be missing for a variety of reasons. You may not have a great degree of control over the electrical systems, but there are a few things you might be able to do that can limit how EMI affects your sensors and software.
What is EMI?
I’ll mainly be addressing radiated EMI here, so we’ll focus on that. You may remember from your physics courses back in college that an electric current in a wire can produce a magnetic field. This magnetic field can then induce an electric current in any wires, or conductors, within that magnetic field. This is the essence of radiated EMI. Connected cars are rife with this kind of noise because they have lots of conductors packed into small spaces. The results of EMI can range from unnoticeable to system failure.
Cars can have lots of trouble with EMI because of the way the electrical systems are routed. The EMI radiated from a wire becomes weaker at greater distances. In cars, though, wires are routed through the body of the car in tight, confined spaces. This means that any EMI coming off one line is probably going to be strong enough to influence the other lines around it. Cars are already chock full of wires, and with more sensors and electronic systems being added every day, this problem can only get worse. Adding to the problem is the fact that many data lines are transmitting at different rates. These disparities cause even more complex EMI that can hamper your systems in unexpected ways.
Well, a little noise never hurt anyone right? Not necessarily. I’ve written before about cybersecurity in ADAS cars. Hackers have been able to inject malicious code through data streams, or corrupt incoming information so often that the main controller assumes a sensor is broken and turns it off. That second problem could easily be caused by EMI. If there’s a noise wire next to a sensor’s data transmission line, it could corrupt the data. If that happens often enough the processor will assume the sensor is damaged and disconnect it. Data corruption could also result in false negatives or positives coming in from sensors. None of those results are good and could result in ADAS features failing while the car is in motion.
Your car is full of unintentional antennas.
There are a wide variety of physical methods that can mitigate EMI in an electrical system. Some of them are more helpful than others, but all of them add cost to the car. That’s one of the main reasons that these practices are not implemented.
Short Routing - Long wires can act as transmitting or receiving antennas. High speed data lines have a particularly high risk of radiating EMI like an antenna. Keeping runs short can mitigate this problem.
Twisted Pairs - Routing high speed lines in twisted pairs can help cancel out noise being generated from high speed runs.
Grounding - Proper grounding is essential for EMI reduction, especially at the PCB level. If the boards you use are well grounded it will help them resist the effects of EMI.
Consider using wireless communication systems to reduce EMI.
You may not be able to change the specific designs in an electrical system, but there are a few ways you might be able to contribute. Anything on your chips or in your code that deals with frequencies is one area to watch out for. You could also consider pushing for a switch to wireless communication systems, which can greatly reduce unwanted radiation.
Frequency is something you have to be very careful with in electrical systems. As I mentioned earlier, high speed data lines are particularly troublesome when it comes to EMI, because they generate high frequency EMI. If you get to choose the oscillator for your microcontroller, be careful to use one that doesn’t interfere with radio bands that you’re using. You should also be watch out for PWM signals. Since these signals can be fast switching they are notorious for generating noise. If your PWM is causing problems, adjust the frequency until it is no longer interfering with the system as a whole.
Wires are one of the primary causes of EMI in ADAS vehicles, so why not remove them? There are already many other reasons to switch to wireless systems, and this could be an added benefit. If the majority of your data transmission is wireless that removes both potential EMI transmitters and receivers from the system.
The counterpoint to “ignorance is bliss” is “knowledge is power.” I hope you feel more empowered knowing some of the main contributors to EMI that can interfere with your systems. If you do get a say in the electrical design, try to push to implement those design best practices. They can really make a difference in your vehicle. If not, watch out for which frequencies you generate or use and be sure they don’t interfere with sensors or other electronics. Implementing wireless wherever you can may also help remove the risk of interference.
Now that you know how EMI works and how it can affect your system you’re one step closer to great software. Another major part of that process is choosing the right programs to help you write your code. TASKING makes tools that are built specifically for the ADAS vehicle industry. Things like standalone debuggers to help you speed up development and a static analyzer that can find bugs will make your job easy.
Have more questions about EMI? Call an expert at TASKING.
About the AuthorVisit Website More Content by Altium Designer