Hooking up relay with arduino boards

Hi,

I bought a 2 channel 5 volt relay board, and connected relay VCC to arduino 5 volt and ground of relay with arduino ground, then I connected D2 of arduino to Signal in of IN1 relay .

everything seemed perfect and I uploaded the code, plugged in power supply to main, used NO and COM to turn on the power based arduino sending signal.

but it didn't worked and to my shock the arduino UNO board stopped working I also tried arduino Wemos D1R2 that too stopped working. On both when I try to upload I get message error "out of sync " and uplaoding fails.

Two boards got screwed in a row. I need guidance of how to hook up 2 channel relay board with arduino and 4 channel arduino shield.

I have arduino Leonardo on which Yun is mounted, I haven't dared connecting ontop of Yun as I dont want to mess it up.

All I want is to turn on 40-100W lights or fan and raspberry pi adapter powered through the relays.

Any help will be greatly appreciated.
Thanks in advance

There are literally hundreds of 2 channel relay boards out there. Please post a link to the one that you have.
How are you powering the relay coils? An Arduino can CONTROL relays, it cannot POWER the relays.

groundfungus:
There are literally hundreds of 2 channel relay boards out there. Please post a link to the one that you have.
How are you powering the relay coils? An Arduino can CONTROL relays, it cannot POWER the relays.

This is 2 channel Relay board I bought, and I powered relay from arduino 5 volt pin .

Below is a four relay board interconnection.

Use an external 5 volt power supply.
.

LarryD:
Use an external 5 volt power supply.

incase the 4 channel relay board is mountable shield ? is it recommended ?
What I mean is with this one ?

Presumably the jumper is positioned across the left hand two pins?

According to part 6 here, the coil current on that 5V Songle can be 40, 67 or 89mA depending on the model of relay (but it's not clear to me how to identify them).

I can't recall what the current available from the Arduino 5V is, but a couple of 100mA rings a bell?

Remote controlled power sockets might be a lot easier and safer than a bare relay module.
They come in packs of three, with a remote.
An Arduino can generate the same remote signal with the help of a cheap 315Mhz (or 433Mhz) transmitter module.
Those power sockets are also available for Wifi or BT control.
Leo..

"Two boards got screwed in a row. I need guidance of how to hook up 2 channel relay board with arduino and 4 channel arduino shield."

So you have two different relay boards?

We need to see a good image of the wiring.

It is always best to show us your sketch.
Use CTRL T to format the sketch.
Please use code tags. Use the </> icon in the posting menu.

[code] Paste sketch here. [/code]

.

Further to my #5 I read in a few places that the 5V pin can supply about 500mA so it should be able to handle two of those relays.

Hope you don't have that jumper to the right which seems to short Vcc to Gns, don't want that. For one supply, the jumper needs to be on the left; for two supplies it should be removed.

ardy_guy:
Hope you don't have that jumper to the right which seems to short Vcc to Gns, don't want that. For one supply, the jumper needs to be on the left; for two supplies it should be removed.

what is the purpose and how does the jumper work ? what it changes ?

Hi, seaurchin!
I had the same difficult problem with my 8 channel relays, its probably because of the wrong description.

Please check this out:

http://creatgraphy.com/04/2017/technik-kram/arduino/use-it-right-8-channel-relais-board-chinesesainsmart-version-185/

Its explained in this post. You have to disconnect the Jumper GND and VCC...
Be careful ! the relays need probably more power. :slight_smile: :slight_smile: :slight_smile:

seaurchin:
what is the purpose and how does the jumper work ? what it changes ?

The JD-VCC/VCC jumper connects the Arduino supply to the relay supply.
If you leave the jumper on, you'r asking the Arduino to also power the relay coils.
That ~80mA per relay, could overheat Arduino's 5volt regulator in certain cases.
One supply (the Arduino) also means that you haven't got opto isolation.

If you want an extra layer of safety (opto isolation), and don't want to use the Arduino to power the relay coils, you need two supplies. One for the Arduino, and one for the relays.
In that case you have to remove the JD-VCC link/jumper.
Relay supply goes to the JD-VCC(+) pin, and GND(-) pin.
(That relay supply could be an old 5volt phone charger)
The Arduino connects to VCC(+5volt) and the relay inputs.
Do ! NOT ! connect relay ground to Arduino ground.
Leo..