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

  Переглядів 6,778

Taste The Code

Taste The Code

День тому

This video is sponsored by Altium Designer. Get your Altium free trial at: www.altium.com/yt/taste_the_code
-----------------------------------------------
The giveaway was open until the end of the day on Wednesday, 17th of November, 2021!
It is now closed!
-----------------------------------------------
To be able to control AC loads with Arduino, a relay is always required for the switching so the high voltage can be separated from the low control voltage of the Arduino.
These relays come in many shapes and sizes, and each relay holds a different load rating so it is important to understand how they work and how we can safely use them in our projects.
In this video, I'm going through the basics of what a relay is, how it works, and how it can be controlled with Arduino so you can then incorporate them into your projects.
Check the project Instructable for a written version of this video. You can also find the Arduino code used in the video there.
www.instructables.com/Arduino...
Tools and materials used in this video:
Arduino Unoi - s.click.aliexpress.com/e/_9HbRep
Arduino Nano - s.click.aliexpress.com/e/_9uMmsh
5V relay board (not isolated) - s.click.aliexpress.com/e/_A3UQ0p
5V relay board (isolated) - s.click.aliexpress.com/e/_AZa5Ip
12v relay module (not isolated) - s.click.aliexpress.com/e/_AthV9P
12 v relay module (isolated) - s.click.aliexpress.com/e/_AgaB9X
4 channel relay module - s.click.aliexpress.com/e/_9h4k3r
Digital multimeter - s.click.aliexpress.com/e/_A6CcIz
Male to Female dupont jumper wire - s.click.aliexpress.com/e/_AfVOct
Mini breadboard - s.click.aliexpress.com/e/_9ihnNr
Sonoff Basic module - s.click.aliexpress.com/e/_ATsQtF
Temperature controller - s.click.aliexpress.com/e/_AK2HSZ
Support my work on Patreon so I can continue producing free content and tutorials!
/ taste_the_code
My recording gear:
Samsung A71 - s.click.aliexpress.com/e/_dX2...
SJ400 Action camera - s.click.aliexpress.com/e/_ssJRaL
USB Condenser Microphone - s.click.aliexpress.com/e/_sMcKML
Tripod - s.click.aliexpress.com/e/_stDAGL
Phone tripod mount - s.click.aliexpress.com/e/_s9WaiJ
Arduino relay basics - how it works and how to use it (+ giveaway!)
#arduino #relay #electronics #circuit #tastethecode
Main Site and blog: www.tastethecode.com
Facebook: / tastethecode
Instagram: / taste_the_code
Twitter: / taste_the_code
Get exclusive Taste The Code t-shirts and merch at
teespring.com/taste-the-code
Click on the link below to get two months of free premium access to Skillshare and start learning today!
skl.sh/37LnRua
Get $50 off your order on hosting for all of your website needs and learning projects on Dreamhost!
www.dreamhost.com/r.cgi?24057...

КОМЕНТАРІ: 19
@davidjobe9876
@davidjobe9876 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 2 роки тому
Thanks! Any plans to use them on a project?
@davidjobe9876
@davidjobe9876 2 роки тому
@@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 роки тому
Hey David, congratulations on winning the relay module!
@davidjobe9876
@davidjobe9876 2 роки тому
@@TasteTheCode Thank you very much ;)
@faturahmanf3024
@faturahmanf3024 Рік тому
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 Рік тому
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 Рік тому
@@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 Рік тому
@@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 Рік тому
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 Рік тому
@@TasteTheCode thank you for your advice, i appreciate it👍
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
Rachel De Barros
Переглядів 357 тис.
Connecting a Relay Module to a Microcontroller
11:41
Brad Henson
Переглядів 203 тис.
Godzilla Attacks Brawl Stars!!!
00:39
Brawl Stars
Переглядів 7 млн
Завтра в школу с... | Шоу-квиз «Вопросики»
00:28
Телеканал СОЛНЦЕ
Переглядів 3,7 млн
Гражданская оборона 2024 - 16 полный выпуск
1:04:15
Телеканал ICTV
Переглядів 1,1 млн
Sensors - which one to use
17:06
Electronoobs
Переглядів 1,3 млн
Build a MIDI to RELAY Box for Arduino
26:01
Notes and Volts
Переглядів 4 тис.
How many relays can I connect to one Arduino?
9:38
AnotherMaker
Переглядів 47 тис.
How to Use a Breadboard
12:21
Science Buddies
Переглядів 2,9 млн
inventor aw - This Device is very helpful ,, you can make at home
6:47
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Переглядів 483 тис.
Arduino Garden Controller - Automatic Watering and Data Logging
9:13
Practical Engineering
Переглядів 3,1 млн
How to use 4 channel Arduino Relay Shield (with code)
11:00
Robojax
Переглядів 30 тис.
Result of the portable iPhone electrical machine #hacks
1:01
KevKevKiwi
Переглядів 7 млн
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Переглядів 995 тис.
МОЙ ПЕРВЫЙ ТЕЛЕФОН - Sony Erricson T280i
18:02
ЗЕ МАККЕРС
Переглядів 66 тис.