Use Arduino to Switch Power On and Off!

Поділитися
Вставка
  • Опубліковано 20 кві 2014
  • Mike picked up a $10 SainSmart 8 Channel DC 5V Relay Module, hooked it up to an Arduino micro controller (a Raspberry Pi should work, too!) and the next thing you know he's remotely controlling 8 electrical devices... it's like building an 8 channel remote, each relay on the board can handle some serious juice, up to 10A 230V AC, 30V 10A DC. It's super easy to set up. Learn how in the video!
    www.arduino.cc/
    arduino-info.wikispaces.com/Ar...
    www.ebay.com/sch/i.html?_trksi...
    www.ebay.com/itm/8-Channel-5V-...
    Subscribe! ua-cam.com/users/diytryin?...
    Have an idea for something we should build? E-mail us!
    DIYTryin@revision3.com
    *New Episodes Every Week*
    Subscribe for free!
    ua-cam.com/users/diytryin?...
    DIY Tryin on Revision3:
    www.revision3.com/diytryin
    Tekzilla on Twitter:
    / tekzilla
    Patrick on Twitter:
    / patricknorton
    Michael on Twitter:
    / palmdalian
    DIY Tryin is a brand-new show about do-it-yourself solutions and maker culture from the Tekzilla team! Here on DIY Tryin, we live by the motto; "Why buy when you can make?"
  • Наука та технологія

КОМЕНТАРІ • 361

  • @gmslayton
    @gmslayton 10 років тому +55

    Cool episode. It would been cool to see how the lights and fan were hooked up and powered. Seeing that could give me more insight as to how the wires are.

    • @diytryin
      @diytryin  10 років тому +13

      Think of the relay switch as interrupting one of the wires. When it's switched off, it's like you cut the wire.
      For the fan we literally cut one of the fan wires and put one half in the COM (common connection) and one in the NC (normally closed) slots.
      Take a look at this page for a better explanation:
      arduino-info.wikispaces.com/ArduinoPower

    • @Lyrabon
      @Lyrabon 7 років тому +1

      DIY Tryin My L led is off and NO is dim what does that mean?

  • @neppy5
    @neppy5 10 років тому +1

    cool demo and great to see Patrick after all these years, used to watch him on The Screen Savers lol

  • @Kattemageren
    @Kattemageren 9 років тому +2

    I really like the atmosphere of this video, very smooth and friendly. Very unlike some of the akward episodes I've seen on e.g. Tested

  • @stampgermany
    @stampgermany 9 років тому

    You've been so helpful! Thanks! I really like your videos and their quality!

  • @SeeJaysPlace
    @SeeJaysPlace 9 років тому +8

    Patrick Norton, I'm not sure if I'm old school or not but, I miss watching Screen Savers

  • @toycarfoushboy
    @toycarfoushboy 6 років тому

    I subbed up guys! Really like learning this kinda of stuff and seems like y'all are gonna teach me some.

  • @gmctech
    @gmctech 7 років тому

    Endless options here! I just ordered a DTMF decoder, arduino and relay bank... I'm going to use my two way radios to operate my garage door using dial tones.

  • @prajasena1
    @prajasena1 7 років тому

    thanks for the useful practical demo

  • @pingu99991
    @pingu99991 10 років тому +5

    I like the apple logo conspicuously hiding behind the tape haha

  • @nogster
    @nogster 10 років тому

    Seeing Patrick here really makes me miss the days of TechTV. I actually was able to attend a taping while in San Fran back in the day.

  • @anthonyvolkman2338
    @anthonyvolkman2338 9 років тому

    I like to use solid state relays because they act as a transistor, whatever frequency you give it, it can turn on and off at that frequency, a mechanical relations can only oscillate so much

  • @JustinOnScreen
    @JustinOnScreen 7 років тому

    Very neat. Thanks for the tutorial.

  • @spokosjr
    @spokosjr 10 років тому +17

    you covered the apple logon on the macbook but you forgot down on the right the apple box

  • @vaper1986
    @vaper1986 10 років тому

    Will play around with this, thanks for sharing.

    • @diytryin
      @diytryin  10 років тому

      Let us know if there's any other cool projects or ideas you'd like to see in the future!

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

    LOVE the channel name...

  • @DarkStar851
    @DarkStar851 9 років тому +8

    Just thought I'd toss this in for anyone interested in toggling a mechanical style relay with any sort of frequency like Michael did with the 40ms delay -- you're going to burn the thing out fairly quickly if you're doing something like that all day long. You should consider a solid state relay (more expensive than these old mechanical ones) for that application. Or a high-power MOSFET (which effectively is all a solid state relay is, just without the heatsink and terminal block attached)

  • @Wisdomofautumn
    @Wisdomofautumn 6 років тому

    I’m a beginner Arduino experimenter and found this video very useful, interesting, and entertaining! I am wanting my first project to be a small weather station looking at temperatures and humidity...any pointers?

  • @andrewk8636
    @andrewk8636 8 років тому +175

    thats right cover that apple logo, hiding the shame lol

    • @rabbitdrink
      @rabbitdrink 8 років тому

      Hehe

    • @peachpark7568
      @peachpark7568 8 років тому

      i dont understand, wheres the shame in using apple?

    • @rabbitdrink
      @rabbitdrink 8 років тому +13

      It means "i am an idiot because I spent all my money on a computer from the 90s"

    • @peachpark7568
      @peachpark7568 8 років тому

      lololololololololololololol thanks

    • @zm7160
      @zm7160 8 років тому +24

      Apple will fuck you on the price of their hardware, and the hardware is always last generation.
      That said, OSX is a very decent OS; If your into hacking / software dev, having a *NIX based OS that works is GREAT.
      For productive use, it really can be good for some people.

  • @RealDealHolyfield2099
    @RealDealHolyfield2099 10 років тому

    Music with the relays is a great idea! This other channel on UA-cam, MrSolidSnake745, plays midi music with stepper motors from old floppy disk drives. I'm pretty sure he uses Arduinos too. Really cool and really fun stuff!

  • @Sorcli
    @Sorcli 7 років тому

    Great info. Could this also be used as a 12v fuses box, so if one was running 12v devises it would protect them?

  • @ixamBee
    @ixamBee 6 років тому

    Hey, I want to use an arduino to make a circuit which when I turn on switches off within 1 second
    Anyone has an idea how to do that

  • @MainlandRC
    @MainlandRC 10 років тому +19

    basic coding etiquette: if someone posts their code online to share it is perfectly acceptable to use some, or all of their code in your own code; however, if you share any code that has other people's work in it you should credit them just like any other work.

  • @paziipa
    @paziipa 8 років тому

    Subbed just for that ending dance

  • @Reaptechsolutions
    @Reaptechsolutions 8 років тому

    Hi guys, great channel!!! liking the relay idea, please post the arduino codes up that you used to drive the 8ch board, thanks

  • @EEEnthusiast
    @EEEnthusiast 9 років тому +46

    Using relays to drive LED strips... Interesting...

    • @lolz2018
      @lolz2018 9 років тому +12

      Sarcasm? :p i would think mosfets are way better?

    • @shyamharidas1828
      @shyamharidas1828 9 років тому +10

      EEEnthusiast they were probably just trying to inrodyce us to the idea. We can even apply this to AC appliances

    • @michaelsills8038
      @michaelsills8038 7 років тому

      @diederik you are correct that mosfets would be much better for these types of applications. Either works tho.

    • @raidzor5452
      @raidzor5452 7 років тому

      Yeah... But there is no real difference... Relays are just easier to connect...

    • @MrFixBroken
      @MrFixBroken 5 років тому

      They literally applied it to an AC appliance in the video (the fan)

  • @DaveHurka
    @DaveHurka 9 років тому +14

    gee, I wonder what kind of laptop he is using...

  • @Beall619
    @Beall619 9 років тому

    you have earned a subscriber

  • @lennova5846
    @lennova5846 5 років тому +1

    Great video!
    Just what I was looking for.
    The link for the code is down any chance of getting the info? also any help on how to do the serial control would be appreciated.
    Thanks!

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

    guys you are awsome, may god bless you

  • @MrChezco1995
    @MrChezco1995 8 років тому

    This is nice if you want to do something like a Home Automation setup :D

  • @attackandsnack
    @attackandsnack 8 років тому

    soooo many tabs!!! lol :) thanks for the video

  • @meemvids738
    @meemvids738 9 років тому

    Thanks guys, very useful. Although it's fun to watch you dance about while switching on lights. I would like to know HOW you switched those colours. lol Do you have a particular video on the serial port? I'm total noob.

  • @danrtavares
    @danrtavares 9 років тому

    wow you are a genius ! you pick a pre build relay shield and put in a newbie programmable system named Arduino and make it work ! sincerely you deserve a nobel prize.

  • @l.b.4817
    @l.b.4817 10 років тому

    Deserve aThumbs up and subscription from Brazil ;)

  • @dalivrubot5909
    @dalivrubot5909 10 років тому

    Mike, how did you manage to wire up the external power supply to the relay in order to save the Arduino MC from having to power it? What power supply did you use, just one that was lying around?

  • @smstiao-tecnologia
    @smstiao-tecnologia 10 років тому

    Hi boys, very very nice your projects with arduino.

  • @mdafroz4190
    @mdafroz4190 8 років тому

    this is a nice and awesome video and i have a request for you can you make this relay control by smart phone via bt hc 05
    please

  • @tuckervaldeze7179
    @tuckervaldeze7179 10 років тому

    I know this video is 2 months old but I purchased a Sainsmart 8 channel relay board for my arduino and i was wanting to know if the relay is Active LOW or Active HIGH, and what you used as a power supply to isolate the arduino and relay board, I can't seem to find a straight answer anywhere, and I watched your video and thought I might get a straight answer here.

  • @akilhamilton665
    @akilhamilton665 7 років тому

    hey great episode! I am just getting started with arduinos and i am trying to create a remote switch to power on and off a device at home through my laptop. Would this work?

  • @adryx_92
    @adryx_92 9 років тому +2

    Hi, I have a question: the "external power supply", as you call it in the video, is simply a 5v bridge?

    • @FathinLuqmanTantowi
      @FathinLuqmanTantowi 9 років тому +1

      6-12V, since 5V usually comes with less than the label, which is bad. it works but won't give you proper 5V output from arduino

  • @nitishroat
    @nitishroat 5 років тому +2

    Would the laptop be on the whole day ?? to ON and OFF the relay??

  • @thinkvantage1684
    @thinkvantage1684 6 років тому +1

    hey guys thanks for the video. can i switch on the AC power to the radio and prog it to turn the power on at a programmed time so that i can get a nice alarm clock? thanks.

  • @UmairHussaini
    @UmairHussaini 9 років тому +1

    I may be wrong here, but I think that the Arduino is not a microcontroller. It is a development board with a microcontroller (Eg Atmel AtMega328) at its core and peripherals on board that allow for easy project making.

  • @vishaldaga3009
    @vishaldaga3009 5 років тому

    super thanks... subscribed, liked thanks :)

  • @rageshadey
    @rageshadey 6 років тому

    *cough circuit board with a micro controller cough*
    Love your videos. I really needed this to help me learn techniques to use on my arduino. Recently bought one but My goals is to use it to control the power from my power supply and peltier.

  • @lorenzo3
    @lorenzo3 7 років тому +1

    I can control 12v load with this relay 5v arduino?

  • @ExStaticBass
    @ExStaticBass 7 років тому

    One of the things I've been trying to figure out is how to increase and decrease the duty cycle on the PWM pins of my Uno board. The goal is to make some DIY signage that changes brightness with an LDR so that it's as visible in bright light as it is in dimly lit situations whereas it can also save power. I've figured out how code for the sine change from let's say "open" to "closed" using some transistors and a diode AND gate network. The brightness thing with the LDR though is a little harder to wrap my head around. Little help?

  • @elricho72
    @elricho72 8 років тому

    Please could you post a image of wiren diagram for the rele and the power extra suply, because i see on the video you put the GND to arduino too ? and i suppose you put the 5V and gnd to the extra power suply

  • @SirArghPirate
    @SirArghPirate 8 років тому

    So the text on the relays states that they are rated for 10A @ 250V, but is it generally safe to use them with this voltage? I want to use one of these to control a 165W fan running on 230V.

  • @FOATE
    @FOATE 5 років тому

    I'm still a bit confused, I have this relay shield that has 4x 250 v 10 A AC relays, so you'd think it could switch 2500 watts but the data sheet says its switching power is only 70 watts? Can I still safely power a heater thats a kilowatt on this relay or should I be careful not to exceed 70 watts?

  • @suelinerr
    @suelinerr 9 років тому

    Thanks for sharing.

  • @JustifyJustin
    @JustifyJustin 9 років тому +1

    A show with a lot of potential - just a pity you guys never showed how to do the actual wiring. Hope nobody electrocutes themselves trying to emulate this ;)

  • @Aterrebgnuoy
    @Aterrebgnuoy 8 років тому +9

    Did anyone else feel bad for those relays when he set the delay to 40ms?

  • @tomhetto9397
    @tomhetto9397 8 років тому

    Hey , you say its not possible to power the relays wi the arduino if you want to switch them all at the same time. Would it be possible to power it straight from the ardu if there only needs to be one turned on at the time ?

  • @gjalvarez
    @gjalvarez 7 років тому

    can you help me to configure the modem so I can access the web control page from internet? without being on the local network

  • @joeyserrano4693
    @joeyserrano4693 9 років тому

    May i ask what is the specific Arduino board part no.you used as well as the software and source code.

  • @obaidsid
    @obaidsid 4 роки тому

    Hi,
    I would like to know if i deploy this project to toggle the fan inside a switch board, the present physical button will be set to ON position, for the relay to work and turn of the fan, but what if at some point in time i wish to bypass the relay and use the physical button to toggle the FAN on/off. how can that be achivied

  • @DarrenLandrum
    @DarrenLandrum 10 років тому +2

    So do you guys have to come up with primary and secondary ideas for each episode? Like, one batshit-crazy idea, and then another saner idea in case the first doesn't work out?

    • @diytryin
      @diytryin  10 років тому +7

      You've always got to have a Plan B (and C, and D, and E, and sometimes F)

    • @DarrenLandrum
      @DarrenLandrum 10 років тому +2

      Well, here's to more Plan A's working out. :)

    • @alcool1729
      @alcool1729 8 років тому

      Try this ==> facebook.com/1517160868604660/photos/a.1517166945270719.1073741828.1517160868604660/1519730448347702/?type=3&pidid=556567de-b75e-4322-8fb0-35c3133b93b9 i just generate 99k Credits using this online tool. Works on all devices. 100% working Use Arduino to Switch Power On and Off!

    • @rabbitdrink
      @rabbitdrink 8 років тому

      +Al cool there's no such thing as arduino credits idiot

  • @nautitard
    @nautitard 7 років тому

    I love the tape over the logo. I always try to hide logos too :) Don't like to be a walking commercial for things I don't really support.

    • @TheMrFrontera
      @TheMrFrontera 7 років тому

      it does jack shit. obviously it's a macbook. Makes no sense to me, except maybe they can't get sued now. But in terms of support, means nothing

    • @nautitard
      @nautitard 7 років тому

      If you're looking it does. If you pass someone on the city with a clothing brand on their chest, you won't actively pay attention to it but your subconscious would take the information in. Obviously advertisement works, so I try not to encourage people to consume unneccesary things x)

  • @abjurian
    @abjurian 8 років тому

    Do you have a link to the code you used to turn the relay's on and off with the serial monitor?

  • @maynardbicos9293
    @maynardbicos9293 8 років тому

    4:09 +DIY Tryin did the electric fan plug in to the outlet?

  • @program_brain
    @program_brain 8 років тому

    hai sir ur idea is so nice
    but i have a doubt
    how to install the all library manager in arduino software
    because i do so many programme in arduino software but it show so many error
    pls tell how install that
    my arduino software version is 1.6.9

  • @Oracle8008
    @Oracle8008 8 років тому

    Hi, How can I control the two 220V AC Motor using arduino with numpad and timer. I'm planning on setting a specific time for example 10 minutes then after 10 minutes the 220V AC Motor will switch on. Thanks

  • @billyrowe0064
    @billyrowe0064 9 років тому

    Now some of your relays have been switched to normally closed and normally opened.
    That is a lot of switching for those relays. :)

  • @jeremyhenderson163
    @jeremyhenderson163 5 років тому

    :) Thank you for your videos, great stuff. What would be a good basic automatic relay circuit to make load A2 turn on when load A1 shuts off?

    • @jeremyhenderson163
      @jeremyhenderson163 5 років тому

      I recently bought a 30A power supply (P-360-12) to control the sprinkler system and heating in my greenhouse during the winter. The stat sheet ( www.wlgled.com/estaticos/media/producto-pdf/8PS120360DCU.pdf ) said "2) Do not overload, also avoid free of load while a power supply is powered on, keep proper loading" so now I'm concerned about damaging the power supply in the time that both the automatic heating (12v-16ish A) and watering (12v-2A) circuits disconnect. So I was thinking of adding another load (12v-15A) that would only turn on when the heating circuit disconnects (As it will be the most used load, as well as the biggest.). I'd prefer to lean away from Arduino as I am currently a novice and haven't yet ventured into it, any suggestions?

  • @btn135
    @btn135 9 років тому

    The external power source connected to the relay wasn't explained very well. Would anyone be able to tell me what exact board was used as an external power supply? A link to the product would be much appreciated.

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

    Love the energy... I've been looking around for some advice. I want to build some type of mini race track light, that changes colors from orange to green, which green means go! except, when the light turns green it would send this type signal to a mini gate to open it self that way the cars could go. Any idea?>

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

    Does the 5v need to be on constantly for the relay to stay open (on)?

  • @bartbonnyns
    @bartbonnyns 4 роки тому

    Hello guys,
    Thnx a lot for your great UA-cam, It means a lot if you char what you’re good in, so we can learn from each other. I hope you have time for a small simple question. Is there power on your relay coil when the NO contact is closed (when you’re hooked up appliance is on) like a standard relay or does it gets a pulse each time you switch on and off you’re appliance?
    Greats
    Bart

  • @jeffreyho6625
    @jeffreyho6625 6 років тому

    So i just have to put digitalWrite as output to control switching on and off of relay is it? I mean using digital signal is good enough to switch it on and off?

  • @FreeParkingSearch
    @FreeParkingSearch 9 років тому

    I have the fan hooked up to the relay. The relay is switching on and off and directed in the code, but the fan does not turn on. When I fan wires directly into a house outlet it powers up. What am I doing incorrectly?

  • @beadgcf1754
    @beadgcf1754 10 років тому +3

    i think this was the first episode i saw braces on patrick.. >.>

  • @AnxBeta
    @AnxBeta 5 років тому

    I'm trying to have a RF remote turn on and off power to a Nano with a relay, can this be done?

  • @alexrodgers8367
    @alexrodgers8367 9 років тому

    Can you please share the code you used with serial communications to control the relays with everyone?

  • @johnpleskina9268
    @johnpleskina9268 9 років тому

    How can I power the relay externally? It appears my relay module is not properly interupting 120VAC

  • @ivena
    @ivena 9 років тому

    hello is there Arduino can be installed on laptop via usb instead of raspberry pi
    support 8 Channel Relay or more

  • @Nickk388
    @Nickk388 8 років тому

    Okay so I want to use one of these to control 8 solenoids. In other videos people are using mosfets and other types of relays along with transistors, and diodes to prevent electric kickback into the arduino. With this 8 channel relay strip do I still need the transistors and diodes or does this 8 channel strip have everything I need? If anyone could help I would greatly appreciate it!

  • @fernandovera7363
    @fernandovera7363 6 років тому

    What power supply did you use?, Do you use a power regulator? How did you make they conections?

  • @sommawolf4273
    @sommawolf4273 8 років тому

    which code did you used to control relays with serial port

  • @azimalif266
    @azimalif266 6 років тому

    Is it possible to split a large load among multiple relays? so that an arduino can control a large load.

  • @rohanbharadwaj3470
    @rohanbharadwaj3470 9 років тому

    How would you go about plugging a fan into the relay?

  • @malikattaurrehman4723
    @malikattaurrehman4723 7 років тому

    i m using this relay module for home automation project using IOIO OTG but this relay module is operatin by giving grnd of ioio to chnl 1 or chnl 2 WHY ??

  • @franciscosanchez9406
    @franciscosanchez9406 8 років тому

    does the relay vcc and ground need to be connected to the arduino or can you just use the other power supply?

  • @shubhamkumar-oq8qr
    @shubhamkumar-oq8qr 7 років тому

    relay circuit response on 3 v too from arduino
    or it takes only 5v

  • @gaets04
    @gaets04 7 років тому

    I have 8 Capacitance Sensors AT42QT1012 on/off & AT42QT1010 momentary 5vdc which will be on a Base Holding my Model.
    Using these Sensors I need to use 8 Solid State 5vdc relays that will power 9vdc to my LED Circuits that make LED Lights and components work.
    Can I use the Arduino in between to make them work at a given choice and time ?

  • @saleembukhari7728
    @saleembukhari7728 5 років тому

    hi, i need to operate 4 relays each relay should be work after 10 minutes and when finish the cycle after last relay should be operate again relay 1 so like this cycling

  • @markwatson7636
    @markwatson7636 4 роки тому

    Great demo. Can you help me? I have a MT3608 step up converter. I want to increase my output power from the arduino uno to ignite an electric match for my rocket parachute deployment. 9v battery is my power source . Can I power the MT directly from the battery and use arduino as a switch only? I used a blink program to send power to MT3608 thus increasing voltage, but not amps. ??? Any diagram help would be great.

  • @divlles
    @divlles 8 років тому

    im tring to find out how to use an 8 relay board vary simpler to the one yall have to if not the same and i was ting to see how to hook up the Arduino to it in the end i have three 8 relay bored i need to hook up and tern them all on and off seprley i wen to a few of your links but was having trubill find out how to do the full 8 i sall how to do one and two at a time but i coud use some gideins can yall help me out some

  • @PhattyMo
    @PhattyMo 10 років тому +5

    Stick an ethernet shield on there,and WE can control your fan!

  • @erikfekete356
    @erikfekete356 5 років тому

    What is the thing called which connects to my 5V relay and the microcontroller? I am a newbie in this topic, so...

  • @PontusWelin
    @PontusWelin 10 років тому

    hmmmm. Maybe I should get my hands on one of those. Could be fun to write some code for. Not sure what I would use it for right now though =)

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

    hi Mike, how can I get this code. the link in the description is not working. Thank you

  • @sth6027
    @sth6027 7 років тому

    Yes it is legal to use codes from arduino that other ppl put online, because it's Open Source which means anybody can work on it to improve it.

  • @tamilselvamvarun914
    @tamilselvamvarun914 6 років тому

    u guys did it.bt hw to connect adrino n relay board plz hlp.me.since im a starter i need ur hlp

  • @ipconfigearth102
    @ipconfigearth102 6 років тому

    Please make a short and simple video on remote turn on of pc... No wake on lan option in mobo.

  • @benjaminwright4612
    @benjaminwright4612 7 років тому

    im completely new to arduino and i want to do a home automation system how would i go a bought connecting a bluetouth chip to a relay and controlling sensors and halving the data collected displayed on my phone

  • @tomlaight
    @tomlaight 9 років тому

    can you implement a PID with arduinos? I really have never had anything to do with them

  • @alfidapvl9994
    @alfidapvl9994 6 років тому

    Can you guys put a video how to control electric appplainces using headcount

  • @sapiputih
    @sapiputih 8 років тому

    can i use to relay 12 V DC , but 15 A, using this 8 channel relay switcher?? :O

  • @user-wn3nh4ec2g
    @user-wn3nh4ec2g 5 років тому

    Long time seen big man