Relay board and Arduino

I’m using this relay board for switching 8 stage lights:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItemVersion&item=200979638106&view=all&tid=1114145831010

As you can see on the attached diagram the switches are connected to ground wire.

I want to connect it to Arduino and automat light switching.
I don’t know how to do it because relay board switches are on the ground wire.
I have another relay board where switches are on +5V side and it worked fine with arduino.
This time I don’t know how to even start.

if you have that YWROBOT board, then your wiring is correct.

assume you get the power LED to light when you connect the 5 volts ?

I would use a wire from the ground to any pin to see if it worked.

just check the power supply.

Connect the inputs to Arduino digital pins. Set the pin to LOW to turn the relay on. Set the pin to HIGH to turn the relay off.

oh thank you johnwasser, I never thought it was so simple.

Does it mean that relay will have +5v on both sides of its coil when pin is HIGH?
When pin is LOW, one side of coil will be connected to the ground

Does it mean that relay will have +5v on both sides of its coil when pin is HIGH?
When pin is LOW, one side of coil will be connected to the ground

For all practical purposes both of these are correct.

Technically when the I/O pin is high it will be at slightly less than +5 v and when it is low it will be at slightly more than 0 v.

Table 28-1 in section 28.2 of the data sheet is where you find the worst case information.

  • The VOH specification tells you that the output voltage will be no lower than 4.2 volts when the pin is high.
  • The VOL specification tells you that the output voltage will be no higher than 0.9 volts when the pin is low.

Don

This time I don't know how to even start.

Start here --> http://arduino-info.wikispaces.com/ArduinoPower
Scroll down to "More Complex Systems:"

Don

floresta:

Does it mean that relay will have +5v on both sides of its coil when pin is HIGH?
When pin is LOW, one side of coil will be connected to the ground

For all practical purposes both of these are correct.

Technically when the I/O pin is high it will be at slightly less than +5 v and when it is low it will be at slightly more than 0 v.

Table 28-1 in section 28.2 of the data sheet is where you find the worst case information.

  • The VOH specification tells you that the output voltage will be no lower than 4.2 volts when the pin is high.
  • The VOL specification tells you that the output voltage will be no higher than 0.9 volts when the pin is low.

Don

Thank you Sir

So when pin is LOW it will still give 0.9 V.
Pin on my relay board has to touch the ground in order to close coil circuit.
Will it work when connected to 0.9V output?

So when pin is LOW it will still give 0.9 V.

No. So when pin is LOW it may still give 0.9 V but most LOW I/O pins will actually be much closer to 0 v.

If you have a whole box full of these microprocessors and if you test the voltage on each I/O pin of each microprocessor with its output 'LOW" you should never find one with a voltage of more than 0.9 volts.

Will it work when connected to 0.9V output?

Most likely it will. Most relays are conservatively rated and will actuate with less than their rated voltage.

Don

Why not just replace the entire board with the relays on your arduino? If they're just powering a few lights, I'm sure the relays on your relay board would cope.

Thank you guys.

My lights will be connected to Normally Open relay output terminals.
When relay is triggered coresponding light will be turned ON for maximum time of 30 sec.

Will relay go too hot if triggered for a, let's say 30 minutes? How can I find out how durable they are?

The relays on most of the relay sheilds are have contacts rated for upto 10 amps at 240v ac. They're frequently used for heaters etc.. So unless they're being used to switch a very large array of lights, they're unlikely to have any problems.

The more significant issue is the current drawn by the relay coils for turning them on and off. As long as you give the shield it's own power supply (rather than powering it from your arduino) there shouldn't be an issue.

KenF:
The relays on most of the relay sheilds are have contacts rated for upto 10 amps at 240v ac. They're frequently used for heaters etc.. So unless they're being used to switch a very large array of lights, they're unlikely to have any problems.

The more significant issue is the current drawn by the relay coils for turning them on and off. As long as you give the shield it's own power supply (rather than powering it from your arduino) there shouldn't be an issue.

Thank you,
Relay board will definatelly have its own power supply. I was just afraid of the heat in situation when relays stay triggered for a longer period of time.

Sikter:
Thank you,
Relay board will definatelly have its own power supply. I was just afraid of the heat in situation when relays stay triggered for a longer period of time.

Nah, they'll cope. :slight_smile: