Noisy Weekend… How Electromagnetic Interference caused a several day project delay

John Galvin Blog Leave a Comment

Everything during the span of the project we were doing was going well so far, almost too well! Then, we hit a “brick wall”. The microcontroller was having issues getting the messages to the strips of LEDs. They were behaving sporadically, doing seemingly whatever they wanted to do. several days later, the mystery was solved and the suspect was a noisy data line, or aka Electromagnetic Interference.

What is Electromagnetic Interference (EMI)?

EMI happens when magnetic fields come into range of a wire and fluctuate the voltage enough to mess up the data being transmitted. Magnetic fields can come from several several places nowadays. With the amount of RF from Wi-Fi to cell phones to FM and AM radio to even telephone lines, EMI can happen almost anywhere and wreak havoc on lower voltage lines. One of our portfolio companies, Exacter Inc., actually has devices out in the field specifically to measure EMI to detect issues and outages on high voltage telephone lines. EMI is more common than you may think, that is why phone lines, coax lines are “shielded” and why many CAT type of wires use what is called a twisted pair method, which will be explained later.

The EMI that delayed “BRITE’n Up Dave Grohl Alley” project

Starting back when we first put up the first 5 strips of LED lights, we started noticing random flickering and random LEDs flashing in the strip. We researched and this was a common problem with the micrcontroller we were using, except this wasn’t the case this time. The microcontroller we are using works on 3.3v logic, with our LED strips which use 5 volt logic (But are 3.3v compatible). So in theory this should work so we ruled out the data line voltage pretty quickly. We went through several other theories like:

  • Voltage Drop from the power supplies to the strips
  • Noisy power
  • Broken Microncontrollers
  • PoE not providing enough power to the microcontrollers
  • Grounding issues
  • and more…

After day 6 of no results I decided to make the full circuit on my bench at home. Only then I figured out the amount of noise in the data line (due to the length and 3.3v voltage) was the cause of the issues we were having. Since 3.3v is near the lower edge of an acceptable voltage for a HIGH state for the LEDs, the noise was dropping the voltage to a point where the LEDs didn’t understand what was HIGH and LOW. Using my oscilloscope I found that the longer the data wire was, the noise in the wire was too significant for the LEDs to understand what was HIGH and LOW. Luckily this was only a few hour fix for all 10 microcontrollers we were using. I simply stepped up the logic level with a logic level shifter and then ran the now 5v data line to LED strip. This fixed all the issues. Although there may still be noise in the line, the LEDs can now better determine the 1’s and 0’s, or HIGH and LOW logic.

Although this is not usually a way to deal with EMI, it worked in our case and was the most cost effective way to fix the issue. I go into further explanation about the more common methods of fixing EMI.

More common methods of blocking EMI

Shielding


Shielded wire is basically where the wires are wrapped in braided wiring (such as aluminum or copper) that is usually grounded. This “shield” over the wires takes in any interference hitting the wire and shorts it to ground. To show you this, I’ll use a coaxial cable as an example. Below is a diagram pulled from techtarget.com.

You may recognize this wire as what brings many people’s internet into their homes and what brings cable TV into homes across the world. Coaxial lines use the shield as the common ground and cover the singular data line in the center of the wire. This significantly helps block out any EMI that is cause by the many wires running alongside a coaxial cable, such as the high voltage lines on telephone poles.

Twisted Pair

Another way of decreasing EMI is called twisted pairs. Twisted pairs are exactly what it sounds like, twisted pairs of wires running alongside each other. Each set of twisted pairs is twisted at different intervals, which eliminates crosstalk between the wires. The idea behind EMI with twisting a data line with its ground essentially, is that the current flowing both ways and both affected nearly the same by EMI, can cancel it out or can be detected by the receiver and cancelled there.

Twisted pairs are used commonly in CAT lines (most commonly used with ethernet and phone wire). A photo of a CAT6 wire from wireandcabletips.com is shown below.

There is a combination of the two above that is often used which is a shielded twisted pair cable, which is named CAT7. This type has each twisted pair shielded in foil and then all the twisted pairs are shielded with braided wire together. This is shown below with a diagram from https://infinity-cable-products.com:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.