How many relays can I connect to one Arduino?

preview_player
Показать описание
Literally threes of people have asked me this question, so I decided to find out. I love these 8 channel relay boards, but how many can you attach to one Arduino and what's the best way to connect them? Oh. I know I repeated the DuPont part. I couldn't bring myself to re-edit :) Let's just say I wanted to drive that point home.

Links below are affiliate links and may earn a commission for the channel.

USA

Will It Blow Up - Episode 001 - Maybe this should be a thing?
Рекомендации по теме
Комментарии
Автор

As someone who never worked with externally powered relays and now needs to control 80 relays at once this was incredibly helpful!

cabraviva
Автор

I’ve never tried using relays but I’m gonna buy a board now. Thank you for actually showing the correct way to use them. I was wondering how to the whole video.

josephroblesjr.
Автор

Impressive video and impressive stockpile of relays!
A few years back, I also had an 'out-of-hand' project where the Client wanted to control hundreds of relays with a single Arduino.
He also wanted to control them remotely via PC touchscreen up to 200 ft away. Yikes!
The PC screen control wasn't a problem as I'd been interfacing Arduino and VB6 for years.
The signal distance also wasn't a problem as I use HC12 long range transceivers in many projects.
I didn't want to use multiplexer boards as I wanted much simpler program control.

While also playing with a neopixel string project and it hit me...
One can control 256 neopixels with one pin of a Nano so why not use the light from neopixels (similar to optocoupler)?
Using WS2812B chips and LDRs one can easily control 256 relays with 1 pin of a Nano.
By using WS2811 modules (3 outputs each - R, G & B) one can control over 11, 000 relays with one Nano :)

If interested do a YouTube search for "nano 256 relays"

peachville
Автор

wow that is impressive, i didnt know a arduino was that powerful, well i am not thinking its just a toy now. Now i am thinking you could hook up twice as many led's with resistors with the normally open and closed, it would be a hell of a light show

d_wizard
Автор

sir can i ask a question, i am using three 16 channel relay 12V to my arduino mega, what is the pin connection from arduino to relay and can i use 12v charger to directly connect it to the power source of the relay?

-hy
Автор

using the i2c bus and pcf8574 module and 8 ch relay board, you could get a lot more as I measured 13.2ma on the 5v line with all 8 channels driven (relay's driven with JD-vcc connected to ext 5v supply of course.)

larrys
Автор

My experience is that those relay boards have a large area of copper plane common to grounds for both the input logic and the relay coils. With separate VCC/VJD supplies for multiple relay modules there will probably be a ground loop via the Arduino logic ground wires. Those will then be carrying an unwanted share of the relays' coil current. Where that extra current is carried on the Arduino pins/tracks depends on the positioning of the signal ground wires.

It wouldn't have been a big design difference to have isolated the two grounds on the board with another jumper. Tried the obvious simple copper cut to no avail. There appears to be an hidden interconnection as well - possibly a via.

sculpturekris
Автор

Hey, thanks so much for all this information! Two questions: What is loud (you mention that the video does not properly show how loud it is) in the final setup? And how to connect all the VCCs to the Arduino? Is that at the breadboard?

mirko
Автор

What makes you think the two ports on your USB charger are galvanically isolated. Some units just have them connected together inside the case. Even if they are driven separately, it could be by non-isolated buck converters.

gedtoon
Автор

I've personally ran 32 relays off a mega without issues when I built a replica countdown clock for channel 4s offices.
I did end up using external power though
you said something about the stability being dependant on the load on the relays but this isn't even remotely a factor, the relays will draw pretty much the same power regardless of load atleast up until the point where the load is over the spec of the relays and the contacts start to weld together

SavageSmithy
Автор

many many thanks, this has been very INSPIRATIONAL+informative,
one question, i have 1 motor and i want to use 2 battery packs, one as a backup, then my question:
how many channel will i need ??? and again many many thanks for your inspirational informative presentation

unglaubichuberlieber
Автор

Great expirment!! Loved the idea
Im new to this but i have a question:the boared is only conected to relay with vcc pin
Nd relays are powered by external source how you control relays by desire ?

TEAbouda
Автор

I've got a small project that I'm working on. I have a computer case that has 3 RGB fans in the front of the case. However the motherboard doesn't support the fans. (other than the fan part) The red and green will light with 5 volts but the blue requires 12. Even 9 volts won't light the blue led. Can these relays work with 12 volts? I've created a prototype using an Arduino Uno and a relay sheild but so far I can't seem to get the relays to trigger. Any thoughts or suggestions will be greatly appreciated.

RandomTorok
Автор

This is awesome... Hope you can clear something up for me. I am new to this and have an arduino mega, arduino shield and wifi boad. I can control H/O trains with this setup... DCC++EX and it works great.
I want to control each track turn out and I understand I need 1 relay per track... say 1 for left and 1 for right. I need 30 relays so 4x8 relay boards are good.
I understand I need 30 outputs from the mega to 30 pins of the 4 relays.. all good... Need power and ground per relay board.. all good there..
What I dont know, is you mention needing a 5v from relay board back to a 5v port on the mega and I see that in your example of the 8 relays... but where do you connect the others? how many other 5v spots are on the Mega that you used? That mess, beautiful that it was lol, i couldnt follow traces to see...
appreciate any help!

riggziegamer
Автор

Lovely :) With some added shift registers, only sky (and CPU speed) is the limit ;)

Myshob
Автор

Awesome bro👍👍👍👍
Also make video on ESP32 AND ESP8266 5v and 3.3v power current limits

gsrathorex
Автор

Thanks for this video. Most people do not know how to make proper connection between the relay and controller using the optocoupler.

andrzejbucior
Автор

Great video! For anyone else who found this video helpful -- I also recommend Ralph Bacon's video "#18 Add a Relay Module to your Arduino project - Hints, Tips & Traps".

asajordan
Автор

I wonder why you connect the VCC from the relays to the arduino, is it because both outputs of the charger are isolated from each other?

SimpleElectronics
Автор

thank you! I'm looking for a solution to power up 30 relays, and here I got an answer.

Bikman
welcome to shbcf.ru