Controlling A 12v RGB LED Strip With Arduino

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • Arduino Nano - diyusthad.store/product/ardui...
    IRF530 - diyusthad.store/product/product/
    In this tutorial, we are going to learn about connecting a 12v RGB LED strip with Arduino to create different colors using Pulse Width Modulation (PWM) function.
    Code & Instructions: diyusthad.com/2019/08/12v-rgb...
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Controlling RGB Lights From ESP32 Web Server:
    In this project we are going to make a web server in ESP32 with an interactive web page to controls the color and brightness of a 12 volt RGB LED strip.
    • Controlling RGB LED St...
    Code & Instructions: diyusthad.com/2019/10/control...
    ----------------------------------------------------------------------------------------------------------------------------------------------------------- Internet-Connected Motion Sensor | ESP8266 01 + PIR
    • Internet Connected Mot...
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Follows Us
    Facebook / diyusthad
    Instagram / diyusthad
    Twitter / diyusthad
    Tumblr / diyusthad
    Hackster hackster.io/najad
    Telegram t.me/diyusthad

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

  • @Doraemon-75
    @Doraemon-75 4 года назад +14

    I searched for tutorial of 5050 rgb control with arduino & ur video came on the top. I just watched and subscribed your channel. Just amazed after seeing total video. You may not believe i was searching for such coding tutorial of arduino for rgb led for 5 months. Finally ur video helped me a lot.
    I requesting u to make more video on this particular topic and also advanced coding and animation of neopixel led with arduino. 🇮🇳 🇮🇳 🇮🇳

    • @DIYUSTHAD
      @DIYUSTHAD  4 года назад +2

      Thanks for your inspiring words and support.

  • @usernameL1
    @usernameL1 4 года назад +4

    Great video, thanks!
    Just a quick question regarding the schematics:
    Do I need to connect positive of the power supply to the ground of the TIP120's? Seemed kind of weird, hence the question.

    • @DIYUSTHAD
      @DIYUSTHAD  4 года назад +3

      Connect the emitter of all the transistors to the Ground of Arduino.
      Connect the Ground of 12V power supply to the Ground of Arduino.
      Connect the positive terminal of the 12V power supply to the 12V pin of the RGB LED strip.
      Connect 1 K resistor to the base of each transistor as shown.
      Connect wires from the digital pins D9, D10, D11 to the other end of the resistors as shown in the circuit diagram.
      Finally, connect wires from the R, G and B terminals of the RGB LED strip to the collector (middle pin) if the TIP120 transistors

  • @HighVoltages
    @HighVoltages 4 года назад +2

    another great content :)

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

    Very interesting......👍👍

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

    Can you please post the links to the products you used via Amazon?

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

    Hi. Do you know what fequency this arduino operates it's PWM? As you can see in the video the camera picks up the flickering of the lights, I'm trying to avoid this so that I can make a light I can use for video purposes. I have used PWM dimmers that operate at 10k frequency and they don't cause any flicker when filmed by a camera. Thanks!

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

      Hi mighty visuals, I didn't do such a in depth study on it. In Sha Allah I'll post on my blog after doing some research. Thanks for asking

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

    Very nice explanation. though i am not a electronics guy, but this is useful. I am using 9v battery for my led strips ( single color ), is this flow work? or i need to change the transistor ?

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

      9v will work but you will not get full brightness

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

    greate man :)

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

    what resister should I use if my microcontroller uses 3.3v logic?

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

    What kind of LED strip are you using? Also, very nice and informative video! Great job!

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

      I can't comment specifically on his, but that strip looks identical to the common kits found at lowes/home depot

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

      I have the same strip and what i can say is the diodes themselves are called SMD5050 LED diodes. They are most common on sites like ebay and such

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

      Yes

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

      Yes it is they are the most commonly found RGB LED strips

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

      12v 5050 RGB LED strip, i have given the details in my blog

  • @CCCI-NeverDie
    @CCCI-NeverDie 4 года назад

    Gracias x la info

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

    Hi there
    Thanks for this video. Please can you explain the use of the 1k resistors attached to the base pins in this circuit. Thank you

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

      To limit the current to the transistor base

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

    Nice video, thank you! I'm new to electronics and I have some quick questions:
    I have an arduino UNO board, does this work the same?
    Doesn't the arduino board needs to be powered from the USB input?
    Do you have a tutorial for very long 5V LED strips that need higher amperage? And how to calculate that?
    THANK YOU!! Greetings from Mexico City

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

      Ys uno works the same, when we are given external supply then no need for powering from usb, currently I haven't done any tutorials with 5v strip

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

      Tell me the model of 5v strip you are using, I help to do your project ان شاءالله

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

    nice video

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

    Thank you!! I was wondering how do I switch off the strip completely?

    • @Edits-vd5ru
      @Edits-vd5ru 3 года назад

      You just make the brightness of the three colors 0. analogWrite(blue, 0); something like that

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

      Yup

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

    Awesome, does this also work with the arduino nano?🙈😊

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

      Arduino nano only I have used.

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

    thanks, that work perfect, with mosfet n channel

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

    Great video
    Want to know if There anyway i can Buy programmed Arduino to run show for LEDSTRIPE

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

      Please contact me @ najad@diyusthad.com

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

    Does anyone know if you can 8se this scheme for using arduino like sequential module for car turn signal? Im just working on a project with my tail light and not sure if i can use arduino for sequential turn signal

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

    Bro make 12led chaser from Arduino, and it connect to 12v bulbs using power transistor ,. How to connect that

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

    this is perfect, how to add a ttp223 touch sensor? do i need another code for that to work on that?

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

      You can check our video on ttp223 touch switch and combine both the projects. Wish you all the best ❤️

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

    Your are the best but i need your help if i powered the arduino with usb from laptop i dont need transistor yes or no

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

      We need those transistors because i/o pins of arduino don't support 12 volts and also usb is 5v not 12v

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

    Thanks for the video. Could you share part reference of RGB LED 12VDC please?

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

      You can check the written instructions, link will be in the description.

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

    Assalamualaikum can you please just tell me that LEDs with 4 input pins are not Addressable or are Addressable? I bought some to make a running animation but all the LEDs are working at same time.

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

      Waalikumusalam, only with the pin numbers I cannot confirm bro

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

    Hi! I have a question, does anything change with respect to the code, if a 5V RGB led strip is used? I have pretty much the exact same LED strip, just that its 5V. Thank you!

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

      Hi, nop code is same if you have same kind of 5v LED strip

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

      @@DIYUSTHAD And if you using 24V led strip? TIP120 would be fine?

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

      @@bercibujdoso upto 60 volt LEDs (if it exists 😊) TIP120 will do the job, check the datasheet for more info.

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

    can I use the IRF530 mosfet in the place of the transistors in this circuit?

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

    I am jus confused. I think got same RGB LED mistaking with WS2813 . what strip is this then?

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

      This is not a addressable LED like WS2812 or other versions of it

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

    can i use tip32c

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

    How many led control by this process... can we make secrolling display by RGB 5050

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

      This is not addressable LED, we cannot make scrolling display with out addressable LED

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

    bro if i am wanted to make vu meter from this can we make?????

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

      With this LED strip we cannot make vu meter, we need addressable LED strip to make VU meter

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

    What is the code for single light led strip.
    For making like raindrop leds or chasing lights.
    Can u please upload the code..

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

      For making that you need addressable LED strip.

  • @mr.doogle
    @mr.doogle 2 года назад

    Can i use TRIAC (BT136) or (d880-y), I don't have TIP120?

  • @ztx-zn5uv
    @ztx-zn5uv 3 года назад

    can i use IRlZ44N mosfet instead of this transistor??plz answer

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

      I need to check that

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

    can I use 2N3906 transistors i got from sparkfun? I'm worried these tiny transistors will start burning. If I can use these, how do I know what pins are what and which resistors to use?

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

      Hi kevin I have not tried with 2N3906. Ill check when I'm free and will get back to you.

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

      @@DIYUSTHAD Still not free?

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

      @@marcus3d 2N3906 transistors are PNP, all the circuit will change if you need to use a PNP transistor

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

      for knowing which leg is which just search "pinout transistor name"

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

      @@marcus3d I am sorry I forgot about that

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

    Can you control each light with different color

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

      The LED strip I have used here is normal RGB it cannot be controlled individually. For control each LED with different color lights then we have to use addressable LEDs like WS2812B

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

    What if i want to use external power supply for led strip to keep arduino safe?

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

      Arduino cannot drive 12v LED from its power, its must that you have to use external power for LEDs

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

    Can I use TIP122 with substitute of TIP120

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

    is this a common anode let strip ?

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

      yes it is , +12, Red(GND), Green(GND), Blue(GND)

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

    Bro tip 122 transistor will work?

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

      Yes, Tip120 tip122, mosfets like Irf530 all will work, you can choose according to the length of strip you are using

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

    hello sir....
    i just want to do Ambilight with the same 12v rgb led setup using Prismatic application.
    i already build same setup using every parts you mentionned in your video.
    please do help me.
    hope to hear you soon.
    thanks.

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

      you can contact me in whatsapp or email

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

    Brother i have a doubt how to give power to cicuit i mean
    By aurdino
    Direct to circuit

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

      Both arduino and LED strip can be powerd from a 12v power supply. If you are powering arduino through USB then you can use a 12v power supply for LED strip, if so dont forget to make the ground common.

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

    I follow you tutorial and i try with tip122 and tip31 but i cannot control the brightness... if i send the valute 255 the color tourn on but if i use value lower than 150 it tourn off....
    I've checked connections hundreds of times and they are ok so i don't know what to do.
    PS: if i send value between 255 and 130, the brightness wont change, It's always the same level.
    Can you help me?

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

      No one know ? 😭

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

      Are you sure you are using PWM pins of the Arduino?

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

    Nice video but i have a question. can i do this without mofset? pls reply

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

      No you cannot, arduino cannot drive 12v LED without transistor/mosfet

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

      @@DIYUSTHAD is it about low electricity power

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

      @@alperennd00 it's about the voltage which arduino can supply, you can drive 5v RGB leds from Arduino and above 5v you need transistor

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

      @@DIYUSTHAD ...and current. Arduino and other µC can't provide enough current.

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

      @@alexanderneumann5267 yes, and current

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

    Sir,could you please tell me how to do digital led clock with this SMD 5050 led strip with change in colour.
    thanks in advance.

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

      For that you need addressable LED

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

      @@DIYUSTHAD ohh ok thank you ..btw ur video was awesome 👍

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

      @@ayoutube6979 thanks

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

    tried the code but the loop does not fade the LEDS it just blinks them on and off

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

      check whether you have used the PWM pins itself?

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

    Bro, how to make led strip react to music,
    My led strip normally glow red,green and blue by default and has only 2 ports i.e., +ve and -ve

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

    sir how to control all of these 3 colours in fading after 1 by one

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

      Use the fading example code in Arduino IDE and implement it for R, G and B

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

      @@DIYUSTHAD ok Sir thankyou let me try once

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

    I'm planning to hook up 15 meters which draw 108W of power, can these transistors handle that kind of power?

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

      Need to check the datasheet for that

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

      @@DIYUSTHAD What did the datasheet say?

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

      @@marcus3d TIP120 transistors can carry up to 5.0A continuous current for each color (~60W@12VDC per color).

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

      @@alexanderneumann5267 So.... exactly the right amount?

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

    can i use arduino leonardo for this?

  • @user-zy2kh2rp4m
    @user-zy2kh2rp4m 3 года назад

    sir can we 12v power to arduino uno and rgb strip with same power supply???

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

    Do you think it would be possible to "read" the signals of an LED Strip with the Arduino? I'd like to use arduinos to wirelessly sync different LED strips😅🙈

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

      What you mean by read signals from led strip?

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

      @@DIYUSTHAD basically putting an Arduino at the end of an LED Strip reading the signals of it (what color values it puts out) and potentially send this data to another Arduino controlling another Lightstrip.

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

      My plan is, I would like to use LED Strips as accent lighting in my room... I already have some Razer RGB components and would like to sync the other LED strips to the Razer Gaming components by using an old Razer chroma mouse and "read" the RGB signals from that😅

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

      @@merpproductions2663 the first arduino is providing the singnels to the led strip that means we don't need to read the signal, we can predict the color value in a given time from the code itself. And by the way it is also possible to read the signal

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

      @@merpproductions2663 ahaa OK that's possible

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

    How to get more colors like orange,pink ,etc.

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

      If you change the values of red green and blue you can create any color

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

    During fading color not changing?

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

      You can adjust the values in different rates for R, G and B to change the colors

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

    what other colors can you do except for red, green, and blue?

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

      red green and blue are the primary colors for light. to make different colors you just turn more than one of the three on, and you can adjust the brightness for diffferent shades. setting red and blue to 255 and greeen to 0 gives magenta, red and green to 255 makes yellow, etc

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

      @@isaiahwhitney8168 yeah i got that thanks

  • @kl32boy.2
    @kl32boy.2 Год назад +1

    can i make Ambilight setup using this led strip

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

      Yes you can

    • @kl32boy.2
      @kl32boy.2 Год назад

      @@DIYUSTHAD but every videos shows need addressable led
      Can you please make video using this led strip

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

      If you need only one color at a time you don’t need a addressable LED strip. You only need a addressable LED if you want to have different LED to have different colors or intensity

    • @kl32boy.2
      @kl32boy.2 Год назад

      @@DIYUSTHAD I need to make the ambilight system like this
      ruclips.net/video/wOvYK2OnFkY/видео.html

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

    Can I use Bc547

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

    Ye kitne types me blink karta hai kitne mode hai

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

    I wan to controll RGB Strip using ESP8266 + Alexa command will you please help. Thank U.

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

      I'll try to make a video on it ان شاء الله

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

      @@DIYUSTHAD Yesterday i have done it bro thank U..♥️

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

      @@PANTHERSARMYGAMING that's great, can you share it in our group bit.ly/34O5ox9

  • @qsdrfghgujfddyffguff
    @qsdrfghgujfddyffguff 7 месяцев назад

    wahhkai..ustahd ho tum

  • @karanroy.2553
    @karanroy.2553 3 года назад

    can i use tip122, instead of tip120?

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

      He say that they are the same, so it work with tip 122

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

      yes you can use

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

      they are not same but for this application we can choose any based on the current requirement

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

    How I download code

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

      You can get if from blog post, it's in the description

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

    Value of transistor and resistance

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

      I'm using transistor: Tip120, resistor: 1k or 2.2k

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

      @@DIYUSTHAD You said 1k in your video!!!

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

      @@m0ment219 oh sorry, yes use 1k or 2.2k :)

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

      @@DIYUSTHAD And you didn't see my comment. What kind of LED strip are you using?

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

      @@m0ment219 12v RGB LED Strip

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

    Do you have an English version of this video?