How To Add Relays to Your Projects- The BASICS

Sdílet
Vložit
  • čas přidán 24. 07. 2024
  • How to use relays with Arduino and more projects.
    See more of my Electronics and Arduino videos here: • Electronics Mailbags &...
    Where I buy relays: amzn.to/2MSJEd0
    Remember to subscribe for more videos! goo.gl/2qaJ2U
    This is a simple tutorial showing how I use relays with my Arduino and Raspberry Pi projects to control any device. A relay simply uses a low current supply (like Arduino, PIC etc) to control a high current device such as lights, fans, pumps etc.
    You can simply use the blink example sketch to get started. All you need to do is send a digital on/off to the pin controlling the relay and you are all set.
    Be very careful with mains power (110/230 Volt) as it quite simply will kill you. The end... If you don't know what you are doing, stick to low voltage DC circuits please.
    +1000 OCD points to those who notice the flaw in the Eric CAD wiring diagram :) That actually wasn't intentional but after 6 takes of the bench footage- I wasn't about to consider doing it again...
    As well the relay was ground side switched (I had to switch modules during filming arrrgh) so the state is inverted compared to the OLED. Function is the same and I didn't want to have to re-take the video. This actually illustrates quite well that some relays will indeed be ground side switched on the trigger pin. Bonus :)
    Hope you enjoy. You guys are truly amazing!
    Here is the extremely messy OLED code- I wouldn't suggest even looking at it as there is a bunch of old code I never got around to removing which you do not need. Check out my OLED video for better code :)
    mkme.org/forum/viewtopic.php?f...
    ------------------------------------------------------
    Get Social with Me!
    Google Plus ➢ goo.gl/4o2wMu
    Twitter ➢ / mkmeorg
    Instagram ➢ / mkmeorg
    SnapChat ➢mkmeorg
    Facebook ➢ / ericwilliam13
    -----------------------------------------------------
    Shop at Amazon and support my channel:
    Shop Amazon US ➢www.amazon.com/?rw_useCurrentP...
    Shop Amazon CAN ➢www.amazon.ca/?rw_useCurrentPr...
    Shop the MKme.org Store ➢store.mkme.org
    -----------------------------------------------------
    My Website and Related:
    Main Site ➢ mkme.org
    Blog ➢ blog.mkme.org
    Patreon ➢ / ericwilliam
    G+ Community ➢ goo.gl/6rMPsi
    MKme Facebook Page ➢ goo.gl/aXg29
    -----------------------------------------------------
    Thanks for Subscribing!
  • Věda a technologie

Komentáře • 203

  • @dilpher
    @dilpher Před 7 lety +3

    I watched many videos on relays and you are the only one so far who explained why a diode is used in the circuit. Great video, thank you and I look forward to watching more videos from you in the future

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      Thanks David. Lots more videos on the channel. Glad to have you. Cheers.

  • @far-red
    @far-red Před 7 lety +1

    I was trying to understand how can a raspberry pi control high voltage device. This video helps clear those doubt. Thanks

  • @Starbuck7410
    @Starbuck7410 Před 7 lety +3

    This video helped me alot figuring how im supposed to control a 9V 5A Peltier module for my mini fridge with a microcontroller like Arduino

  • @Wrighty
    @Wrighty Před 6 lety

    Hi, I wonder if you could help please. I'm not much good with this sort of thing. I have a twin relay module and I can't get the relays to trigger. I'm ok with the output, but on the 12v input side I am unable to wire it. The terminals I have are CL2. CL1. DC - and DC + any help you could give will be very much appreciated. Thanks, Terry.

  • @ChristopherGaul
    @ChristopherGaul Před 7 lety +1

    This is a great video that I'll refer all of my beginning electroncis/maker/arduino/pi friends to.
    One note is that the type of relay shown in the video, designed for use with micro-controllers like the Arduino, often comes with the clamping diode built in. I would personally recommend people check for that and order that type to save the hassle of doing it manually and the worry of forgetting about it or installing it backwards.
    On another note, because this video is going to get people thinking about all the cool projects this knowledge opens up, maybe you should do a follow up video covering latching relays. What they are, how they work, using them with micro-controllers, etc.
    Thanks

  • @gleehyuki6622
    @gleehyuki6622 Před 6 lety

    Gud day mate. Would like to seek help from you.. Would like to build a overheat alarm on our diesel fed generator. From the signal coming from engine thermistor at 55 celsius but dunno if how to use relay for this set up. Please help.

  • @mariehuynh
    @mariehuynh Před 7 lety +2

    Perfect. This video contains exactly the info I was looking for to build an automated irrigation system.

  • @elmagicocustoms
    @elmagicocustoms Před 7 lety +4

    thanks for the info! question: I want to run an air filtration system with an ir controlled relay with remote, since the unit will be hanging from the ceiling. But I'd like to have a couple options, ON, OFF, 2HR, 4HR & 8HR run times. Can I do this with relays only and some type of timer or would I need to incorporate a pi or arduino? Thanks

    • @MkmeOrg
      @MkmeOrg  Před 7 lety +4

      You could do either. Easiest would probably be to use an Arduino and a real time clock to control the relay. Just use the code for my Arduino Urban Kitchen Garden project and adapt it. Easy. czcams.com/play/PLxyM2a_cfnzgLjCoJ04S2Z812JrdFKbFX.html

    • @iRuf12
      @iRuf12 Před 4 lety

      @@MkmeOrg hi dude read your comment and watched urban kitchen, nice nice. Ive got some GM5 far red 12v led pucks that i wish to power from 12v CC led driver triggered by a 12v signal from chilled drive controller. Im a new twat at diy electronics but i love it! Ive had to learn a lot building a new indoor garden as eco as possible. 2KW of led still!! Any help much appreciated

  • @dougdroneflyer5807
    @dougdroneflyer5807 Před 4 lety

    How about adding the relays as a reversing (DC) circuit ..
    My actuator needs a control box that will go fully open then close then back to open again (cycling).. I was wondering if there was a way to set up something for my hay baler ...

  • @brucemarmy8500
    @brucemarmy8500 Před 7 lety

    I thank you for the good will. I am trying to set a timer circuit on an iDrive 300 motor control for shades. the iDrive has cube contactor for close shade and another for open shade. The controls have manual open and close positions as well as auto position. the cubes are wired for manual, can I lap a set of timer wires onto the existing connections for timer operation? using the same input voltage (24vac).

  • @dmeat0rz
    @dmeat0rz Před 6 lety

    Hello, I'm having trouble with my low level relay :
    - when I power it with 5v, the input from the arduino works (green LED turns on and off) but the switch isn't actually actuated.
    - When I power it with 9 or 12V, the switch triggers, but the input is not recognized (the green LED just stays lit)
    What do you think is causing that ?

  • @romanDefy2000
    @romanDefy2000 Před 7 lety +1

    What a great video. Thank you so much for posting this. Really interesting to hear your comments with the relay diagram.

  • @joshuavincent7884
    @joshuavincent7884 Před 4 lety

    whats a good way of testing that your diode is absorbing the back emf without an oscilloscope?

  • @wruubiq7345
    @wruubiq7345 Před 6 lety

    even if I use the relay controlled by arduino into 240V line to neutral would it still be possible depending on the specs of the relay and the diode connected?

  • @caffeinatedinsanity2324

    Got an 8 relay module and i'm looking forward to cut off 5 outputs on my arduino by using an 8 bit shift register 74HC595 IC chip. Boy will this be a fun project.
    Mine has optocouplers to seperate the input section from the coil and needs a seperate 5VDC supply there, and is an active low module. Problem is I'm not sure what approach should I take when dealing with latching relay states internally when using the IC. Don't want to add 1 to my byte variable every reading cycle and start glitching my relays by flicking at a crazy rate. Should I use an array of booleans or bits or anything else for shifting out (function used to write the output states in the IC)?

  • @ciccioformaggio6897
    @ciccioformaggio6897 Před 6 lety

    Hello dear friend, can you kindly answer this question? Is it possible to directly connect(without Arduino) a pir hc-sr501 which has a 3.3v output to a relay that requires a low trigger level? If so, how should the link be? Thank you very much

  • @johnedwards1968
    @johnedwards1968 Před 7 lety +2

    Could I ask what specs you would recommend for the clamping diode?

  • @norbac
    @norbac Před 7 lety

    Thank you so much for posting this video! I've watched several videos explaining relays (and their practical applications) and yours is one of the best explained out there because your simple sketch was actually compared with the actual setup a good eye opener. Thanks again! Keep up the good work!

  • @bmlstar2449
    @bmlstar2449 Před 6 lety

    I have a question, can we use this relay on 2 power input to 1 output light...1 power input using normal switch on off and 1 more power using sensor motion...

  • @stephenwaugh6558
    @stephenwaugh6558 Před 2 lety

    I'm not sure how to wire the relays for my 12V system in my camper and requires 15, 20, 30, and 40 amp fuses to run my awning in and out with a switch, can these be used instead of those 5 wire relays?

  • @shreyasGV
    @shreyasGV Před 6 lety

    I'm extremely thankful for this video!!! Helped me a lot!!! Thank you!!!

  • @jazzyj2899
    @jazzyj2899 Před 2 lety

    hey thanks for the vid. what sort of gloves did you have on? are they rubber? wondering if I could use my rubber dishwashing gloves

  • @artart3057
    @artart3057 Před 4 lety

    In relay 2 module. Why must have a jumper at VCC and VCC, if I plug in at VCC and GND will happen?

  • @bloodswarms
    @bloodswarms Před 6 lety

    I want to use a relay to turn on/off a common household 20" box fan (with arduino on a schedule)? I'm going to do some googling to see if there are perhaps charts with relays and typical applications vs loads.

    • @MkmeOrg
      @MkmeOrg  Před 6 lety

      Relays are rated for load. Easy math ;)

  • @ajayassani9413
    @ajayassani9413 Před 7 lety

    Hello Great Video and thank you for your time in making it. I need to ask you a quick question on which relay I will need to operate 230v input and 0 volt or 5v output. Basically need a relay so when I plug it into wall socket motor turns oneway and when I unplug from wall socket it turns other way. The motor has its own power and is plugged in the socket all the time.

  • @kennyfarrugie5352
    @kennyfarrugie5352 Před 7 lety

    I want to control my very small solar setup, i have ordered an orange pie one and one of the two bank relay boards. Im new at this so it should be interesting. I just want the DC current from the panels to switch from the batteries to my grid tie when the batteries are charged. Thinking this should be relatively simple any suggestions?

  • @williamcoleman3208
    @williamcoleman3208 Před 7 lety

    I think this video was very satisfying.I LOVED it!Best video ever made by man!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @mizayass489
    @mizayass489 Před 7 lety +1

    i want to use relay to move the 12volt dc motor left and right.. the relay cooperate with two infrared sensor.. can u xplain further?

  • @RD-ni7qe
    @RD-ni7qe Před 4 lety

    Can I switch using either the hot or ground side of the relay coil? Does it matter, or is there a convention?

  • @derrickhayden4762
    @derrickhayden4762 Před 4 lety

    I have a pool pump 220V motor (L1(110v) and L2(110v) connections). The motor has a max load of 15.0/7.5 amps. I have a 2 relay board 10 amps a piece that I was hoping to connect one relay to L1 and the other relay to L2. My program would turn on both relays on the board at the same time. What are your thoughts on doing this?

    • @MkmeOrg
      @MkmeOrg  Před 4 lety +2

      You need to get an electrician (or their help). You cant split phases across separate relays. You need to use a contactor.

  • @karamchris
    @karamchris Před 7 lety +1

    You may have answered this, but I'm having trouble creating code on my arduino to control dwell times in .5ms increments.
    I need to then add the code to a GUI for a touchscreen that I can manipulate for a sprayer. The relay will power a solenoid valve for a simple on/off operation to apply product to our samples at work.
    Any help would be greatly appreciated.

  • @mariaerrylaesto8953
    @mariaerrylaesto8953 Před 6 lety

    Hello! This is a very informative video. In connection to using relays, I would like to inquire on how to use them in four way solenoid valves? Thank you so much. Keep it up!

  • @surenbono6063
    @surenbono6063 Před 3 lety

    ..can the arduino be powered from the main too via the relay instead...stepdown bridged

  • @chungchichiu9779
    @chungchichiu9779 Před 7 lety

    very good explanation. thank you

  • @downloadmovies4194
    @downloadmovies4194 Před 7 lety

    hi sir. by the way thanks for the video. its very helpful. but Im asking about if posible that im using heater 220v in relay module v3.1 in arduino. what diode can i use? and can you help me in connection?

  • @sa1nts1n
    @sa1nts1n Před 6 lety

    Thanks for the video. The explanation is amazing.

    • @MkmeOrg
      @MkmeOrg  Před 6 lety

      Glad you found it helpful. Good luck in your projects! Check out the other vids on the channel. Plenty here ;)

  • @DylanMangel
    @DylanMangel Před 7 lety +1

    Great video, I was having a hard time understanding this but this video helped.

    • @MkmeOrg
      @MkmeOrg  Před 7 lety +1

      Thanks for that Dylan. Sometimes it gets a bit tough hearing people complain about free videos- but when someone like yourself leaves a genuine, simple, honest feedback- it is truly appreciated. Good luck in all your projects. Eric

  • @arvindkumawat4035
    @arvindkumawat4035 Před 6 lety

    What can we use if we want a output voltage between minimum and maximum voltage (not as on and off switch but as a fan regulator)?

  • @misperry
    @misperry Před 8 lety +1

    Hey there I am glad you mentioned the diode. The voltage spike can really destroy a micro or transistor if the relay coil is big enough. I usually use a 1n4007 or similar if I am using relays that don't have an onboard diode. Cheers

    • @MkmeOrg
      @MkmeOrg  Před 8 lety +1

      +misperry Sure can. Cheers Sir

    • @RavianXReaver
      @RavianXReaver Před 7 lety

      Relay boards do have diodes right?

  • @Berghiker
    @Berghiker Před 3 lety

    Can I use the same battery for both outputs on the relay for 2 different circuits? I did this but the relay keeps clicking. It can't stay on.

  • @crappysammy
    @crappysammy Před 8 lety

    is there a special diode to be used or a specific name or are they just all the same? im new to this and a few tips with these would be nice!

  • @thomasDSoundDesign
    @thomasDSoundDesign Před 7 lety

    Hi Mkme Lab, Hope you can help. im confused about which type of relay to get. The relays in your video say "SRD-05VDC" does that mean you need 5v to get the relay to work? Iv saw other relays that say "SRD-12VDC" so would that one need 12v?
    I need to get a relay which can be switched on by 5v and which will be switching on a 12v line.
    Thanks

    • @edlingja1
      @edlingja1 Před 7 lety

      codoyen
      You can operate a switch that doesn't actually draw from the 12V supply.

  • @babunethaji
    @babunethaji Před 3 lety

    Can I use this for 48v DC?

  • @VacancyJB
    @VacancyJB Před 6 lety

    hi, i gone thru some video that they recommend to supply separate power supply for the relay, but some don't, i not sure is it really necessary to have a separate 5v supply to the relay?

    • @VacancyJB
      @VacancyJB Před 6 lety

      Yan Mong Chan , thanks for your reply. if my relay has lesser ohm, should i add a resistant in series with the relay? will it works?

    • @tomazjancic9057
      @tomazjancic9057 Před 6 lety

      At 3:03 he basically explains why you shouldn't connect a relay directly to the arduino or any other microcontroller. For that you have control circuits like Yan Mong Chan explained which basically work like this: Output of an arduino or microcontroler triggers a transistor (who in this case operates as a switch) which then triggers the relay, so if anything goes wrong with the relay, the control circuit will get damaged while arduino will be safe.
      If you want to control more relays or other components like motors the easiest way would be to use a Darlington Transistor Array for example ULN2803 (www.ti.com/lit/ds/symlink/uln2803a.pdf) as they require minimum components. All you need for this is the ULN IC and power supply which has to be the same as the power requirements of the device you are controling (12V if using 12V relays, 24V if using 24V relays,...).

  • @souncivilized
    @souncivilized Před 7 lety

    Hi - thanks for the direct and informative video. Do you have the link to to the relay you're using?

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      Just search Arduino Relay :) Sorry I dont have links anymore.

  • @mistakelove7748
    @mistakelove7748 Před 7 lety

    Thank you, it's very informative. One question for you, if we are on and off the circuit every second, does it harms the relay?

  • @robviolin1
    @robviolin1 Před 7 lety

    Good vid, thanks. I would like to setup a relay that reads battery voltage. When the battery voltage gets below a certain voltage, the relay should turn off. Example - I am running a battery with 4.2 volts. As I am using the battery , and it falls down to 3.5 volts, the relay should switch off. I am hoping I can use a relay to disconnect a power line to the battery. Thanks.

  • @mrjn5786
    @mrjn5786 Před 7 lety

    hey can i control it for my dc battery charger??

  • @KokoMbella
    @KokoMbella Před 8 lety

    Hi Eric, i would like to run a freezer and a water pump with PV energy ( without electrical storage ). To switch the pump and the freezer on and off i am planing to use relays. To make best use of the PV energy i am thinking of using uv LED light strips to sterilize the pumped water. So my question to you is, how would you control the uv LED light strips, with MOSFETs or relays? Thanks in advance

    • @MkmeOrg
      @MkmeOrg  Před 8 lety

      +Coco Mbella If there isnt need for dimming etc- Good old relays work great and the current consumption for the coil activation is quite low.

  • @akhilyalagonda6644
    @akhilyalagonda6644 Před 8 lety

    Hello Sir, can i connect a 450 VAC with less than 1 amp to these ice-cube relays?. Though the rating shows 240VAC - 7A.

  • @baileysmooth
    @baileysmooth Před 5 lety +1

    If we look at the diagram on the left and name the points around the square from the top left as A, B, C, and D wouldn't it make more sense to put the diode between points A and B (between pin 13 and the coil)?

    • @baileysmooth
      @baileysmooth Před 5 lety +1

      Actually, never mind. I just solved my own question. The collapsing field generates power and continues to flow around the new circuit feeding the current controlled current source over the coil. Makes sense. If anybody wants to see a visualisation of this I put one up on imgur: imgur.com/EZKTr0G

  • @viktor_vaughn
    @viktor_vaughn Před 6 lety

    Does this kind of relay only switches AC current output, or would I be able to control a DC current with it?

  • @satrah101
    @satrah101 Před 6 lety

    Hello MKme Lab, Great channel. Can ask what type of gloves you are using in your video. Thanks in advance.

    • @MkmeOrg
      @MkmeOrg  Před 6 lety

      Just standard 1000V gloves

  • @akro286
    @akro286 Před 7 lety +1

    Thanks alot for this video, now i gotta use this same concept to control my light through a bluetooth module.. I wonder how :)

  • @artsofthewood5748
    @artsofthewood5748 Před 5 lety

    I'm working on making a timer to turn a motor on and off on my pellet stove.

  • @RavianXReaver
    @RavianXReaver Před 7 lety

    great video! and hey, how do i know if my relay board has a diode or not?

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      It will almost always be marked on the relay case with a diode symbol across the coils connections.

  • @rodriguezfranco3839
    @rodriguezfranco3839 Před 5 lety

    Can someone tell me if a ssr can be used for 5v direct current? would be to control an injector in a fuel injection project managed by arduino

  • @TechyAsit
    @TechyAsit Před 7 lety

    Thank you so much for this Video !

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      You are very welcome. Lots more on my channel. Eric

  • @knut5328
    @knut5328 Před 8 lety

    im new to electronics so i dont know how to use a transister yet :/ so do anyone know if i can use a relay instead for my LED Cube and will the timing be right?

    • @MkmeOrg
      @MkmeOrg  Před 8 lety

      If you are doing any high speed switching/dimming- no a relay wont work. Cheers

  • @tomcatmeow69
    @tomcatmeow69 Před 6 lety

    I hooked up an 8 channel relay module board one of those typical ones you buy from amazon. I wrote a simple sketch to check it out as I want to use it to power some linear actuators. On power up all relays go high and turn on power to all linear actuators and everything that could be connected to them... this is not good. Once the program rolls through the loop the first time it functions as programmed where I'm cycling through the 8 relays turning one on at a time with a 1 second delay and then back off. So how do I get around this problem on power up where everything turns on?

    • @kristianbell5273
      @kristianbell5273 Před 6 lety

      Tom Collins - I’m having the same issue - how did you manage to resolve this? Thanks

  • @honeyhoney2182
    @honeyhoney2182 Před 8 lety

    Sir i don't know how to give power to the relay?Can i give it from the arduino mega board which i am having or externally?
    If i give it from the board will it damage it or if externally then how should i do it?

    • @MontclairsLair
      @MontclairsLair Před 8 lety

      Do it externally. Remove the jumper on the relay and remove the ground wire coming from the Arduino. Connect your 5v power supply to the relay GND pin and the JD-VCC pin (or whatever it's called on your relay board, where you removed the jumper). Otherwise, you may encounter Arduino resets when the relays are under load.

  • @FrankP83
    @FrankP83 Před 7 lety

    I've just bough a Dushbutton from amazon (5$) ...is possible to use an arduino micro with a wifi module and a relay to turn on a light? :)

  • @JordanMiller1117
    @JordanMiller1117 Před 6 lety +1

    What kind of power supply do I need to purchase to power an 8 channel version of the relay?

    • @MkmeOrg
      @MkmeOrg  Před 6 lety

      You need to figure out what your control circuit is drawing and add the relay coil draws. Depending on brand they are usually 50-100 mA each in my experience.

    • @JordanMiller1117
      @JordanMiller1117 Před 6 lety

      MKme Lab I’m just going to be using it to turn a heater on and off. Leaving the plug intact and just snipping the positive wire and wiring that into the relay. So really I only need the 5V supply to be able to activate the relay. Correct?

  • @pabsime
    @pabsime Před 7 lety

    The relay board he is using is active low. If you notice, whenever the lcd read "Relay On", the relay led went off, and when it said "Relay Off", it would come on. That because it is active low, which is the opposite of what the blink sketch logic is doing. In other words, if you want to activate the relay, you must write "LOW" to it, and to turn it off you must write "HIGH"...Just a heads up, although I'm sure most of you would figure this out when testing your relay boards.

  • @TheWreckingYard
    @TheWreckingYard Před 8 lety

    Good stuff Eric, I realize that the relay schematic you drew was deliberately simplified for illustration, but it's very much worth mentioning that the arduino can't source enough current to drive anything bigger than the smallest relays, minimally a transistor should be used to switch them. The boards with an integrated driver (likely an opto-isolator) like your boards are a big help and not particularly expensive.

    • @MkmeOrg
      @MkmeOrg  Před 8 lety

      +TheWreckingYard Indeed. In hindsight I wish I did the video a bit different but for the audience that will actually be searching/viewing the video I figured this would do. Hard to draw the line and not make 20 minute videos that no one will sit through :)

    • @MontclairsLair
      @MontclairsLair Před 8 lety

      This, so much. Arduino resets will plague you if powering relays from the Arduino. Remove that jumper and power the relays separately.

  • @richardtran1030
    @richardtran1030 Před 7 lety

    Thanks for the video and love the way you explain with simple languages:" The funny part coming....... wacking the Arduino" which help me learn faster. lol.
    I'm trying to learn how to make stair light.

  • @berniken6511
    @berniken6511 Před 8 lety

    Hi Eric, in the video you stated that for those who wanted the more elaborate code you would put the link below but I can't find it. I am particularly interested in the oled code. Thanks Eric good video as usual................................. Berni UK

    • @MkmeOrg
      @MkmeOrg  Před 8 lety

      +berni ken Hey Berni. Added it to the description but it is really messy and needs the junk from the pulse sensor code removed. You will get the idea though but if you need just the OLED go check out my OLED example video and grab that code- much cleaner :)

  • @2112user
    @2112user Před 7 lety +1

    Planning on making a fish tank heater here, with the arduino, relay and thermistor. (store bought ones fail in the on position, and I believe this can be made to protect against/replace the built in thermostat in those heaters. I was wondering what the "extra" components on the prebuilt boards were.... I didn't know I needed a diode in-line with the coil pins, never needed one for auto's applications. Now, just have to learn to set up the programming side.

    • @MkmeOrg
      @MkmeOrg  Před 7 lety +1

      I have 2 reef tanks and if I didn't already have a Reef Keeper on each of them I would definitely build the circuit you are building. Stuck heaters have killed many tanks. Super easy to add a tonne of functions like temp display/alarms. ph alarms/display, water level switch etc etc.

    • @2112user
      @2112user Před 7 lety

      I've noticed that, been shopping around for a new one and on every product theres warnings for one or more person about how theirs broke in a closed loop and killed everything. It was at that point I looked over at the printer and wondered..... it's basically the same... kinda. I'm just starting to learn (or trying to learn) the programming side. I would love to add a small display to show temp or set temp and actual temp. I think that would be a really cool feature to have. And advice on display to use and where to best learn how to program it? So far the extent of my arduino knowledge is simple tweaking an arduino/ramps for 3D and making a custom thermistor table.

  • @TheMichaelGrace
    @TheMichaelGrace Před 8 lety

    Awesome! Thanks.

    • @MkmeOrg
      @MkmeOrg  Před 8 lety

      +Michael Grace Welcome!

  • @Hyuts
    @Hyuts Před 7 lety

    Thanks!

  • @ZakkBlog
    @ZakkBlog Před 8 lety +1

    Awesome tip for beginners, Eric! Thumbs up as always :)
    P.S. hope you're enjoying the sunshine ;)

    • @MkmeOrg
      @MkmeOrg  Před 8 lety

      +ZakkBlog Thanks Sir. Cheers

  • @kelvink9999
    @kelvink9999 Před 7 lety +1

    Great video, making relay and power board for school project-Underwater robot.

  • @jham4333
    @jham4333 Před 5 lety +4

    You should have shown a close up view of how the relay was wired.

  • @ninacrotch7843
    @ninacrotch7843 Před 6 lety

    I am sick of my 91 corolla, leaving the light on, it does not have any beep or warning to let me know that I did left the light on, so I am going to connect two relays horizontally to have two positive voltage from the door switch(fuse) and the head light switch(fuse), so with the two on, I will power on a beep device that I will connect the circuit, like this I will save my battery :), what do you think? sounds like a project? :)

  • @SamoSamo7s7
    @SamoSamo7s7 Před 7 lety +3

    To not complicate stuff: Relays are automatic switches that are typically positioned where the use of regular/manual switches is impractical. Thank me later.

  • @RichardT2112
    @RichardT2112 Před 8 lety +1

    Good explanation, an even easier one : remote switch.

    • @SamoSamo7s7
      @SamoSamo7s7 Před 7 lety +1

      Richard T Indeed it is, nothing more than a remote switch. The 'basic' people certainly don't need to know more than that.

  • @infoelectronicsx5992
    @infoelectronicsx5992 Před 7 lety

    Hi there, thanks for this awesome tutorial dude. Anyway, I want to know how to connect bluetooth module to relay. Thanks dude.

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      Bluetooth to Arduino. Arduino to relay

  • @LetTheWritersWrite
    @LetTheWritersWrite Před 7 lety +1

    Does that relay board also require a diode on the arduino? I didn't quite get the diode part.

    • @AgentOffice
      @AgentOffice Před 7 lety

      LetTheWritersWrite I think the collapsing magnetic field from the relay can back feed and cause damage

    • @MkmeOrg
      @MkmeOrg  Před 7 lety +1

      Yep- As the collapsing magnetic field cuts through the coils it induces a voltage opposite the normal polarity and very large in magnitude. This needs to be conducted back to the source (the coil) to protect any micro controller.

    • @AgentOffice
      @AgentOffice Před 7 lety

      MKme Lab how do you run a relay from an arduino? even relay current is big

    • @pabsime
      @pabsime Před 7 lety +1

      The relay board he was using already has a flyback diode built into it, so you can just plug and go with the arduino. It is important, however, to use a flyback diode if using a relay by itself. Make sure you also check out the relay specs to make sure the arduino can handle the the coil current. Max I/O pin current for the uno and mega are ~20mA and ~40mA, respectively.

  • @rrrrrrrr290
    @rrrrrrrr290 Před 7 lety

    hi I'm using a relay and Arduino to switch on and off a solenoid door lock
    my problem is on power up of the Arduino the relay activates unlocking the door
    I set the Arduino pin low but dos't help.
    Again my problem is when the Arduino power is restarted the door opens as the relay gets
    a pin high from the Arduino
    any help please

    • @MrBildo
      @MrBildo Před 7 lety

      Try setting your pin HIGH initially. Make sure you do this in the setup() phase.

    • @rrrrrrrr290
      @rrrrrrrr290 Před 7 lety

      MrBildo thanks for your help I made the change setting the pin HIGH and made the changes in the loop from high to low etc
      and it works great
      so thanks again

  • @iRuf12
    @iRuf12 Před 4 lety

    lol just checked the merchandise page. awesome

  • @mustafayousif2696
    @mustafayousif2696 Před 7 lety +1

    thank you so much

  • @berniken6511
    @berniken6511 Před 8 lety

    Thanks Eric.

    • @MkmeOrg
      @MkmeOrg  Před 8 lety

      +berni ken Welcome :)

  • @christiankjrjensen5122

    Can I make a sketch that gradually fades the light bulb in and out?

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      For that you would need a solid state driver like a transistor- Relays are a bit too slow for dimming and would cause massive back EMF issues as the relay coil becomes similar to an ignition coil :)

    • @christiankjrjensen5122
      @christiankjrjensen5122 Před 7 lety

      Ok, I've found out I can, but it's too hard for my electrical skills. I'll probably buy my way out of it

  • @acorgiwithacrown467
    @acorgiwithacrown467 Před 7 lety +1

    :D I always wondered how people use ardunios to control their lights

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      Glad it helped. Cheers!

  • @rockb922
    @rockb922 Před 5 lety +2

    Why didn't you give a close up shot of how it's actually wired? I'm having a hard time finding a vid showing how they have it wired.

  • @joevd8718
    @joevd8718 Před 7 lety

    I'm hoping to use this technique to create a quick-shifter system for my motorcycle. Quick summary: Instead of cutting throttle, disengaging the clutch and shifting gear, which can take hundreds of milliseconds at least, one can simply cut ignition to the engine momentarily and shift gear. Without ignition, the transmission momentarily "floats" without torque on the system and allows the gears to engage without stress (normally wears or even breaks gear teeth). I started with the idea for simple electromechanical system; A spring loaded piston in-line with the gear shift linkage allows you to push on the gear shifter until it encounters resistance. Subsequently your spring compresses, which closes a circuit that grounds the engine's ignition coils, which cuts spark to the engine. With the transmission now unloaded, your gear shifter would have no resistance as it pushes the transmission into a higher gear. As you finish actuating the shift lever, the spring loaded piston returns to open the grounding circuit and your engine continues its ignition sequence. Notice this still limits shift times to hundreds of milliseconds that your foot is pressing on the gear shift lever, grounding out the engine ignition system. I know there must be a similar analog method to hold a grounding circuit closed for a set time interval from some kind of input from the spring piston system, but I do not know how to do it. I'm thinking it will be easier and allow more refinement to use a simple Arduino microcontroller to receive that signal from the spring piston and then open a relayed grounding circuit for a set interval, in the 10-100ms range. There are several quick-shift systems available on the market, I'd rather build my own as proof of concept. What are your thoughts?

    • @joevd8718
      @joevd8718 Před 7 lety

      The motorcycle can supply constant 12~14VDC from a DC battery and regulator/rectifier.

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      My 2 cents- The times you are looking to get are beyond what a relay can do and you should look at using MOSFETs. Another issue you need to handle is the fuel- unless you stop the supply you will run into a large backfire out the exhaust when ignition is re-engaged. On fuel injected systems this should be easy for you- if carbureted, this is much harder. Good luck with your project.

  • @gamingradar1097
    @gamingradar1097 Před 7 lety

    HOW ABOUT USING MORE THAN 1 LIGHT BULB, HOW WOULD YOU DO IT ?

    • @Phoen1x883
      @Phoen1x883 Před 7 lety

      Wire the bulbs in parallel. Make sure you use a relay that can handle the load of all the bulbs combined.

  • @feynrobbins9498
    @feynrobbins9498 Před 6 lety

    Still have no idea what I’m supposed to do with the “in” pin :[

    • @cyberbassboost4650
      @cyberbassboost4650 Před 6 lety

      you are supposed to write code for the GPIO pin to turn on that relay part

  • @yourcreed104
    @yourcreed104 Před 4 lety +1

    You saved my 10 dollars

  • @bijuphilipjacob2961
    @bijuphilipjacob2961 Před 7 lety

    Just Awesome!
    Thank you so much. You are the man.
    Would you be kind and make a tutorial video on how to connect an AC well water pump to a relay?
    If you could also advise on the correct relay spec to purchase please.
    I plan to control my pump for the house from my cell phone using my Arduino UNO and a WiFi sheild.
    AC Well Pump Specs:
    -> 240 V
    -> 50 Hz
    -> 1.5 HP
    -> 6.6 A
    -> 2800 rev/min
    -> HEAD: 30 Feet
    If there is anything else you would need to know, kindly let me know.
    Eagerly awaiting your reply.
    Thanks & Best regards,
    Philip

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      Get a 10 to 15 amp 240V relay and you will be good. Could use a very small relay (aka interface relay) to run a contactor as well if you really wanted to get overkill.

    • @bijuphilipjacob2961
      @bijuphilipjacob2961 Před 7 lety

      Thank you so much.
      Just if I may clarify please:
      1) Are interface relays generally expensive?
      2) How do I connect the pump wiring to the relay?
      Warm Regards,
      Philip

  • @manirubio
    @manirubio Před 7 lety

    Great Video.. Is the diode embedded into the relay?

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      Yepper

    • @manirubio
      @manirubio Před 7 lety

      So I need an additional power source to run a servo as my arduino cannot provide enough current to it. Would the relay also work to control a DC circuit or should I use a transistor instead.

    • @manirubio
      @manirubio Před 7 lety

      So I need an alternative power supply to my 5V arduino as driving a servo from my microcontroller is not enough. Would the relay also work to manipulate a DC circuit? Should I be using a transistor to to this or could I also use a relay?

    • @MkmeOrg
      @MkmeOrg  Před 7 lety +2

      You can use either. An analogy would be that using a transistor in that case would be akin to using a flyswatter to kill a fly. The relay would be akin to a Howitzer cannon to kill the same fly. Both would get the job done.

    • @youtubechannel4180
      @youtubechannel4180 Před 7 lety

      lol, wut

  • @roidroid
    @roidroid Před 8 lety

    i see u Atmel, practicing your photobombing :P

  • @blueckaym
    @blueckaym Před 7 lety

    Hi guys,
    I'm building a custom portable laptop-like-UPS, in order to feed my NUC (the Intel Skull Canyon) when not plugged in the wall-socket.
    I've determined more of less the rest of the components I need, but I have difficulty of finding a proper relay for the purpose of switching from the main-power to the battery when main-power is off.
    I'll need a relay with 2-inputs (one for the main-power, and one for the battery) and 1 output (to the NUC). The closest type of relay I've found is a DPDT type /looking at its basic diagram it actually has 2 outputs, but I can always link them into one/.
    The NUC needs up to 120W (19V @6.32A) which is why good old laptop scavenging is not likely to work (most laptops have lower consumption than the NUC, which is also the reason to consider building my own UPS. Also I think the switching relay circuit is actually in the laptop body rather than in the battery, and I don't have many dead laptops laying around).
    Anyway, most applications of relays on the net I've found (like this one too) depend on outside control of the control-coil, and are often of different type /than 2INs-1Out auto-switching/.
    My case I believe should be simpler, because both the inputs will be DC (the battery obviously without inverter will give me about 22VDC, and since its charger also requires DC, I plan on using common AC/DC adapter which will output 20ish V DC).
    So I was thinking that if I link the main-power not only to one of the relay's INs (lets call it A) but also to the control coil terminals, which under current should keep the relay in A-input closed position, and will feed the NUC.
    Then when the main power is lost, it would also lose the current in the control coil, so it should automatically switch to it's normal position closing the B-input circuit.
    Would that work? And could you recommend such relay capable of say up to 27V and 7A (or up to 120~150W) /could be stronger of course/
    disclaimer: I'm complete newbie regarding electrical stuff, so please correct me if I'm wrong /or missing/ something! For my own safety! :)

  • @prokillergrape5823
    @prokillergrape5823 Před 7 lety

    My relay will turn on but not off I have to restart my pi every time to turn it off please help me!

    • @lokErik09
      @lokErik09 Před 7 lety

      prokiller grape what you can do to trick the pi to think it is at g or 0v is to set it as an input. Be sure to add the diode as he mentioned in the video so the excessive voltage don't go into the pi when you turn it off (switching to input).
      This all has to do with that the pi and the relay don't have the same specifications on what is classified as HIGH and LOW.
      Hope it helps!

    • @prokillergrape5823
      @prokillergrape5823 Před 7 lety

      Christer Garpenlund thanks that was the problem.

  • @TutocarloCV
    @TutocarloCV Před 7 lety

    nice

  • @tylersheehy3918
    @tylersheehy3918 Před 5 lety

    Thair is evin solid state relay

  • @pauljohnson-yk5dq
    @pauljohnson-yk5dq Před 7 lety

    be useful if you showed which ones are the NC and NO connectors on that blue-colored relay.

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      They are labelled on every relay and differ by brand.

  • @nonya8694
    @nonya8694 Před 4 lety

    I dont understand. I just want to add a relay to a trolling motor so I can switch it on and off safely if it's even needed. This video called kayak go go cart had one and in trying to learn what a relays for.

    • @joshuavincent7884
      @joshuavincent7884 Před 4 lety +1

      relay allows you to control power from a different source to a load, its acting like a switch that you can control with very small power, like that coming out of an arduino GPIO pins

    • @nonya8694
      @nonya8694 Před 4 lety

      @@joshuavincent7884 cool

    • @nonya8694
      @nonya8694 Před 4 lety

      @@joshuavincent7884 😎

  • @ShengTheCraftsman
    @ShengTheCraftsman Před 7 lety

    wait. what does it do again?

    • @MkmeOrg
      @MkmeOrg  Před 7 lety

      Maaaaaaaaaaaaaaaaagic

    • @ShengTheCraftsman
      @ShengTheCraftsman Před 7 lety

      :'(

    • @andreamitchell4758
      @andreamitchell4758 Před 7 lety +1

      it uses a magnet, an electro magnet to open and close a switch that is more hefty and can switch circuits with much higher voltage and current ,the electromagnet is powered by low voltage like 3v or 5 v
      the relay can switch things that are 120V, think of it as a light switch in your wall that you have glued a small powerful magnet to , then positioned an electro magnet with in an inch or 2 of, the electro magnet is being powered by 9v say, when you energize the electro magnet it pulls the switch closed the circuit that runs the electro magnet and the circuit that is being switched on or off are not physically connected with any sort of conductor one runs on 9v DC the other on 120v AC
      hobby boards like the arduino and the rpi run at like 3 or 5 v DC
      so they can not be used to switch things that run on higher voltages and currents like 120v AC ,the relay lets you open and close switches for higher voltage and higher ampere circuits and different types of current curcuits,or acts like a switch for
      those higher current higher voltage circuits ,the lower voltage circuit that is controlling the higher voltage

    • @Anonymous-vh6kp
      @Anonymous-vh6kp Před 7 lety

      It's a digital switch, that can switch high voltage devices.

    • @andreamitchell4758
      @andreamitchell4758 Před 7 lety

      Its not digital it is z simple electro mechanical device
      It is just a magnetic switch