Use Arduino to Switch Power On and Off!
HTML-код
- Опубликовано: 3 окт 2024
- 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.wi...
www.ebay.com/sc...
www.ebay.com/it...
Subscribe! www.youtube.com...
Have an idea for something we should build? E-mail us!
DIYTryin@revision3.com
*New Episodes Every Week*
Subscribe for free!
www.youtube.com...
DIY Tryin on Revision3:
www.revision3.c...
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?"
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.
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
DIY Tryin My L led is off and NO is dim what does that mean?
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
cool demo and great to see Patrick after all these years, used to watch him on The Screen Savers lol
I like the apple logo conspicuously hiding behind the tape haha
thats right cover that apple logo, hiding the shame lol
Hehe
i dont understand, wheres the shame in using apple?
It means "i am an idiot because I spent all my money on a computer from the 90s"
lololololololololololololol thanks
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.
Patrick Norton, I'm not sure if I'm old school or not but, I miss watching Screen Savers
you covered the apple logon on the macbook but you forgot down on the right the apple box
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.
Using relays to drive LED strips... Interesting...
Sarcasm? :p i would think mosfets are way better?
EEEnthusiast they were probably just trying to inrodyce us to the idea. We can even apply this to AC appliances
@diederik you are correct that mosfets would be much better for these types of applications. Either works tho.
Yeah... But there is no real difference... Relays are just easier to connect...
They literally applied it to an AC appliance in the video (the fan)
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)
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.
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
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.
gee, I wonder what kind of laptop he is using...
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.
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.
Stick an ethernet shield on there,and WE can control your fan!
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?
You've always got to have a Plan B (and C, and D, and E, and sometimes F)
Well, here's to more Plan A's working out. :)
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!
+Al cool there's no such thing as arduino credits idiot
Did anyone else feel bad for those relays when he set the delay to 40ms?
Music with the relays is a great idea! This other channel on RUclips, 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!
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.
Subbed just for that ending dance
Are you sure it's safe to flip that relay every 40ms? There must be a minimum time to flip that's safe to use without overheating and mechanical wear etc. Be careful with high voltage.
Timur Iskhodzhanov
Well you certainly aren't using this to light up a room. It's for like r/c airplanes and drones, to like switch a clutch on and off. Cvt transmission servo motor operation, some lighting, etc. You just gotta learn the silly code :#
I'm much more worried about the coils generating voltage spikes.
LOVE the channel name...
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 ;)
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.
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
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)
You've been so helpful! Thanks! I really like your videos and their quality!
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.
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?
Now some of your relays have been switched to normally closed and normally opened.
That is a lot of switching for those relays. :)
I like how you cover the logo on the laptop but leave a blatant apple sticker uncovered in the background
Raspberry Pi is not a micro controller.
lmao. true
Raspberry Pi is not just a micro controller........
theoretically, you should be able to drive all 8 relays, the UNO can handle 20ma per output, with a total of 200ma total, and each relay is designed to be driven by 20ma, so 20ma x 8 relays= 160ma, this is on the specs of the relay board and on the arduino, you do can drive all of them, but is not wise to do so if you are going to use it a lot, it will shorten the life of the arduino board, is always better to use power driven devices with an external power supply
or just use transistor driver to draw current directly from source
I subbed up guys! Really like learning this kinda of stuff and seems like y'all are gonna teach me some.
thanks for the useful practical demo
Very neat. Thanks for the tutorial.
*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.
i think this was the first episode i saw braces on patrick.. >.>
Arduinos dont have the power to turn on a single relay, the signal is optocoupled to the relay board and the relays are actually powered by an external source ONLY.
Would the laptop be on the whole day ?? to ON and OFF the relay??
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.
4:10 and i thought i was tab-hoarding...
Arduino is rated for 6 - 20 VDC. Raspberry Pi, as a I learned the hard way, is only rated for 5VDC.
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
you have to check the license to see what is legal to do with the software taken from other developers. it's not generally 'accepted and cool' if the license does not say so
Finally people who speak english
Lcome to the church of the flying spaghetti monster!
deadpool? wade? is that you?
Arduino is not a microcontroller, it's a development board brand that uses different microcontrollers.
Be careful buying Arduinos from eBay. Many, many are counterfeit. I'd buy from Adafruit, Sparkfun or Makershed (or Radio Shack as they note in the video) where you can get authentic Arduinos, or good, supported, compatible boards.
I've bought two from Amazon from Mp3carstore and they have both been authentic.
I specifically meant counterfeit in the trademark sense.
Hello guys,
Thnx a lot for your great RUclips, 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
Will play around with this, thanks for sharing.
Let us know if there's any other cool projects or ideas you'd like to see in the future!
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!
would you show me the project with more details I mean how you connect wires from zero to end and I procreate you
you don't connect 0 and 1 on arduino,
relay 1 connect to 2 , relay 2 connect to 3 and so on
If you wanted to set a pair of Christmas lights flashing for 10 minutes then swap to another pair for 10 minutes, how would this work with this relay?
Mike
Patrick you old tech guys buddies is Rosevelt right
Deserve aThumbs up and subscription from Brazil ;)
I know enough about this stuff to know that I don't know anything about this stuff, except that it can be built to do with I need done. Unfortunately, I don't know enough about this to do it.
you have earned a subscriber
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.
I think I'm getting an arduino kit for Christmas.
Sti cazzi
If you need to turn stuff off rapidly or over a very large number of cycles, look for a solid state relay board. Same people make one and that can go very fast, for a very large number of cycles, and is silent.
If you just want to turn one thing on/off with an arduino, very safely and easily, look up the PowerSwitchTail2, a hobbyist product that has everything (except the arduino) safely isolated, tested, etc.
Can you guys put a video how to control electric appplainces using headcount
Sorry, but you made a mistake, a Raspberry pi is microprocessor not a microcontroller.
Its neither its a single board computer that has a soc that contains a microprocessor
Hi guys, great channel!!! liking the relay idea, please post the arduino codes up that you used to drive the 8ch board, thanks
Please make a short and simple video on remote turn on of pc... No wake on lan option in mobo.
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?
you covered the apple logon on the macbook but you forgot down on the right the apple box
guys you are awsome, may god bless you
Just copy and paste on and of fans and LED common growth up.That setting suitable for LED show..my friend use to monitorong Kwh Meter and Bill from work via GSM..common Patrick do something
Hi, I have a question: the "external power supply", as you call it in the video, is simply a 5v bridge?
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
How about adding bluetooth and an app for mobile devices?
What power supply did you use?, Do you use a power regulator? How did you make they conections?
Great info. Could this also be used as a 12v fuses box, so if one was running 12v devises it would protect them?
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?>
It will be nice if you show how you connect them.
This is nice if you want to do something like a Home Automation setup :D
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 =)
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
How can I power the relay externally? It appears my relay module is not properly interupting 120VAC
i used bluetooth to control the arduino wirelessly from my phone with an app to turn relays on and off only problem is i havent figured out how to get the arduino to stay in whatever state it is when i exit the app as soon as it losed blutooth connection power to the relays returns to default
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?
hi
i want to simulate a push button using bluetooth from my phone on a music system
what i want to achieve by doing this is when we power on the music system(by using WiFi enabled Sockets), by default it starts in aux mode
by using mobile with bluetooth it changes it from aux to bluetooth mode so we can connect it with mobile and play music at scheduled time by using Tasker app
so we dont have to physically push any button
thanks
It would be nice if you could teach me how to wire this up.
I'd like to have an arduino connected to the power button leads on my pc so when I want to turn on my pc before I get home, I can give the arduino the signal and it'll connect the power button leads together, turning on my pc.
Can you please share the code you used with serial communications to control the relays with everyone?
The "external power supply", what exactly is it? What is with the screen on it?
Any idea why i can get my relay to work with my arduino is powered by a battery, but when i connect my arduino to a 9 volt power supply (actually sending 9.2 volts), the relay doesn't work properly? ...it sticks "closed" (LOW) and won't disconnect?
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 ??
Is it possible to split a large load among multiple relays? so that an arduino can control a large load.
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
How to connect an external power supply for the relay module?
that 'switching' thing around the 6min mark is really bad for your relays man.
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?
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
I can control 12v load with this relay 5v arduino?
would you tell me how to control a solenoid (12v) with arduino through a relay ?
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
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?
Can this be set to turn on and off at certain times without having to change the code each time. Example a school bell that goes on to alert students a period is over 9 times a day automatically. Can it also be fixed so that it automatically sets daylight savings time? I'm trying to work on this project making it function automatically without anything extra done to it once it is complete.
with the right code it can do all of that stuff