using relay with arduino ?

So guys i bought some Component for building relay circuit
1 5v dc to control 240vac
2. A diode
3.transistor
4. and 10k ohm resistor

so i am having problem with interfacing it with arduino i have connected my arduino output to coil but i am confused where should i connect my 230v ac load should i connect it to no and nc or no and com i am confused plzz help ? and sorry for noob question

many many thanks in advance

Please don't do this. You'll kill yourself.

saifkazi:
So guys i bought some Component for building relay circuit
1 5v dc to control 240vac
2. A diode
3.transistor
4. and 10k ohm resistor

so i am having problem with interfacing it with arduino i have connected my arduino output to coil but i am confused where should i connect my 230v ac load should i connect it to no and nc or no and com i am confused plzz help ? and sorry for noob question

many many thanks in advance

Hmm If you are newbie you shouldn't work with 230 V it's dangerous. Anyway, if you want more detail show us the schematic of your connections.

Hmm If you are newbie you shouldn't work with 230 V it's dangerous

Do you have any experience working with High voltage ?

i have connected my arduino output to coil

That doesn't sound right . Can you draw a schematic and post a photo ?

The coil should be switched by the transistor with the diode across the coil and the arduino output should drive the transistor through a resistor. What you describe does not sound like that.

Here is my schematic diagram

As I know I connected my relay right but having problem connecting relay to my load

That's wrong.
The flyback diode ALWAYS goes across the relay coil.
FLYBACK DIODE with relay

Also, the relay should have +Vcc on one end of the coil and the collector of the transistor on the other end.

Either you schematic is wrong or your wiring doesn't match the schematic because the relay is not connected to any power source in the schematic. see the schematic in link above for correct wiring.

If you are going to take the time to draw the schematic, take the time to draw the power source and ground for the lamp load.

Not that matters much at this point but your transistor is mislabeled. the emitter is the one you labeled "C"
and vice versa. (the base is correct if that's any consolation)

I feel compelled to tell you your relay is also mislabeled. You can't put your load across N.O. & N.C.
It goes to COM and N.O. or COM and N.C. depending on whether you want it normally open or normally closed. In short, there is nothing correct about your schematic except the base of the transistor.

Also the light will never come on as it is connected to the outer contacts and not to the common.

Weedpharma

What book is this circuit from? I want to make sure I do not ever refer to it!

Weedpharma

saifkazi:
I know I connected my relay right

Except you didn't: as pointed out the diode must be across the coil.

but having problem connecting relay to my load

Here's a nice schamatic.

Your load needs to have one side on the Common terminal; the other goes to Normally Open or Normally Closed, depending on your choice of it being normally off or normally on.

OHh i was referring that book it was arduino workshop of 65 project handbook

Hey, he actually got part of that circuit with the diode wired in series from an Arduino project book! :astonished: :astonished: :astonished:

Look saifkazi, we really mean it when we say, if you do not have the experience to know these things, please abandon any project which involves the power mains until you have a lot more knowledge. Even if you could assure us you were a licensed electrician we would still be concerned about your clear lack of comprehension of electrical circuits.

Go buy a "Powerswitch Tail" kit if you absolutely must, assemble that carefully according to the instructions, close the casing and you can connect it to your Arduino.

but i cant abandon the project :confused: its college project i just want to glow my 230 v ac bulb any how and there is nothing such thing called licensed electrician in india most of them dont know what i am doing :confused:

weedpharma:
What book is this circuit from? I want to make sure I do not ever refer to it

saifkazi:
OHh i was referring that book it was arduino workshop of 65 project handbook

Paul__B:
Hey, he actually got part of that circuit with the diode wired in series from an Arduino project book!

Did I miss something?- where is the relay in that circuit?, or is it on the next page or something. Looks to me like OP guess where the relay goes: if he'd put it across the diode he'd have been ok?

Go buy a "Powerswitch Tail" kit if you absolutely must, assemble that carefully according to the instructions, close the casing and you can connect it to your Arduino.

My thoughts exactly.

saifkazi:
but i cant abandon the project :confused: its college project i just want to glow my 230 v ac bulb

Your Prof should be strung up by his @@@@@ thumbs.

Follow the pic in the link I posted, wear rubber gloves and shout "CLEAR!" before you hook it up to the mains.

JimboZA:
Did I miss something?- where is the relay in that circuit?, or is it on the next page or something. Looks to me like OP guess where the relay goes: if he'd put it across the diode he'd have been ok?

My thoughts exactly.

its there in page with power mark just see it

Here's a nice schamatic.

Your load needs to have one side on the Common terminal; the other goes to Normally Open or Normally Closed, depending on your choice of it being normally off or normally on.

Gee, that sounds vaguely familiar....

saifkazi:
its there in page with power mark just see it

I read that as being the supply, not the relay. But hey, with Frizings it's never as clear as a schematic.

I loooove the 180 degree zig zag on the diode anode just to get the diode connected to the longer wire that goes to the collector.

OK, just checked out the book (page 52) - it is clearly misleading at this point and I can see from where he got the funny diagram - mistaking the power source for the relay which is nowhere to be seen in the diagram.

We can only echo and reiterate the clear warning on page 53 of the book:

If you want to control mains-rated electricity (110–250 V) at a high current with a relay, contact a licensed electrician to complete this work for you. Even the slightest mistake can be fatal.

If the course supervisor set as a project, something to control a 230/ 240V light bulb, then he is culpable.

I really doubt it. If you thought up this "project" yourself, then you need to choose differently. Maybe control a 12V light globe instead. It may appear we are "giving you a hard time" saifkazi, but nothing is further from the truth. The most important thing for success (including safety) is to work within your limits. You do not want to earn a Darwin Award.

Paul__B:
Maybe control a 12V light globe instead.

Good point, since as far as the Arduino and relay is concerned it's the identical thinking.

Paul__B:
the relay which is nowhere to be seen in the diagram.

Ah so it's not just me wondering where it was!