Go Down

Topic: arduino hangs when connected to 220v supply through relay (Read 1 time) previous topic - next topic

jonyjakee


i am trying to control the home appliances through the arduino board. when i connect the led and test it, it works good. but when i connect to the 220v appliances through relay my arduino functions with two or three controls and it gets hangs up and doesnt funtion until i press reset. please help me, where i am wrong.

pylon

As you're not supplying much information, I'm guessing wildly. Maybe the relays draw too much current during activity or produce too much noise. Do you have a schematics of your circuitry? What are the technical details of your relays? Links for them?

Grumpy_Mike

Interference from your appliance is probbly upsetting the arduino. Look for things like snubbers or surge supressors to add on to your mains appliance to cut this down.

jonyjakee


Do you have a schematics of your circuitry? What are the technical details of your relays? Links for them?


its a simple circuit. i am connecting my 3rd,5th,6th pin to led(getting good output). when i connect the same pins to relay and other pins of relay with 220v appliance as switch, it gets hanged up.

winner10920

Is it a 5v relay that draws less than 30ma? If not you need a transistor and a diode tp power the relay

Nick Gammon

Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

JimboZA

My understanding based on numerous posts in this forum, is that even if the Ardy can provide the current, it should be protected from any inductive device by a diode....

(Edited a bit, didn't make sense before)
No PMs for help please. Not active on this forum any more.

jonyjakee


PeterH

You certainly need a diode across the relay to absorb the EMF when you turn it off, and unless the relay coil draws less than 20mA you need to drive it via a transistor.
I only provide help via the forum - please do not contact me for private consultancy.

jonyjakee

please give me the transistor circuit. i am having confusion with it.

JimboZA

Have a look here. About halfway down it explains using a transistor as a switch, as well as the protection diode.
No PMs for help please. Not active on this forum any more.

jonyjakee

i am choosing now to use optocoupler to solve the problem. i am using optocoupler pc-817.

here is the sample optocupler diagram.

please help me to use the appropriate resistors to use with it. because i got many different resistors value in using it.


Arrch

Is the Arduino trying to turn on/off the light (OUTPUT), or is it trying to read it's state (INPUT)?

jonyjakee

Quote

Is the Arduino trying to turn on/off the light (OUTPUT), or is it trying to read it's state (INPUT)?


Arduino trying to turn on/off the 220v appliances

Grumpy_Mike

Those resistor values are a good start.
The LED side goes to the arduino. The transistor side goes to another transistor that then drives the relay.

Go Up