Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. 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.
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
upload_2015-1-14_16-3-26.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?
 
The 12V from the big PSU should go only to the top of the 12V relay.

If you want to run the Arduino on 5V (bypassing its internal regulator), feed 5V from the big PSU to the 5V pin on the Arduino (look at the Arduino documentation). Do not connect anything to the DC input pin of the Arduino.

If you want to run the Arduino on 12V (utilizing its internal regulator), feed 12V from the big PSU to the DC input pin on the Arduino (look at the Arduino documentation). Do not connect anything to the 5V pin of the Arduino.

The Common (0v) from the big PSU should connect to the emitter of Q1 and to the GND pin on the Arduino.

A single wire from an Arduino port pin to R1.
 
It's always possible that the load is too light for the PC Power Supply to regulate properly. Try adding something else with a higher load on the 12V rail in addition to your circuit :)
 
The 12V from the big PSU should go only to the top of the 12V relay.

If you want to run the Arduino on 5V (bypassing its internal regulator), feed 5V from the big PSU to the 5V pin on the Arduino (look at the Arduino documentation). Do not connect anything to the DC input pin of the Arduino.

If you want to run the Arduino on 12V (utilizing its internal regulator), feed 12V from the big PSU to the DC input pin on the Arduino (look at the Arduino documentation). Do not connect anything to the 5V pin of the Arduino.

The Common (0v) from the big PSU should connect to the emitter of Q1 and to the GND pin on the Arduino.

A single wire from an Arduino port pin to R1.

first of all thanks for the help

now i want to tell you that i have a arduino development board which runs on a 12v dc power supply and the board is able to supply 12, 5, 3.3 V on its own there is no need of external PSU if i use arduino itself..
 
First measure each supply voltage and see if one is not stable. (12V) A scope is best but a simple meter will probably work.

If the 12V and 5V are good then look across the transistor. When it is on you should get less than one volt. C-E Probably closer to 0.3V. If there is too much voltage C-E on the transistor then change the 10k resistor to 4.7k or 2.2k and try again.
 
Your description of how you are connecting the various supplies to the circuit(s) is not clear.

Please provide a schematic showing the UNO's and your relay circuit's connections to your PSU. Also, the minimum current needed by the relay.

Your code (program, or "sketch") controlling the UNO would also be useful.
 
Your description of how you are connecting the various supplies to the circuit(s) is not clear.

Exactly, that is why I wrote the long description of how they should be hooked up.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top