Go Down

Topic: LEDs blinking from Electromagnetic Interference (EMI) (Read 7074 times) previous topic - next topic

Wmtasker

I am using this equipment to run my reef aquarium.  I am using an Arduino Mega 2560 to control LDD-700s for my LEDs and a 8 channel relay board for my wavemaker and heater. Whenever one of the relays turn off and disengages, I get a blink on any of my LEDs that are off at the time. 

I have a 48 VDC 5A power supply to run my LED drivers (5 x LDD-700H) and a 12vdc 3A power supply to run my Arduino Mega 2560 and cooling fans. I have a 5v 3A power supply to give power to my relay board. In order to control all the PWM LED drivers, the relay board, and PWM fans, everything is on a common ground. I think I might have to isolate the relay board with its own 5vdc power supply that doesn't share the same common ground.

I found this youtube video explaining pulldown resistors.  A pull-down resistor goes from the wire to ground.  I just need to figure out the size of the resistor and which pin to connect to.  The video says that I need a resistor that is 10 times the impedance of the pin?  Vin+ and Vin- on my driver are always on.  So I would think that the resistor would have to be placed on the PWM signal wire and ground.  But will this interfere with the dimming of the lights?  I think I need a 10K Ohms resistor would be the right size. I haven't confirmed that this will work as I am still reading.

I am also considering putting a diode (IN4001) on the GRD wire going to the Relay board to try and suppress the surge from the relays when they disengage going back the mega 2560, but this is also a theory.

Below is my Relay Board. I believe that the second largest-sized chip on that board marked "M7" on it is the diode. I think the stripe next to the "M" indicates the cathode side. There is one for each relay and I don't know if it is connected to GRD or not. I think this relay is to only protect the board from the surge and not any thing else connected to it. 

Any thought on the issue would be great.  Thanks.

http://arduino.cc/en/Tutorial/DigitalPins
http://youtu.be/BxA7qwmY9mg
http://www.meanwell.com/search/LDD-L/LDD-L-spec.pdf
http://www.ebay.com/itm/261072878568?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

Richard_Laue

Quote
I am also considering putting a diode (IN4001) on the GRD wire going to the Relay board to try and suppress the surge from the relays when they disengage going back the mega 2560, but this is also a theory.


This is the first thing I would do. A relay is controlled by a coil, putting a current through the coil produces a magnetic field, that pulls the switch lever. Releasing the current releases the switch, this is our desire.

Lets go back to electro magnetic theory, take a wire put it near a changing magnetic field and we have an electrical generator, producing a current. The faster the filed changes the more current.

Now back to the relay which is energized, the electricity is creating a magnetic field in the iron core. This is good, and we want it. We now turn off the coil, the iron cores magnetic field will collapse at a very fast rate, allowing the switch to turn off. This is good and gives us our desired effect.

Now back to our theory we have a coil of wire around a iron bar with a very high magnetic field that is collapsing, This is exactly how an electrical generator works. Not good for us, and known as Back Electrical Magnetic Field. We now have a very high current that has the potential to fry our circuit.

We all have herd static in the AM radio when running a high powered motor, say a drill, or vacuum. Back emf is the source of this static, and comes from the brushes that or switching on an off many times a second.

A very good and simple explanation on Back EMF can be found at http://www.progeny.co.uk/Back-EMF-Suppression.aspx

Can't say if those LED's or blinking from the Back EMF or not but I can say the EMF will give you much grief and shorten the life of your Arduino.
 
Put those diodes in, and sin no more.

Wmtasker

Thanks Richard for taking the time to post here.  I see this was your first post, so welcome to the forum.  I have only been doing this for a month now and I am really green. 

The diodes were going to be my first choice but I have been reading about a Opto-Isolated relay board. It is made just for this kind of problem.  I was playing last night and noticed that only the relays that have a load on them (pump) will give me enough EMF to cause LEDs to blink.

One last thought.  The program I am running has the pins set to low at a resting state then turn high to energize the relay.  I know this would have to be changed to run the Opto-Isolated relay board, but it means that GRD is normally being applied to the relay board when not energized.  Can the EMF travel on this line and should I also have a diode running between the relay pins and the arduino pins?


http://yourduino.com/sunshop2/index.php?l=product_detail&p=156

Wmtasker

I tried the diode on the ground wire and it didn't work. I might have to try them on the signal wires also.

Grumpy_Mike

Quote
Can the EMF travel on this line

Yes
Quote
and should I also have a diode running between the relay pins and the arduino pins?

No.

Quote
I might have to try them on the signal wires also.

No.

Capacitors and inductors are used to stop EMI. See:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
http://www.thebox.myzen.co.uk/Tutorial/Protection.html
http://www.digikey.com/us/en/techzone/microcontroller/resources/articles/protecting-inputs-in-digital-electronics.html

Wmtasker

What about the use of a pull down resistor on the input pins of the relay board?

Grumpy_Mike


What about the use of a pull down resistor on the input pins of the relay board?

What about it?
I can't see it affecting anything here.

Richard_Laue

Quote
I was playing last night and noticed that only the relays that have a load on them (pump) will give me enough EMF to cause LEDs to blink.


This changes things somewhat.

How much of a load and what voltage are we talking about?
Are the relays rated to handle what you want them to?
An underrated switch could cause a spark when it is turned on and off.

Have you ever turned a switch and noticed a spark are heard a crack, signs of a switch about to fail?

A note about the diodes:
The diodes across the coil are put there to stop the reverse polarity voltage produced by the collapsing magnetic field across the coil. Depending on the mass of the iron rod in the coil this reverse voltage can be considerably higher than the operating voltage of the relay.
We don't want this getting into the chip.

Thanks for the welcome.
I've been a member for a while since I'm new to the Arduino, have mostly been reading.

My first computer program I wrote on a PDP-8 in the late 60s. dad brought a terminal home, connected at a whopping 110 BPS!

My mom says I was born with a battery in one hand and a light bulb in the other.
Around 4th grade I made my first motor out of nails paper clips wire, and scraps around the house.

Ive been running Linux so long I can't remember much about that other operating system.

Chagrin


The diodes were going to be my first choice but I have been reading about a Opto-Isolated relay board. It is made just for this kind of problem. 


From your earlier posts, the red relay board you have already has optoisolation capability. It requires that you remove that jumper and use another power supply for the relay coil side.

http://arduino-info.wikispaces.com/ArduinoPower

Wmtasker



The diodes were going to be my first choice but I have been reading about a Opto-Isolated relay board. It is made just for this kind of problem. 


From your earlier posts, the red relay board you have already has optoisolation capability. It requires that you remove that jumper and use another power supply for the relay coil side.

http://arduino-info.wikispaces.com/ArduinoPower



At first I thought so also.  The Opto-isolation relay board at the website you listed has a jumper from Vcc to JD-Vcc.  In order for this relay board to work, the digital inputs from Arduino are Active LOW: The relay actuates and an Pumps turn on when the input pin is LOW, and turns off on HIGH. You must connect "Vcc" to Arduino +5 volts but do NOT connect Arduino Ground.  Remove the Vcc to JD-Vcc jumper. Connect a separate +5 supply to "JD-Vcc" and board Gnd.

The Board I am using has a jumper from GRD to Com.  It works opposite of the Opto-isolation relay, the digital inputs from Arduino are Active HIGH: The relay actuates and an LED lights when the input pin is HIGH, and turns off on LOW.  I tried to follow the same directions by connecting "GRD" to Arduino GRD but do NOT connect Arduino +5vdc.  Remove the Com to GRD jumper. Connect a separate +5 supply to "VCC" and board Com.  Nothing Happened. I put the Arduino GRD to the COM pin and The separate 5vdc GRD to the GRD pin on the relay board.  Everything worked fine, but the LEDs still Blinked.

I remember writing a program like the game Zork when I was 13, but after that I really went a separate way in life.  I wish I went computers but I went into the medical field instead. Some people just write program like they are having a conversation.  That has never been me.  It takes a lot of thought for me to write.




How much of a load and what voltage are we talking about?
Are the relays rated to handle what you want them to?
An underrated switch could cause a spark when it is turned on and off.

Have you ever turned a switch and noticed a spark are heard a crack, signs of a switch about to fail?


I've never noticed a spark or heard anything other than the normal click of the relay. I listed the links to the relay boards and pump data sheet.  It says that the relay board is equiped with high-current relay : DC30V 10A AC250V 10A. The pump is rated at AC120V 20W 380mA. I don't think that is to much, but I have been none to miss things from time to time. 


Relay Board: http://www.ebay.com/itm/110983062639?var=410149497719&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

Pumps: http://www.f3images.com/IMD/UserManuals/AS90512.pdf

Richard_Laue

I saw the ratings of the relay but wasn't sure about the pump.

I'm stumped.
But will let it chew in the back of my mind.

Wmtasker


I saw the ratings of the relay but wasn't sure about the pump.

I'm stumped.
But will let it chew in the back of my mind.


I have temporarily fixed it with an extension cord going across the house.  I have two AC 120v plugs coming into my box that houses everything.  One plug is to run my power supplies that run my arduino and LED drivers.  The other AC plug goes to my eight plug outlets that is controlled by the relay board for pumps and heater. I got an extension cord to plug the AC cord for the relays across the room.  Now no blinking.  I need to find a permanent solution other than the extension cord or running a different circuit to the wall.

Wmtasker

Could I just have one of the circuits on your run of the mill surge protector? Or do they protect from a different kind of surge?

Go Up