Driving a Relay with an Arduino

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 104

  • @clarkinthedark1
    @clarkinthedark1 Год назад +1

    Not only was this useful to my project, you saved the day by opening my eyes to the Fritzing tool. This was exactly what I was looking for to document my custom project. Thank you!

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  Год назад +1

      I am glad that I was able to help you mate 👍🙌

  • @577473
    @577473 2 года назад +1

    Thanks to you I could test the last part of my remote trigger for my receiver. I finally invented something that WORKS !!!

  • @triki-beats
    @triki-beats 2 года назад +2

    Clear as sun light sir!!!
    THANK YOU.

  • @Riddle-Me-This-Puzzles
    @Riddle-Me-This-Puzzles 2 года назад

    Correct. Lots of MODULE video. Thx for making this.

  • @KrishnaNaveen
    @KrishnaNaveen 2 года назад +1

    video i was searching on whole video a big thanks sir

  • @computerjantje
    @computerjantje 6 месяцев назад +1

    Thank you for the video and to your very well understandable english. subscribed right away and now going to look at some other videos by you :)

  • @vanilove269
    @vanilove269 3 года назад +1

    Very well explained and the graphics are awesome

  • @justus_2319
    @justus_2319 5 лет назад +1

    Really helpful video. You have good way to make things understandable. Just remember when using relay with big loads that you cant get load power from chip or it will burn.

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  5 лет назад

      That is true 👍
      And thanks for the appreciation

  • @sakif7
    @sakif7 3 года назад +1

    This was a really good video. Explained every well. Thank you

  • @perryyoung6396
    @perryyoung6396 5 лет назад +1

    Very clear presentation. Excellent job!

  • @GospodinJean
    @GospodinJean Год назад +1

    Very well explained

  • @JohnBaxterWalker
    @JohnBaxterWalker 4 года назад +1

    Best presentation yet - Thank you

  • @tyuiocool
    @tyuiocool 5 лет назад +1

    Thanks. Your explanation really helps me a lot.

  • @Mrbeeast297
    @Mrbeeast297 6 лет назад +3

    Number 1 channal i lyk it

  • @sapnakumari2534
    @sapnakumari2534 5 лет назад +1

    Thanks👍👍👍 in this video everything includes about of relays and arduino

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  5 лет назад

      Thanks mate. Check out my other tutorials, I try to cover as much as possible in all my tutorials

  • @mantvydas8372
    @mantvydas8372 6 лет назад +4

    Could this transistor and diode work well with 12V relays and 12V power supply?

  • @bradcoish2358
    @bradcoish2358 4 года назад +1

    Thank you! Thank you! Thank you! Very nicely done!

  • @mohanachuthvarma6478
    @mohanachuthvarma6478 5 лет назад +1

    Best Videos ever on youtube excellent

  • @Yournepali
    @Yournepali 6 лет назад +2

    Really helph full video thnx for the video

  • @crazypeople6760
    @crazypeople6760 5 лет назад +2

    Good explanation

  • @trishyajameen336
    @trishyajameen336 3 года назад

    this tutorial is amazing

  • @fattahjamil2452
    @fattahjamil2452 4 года назад +1

    loved d presentation

  • @syedmoin4770
    @syedmoin4770 5 лет назад +1

    Thank you so so so much
    You are a life saver

  • @AnggelMD
    @AnggelMD 6 лет назад +4

    Hi, great tutorial, congratulations!
    Just a little correction: In the fritzing squematic you connected 5V power supply to the VIN arduino pin, but in the real circuit in the breadboard you connected the 5V power supply to the 5V arduino pin.
    I have read that the regulator in the VIN pin needs more than 6.2V to work. Does it work well if you connect 5V power suply to the 5V arduino pin?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  6 лет назад +2

      First of all thanks a lot for watching the video.
      Now, in the fritzing schematic I am powering the Arduino externally using the 5v power supply, and in the demo I am powering it using the USB cable so I am not using the VIN pin in that case.
      In the demo I am using the 5V Arduino pin to supply 5V to the Breadboard's rail for the rest of the circuit to use.
      Yes, you can very well power an Arduino using a 5v regulated power supply.
      Let me know if that answers your question :)

    • @AnggelMD
      @AnggelMD 6 лет назад +1

      ooh okok I see it now. I didnt see the USB cable :p my mistake.
      Thakns! So I can power the Arduino using a 5V regulated power supply connected to the 5V Arduino pin, right? or should I connect the 5V power supply to Vin pin?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  6 лет назад

      Absolutely right mate. If you are using a Arduino nano just turn it around and you will see a voltage regulator under the board. So I am pretty sure u can even use a 9v power supply to power it up.

    • @AnggelMD
      @AnggelMD 6 лет назад +1

      Okay. Thanks!

  • @MechInvent
    @MechInvent 5 лет назад

    Finally one that was good. Ty

  • @dwalden74
    @dwalden74 4 года назад +1

    Very good tutorial! Question: Why do you need a transistor? Can't you activate the relay using 5V from a digital pin on the Arduino?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  4 года назад

      1. The transistor is used as an amplifier to limit or enhance the current which is given to the NO or NC pin.
      2. Yes you may. Check out my 2nd tutorial on this :
      ruclips.net/video/3n69b4sdDjk/видео.html

    • @OffroadMXbohemia
      @OffroadMXbohemia 2 года назад

      My opinion its useless... just dont use it

  • @Yournepali
    @Yournepali 6 лет назад +3

    Its welll thnx for video

  • @korreyj
    @korreyj 4 года назад +1

    yes finally! thank you!

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  4 года назад

      Cheers
      Check out my latest video (an updated version of this video)

  • @crazycube001
    @crazycube001 6 лет назад +1

    Thanks for uploading..that's really useful

  • @KanchanDas
    @KanchanDas 6 лет назад +2

    good work

  • @rajababuentertainment4264
    @rajababuentertainment4264 6 лет назад +2

    Good tutorial video!!!!!!!

  • @rubixstars
    @rubixstars 5 лет назад +1

    Thanks It Was Very Helpfull

  • @meirg7509
    @meirg7509 Год назад

    Hi
    is it possible to run
    Toy motor for a few second when movement is detected
    using ‏only pir or pir and relay

  • @azharsiddiqui4992
    @azharsiddiqui4992 6 лет назад +1

    so nice

  • @wnemn
    @wnemn 5 лет назад +1

    Wich program did you use to wire the Arduino in Software?

  • @rashikagupta7054
    @rashikagupta7054 6 лет назад +1

    May I use BC547 transistor in place of 2N2222 transistor?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  6 лет назад

      Sure you may
      Basically, u just need an NPN transistor for this

  • @HemantRangdal
    @HemantRangdal 6 лет назад +2

    great....

  • @Yemto
    @Yemto 6 лет назад +3

    Why is the transistor needed?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  6 лет назад +2

      The coil of the relay needs a large current (around 150mA) to drive the relay, which an Arduino cannot provide. Therefore we need a device to amplify the current. In this project the NPN transistor 2N2222 drives the relay when the NPN junction gets saturated.

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  6 лет назад +1

      More info can be found here: diyfactory007.blogspot.com.au/

  • @gadgetborg6873
    @gadgetborg6873 5 лет назад +1

    Gr8 video

  • @jenniferw8963
    @jenniferw8963 2 года назад

    Why are you using VIN with a 5V supply? Wouldn't you use the 5V pin instead to power the arduino? Otherwise the 5V tries to go through the 5V regulator.. read that the VR needs 7-12V.

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  2 года назад

      Hi there
      VIN means Voltage IN
      Arduino boards have five options in which they can be powered: Powering via USB connector. Powering via the onboard barrel jack connector (if available on the board) Powering via the onboard battery connector (if available on the board) Powering via the VIN (Voltage In) pin.
      5v pin to power the sensors attach3d to the board.

    • @jenniferw8963
      @jenniferw8963 2 года назад

      @@CrazyCoupleDIY I'm powering the arduino with 5v from 7805 by connecdting the 7805 +5V to the 5V pin on the arduino. Not usb, not jack, not VIN. VIN expects 7-12V as that goes thrugh the on board voltage regulator.

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  2 года назад

      @@jenniferw8963 I will not say that your setup wont work or is incorrect.
      But, VIN means Voltage IN (7-12V Nominal) and 5v pin to power the sensors attached to the board.
      There is no hard and fast rule to say that u cannot power the device through the +5v pin or the VIN which obviously has a voltage regulator.

  • @ProcrastinatingGameCat
    @ProcrastinatingGameCat 4 года назад

    Why do you need the transitor? is there anything wrong with just connecting pin 2 directly to the relay?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  4 года назад +1

      You would not like to kill the pin of the Arduino by connecting the relay straight to the pin.
      Basically the output current is not enough to magnetize the relay. So to add a bit more of current I have added the transistor

    • @ProcrastinatingGameCat
      @ProcrastinatingGameCat 4 года назад

      Crazy Couple doesn’t all the pins have a current limiter circuit? It worked fine for me to connect it directly, but then i saw this video, and now i wonder if i should change me circuit.

  • @LOSER-xu2ld
    @LOSER-xu2ld 6 лет назад

    thanks for information

  • @सुनुवारटिभी
    @सुनुवारटिभी 5 лет назад +1

    great

  • @sahilsiddiqui3266
    @sahilsiddiqui3266 6 лет назад

    nice job

  • @salmanahmed483
    @salmanahmed483 6 лет назад +1

    nice

  • @CancunManny
    @CancunManny 4 месяца назад

    I got lost a bit. What is the transistor for? If I understood correctly the transistor was only used to make the light blink on its own?
    I understand the importance of the diode. For my project I was thinking of connecting one side of the coil to 5vGND the other side the coil to a 3.3v pin (esp8266) with the diode in between. That way when pin goes high, it would power up the coil, when pin goes low it powers off the coil.
    What would my way of doing it not work, or be wrong?
    Edit: So I did see video again, and noticed relay goes on and off because of the code you put in. I've seen a couple of short videos, like this one ruclips.net/video/19UNeUmvOW4/видео.html that connect power straight to the coil pins.

    • @CancunManny
      @CancunManny 4 месяца назад

      So I think I figured it out, but would like someone to confirm. For the coil to work it needs 5v, the adruino and esp8266 (which I am using) only have 3.3v as output. That is why we use the transistor which acts like a relay. With 3.3v the transistor "connects", providing 5v to the relay coils when then power on the NO side of the relay.
      Do I understand it correctly now?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  3 месяца назад

      Yes, that is correct
      If you connect the relay directly to the arduino, you can end up damaging the pin.
      The transistor works at low voltage and allows 5v device to work seamlessly

  • @maximusanelo8163
    @maximusanelo8163 4 года назад

    Hyyy i hope everything is good. I need some help i have this project. And my goal is
    to control two 12v fan
    I have a. L298N motor driver controller
    I also have a. timer delay relay
    I also have a .elegoo uno r3
    I also have a. Lcd screen 1602A
    And it should all be controlled by the bluetooth dsd. My goal is to be able to controlthe fans with my phone. I want to be able to set a timer on the fans and also turn it off when i want. Is there any way you can help me

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  4 года назад

      Hi there sure I can
      So you basically want to control the fans using the relays or via the motor driver?
      Cos you can send high or low signal using your uno to either one of them and let them run until you send a low.
      Also why do you need the lcd screen for

  • @sushilhanawate2602
    @sushilhanawate2602 4 года назад

    Can we use bc547??

  • @ivancabz1405
    @ivancabz1405 6 лет назад +1

    wow nice tutorial my friend (shane here) vinzkie anulibac

  • @muhammadabdulrehman7275
    @muhammadabdulrehman7275 6 лет назад +2

    nice video growth channel #manichannel

  • @Theineluctable_SOME_CANT
    @Theineluctable_SOME_CANT 2 года назад +1

    So what are you doing dipping YOUR toe in the water, trying to "be an expert" in electronics?
    Stick to telling us about your boring relationship and how you still get butterflies...

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  2 года назад +1

      Oops did I frustrate you
      Humm may be you should not be stalking my channel then.
      Oo by the way who cares what u think
      A genius is always a genius.

    • @Theineluctable_SOME_CANT
      @Theineluctable_SOME_CANT 2 года назад

      @@CrazyCoupleDIY and you're not one. So don't sweat. Why do you sound so gay?

    • @CrazyCoupleDIY
      @CrazyCoupleDIY  2 года назад +1

      Stalker, I guess you have lots of issues in life.
      Did u ever go to school?
      Do you have a wife?
      Well, I guess you should go back to school and learn some abcs, electronics is not for you.

    • @fatnareda4147
      @fatnareda4147 2 года назад +2

      What is your problem, old man?
      You sound more gay than anyone else I have ever seen in my life.
      This guy is a true genius.
      Who are you to judge what he should or should not publish?
      Good work, mate. Keep it up.

    • @PhonphanJomjun
      @PhonphanJomjun 2 года назад +2

      Are you serious @SOME CANT?
      Social media and RUclips is not a place for people like you.
      Stop cyber bulling and pray for Ukraine

  • @monikareviews3711
    @monikareviews3711 6 лет назад +3

    loved d presentation

  • @reshmabegum3677
    @reshmabegum3677 6 лет назад +1

    nice

  • @agrwalkomal3881
    @agrwalkomal3881 6 лет назад

    great