Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

switching 220 V AC electric bulb using relay through arduino

Status
Not open for further replies.

phrbob93

Member level 1
Joined
Mar 28, 2014
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
Jalandhar, punjab
Activity points
343
my aim is to switch an electric bulb operating at 220v AC..for this purpose i use a 12V DC relay that can operate for 220 V appliance according to its data sheet.
my relay circuit is
https://obrazki.elektroda.pl/5442830400_1421232984.png


now, when i use a regulated power supply( i have used a desktop PC's SMPS unit for power supply that gives 12v, 5v, and 3.3v) then if i give 5v from that power supply to the pin of microcontroller , i get a click sound from the relay and the bulb gets ON and when the pin is kept open bulb get off( Every thing is fine till now relay circuit is working)
but when i use an arduino uno board for the same purpose (i have 12v, 5v, 3.3 v and gnd pins on the board so i give all of the supply from the board itself now not from the seprate supply)
when i connect 12v gnd and 5v at the pin that goes to MCU pin the relay is making noise.. i am getting a continues clicking sound from the relay.. that means relay is switching continusly... and if i connect the bulb to it it may damage my bulb( i assume, coz relay is switching fast and continuously)

why iam getting the noise of clicking continusly when i use arduino instead of the power supply
now how i could solve this problem ? any suggestions?
 

Mrunal Ahirrao

Full Member level 2
Joined
Nov 26, 2012
Messages
133
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Location
India
Activity points
2,213
I am having less experience with arduino, but by experience on other microcontrollers, I am feeling that the pin at which you are applying 5V is not constantly applied because of which the relay is switching continously following your discontinous 5V touching to input. But i hope there are many who help on this forum so post your code.
 

phrbob93

Member level 1
Joined
Mar 28, 2014
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
Jalandhar, punjab
Activity points
343
I am having less experience with arduino, but by experience on other microcontrollers, I am feeling that the pin at which you are applying 5V is not constantly applied because of which the relay is switching continously following your discontinous 5V touching to input. But i hope there are many who help on this forum so post your code.

i know the problem i want solution
and i dont think there is any code needed applying 5 volt directly to the pin for MCU should switch the relay to normally open.. but its like it is switching on and off continuously( fast clicking sound)
 

--BawA--

Advanced Member level 1
Joined
Nov 28, 2012
Messages
479
Helped
43
Reputation
86
Reaction score
42
Trophy points
1,318
Location
Noida, INDIA
Activity points
4,926
I presume that all the connections are tight , how did u power the arduino?
make sure that you give atleast 8V to Vin pin or DC jack of arduino . I have seen some errorneous operations when arduino is powered with 5V at Vin pin.




Regards
 

paulfjujo

Advanced Member level 4
Joined
Jun 9, 2008
Messages
1,453
Helped
295
Reputation
590
Reaction score
278
Trophy points
1,363
Location
France 01800
Activity points
10,263
hello,

What is the coil resistance (ohms) value of your 12V relay ?
Arduino output level is 5V ?
How do you drive your relay, show your schematic.
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
Power for the relay is not sufficient and hence you see the relay chatter.
 

Ogu Reginald

Full Member level 6
Joined
Oct 7, 2011
Messages
369
Helped
47
Reputation
94
Reaction score
46
Trophy points
1,308
Location
Nigeria
Activity points
3,391
I presume that all the connections are tight , how did u power the arduino?
make sure that you give atleast 8V to Vin pin or DC jack of arduino . I have seen some errorneous operations when arduino is powered with 5V at Vin pin.




Regards

I agree with the above, check well to see if all the pins are connected very well to avoid partial contact. I also suggest you using another arduino to see if you are still getting the same experience.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top