Pages: [1] 2   Go Down
Author Topic: Relay Board Connection help  (Read 11088 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi I just bought a arduino duemilanove and a four channel relay board. I have searched many forums and articles but cannot find any basic instructions on how to connect it. here is a picture of the realay board http://cgi.ebay.com.au/Four-4-Relay-Board-24V-AVR-PIC-Arduino-DSP-8051-/120682553460?pt=LH_DefaultDomain_0&hash=item1c193da074#ht_939wt_1001 If anyone can please tell me what wires go where it would be much appreciated. Im just looking to control my 12v garden lights by pressing a key on my keyboard or clicking a on screen switch to turn the lights on and off manually. Thanks
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8472
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just looking at the photos I'd say connect any four digital OPs to IN1-4.

Connect the Arduino GND to the GND on the board.

What's not clear though is what VCC means in this context, a board like this shouldn't heed VCC from the Arduino (unless it's for the LEDs, or maybe the relay coils are 5v), and where does the 24v come from. There are two GND/VCC terminals, is one of them for 24v?

I would ask the suppliers for more details, a wiring diagram or a schematic.

Alternatively tell us the relay details (printed on the top) and trace where the GND/VCC signals go and tell us.

______
Rob

« Last Edit: March 17, 2011, 11:06:00 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks very much for your help. the terminal screw blocks where the relays are (nc, com, no) how do i go about connecting a extension chord socket to plug in a 240v light?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8472
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The PDF document (linked from the eBay page)
I didn't see that despite it being being bright blue and 400 chars long smiley

Correct, "VCC" is 24v.

Quote
the terminal screw blocks where the relays are (nc, com, no) how do i go about connecting a extension chord socket to plug in a 240v light?
NO = Normally open
NC = normally closed

Normally you would place the COM and NO terminals in series with any load.

I know how I'd connect the light, but I won't advise on a forum as you are supposed to be qualified to do such a thing.

______
Rob


Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry im a little confused with placing the COM and NO terminals in series with any load. here the electrical wires are:  brown = live, blue = ground, green = earth. witch ones do i connect to the terminals?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 5557
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry im a little confused with placing the COM and NO terminals in series with any load. here the electrical wires are:  brown = live, blue = ground, green = earth. witch ones do i connect to the terminals?

Here in the US, we have "black=hot, white=neutral, green or bare copper=ground"; I am not absolutely certain if what you are referring to as "blue=ground" is the same as our "white=neutral"; I know that where you are at that "earth" is what we USains call "ground". So it sounds like blue is your neutral...?

The fact that you are asking this question at all indicates that you aren't anywhere near ready to tackle something like this; this is the kind of thing that can get you sent to an early grave fast. Still, we all have to learn somewhere (just realize that neutral/ground isn't the same as ground/earth, even though it looks real similar when you look inside a break/fuse box).

Ok - so what you do:

1. Turn off the power - don't even imagine yourself doing any of this with live current!
2. Your NO and COMMON contacts on the relay are your switch; these need to be inline with the HOT/LIVE line (in your case, the brown line).
3. So - cut the line, strip a bit of insulation off, and hook each end under the NO and COMMON screws.
4. Tighten the screws extremely well; any slack here will induce a bit of resistance, and with enough current, that means tripped breakers or blown fuses.
5. Check your connections and everything else, then double check them.
6. Triple check them!
7. Keep your low-power lines (battery, low voltage lines, USB cables, jumper wires, etc) as far away from the mains lines as possible.
8. Don't handle the relay board after you turn on the power or plug in the wires, or whatnot, into live mains current!
9. Hook it all back up, turn on the power, and see if the magic smoke comes out.
10. No? Alls good, try a digital write to the pin to turn the relay on - your lamp or whatever should turn on.
11. Hopefully, your lamp or motor doesn't take more current than the relay contacts can handle - that could be a bad thing all on its own!

Good luck, and don't kill yourself.

smiley-wink
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks heaps mate for your help. i understand the risks an will get a electrician mate to give me a hand. thanks again
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8472
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well why didn't you say you have a mate who's a sparkie, go for it smiley

As Cr0sh says, but I'd add the following.

The board has four mounting holes so mounting it to something non-conductive would be a real good idea, just because no matter how careful you are you always forget, for example with such a light board the mains cable could easily pull it off the bench, and what's your first instinct, to grab the board and stop it falling. And if you grab it in the palm of your hand or between thumb and forefinger you won't be able to let go.

I've had two bad 240v shocks (and many tingles) and been lucky, trust me it's worth a few minutes to screw it to a piece of wood or something.

______
Rob

« Last Edit: March 18, 2011, 02:33:22 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

'round the world...
Offline Offline
Faraday Member
**
Karma: 42
Posts: 3223
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

US - Europe (not UK) - meaning
Black - Black - "Hot" or phase
White - Blue - Neutral
Green (or bare) - Green and Yellow - Ground.

It is fairly normal to call the neutral, ground and the ground, earth.

In the UK, the phase is Brown.
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are some similar boards that only require 5V...
=relay&s[title]=Y&s[short_desc]=Y&s[full_desc]=Y&s[sku]=Y&s[match]=all&s[cid]=0]http://arduino-direct.com/sunshop/index.php?l=search_list&s[search]=relay&s[title]=Y&s[short_desc]=Y&s[full_desc]=Y&s[sku]=Y&s[match]=all&s[cid]=0
(Schematics supplied)...
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A nice safe way for and Arduiono to control 110v AC (US style plug connectors)....

http://powerswitchtail.com/default.aspx

$20 per channel.

By the way... if you cause a fire with home-made connections to 110v electricity, you may find that your insurance company won't pay up. And/ or you may be prosecuted for endangering the emergency services personnel. Or for code violations.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8472
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
prosecuted for ... code violations.
Not even my code is bad enough to be prosecuted for, although I admit some might be pretty close smiley
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The following URL will take you to YourDuino site where they have safe opto-isolated relays.

The relays are good for 110v and 220v and are opto-isolated preventing you from any shock from the arduino board.(very safe). If you get shocked from the relay side then consider turning off the power of your house first. dah.
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=156
How to connect to the arduino sensor shield
http://arduino-info.wikispaces.com/ArduinoPower

A sensor shield should be purchased that stacks on top of the arduino uno.
(You have much more flexibility with this sensor shield for future projects such as a real time clock which can be used for timing when the relay is turned on or off).
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=95
How to connect to the Arduino uno here: (about half way down).
http://arduino-info.wikispaces.com/ArduinoPower

Now if the instructions are not clear for you relay please note the following:
Sensor Shield Information:
1) ROWS on the sensor shield:  There are  "rows" of pins on the sensor shield in the middle marked GVS from top to bottom and on some other boards we have instead   - + S where:
 - is the ground G.
 + is power 5V
 S is the pin # that corresponds to the pin # on your relays.

2) COLUMNS on the sensor shield:  are numbered 0 to 13. These are pin numbers on your shield that can be connected to pins numbers on your relay.

3) Code sample that will turn the relays on then off.

/* YourDuino Example: Relay Control 1.10
 * Handles "Relay is active-low" to assure
 * no relay activation from reset until
 * application is ready
*/
int Relay_1 = 2;     // relay_1 will operate through pin #2
int Relay_2 = 3;     // relay_2 will operate through pin #3
int Relay_3 = 4;     // relay_3 will operate through pin #4
int Relay_4 = 5;     // relay_4 will operate through pin #5

void setup()   /****** SETUP: RUNS ONCE ******/
{
//-------( Initialize Pins so relays are inactive at reset)----
  digitalWrite(Relay_1, HIGH);
  digitalWrite(Relay_2, HIGH);
  digitalWrite(Relay_3, HIGH);
  digitalWrite(Relay_4, HIGH); 
 
//---( THEN set pins as outputs )---- 
  pinMode(Relay_1, OUTPUT);   
  pinMode(Relay_2, OUTPUT); 
  pinMode(Relay_3, OUTPUT); 
  pinMode(Relay_4, OUTPUT);   
  delay(4000); //Check that all relays are inactive at Reset

}//--(end setup )---


void loop()   /****** LOOP: RUNS CONSTANTLY ******/
{
//---( Turn all 4 relays ON in sequence)---
  digitalWrite(Relay_1, LOW);// set the Relay ON
  delay(1000);              // wait for a second
  digitalWrite(Relay_2, LOW);// set the Relay ON
  delay(1000);              // wait for a second 
  digitalWrite(Relay_3, LOW);// set the Relay ON
  delay(1000);              // wait for a second
  digitalWrite(Relay_4, LOW);// set the Relay ON
  delay(4000);              // wait see all relays ON
 
//---( Turn all 4 relays OFF in sequence)--- 
  digitalWrite(Relay_1, HIGH);// set the Relay OFF
  delay(1000);              // wait for a second
  digitalWrite(Relay_2, HIGH);// set the Relay OFF
  delay(1000);              // wait for a second 
  digitalWrite(Relay_3, HIGH);// set the Relay OFF
  delay(1000);              // wait for a second
  digitalWrite(Relay_4, HIGH);// set the Relay OFF
  delay(4000);              // wait see all relays OFF 
 

}//--(end main loop )---




Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1867
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, and thanks for the nice synopsis of stuff on the relays..

I am trying to find a source of a similar opto-isolated relay board with 4 relays. Some people don't NEED 8 relays!

Regards, Terry King
...On the Mediterranean in Genoa!
terry@yourduino.com
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Assuming you have the relay turning on and off with your arduino microprocessor the question remains......

How do I connect my 120V device to the relay at the terminal blocks?
 If you have purchased the 4 or 8 relay board you will notice three terminals for each relay.
They are normally marked as follows:

NO- normally open
COM- common hot wire (always live) from the AC source (black in north america).
NC- normally closed

The center always receives the black or live wire from the AC source (or fuse panel at least in north america).

If you want the device to remain on all the time but turn it off through your microsprocessor then you will connect the other black wire (returning to your device) to the terminal marked NC (normally closed).

If you want to remain off all the time but turn it on through your microprocessor then you will connect the other black wire (returning to your device) to the terminal marked NO (normally open).

In any case one terminal NC or NO will have no wire at all as you do not need a live wire in both terminals.

Still not clear?  Then go here to learn about relays:

http://www.kpsec.freeuk.com/components/relay.htm

Want an illustration on how to connect an AC device to the terminal blocks?  Then go here:

http://www.instructables.com/id/Computer-control-of-AC-devices/

This step (#8) shows you the hot wire going to the COM terminal (center screw) from the AC source (plug in the wall). They have two relays operating two lights and the center of both terminals is the COM terminal.

http://www.instructables.com/id/Computer-control-of-AC-devices/step8/Hot-wire-connection-to-the-U451/

This step (#9) shows you the hot wire connected to the NO terminal (right of the COM terminal) and leading to the AC device. They have two relays so the other also has a hot wire connected to the NO terminal leading to a second bulb off to the right of the picture and not in view.

http://www.instructables.com/id/Computer-control-of-AC-devices/step9/Connections-to-lamp/

Hope this helps for those trying to connect AC devices.

Warning:
  If you are trying to connect 220V devices, then the 10 amp relay spec is not suitable for motors and other devices that are current demanding upon startup.  Radiant heat (electrical baseboard heat) on the other hand does not make such demands so you are safer. If you don't know what is demanding upon startup then better be safe and pick up a relay that can handle 30 amps.  You don't want a fire in your house.

s
 
Logged

Pages: [1] 2   Go Up
Jump to: