Offline
Newbie
Karma: 0
Posts: 46
|
 |
« on: July 11, 2012, 04:59:16 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Switzerland
Offline
Faraday Member
Karma: 69
Posts: 3256
|
 |
« Reply #1 on: July 11, 2012, 05:05:09 am » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 272
Posts: 25464
Solder is electric glue
|
 |
« Reply #2 on: July 11, 2012, 05:14:48 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 46
|
 |
« Reply #3 on: July 11, 2012, 05:39:39 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 3
Posts: 1712
|
 |
« Reply #4 on: July 11, 2012, 06:17:41 am » |
Is it a 5v relay that draws less than 30ma? If not you need a transistor and a diode tp power the relay
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #5 on: July 11, 2012, 06:19:41 am » |
its a simple circuit.
Simple enough to post, so we can help you?
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #6 on: July 11, 2012, 06:22:15 am » |
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)
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 46
|
 |
« Reply #7 on: July 11, 2012, 06:39:54 am » |
here is the circuit.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Tesla Member
Karma: 89
Posts: 6332
-
|
 |
« Reply #8 on: July 11, 2012, 06:45:01 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 46
|
 |
« Reply #9 on: July 11, 2012, 07:35:47 am » |
please give me the transistor circuit. i am having confusion with it.
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #10 on: July 11, 2012, 07:55:20 am » |
Have a look here. About halfway down it explains using a transistor as a switch, as well as the protection diode.
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 46
|
 |
« Reply #11 on: July 12, 2012, 12:22:20 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
California
Online
Edison Member
Karma: 38
Posts: 1844
|
 |
« Reply #12 on: July 12, 2012, 12:35:21 am » |
Is the Arduino trying to turn on/off the light (OUTPUT), or is it trying to read it's state (INPUT)?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 46
|
 |
« Reply #13 on: July 12, 2012, 01:35:36 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 272
Posts: 25464
Solder is electric glue
|
 |
« Reply #14 on: July 12, 2012, 03:30:10 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
|