switching 220 V AC electric bulb using relay through arduino

Thread Starter

bobparihar

Joined Jul 31, 2014
93
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


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?
 

MagicMatt

Joined Sep 30, 2013
117
I think your 10k is supposed to be a pull-up or pull-down, not in series with the chip... if it were in series, I would go for something around 330ohm to 670ohm personally, and still have a pull-up or pull-down to stop the thing bouncing on/off before the chip is driving it. Check if the arduino already has pull-up or pull-down on the pin you're using though, as it's pointless to duplicate, and if you go the wrong way you make a voltage divider.
 
Top