EMI problems in my automated home

Hello fellow Arduino'ers,

I have been working on my home automation system for some time now and have tried to develop an entire home automation system from scratch. I know it might not have been the correct way to go but I wanted to go all-in on my own system.

Here goes:
I have an Arduino mega that is the systems controller. This receives all push button inputs (27 of them).
At first I used the INPUT_PULLUP functionality of the arduino to connect them. I have read info on reducing the pullup value to reduce EMI susceptibility so I moved from INPUT_PULLUP to regular INPUT and added in 4.7K resistors to my pin inputs.
All of the push buttons are connected via cat5e twisted pair cable (these can run up to 10-15m [30-50ft] long)

The arduino mega also controls 4 relay boards with 8 relays each. so 32 relays in total. For each group of lights I have 2 relays. 1 to switch "L1" and 1 to switch "N". I also have 2 rollershutters that are controlled by 3 relays each.

2 biggest issues:
Issue 1: random turning on of lights. I'm suspecting the twisted pair cables to be acting like antennas and triggering the arduino to switch the relays. This happens at random intervals. By adding the lower pullup resistor this seems to have already decreased a lot.

Issue 2: basically the same issue as issue 1 but this time I know what causes it. Whenever I switch my rollershutters they do what they are supposed to do. But the problem is when:
-If I stop the rollershutters programatically before it reaches its limit there is no issue.
-If the rollershutters are stopped due to hitting their limits this causes a burst of EMI and randomly switches on/off one of my lights.

What I've tried :

  • smaller pullup resistors
  • moved the relay board that controls the rollershutters away from the arduino

This link gives some extra advice but not all of it is possible to apply.

On top of that I don't really know what the MOV's do and how I would have to hook them up.

Any advice would be greatly appreciated as this is my actual home and having random lights turn on and off isn't making the misses happy :slight_smile:

have you tired to use shielded CAt5 or CAt6? if you have, have you properly terminated the shield at both ends of the cable to ground?

within the Ethernet cable, which conductors are you using? they are not all equal in that the green and orange pairs have more twists per inch as they are meant for the transmit and receive for data. the extra twisting gives them better noise immunity.

you can also get EMI ferrites
http://www.mouser.com/ProductDetail/Fair-Rite/0431176451/?qs=sGAEpiMZZMsuct6UGZJC7Y9vIXAljJDikeChCeI2X9w%3D

which the Ethernet cables will pass through to help alleviate noise on the line. if you were to have several coils/wraps of the Ethernet cable (around 2-3) you will get better performance.

how are the cables routed? are they routed in parallel to your home's 115 VAC power structure/conduits? are they in close proximity to any motors/inductive loads, are they in close proximity to any florescent light fixtures?

other things that can help is a shielded enclosure for the arduino and or the relay boards.

http://www.tech-etch.com/SHIELD/images/board_level_shielding.jpg

On top of that I don't really know what the MOV's do and how I would have to hook them up.

MOVS are actually what is inside your average surge suppressor/power strip and they are what protect your equipment from power surge related damage. not all MOVs are equal in that they have a "clamping" voltage (the voltage at which they activate). as most MOVs are meant for standard 115 VAC or 220 VAC power, they typically activate around 300 volts or so. since your system is using the arduino logic voltage of 5 VDC, you will need a MOV with a clamping voltage of around 20-30 volts.

Hey Wallace,

Thanks for replying.

have you tired to use shielded CAt5 or CAt6?

Didn't use shielded cable and as all cables are already in the walls, this is not something I can change at this stage. Didn't think this entirely through when I started the project.

within the Ethernet cable, which conductors are you using? they are not all equal in that the green and orange pairs have more twists per inch as they are meant for the transmit and receive for data. the extra twisting gives them better noise immunity.

Aha! to change this it would require me to put pin connectors on all my cables which would be a hassle but this is something I will definitely keep in mind. This is something that could still be possible. As murphy would have it I used the blue and the brown off course :confused: ....

you can also get EMI ferrites

I've been looking into ferrites and this was going to be my next adaptation.

how are the cables routed? are they routed in parallel to your home's 115 VAC power structure/conduits? are they in close proximity to any motors/inductive loads, are they in close proximity to any florescent light fixtures?

They are routed all over the place. As I mentioned, I didn't think about EMI :frowning: they do at points run parralel to the 220VAC power lines. and in 2 locations they are close to the roller shutters. No florescent light fixtures though. Only 220VAC Led spots.

Might have to look into the shielding options you mentioned as well. but I hope the ferrite beads will help for now.

For the MOV's is it correct to understand that if I would connect them parallel over the roller shutters up- and down phase and common, that this would make the motor send out less EMI?

Thank you already for your detailed suggestions.

Rgds,
Yoni

Another idea I have been playing with:

Would it make sense to feed the buttons with a 12-24V supply and then step down to 5 Volt to feed the inputs of the Arduino? Would my cables be less susceptible for noise if I do that?

As the EMI would need to generate a current in the lines that translates to 12V or 24V ?

thanks.

a higher voltage would generally make the system less susceptible to a point. that is something you can look into.

the MOV would go across the signal line from the arduino controlling the relay at the relay end of the wire. you may also try adding them to the output of the relay if you continue having issues.

it is unfortunate that you are not able to change the cable to shielded wire, as this alone would probably fix all of our issues.

before you buy MOVs i would try the ferite beads and changing your wiring over to the orange and green conductors. that may be enough to fix your issues.

It might be that your EMI noise bursts are of much shorter duration than the time the push button is held down. If so you might be able to debounce them in software by delaying for a few milliseconds then reading the input again to separate the good readings from the false ones.

Ferrites or parallel capacitors are other ways to swamp out noise.

Agree on the debounce of the signals from the switches, or any signal that is coming from a remote location. Depending on how you wired your system, this may be the only way to reduce the false hits.

How are you using the CAT5 cable? If you are not using a differential driver and receiver for your signals coming from the switches, the twisted pair is of little use.

If you are using one of the wires in a pair to source the voltage to the switch and the other wire of the pair to return the switch signal, you are really only using straight wires. Same goes for if you are using a pair as the source and a pair as the return. These are just paralleled conductors.

The way twisted pair works by ignoring signals that appear on both wires, such as induced noise. The signal you are looking for is sent down the pair as a +/- signal that is received by a differential input and usually turned into a +/gnd referenced signal.