Arduino relay basics - how it works and how to use it

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

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

  • @davidjobe9876
    @davidjobe9876 3 года назад +2

    That was a good tutorial ;)
    How to use a relay.
    I have both relays, the normal one and the SSR, which was bought together with a PID controller.

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

      Thanks! Any plans to use them on a project?

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

      @@TasteTheCode I once made a slow cooker with that SSR.
      With that regular 4 way module relay, maybe I would make a terrarium for my carnivorous plants that controls my light, humidifier and water pump ;)

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

      Hey David, congratulations on winning the relay module!

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

      @@TasteTheCode Thank you very much ;)

  • @paulomorgado4967
    @paulomorgado4967 3 месяца назад +1

    Thanks a lot for the tutorial! Would it be possible to code it so two relays activate and deactivate out of phase? I need my code such that one of the relays activate each 1000ms and the other one 1500ms.

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

      Yes, you can. You just need two variables to compare the elapsed time.

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

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

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

      Does your module have EMF protection diodes? Motors know to create a lot of electrical noise when stopping so that might be interfering with the electronics. Check if the code runs with just the relays, without the motors, so you can isolate if the problem is coming from the relay board or the motors. Additionally, it is recommended that you use two separate power supplies, one for the controller and one for the motors.

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

      @@TasteTheCode im using 4channel relay just like in your video, i thought that kind relay had a zener diode that protect the relay give a current feedback is it?

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

      @@TasteTheCodeexcuse me i want to send you the video of my project, if it doesnt bother you, can i send it via your facebook page or instagram

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

      Video will not help a lot as it might be difficult to identify what is going on bu send it if you want.

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

      @@TasteTheCode thank you for your advice, i appreciate it👍