How to use 5V Relay with Arduino to turn ON and OFF AC bulb or DC load



In this video you will get learn how to control an AC bulb or load or DC load using 5V relay.
Code is provided and controlling AC bulb is demonstrated.

Get this 360 Amazing Rotating Dashcam :

This video is part of Arduino Step by Step course bey Robojax which starts here

Top On Sale Product Recommendations!
Baseus USB C HUB Type C to HDMI-compatible USB 3.0 Adapter Multifunction Type C HUB Dock for MacBook Pro Air USB C Splitter
Original price: USD 24.99
Now: USD 19.49
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Click&Buy:
Search Code on AliExpress:AL26MV4

Subscribe To my channel now

***** Purchase 5V High level Trigger Relay from ***
Amazon USA:
Amazon Canada:
All other Amazon:
eBay:
AliExpress:
Banggood:

**** Purchase SunFounder Arduino Learning kit from Affiliated Stores ***
Amazon USA:
Amazon Canada:
Amazon Germany :
Amazon UK:
Amazon France:
Amazon Spain:
Amazon Italy:
Amazon Japan:
SunFounder website:
eBay:
AliExpress:
Banggood: or UNO board

****** Purchase Authentic Arduino Uno from Affiliated Store ****
Amazon USA:
Amazon Canada:
Amazon Europe (all Europe):

*** Purchase Arduino Uno Compatible from Affiliated Store
Amazon USA:
Amazon Canada:
Amazon Europe (all Europe):

**** Free Course ****
Arduino Step by Step Course (over 100 lectures) Starts here

The best thank you for me is to not skip ads and Subscribe 🔔 to my channel, like 👍 the video and do not skip the ads.. It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber’s 🔔 questions. So make sure to Subscribe.😊 .

Download the code from:

00:00 Relay explained
03:33 Wiring explained
04:42 Code explained
06:10 Demonstration

Related videos:
If you need to control bulb with push button:
4 channel relay:
8 channel relay:
16 channel relay :
If you have the other 5V relay modules with Green and Red LED, then watch this video:
Relay with Push button ON, and Push OFF:
Watch my video on dual relay 999 minuets timer

Turn ON and OFF AC bulb with Arduino and your mobile phone:

Using 4 Push button push-ON and push-OFF 4 relays with Arduino:

How to use a breadboard :

Jump to different Chapters of this video:
00:00 Start
00:01 Relay Explained
03:33 Wiring Explained
04:43 Arduino Code Explained
06;20 Demonstration

Tutorial by Ahmad Shamshiri form Canada
****************************
Arduino Step by Step Course (over 100 lectures) Starts here
****************************
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link

Follow me on Facebook
Follow me on Twitter:
Follow me on Instagram:

Tutorial by Robojax.com
Get other projects code and learn Arduino

#robojax #robojaxRelay #robojaxArduinoCourse

Comprar Camiseta Fútbol De Ecuador Baratas maillot de foot personnalisé

37 comentarios

  1. Thank you for posting this. I would love to see a follow up video with the Arduino controlling a relay based on input to the Arduino. In other words if I press one button the relay would be activated for one second. If I press a second button the relay would be activated for 10 seconds and if I press a third button the relay would stay activated unless a separate signal told Relay to shut off.

    I am trying to control an AC motor that will raise a platform to various heights.

  2. Thank you, I used this exact method to upgrade my laser cutter to automatically activate my air assist pump during a cut when activated in the cutting software so much cheaper to build a relay control box than spend £260 on a kit for the same thing!

  3. Hi , very new to to your You Tube, thanks Robojax. Thank you for this video.Using a Arduino Mega 2560 what is the maximum delay in seconds I can have. I want to turn a 5v pump on every 24 hours for a few minutes.

  4. Greetings sir, I hope you are doing well. It is requested to answer whether or not a 220-240Vac bulb can be driven using a 5v relay using arduino uno? I have a project in which i am doing a bluetooth controlled smart home automation. It is requested to give me tips on how to do it.
    Regards

  5. Well no its not quite clear coz these do work been using for ages. when orange light is on that means its pushing out power its not going to drop off till the top green light comes on. red is always on.
    The more you boost voltage you loose ability to push out big amps nomatter what you set it at. e.g 12v 15a power supply boost to 67v your going get around 1a output. want more amps start with higher voltage. It is fairly straight foward

  6. is there a way to stop the relay pulsing on on power up? As in the video my relay briefly pulses on when power applied. I want to use my relay to send signal to open a gate but if everytime there is a power interruption the gate would open on power up not really ideal.

  7. Don't use this module to drive mains powered equipment. The isolation between the 5V side and the power side is completely inadequate, and the low voltage side could become live.

  8. Hi, thanks for your work!. This seems to be the way I want to work with a washing machine motor, BUT; I need the ON signal to be for one second, then off 2 seconds, then on again 1 second, alternating between 2 different pins. I suppose this is possible but I wanted to check for feedback before I go and burn things. Any help appreciated!

Los comentarios están cerrados.