2
\$\begingroup\$

Product Used - 12V 4 in 1 Relay Board (got it from eBay), Arduino Duemilanove, Ethernet Shield.

AIM - Control my Room Lights with Arduino. (Home Automation)

My Connection - Arduino is connected to ethernet shield as usual. Arduino is powerred with my Desktop PC. Relay Board is powerred with a 12V External supply and it's ground is connected to the GND Pin of Ethernet Shield. Light Bulb is connected to 220V supply and Relay 1 (of relay board) is connected as a Switch of Light Bulb (Using NO and COM Pins)

Problem Description - All my circuit is working fine. But, When I turn ON/OFF just me Relay Board (With 220V supply connected) everything works fine. But when I connect a Light Bulb running at 220V and try to control it with my Relay Board. It just turns ON once or twice, then my Arduino Hangs or Resets.

I have to turn off and restart my arduino to make it run back again.

Why is this Happening ?

I am using this Relay Board =>

enter image description here


Based on the image of the board and the described components the schematic should be like this

enter image description here

There is only a small ceramic cap that I see on the board image (lower right corner) but I'm not sure where it is connected.
Note that the schematic shows only one of the four relays but the circuit of the other three is identical to the one shown.

\$\endgroup\$

closed as unclear what you're asking by Matt Young, Joe Hass, Chetan Bhargava, Dave Tweed, Daniel Grillo Dec 25 '13 at 23:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ Can't read the markings on top of the relays... \$\endgroup\$ – Ignacio Vazquez-Abrams Dec 24 '13 at 17:58
  • \$\begingroup\$ HL, JQC-3FC(T73) DC 12V, 50/60 Hz, 7A 250V AC_SYMBOL | 10A 120VAC, 12A 120 DC_SYMBOL | 10A 24VDC, this is written on the Relay Instead of AC_SYMBOL and DC_SYMBOL there Symbols are Drawn \$\endgroup\$ – user3114179 Dec 24 '13 at 18:07
  • \$\begingroup\$ Do you have a reference/link to the board? It could help us view schematics and specs. \$\endgroup\$ – flup Dec 24 '13 at 18:08
  • \$\begingroup\$ How are you energizing the relays? \$\endgroup\$ – Ignacio Vazquez-Abrams Dec 24 '13 at 18:12
  • \$\begingroup\$ Cant provide Link. This Relay is no longer on ebay. Relay Board is Energized with a 12V Power Adapter \$\endgroup\$ – user3114179 Dec 24 '13 at 18:16
1
\$\begingroup\$

Current pulse is induced when switching on the load which end up building potential on sensitive part of your schematic and your digital circuit tolerates it badly.

You could have avoided it totally if you use optocoupling with zero-cross detection instead of relays.

Usually it is quite tricky to find exact piece of circuit which is disturbed by the power surge. Please tale a look at Atmel AVR Appnotes 040 and 042. They will give you some insight into which parts of your microcontroller are most vulnerable to surges and how to handle them.

I would try adding 0.1uF ceramic capacitor on atmega reset pin to ground and power your arduino board from the same 12V source as relay board. Usually power supply from computer tends to be less then 5V, your atmega168/328 is not guaranteed for stable work if fed less then 4.5 volts. Try to wire your power load lines as far as possible from arduino. At least do not wire them under atmega or close to atmega power/signal lines. You may also try shielding Arduino and also ethernet board from relay board.

Also try to keep ground connection and relay input control lines close together. Wire mess makes such things much much harder to handle.

EMC handling is a complex task. Above are only general guidelines, though they usually help if you remember them.

\$\endgroup\$
  • \$\begingroup\$ How does the power surge get to the atmega? Via the digital IO? \$\endgroup\$ – geometrikal Dec 24 '13 at 21:31
  • \$\begingroup\$ I tried powering relay board with arduino...but it is not solving the problem \$\endgroup\$ – user3114179 Dec 24 '13 at 21:35
  • \$\begingroup\$ Computer case and USB ground line is coupled to mains through filtering capacitors on the primary side of SMPS. Of course if you have proper earthing connection of your PC plug in your house mains routing then this is not the issue. But in many countries there is no earthing mains line, thus any USB device is having floating potential between mains power lines. Touching this potential with one's finger adds a capacitor (human body) to the circuit and the surge in the moment when potential of human body and the circuit equalizes. This small capacitance dis/charge or leak may cause malfunctions. \$\endgroup\$ – x4mer Dec 25 '13 at 7:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.