How many relays can I connect to one Arduino?

Поділитися
Вставка
  • Опубліковано 6 вер 2024

КОМЕНТАРІ • 146

  • @onecircuit-as
    @onecircuit-as 3 роки тому +28

    It’s a relay race! 😉

    • @AnotherMaker
      @AnotherMaker  3 роки тому +2

      haha. Why didn't I think of that?

    • @FirstLast-tx3yj
      @FirstLast-tx3yj Рік тому

      @@AnotherMaker i have an application where there is a relay and a fuse to a 12V load (only 1)
      I was considering using a relay module and ditching the fuse (is this safe or a relay module does not replace a single oldschool automotive relay + fuse)?
      I then found out about mosfet modules that are much more compact, now could these be a direct replacement to my old fuse relay combo?

    • @AnotherMaker
      @AnotherMaker  Рік тому

      @@FirstLast-tx3yj absolutely. MOSFETs offer faster switching too

    • @FirstLast-tx3yj
      @FirstLast-tx3yj Рік тому

      @@AnotherMaker and should I couple mosfets with efuses or not necessary?

  • @green_lab
    @green_lab Рік тому +4

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

  • @josephroblesjr.8944
    @josephroblesjr.8944 3 роки тому +5

    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.

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      You're welcome. They're a lot of fun.

  • @peachville4383
    @peachville4383 2 роки тому +4

    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 UA-cam search for "nano 256 relays"

    • @AnotherMaker
      @AnotherMaker  2 роки тому +1

      That could be one of the most brilliant things I've ever heard. That so dang cool. I am absolutely going to go look that up.

    • @peachville4383
      @peachville4383 2 роки тому

      @@AnotherMaker Thank you!!! Actually not that brilliant....just had a brain fart. lmao

  • @thomasheisler
    @thomasheisler 3 роки тому +3

    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

  • @sculpturekris3548
    @sculpturekris3548 3 місяці тому

    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.

  • @Myshob1
    @Myshob1 3 роки тому +3

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

    • @AnotherMaker
      @AnotherMaker  3 роки тому +1

      haha. One day I will try that. If I have enough relays.

  • @larrys3619
    @larrys3619 2 роки тому +2

    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.)

    • @AnotherMaker
      @AnotherMaker  2 роки тому +1

      Yeah. The external power is the trick. That is an interesting thought. I wonder what the difference would be (power wise) with i2c vs standard pins.

  • @andrzejbucior6188
    @andrzejbucior6188 2 роки тому +1

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

    • @AnotherMaker
      @AnotherMaker  2 роки тому +1

      It's funny how many times I see people buy the ones with the optos and then don't use them.

  • @user-lo1cl8de1s
    @user-lo1cl8de1s 5 місяців тому

    AnotherMaker- You should have written a for loop and turn them all on in sequence over the course of a few seconds or so. Would have been cool to hear.

  • @user-nx7qg1ir3r
    @user-nx7qg1ir3r 10 місяців тому +1

    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?

  • @SavageSmithy
    @SavageSmithy 10 місяців тому +1

    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

    • @frikkiesmit327
      @frikkiesmit327 9 місяців тому

      Exactly what i wanted to say. Regarding load on relays.

    • @JohnBailey39
      @JohnBailey39 3 місяці тому

      Perhaps he meant the load of each coil. The single relay I'm playing with right now pulls about 70ma to switch. So with one on, no problem, With lots on at the same time, Lets just say a cheap phone charger ain't gonna cut it.
      Load on the relay terminals is I agree, irrelevant, so long as the relay and the isolation can cope.
      Each opto only draws a few milliamps, plus the indicator LED. With a 1k resistor in series. So going over the Arduino current limit shouldn't be a risk. Something in the hundreds of ma per group of pins if I remember correctly.

  • @damianbutterworth2434
    @damianbutterworth2434 8 місяців тому

    I`ve connected all the digital pins on a mega up to LED`s for a flashing sign. Worked ok with just the usb connected to the mega.

    • @AnotherMaker
      @AnotherMaker  8 місяців тому +1

      As long as you're not driving too much current, that's fine.

  • @Bikman
    @Bikman 2 роки тому

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

  • @unglaubichuberlieber8048
    @unglaubichuberlieber8048 6 місяців тому

    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

  • @gavinhicks7621
    @gavinhicks7621 3 роки тому +11

    Could you make a whole neural network from relays 😂

    • @AnotherMaker
      @AnotherMaker  3 роки тому +4

      It's kind of funny, but I've just been reading about how they used to make all sorts of gates and logic from relays back in the day.

    • @frikkiesmit327
      @frikkiesmit327 9 місяців тому

      True. My boss a old school electronic technician told me about a place where the whole walls was covered with relays and contactors. The noise in there and the movement was amazing he said. It was something to experience.

  • @ishacare176
    @ishacare176 3 роки тому +1

    You deserve my respect. Love from Goa

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      Thank you so much for the kind words. Love from Florida.

  • @TBL_stevennelson
    @TBL_stevennelson 3 роки тому

    I think the idea of how many can you connect is great maybe you can do this with other products. Thanks for the video

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      I like making these kinds of videos. I need to do more.

  • @gsrathore97x
    @gsrathore97x 2 роки тому +1

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

  • @RidmikaDidula-yb4mj
    @RidmikaDidula-yb4mj 10 місяців тому

    Please explain......
    Need to operate 16 channels . Must on 1 mnt then switch to next channel... Every channel one mnt .. after 16 mnt oll off.. if i want to operate again must start from beginning channel 1 to 16 ... One mnt for every chanel

  • @TEAbouda
    @TEAbouda 2 роки тому +1

    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 ?

    • @AnotherMaker
      @AnotherMaker  2 роки тому

      They were all powere4d by the arduino itself.

  • @RandomTorok
    @RandomTorok 8 місяців тому

    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.

  • @peterenis4107
    @peterenis4107 2 роки тому

    The first sentence describes my projects perfectly xD every of my projects go out of hand xD

  • @riggziegamer9237
    @riggziegamer9237 3 роки тому +1

    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!

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      Sorry for the slow response. The IDEAL way to do it is to grab the 5v from a second usb charger. That's how I normally do it safely. The mega has at least 4 5v pins and sometimes I take a "normal" IO pin, set it to output and write it high. to make more of them. So even though the board is being "powered" externally, that 5v is still connected to the arduino.

  • @SimpleElectronics
    @SimpleElectronics 3 роки тому

    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?

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      Yep. When that jumper is off it will not work without the second VCC.

    • @larspeterjensen3913
      @larspeterjensen3913 3 роки тому +1

      @@AnotherMaker You are using the same charger to supply both the Arduino and the relays with power. A charger with two outputs does not normally have separate 5V outputs so there is no separation between the Arduino and the relays

  • @thombaz
    @thombaz Рік тому

    I want to have a realy module that I can easily connect to arduino. I want to control 12V heather, humidifier ect. But can't find any information about the quality of the relays. They all seem to be cheap chinese quality, and I don't want any dangerous situation with them.

    • @AnotherMaker
      @AnotherMaker  Рік тому

      Overall there of pretty decent quality. A UA-camr named a v e did a counter and showed how many times one of these things could turn off and it was in the hundreds of thousands if not millions.

  • @predcr
    @predcr Рік тому

    What was the sound when you used 68 relays?

  • @H3liosphan
    @H3liosphan 3 роки тому +1

    Not sure what the thinking is with connecting vcc from the relay boards to the Arduino 5v, generally you only need to common the ground vss connections to each other. I've done this kind of experimentation and I appreciate this configuration works, perhaps it's because it's active low as opposed to high. Unsure...

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      I think that's it...they definitely don't work without it.

    • @bandenk4550
      @bandenk4550 3 роки тому

      The opto thing triggered when the led from the arduino is activated, this will triggerred the relay switch, so no common gnd is needed as per usual. howtomechatronics.com/tutorials/arduino/control-high-voltage-devices-arduino-relay-tutorial/

  • @ggranby11287
    @ggranby11287 Рік тому

    I found you from simple electronics!

    • @AnotherMaker
      @AnotherMaker  Рік тому

      He is such a great guy. Love his stuff. Thanks for checking out my channel.

  • @SnifterRoux
    @SnifterRoux 2 роки тому

    Where the jumper is my 4 channel relay board lacks a ground pin. My only ground pin is with the input pins.
    How do I wire up my arduino and external power supply in this case?
    And would there be a reason some boards lack the ground pin while others don't?

    • @AnotherMaker
      @AnotherMaker  2 роки тому

      I wonder if some of the ones that lack optical isolation don't have that other ground pin. Does yours have a 4 pin chip in front of the relays or a 3 pin? 4 pin is the optocoupler. You could probably use the same ground for both.

  • @TruestQuest
    @TruestQuest Рік тому

    how can a relay project benefit in music production, and how many adding many sequences of relay circuits benefit the same cause? thanks

    • @AnotherMaker
      @AnotherMaker  Рік тому

      Check out youtuber Gadget Reboot. He made some relay projects that he used to turn things like guitar pedals on and off.

    • @TruestQuest
      @TruestQuest Рік тому

      @@AnotherMaker will do for sure. if you have other recommendation feel free to share as well. thanks man

  • @BSOArtMagedon
    @BSOArtMagedon 4 місяці тому

    Good explainations

  • @RakeshKumar-hs8yz
    @RakeshKumar-hs8yz 3 роки тому

    thanks for this experiment sir its very helpful

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      Most welcome. I need to do more stuff like this. It was fun to just tinker with no particular purpose.

  • @HarshitSingh-mg7zt
    @HarshitSingh-mg7zt 2 роки тому

    Hi sir
    I wanted to know something regarding the same
    I m currently working on a robot, which already has uses about 40 io pins of mega(more extensions to come) - which I'll power directly from the 5v pin of l298n board, which itself is powered up by 2 18650 Li ion batteries. So,
    1.) Can I add another l298n, powered by the same 2 batteries, to power up the relays? As I don't wanna add 2 more li-ion batteries, just for 4 relays
    2.) In future, I'll add more sensors/modules, that would draw more and more current, but the max recommended current that can be drawn for one IO pin is 40ma(max for the board itself is 200ma)
    What should I do in that case?
    Btw, i really liked the concept of ur video 🤝

    • @AnotherMaker
      @AnotherMaker  2 роки тому +1

      Thanks! I wish I had better advice for you off the top of my head. It really comes down to measuring or calculating the amount of current used vs the max of the various components (and leaving yourself some room). I don't know all the numbers off the top of my head

    • @HarshitSingh-mg7zt
      @HarshitSingh-mg7zt 2 роки тому

      @@AnotherMaker no problems mate 🤝

  • @danielsorby8478
    @danielsorby8478 Рік тому

    Novice question....how are the control signals connected to each of these relay boards? Do you split the 5v line coming from the arduino to connnect to all the boards in parallel?

    • @AnotherMaker
      @AnotherMaker  Рік тому

      The 5 volt line powers the board and then each of the pins of the Arduino sends a separate 5 volt signal to trigger it

    • @tbprod5
      @tbprod5 Рік тому

      @@AnotherMakerso basically every relay gets 5v?

    • @AnotherMaker
      @AnotherMaker  Рік тому

      @@tbprod5 yes!

    • @tbprod5
      @tbprod5 Рік тому

      @@AnotherMaker oh ok, thanks!

  • @williamviolette4555
    @williamviolette4555 2 роки тому

    Thanks for making this video:)

  • @smartassist9700
    @smartassist9700 3 роки тому

    How many water sensor and switches for little water pump will that 1 Arduino manage?

  • @deankq4adj125
    @deankq4adj125 3 роки тому

    This was fascinating!

  • @frikkiesmit327
    @frikkiesmit327 9 місяців тому

    Here i am watching video and me with my little humble only 8 relay board😅

  • @faturahmanf3024
    @faturahmanf3024 2 роки тому

    Can you help me with my project? I use 2 relay to control my DC motor for forward and reverse the motors rotation, but when i control it using my arduino, my arduino program was crash and error, and i had to reset it again so it can run again, i already use an external power supply for my relay 4 channel modul, but it just the same, can you help me with that please

    • @AnotherMaker
      @AnotherMaker  2 роки тому

      I'm sorry. I don't have a whole lot of insight on that sort of thing. The only thing I'd guess is that you're using too much power. You probably want to power the relay separately from the arduino and see if that fixes it.

    • @gamezilla1387
      @gamezilla1387 2 роки тому

      not only external relay you also need to use dc motor driver ic or ic module as arduino out put pin can not handle required power to dc motor to run.

  • @smartassist9700
    @smartassist9700 3 роки тому

    Where can I find the electrical wire bu 30 feet long? I need auto plant waterer. I want garden . Disabled, the plants will still get water and not die as fast.

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      Any electric supply store should have them.

    • @smartassist9700
      @smartassist9700 3 роки тому

      Is there wire info? Gauge or size, or type?

    • @smartassist9700
      @smartassist9700 3 роки тому

      Know how to program switches with moisture sensor on a switch. And 5volt mini water pump on 2nd switch? If dry -turn on water pump......when it senses water- turn off water pump?

  • @jenniferw8963
    @jenniferw8963 Рік тому

    Why do the relays need to be isolated from arduino? Are those optoisolator chips on the relay board?

    • @AnotherMaker
      @AnotherMaker  Рік тому

      There are little power surges when they operate and you wouldn't want to damage the sensitive electronics on the Arduino. Those are optos.... Although it's not uncommon to find the cheaper relays without them

    • @jenniferw8963
      @jenniferw8963 Рік тому

      @@AnotherMaker Oh i use a snub protection diode. Are you talking about when the coil disengages and causes a voltage spike?

  • @traplifensr7561
    @traplifensr7561 3 роки тому

    Hey i have a question please.. can i connect more then 1 bluetooth relay to Arduino at the same time?

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      It may be possible, but I've never seen it done.

  • @ChrisDragotta
    @ChrisDragotta 3 роки тому

    Can relays be modified so that they operate silently? (for a musical instrument)

    • @AnotherMaker
      @AnotherMaker  3 роки тому +1

      Solid state relays or transistors would work

  • @genome692002
    @genome692002 3 роки тому

    Im gonna try not connecting that ground to arduino.. hopefuly it stops arduino from resetting whenever relay is switched..

    • @genome692002
      @genome692002 3 роки тому

      that did not work. what worked just so anyone might have the same problem is I connected a 1000uF electrolytic capacitor to the vcc and ground pin of the arduino using 10cm dupont female connectors. and no more reset..

    • @beshoynagib4812
      @beshoynagib4812 3 місяці тому

      ​@@genome692002Great info

  • @muhammadwsalis6841
    @muhammadwsalis6841 2 роки тому

    Can you suggest me, i wanna make multi time clock 7 segment with 1 arduino

    • @AnotherMaker
      @AnotherMaker  2 роки тому

      This guy has a tutorial that is a good place to start. ua-cam.com/video/l6QoGsdHzfM/v-deo.html

  • @NBG.hater.number.1
    @NBG.hater.number.1 Рік тому

    can you post the code aswell?

    • @AnotherMaker
      @AnotherMaker  Рік тому

      I do have a basic relay test here... github.com/mudmin/AnotherMaker/tree/master/relay-test

  • @Inspiringquotestips
    @Inspiringquotestips 3 роки тому

    can we use its Arduino Nano Also ?

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      Absolutely. You'd want a multiplexer if you're going to use that many outputs, but for 8 or so relays, that would work.

  • @maicod
    @maicod 3 роки тому

    awesome ! now make a tune with them

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      I'm not very musically inclined but that would be fun :)

    • @maicod
      @maicod 3 роки тому

      @@AnotherMaker me neither :)

  • @Mega5035
    @Mega5035 3 місяці тому

    We can use 74HC595+Arduino UNO elegantly, and it is not a problem to control hundreds of relays

    • @AnotherMaker
      @AnotherMaker  3 місяці тому

      Absolutely. I use them on other projects.

  • @superliegebeest544
    @superliegebeest544 2 роки тому

    I was just wondering if I could connect 50 solenoids to one arduino

    • @AnotherMaker
      @AnotherMaker  2 роки тому

      You can connect them, but I would power them externally.

  • @mostafasohrabi5634
    @mostafasohrabi5634 Рік тому

    good video.

  • @Chinhnguyen0497
    @Chinhnguyen0497 3 роки тому

    how about signal interference?

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      It's generally not a problem with the relays. It's not uncommon for me to hook 50 up to a mega without an issue.

  • @bollywoodgunslogic9905
    @bollywoodgunslogic9905 2 роки тому

    What is the latency of this relay ?

    • @AnotherMaker
      @AnotherMaker  2 роки тому

      Whew. I couldn't tell you. That would be an interesting experiment though. I used a bunch of these in another video to control a claw machine and it "felt" instant, but I'd guess 100ms.

  • @ChokoLokoTV
    @ChokoLokoTV 2 роки тому

    make video 16 relay 5v

    • @AnotherMaker
      @AnotherMaker  2 роки тому

      What are you trying to do? So far way more than 16 work.

  • @50Hz
    @50Hz 3 роки тому

    love it

  • @boopeshkumarprabhakaran
    @boopeshkumarprabhakaran 3 роки тому

    But.... My arduino nano can't even power 16 channel relay..not sure why... And if I use external 5v supply for Relay... It does not trigger the relays... It works only when connected to board power supply... What am I missing here.... Can you share a circuit diagram... For two 16 channel relay with shift register...

    • @AnotherMaker
      @AnotherMaker  3 роки тому +1

      Each style of relay has a different ability to output power. That's why I used the mega on this one. I don't tend to use shift registers. I can tell you the easier/better way to do it is to actually do the VCC/Ground on the relays from an external power source and then only use the arduino to drive the pins.

    • @boopeshkumarprabhakaran
      @boopeshkumarprabhakaran 3 роки тому

      @@AnotherMaker yeah.. I'm using external source to power relays and connected the outputs to relays pins.. But it dosnt work... Or trigger... I think ground of relays and arduino should be joined together

  • @jimmyfio
    @jimmyfio 3 роки тому

    What are you doing tonight? --> I'm going to blow an arduino mega with an ungodly amount of relays. That's what I'm talking about!

  • @desalegnsimon6671
    @desalegnsimon6671 Рік тому

    Your relays are normay closed they are not taking any power when u wright them low

  • @davariz
    @davariz Рік тому

    8:56 quem ai se afastou da tela com medo de explodir tudo? rsrsrs

  • @AitoLaikoSamoMoaCawfy
    @AitoLaikoSamoMoaCawfy Рік тому

    me here after breaking my power supply that handles switching of relays

  • @smartassist9700
    @smartassist9700 3 роки тому

    I’m in USA. GA. U?

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      Florida!

    • @smartassist9700
      @smartassist9700 3 роки тому

      I looked for available code already written but did not find it.... I do not know how to load code in an Arduino... either.. I’m new but née badly to water garden vegetables for me. I am disabled. But can learn by video and automate it.
      I have friend to run water lines for me once I build it and solder it all together. I will need to power each 8 switch brick and Arduino.
      I will offer pay for your assistance to guide me. Wanna help some?

  • @fredflintstone1
    @fredflintstone1 3 роки тому

    Hmm who asked those questions name them :-)

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      I've been asked in the fb group a few times

    • @fredflintstone1
      @fredflintstone1 3 роки тому

      @@AnotherMaker it was said in jest:-)

    • @AnotherMaker
      @AnotherMaker  3 роки тому

      @@fredflintstone1 if I remembered I would definitely call them out :-)

  • @azimalif266
    @azimalif266 2 роки тому

    Is it possible to distribute a large load across multiple relays?

    • @AnotherMaker
      @AnotherMaker  2 роки тому +1

      It's possible, but I wouldn't advise it due to reliability concerns.