SSR (240VAC) - can it generate EMI and interfere with Arduino inputs?

Hi there

I have 4 Arduino-based systems which controls cameras and lights in a studio. I have just made a mains relay so that I can switch lights on and off automatically. The lights are 240VAC CFL horticultural growlight for plants, and each is 125W. I have just two at the moment, both connected to the same relay.

The relay is a SSR, specifically this one:
http://www.ebay.co.uk/itm/Control-Solid-State-Relay-SSR-40DA-40A-24-380V-AC-Module-Fast-Switching-/170802773696?_trksid=p5197.m1992&_trkparms=aid%3D111000%26algo%3DREC.CURRENT%26ao%3D1%26asc%3D14%26meid%3D5522530621313156198%26pid%3D100015%26prg%3D1006%26rk%3D1%26sd%3D170802773696%26

However, I have noticed that the Arduino has begun to do funny, erratic things. Could this be caused by the SSR and mains voltages? The Arduino controls the camera, and has digital input. When one of the Arduino pins is brought to ground, it triggers a sequence of things such as lights off / on, camera behaviour etc. However, the Arduino is seeing 'phantom inputs' i.e. no input signal is given, but it responds as if it has one. Pull Resistors are apparently active.

The input to the Arduino and the output from the Arduino to the SSR, are both in the same cable and share a ground with the Arduino. Could the presence of the SSR be causing the phantom inputs?

I have added ferrite clamps to this cable. No joy. I have ordered a mains conditioner which should arrive tomorrow, which I'll use to filter the mains to the Arduino power supply, and also the CFL lights (two separate conditioners).

I have also read this;
http://arduino-info.wikispaces.com/ArduinoPower

Does anyone have any ideas about this type of SSR and how it can adversely affect the inputs of Arduino?

Thanks
Rob

Hi everyone

I have an Arduino-based system that runs cameras and lights etc in a studio. The Arduino listens out for a digital input signal (fall edge on a pin that is held high), and upon this begins a sequence of things like firing a camera and turning 240VAC lights on and off via a SSR (see this post for details http://arduino.cc/forum/index.php/topic,148304.0.html)

However, the Arduino is seeing 'phantom' inputs and triggers events back to back. I was wondering if you knew any reason what might be causing this? The input is held high in code. The input and output to the SSR are on the same physical connector, i.e. the cable those two signals runs down is the same, and they share a ground. Could that be it?

The switch that sends the Arduino pin to ground is a digital switch (a Nikon MC36 trigger - MC-36 Multi-Function Remote Cord | Nikon).

Could it be EMI? I have added RF ferrite chokes to the cables, but they have not made any difference.

Any thoughts would be gratefully received!

Thanks
Rob

Any thoughts would be gratefully received!

I think I'd like to see your code.
I think I'd like to see your schematic.
I think I'd like to know if there is a pattern to the "spurious input".

Have you connected the grounds?

The input is held high in code.

No code can't do anything to an input.

Could it be EMI?

Possibly, what size are your pull up resistors?

It could also be contact bounce but as PaulS says we need more information.

Grumpy_Mike:

The input is held high in code.

No code can't do anything to an input.

It can enable the internal pull-up resistors. I assumed that is what the OP referred to.

Topics merged.
Please don't cross-post

I meant that the input was pulled high with the internal pull-up resistors, nothing more.

It's a modified one of these, but uses the same code as is online as it's open source;

I don't have the schematic but I can draw one for the additional SSR.

The internal pull ups are quite weak and in the presence of interference they can cause trouble. Use an external 4K7 pull upand seeif it helps.

  1. Keep the mains wiring well away from the wiring to the switches.

  2. Keep the wiring to the switches short if you can, and run the ground wire to the switches in the same bundle as the wires to the other side of the switches.

  3. Never use a common ground wire for both inputs and outputs, and never put input wires in the same bundle or on the same connector as output wires. The capacitance between the output and input wires is probably causing your phantom inputs.

If you have bundled the input and output wires together, then it should be possible to modify the software to ignore short pulses on the input wires and hence get round the problem; but it's better to avoid the problem in the first place.

Thanks DC42!

I've just about broken every one of your rules. Added a 4k7 pull up to no effect, and grounded the whole system now to earth via a AC in the relay system. That's improved things a little but there is still RF coming in, but it's now mostly refined to when the relay turns the CFL lights on - the process of switching them on triggers a false input on the Arduino. The relay has just one CFL on it and it's a 125W lamp, so not a huge load being switched, certainly not for a 40Amp relay.

Next stop is a firmware fix to ignore short trigger pulses and hopefully that will fix it.

Any ideas, do chip in. It's driving me up the wall at the moment.

The input to the Arduino and the output from the Arduino to the SSR, are both in the same cable and share a ground with the Arduino. Could the presence of the SSR be causing the phantom inputs?

I certainly wouldn't do that - its an obvious route for transients to produce spurious inputs.

Keep the SSR's and their control signals away from all sensitive circuitry, and never share a ground wire between
sensitive input devices and power / output devices.

You could add a 0.1uF or 0.01uF capacitor in series with a 100 ohm resistor between the Arduino digital input pin and ground (i.e. across the switch contacts). That should fix the problem.

Thanks! I'll try the capacitor and resistor idea tomorrow; which of the capacitor values would be best?

I agree the input and output need to be in separate connections, but that's not something I can do quickly sadly. Would require a good amount of work to detach them and drill in new connectors to the chasis. Something for a future amend when I have some down time.

The capacitor value is not critical. 0.01uF should be more than enough.