RGB LEDs with Arduino - Standard & NeoPixel

Поделиться
HTML-код
  • Опубликовано: 3 авг 2024
  • Learn to use RGB LEDs with an Arduino. We'll cover both standard and NeoPixel varieties.
    Article with code at dronebotworkshop.com/rgb-leds/
    More articles and tutorials: dronebotworkshop.com
    Join the conversation on the forum: forum.dronebotworkshop.com
    Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
    RGB or Red Green Blue LEDs are useful little devices that can add a splash of color to your Arduino projects. Today we will learn how RGB LEDs work, how addressable RGB LEDs (also called NeoPixels) operate, and how we can incorporate them into our Arduino designs.
    We start with a bit of color theory that explains how the primary colors red, green and blue can be used to create almost any color in the rainbow.
    Next, we’ll look at conventional RGB LEDs, both common anode and common cathode. I’ll show you how to calculate the correct value for the dropping resistors you’ll need to work with these devices.
    Then we’ll hookup a common anode and a common cathode RGB LED to an Arduino. Using three potentiometers we will control the intensity of the red, green and blue light to create custom colors.
    After that, we will move on to working with the WS2812 addressable RGB LED, also known as a NeoPixel. I’ll show you how they differ from conventional RGB LEDs and how you can “daisy chain” them together to allow you to drive multiple RGB LEDs using a single Arduino I/O port.
    Of course, we will then run some code to produce a colorful light display using multiple NeoPixel LEDs.
    Here is the Table of Contents for this video:
    00:00 - Introduction
    03:00 - Understanding Color
    06:59 - Basic RGB LEDs
    07:57 - Calculating Dropping Resistors
    11:43 - RGB LED Demo
    14:38 - RGB LEDs with Arduino
    25:15 - NeoPixel (WS2812) RGB LEDs
    30:15 - Using NeoPixels with Arduino
    RGB LEDs have a lot of uses. They can be used for status indicators, custom lighting effects, and even as video displays.
    I hope you enjoy this colorful episode. As always you can get more details and all the code on the article.
  • ХоббиХобби

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

  • @willofirony
    @willofirony 6 лет назад +30

    Yet another excellent and well researched video. I was particularly impressed with your treatment of the colour theory. I was more or less familiar with the RGB side of things but the CMYK was new to me. Finally my laser printer makes sense. With each of your videos I have been impressed with your graphics. That was particularly the case with this video. Thank you. I am off to peruse your blog now.

  • @natelong6582
    @natelong6582 6 лет назад +6

    You are the man! I love how you carefully distribute information from basic to more complex with links to further info! You are a great teacher and I appreciate your slower pace for beginners. I'd love to talk to you sometime! I teach middle school.

  • @binarybox.binarybox
    @binarybox.binarybox 5 лет назад

    A lot of thought and preparation goes into your videos and this one is no exception. Projects using rgb leds is my favourite. Last Christmas I built several WS2812 strings, 60 and 300 leds using the fast led library. This video should help beginners get started.

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

    As usual this tutorial answered all of my questions. Thanks a lot for the high quality content you provide again and again!

  • @ColettaHughes
    @ColettaHughes 5 лет назад +5

    Thank you for these videos. As a person ever 50 I'm very grateful for how you slowly explain things. I have a couple arduinos, components, breadboards etc. Once I get settled into my new place I'm going to have an area dedicated to sewing, crafts and electronics. Until then I'll be watching and learning... Again thank you :)

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

      I just saw this post ( 2 years later) How are you doing with your electronics hobby? I hope the love for it is still strong with you, after two years. I love tinkering with arduino projects and wish I didn't have to work all day, It sure limits my creative mojo. Have a great time building and exploring!

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

      I thought you said you were in prison for 50 years, I was astonished at your ability to obtain stuff lol.
      But yeah, how's it going; done any more near the metal CS stuff.

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

    Another excellent tutorial - really enjoyed your presentation. Learnt at lot today!

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

    You are unbelievably helpful. Thank you for your education, Sir!

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

    Pretty nice video explaining not only how to make it work but also the knowledge and reassoning behind.

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

    Beautiful project sir. I love your demonstration. I am not perfect in English. Sorry for it !!! Thank you sir for sharing your video !!!

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

    Another very well presented and easy to understand tutorial video.. very well timed too, as I'm about to embark on a learning experience with rgb strips for use with photographic light painting.
    I've watched a number of your tutorials now and am very impressed with your skill and style of tutorials that should be at least understood by people of any level. I am about to subscribe to your channel and probably your mailing list also.
    Keep up the good work and well done on yast (yet another super tutorial) ;-)

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

    Excellent as usual, thank you once again.

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

    Another great and helpful video. You have lots of content I'm catching up on, but I did want to make sure to express my appreciation. ❤️❤️❤️

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

    Great videos! You cannot explain science better than that...perfect. Thanks.

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

    As usual, great video and excellent educator

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

    Excellent tutorial. Exactly what i was searching for and even more in a single video.
    Will be nice if you could do a video on how the WS 2812 chip. Just curious how they make it this simple to wire

  • @AdilKhan-jp7hn
    @AdilKhan-jp7hn 3 года назад

    Amazing and very detailed information. Thank you

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

    Thanks a lot for yours excellents and educationnals explanations .Happy New Year 2022.

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

    thank you so much for your great videos.

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

    Very informative, thanks so much for the video

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

    Very instructive!

  • @cornelmanea4894
    @cornelmanea4894 6 лет назад +16

    I wonder what's your real day to day job. I have a feeling you are in some education institution or smth. You have excellent skills in presenting your experiments. I'm truly honest when I say that I have never found any other tutorial on youtube with such clear explanations(no matter the area they were on). Thank you a lot for spending your time while sharing your knowledge with us. Keeping they coming, we're hungry :)
    Note: I was curious about the current draw while the last experiment with only 1 data pin being used with the 4 LEDs...

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

      Unqualified guess: uA the real power consumption happens in the LED chips themself.
      You'll have to read the datasheet to find this data.

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

    Dear sir of course you do give us every time exceptional videos going in depth explaining everything so anyone that is not familiar to be able to understand. Thank you for that!! I would like to ask you to help with the RAMPSSB setup because i'm kinda lost trying to replicate it with simple wiring, i'm not able to change the parameters of the sketch to meet my need. thank you in advance.

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

    Thank you for this excellent video explaining the differences between standard LED's and RGB LED's. I had been briefly introduced to the NewPixel LED's just before Radio Shack went out of business and I was able to pick up a couple of 1M strip lights for a fraction of their original cost at that time. More recently I picked up one of the 8X8 RGB LED matrix from Adafruit and wasn't sure what to do with it. Now, after this video I'm more confident that I can actually do something with both of them. Have you ever coupled multiple matrix blocks together to make a marquee type of display? I was thinking of picking up one or two more of the 8X8 units and wanted to be able to create rolling messages that starts on the right and moves to the left on all of them.

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

    Excellent video and explanation sir,thanks alot.I hope to have more videos abt addressable leds,i made the one using APA106 LEDS using your code,works fine!!!As ian not so familiar in programming but i understood the more.If you have any plan to make videos abt programming arduino it would be great at least for me if you already have any plz suggest me,Greece here.THANK YOU

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

    Hello, Thanks I will check for a video on the LED board like a sign to send text and video to you are a very good teacher especially for someone like me not educated.

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

    Another excellent video. I was caught off guard when a kit I bought that contained a common anode RGB LCD had me baffled for a while until I realized that all three output pins going to 5V resulted in the LED going blank meant I had the wrong code for the component in use.
    Is there any way to visually check the LED to verify what type it is? If not then what is the technique to do so?

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

    nice video, one question
    what program do you use to draw the schematics ?

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

    good job !

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

    Gracias! desde Argentina

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

    awesomely informative and as delightful as always, thanks for clearing up the neopixel mystery - don't use a PI, i hope my Pico will drive them OK

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

    Excellent!

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

    sounds like you saying battchery are you from south LA. ,thats how we say it down dare lol ,great video btw !

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

    Thank you for posting this instructional and informative video on RGB & Addressable RGB LEDs. At Min. 31:47 you note that you need to 100uF Cap and 330 ohm resistor for your stand alone Addressable RGB LEDs. I would like to know if you need both the Cap and Resistor for an Addressable RGB Strip? Thank you again and keep up these great videos

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

      The electrolytic capacitor is required to smooth out the arduino power supply when the LEDs switch on and off. It's not required if you use an external supply., The 330 ohm resister is always required.

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

    Muito bom, estava precisando dessas informações preciosas. Abraços. 👍👍👍👍👍

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

    Excellent

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

    TIP: If you sign up for the newsletter you'll receive an email signed with the man's first name...something I never knew! :)

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

    Next you can make us see how the LED outdoor TV screen can be made.

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

    Great explenation and video. Tried it at home with a 60 LED long strip and it works. Only implemented the colorWipe function to experiment. I only run into one problem. If the LED-count is higher then 10, it keeps only working for the first 10 LEDs. It looks like more then 10 LEDs is not working? Or am I doing something wrong?

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

    Thank you very much for this video and the many others. They are very helpful in many ways and have helped me keep productively busy during this Covid era. Im about your age and had never soldered before and have many problems soldering extension between LED on WS2812 strips. And I have two questions if you don't mind. 1-- Can you recommend some practice techniques and setups to learn to solder on the resulting small pads once strips have been cut? I have tried several setups, but not been able to match the size and thermal properties of the reduced pads. By that I mean that the copper base I've used has more mass than the pad on the strip, thus absorbed more heat. 2- Where can I get the programmable LEDs you used in the video? Once again thank you very much for your videos. Juan

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

    I just read all of the comments and they have saved me a lot of typing...so I'll just say DITTO! (And thank you!)

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

    Great video on LEDs but also some good coding insights as well. Only question is about the capacitor on the 5V from the Arduino. What is the purpose of using it, and do you still need it if you are using an external 5V power supply (in my project I am using a buck converter to step down 12V DC to 5V)?

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

      The electrolytic capacitor is required to smooth out the arduino power supply when the LEDs switch on and off. Ii's not required if you use an external supply.

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

    nice explanation, thanks!. what is the code to press the button simultaneously sir?

  • @khomo12
    @khomo12 6 месяцев назад

    Very nice!👍👍👍🖥🖥🖥

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

    Can you change sketch from common led to RGB led for project

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

    I wanted help controlling the color red an blue. So there on the same strip, and I want blue to light up and switch to red over an over. So there's 3 lines 1+ in an 2 outs each out is a color red or blue. I want to have the light time changed fast

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

    Finally a real intuitive explanation with English free from freaky accents .

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

    Hi,
    RG
    Would please tell me how could I use the ESP32/ESP8266 to control the 12V standard RGB LEDs? Can I connect the 12V LEDs to the 12V power source while the ESP32/ESP8266 is feed with the 5V power source?
    Thanks,

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

    I can’t opten the page containing the conde of the proyecto...

  • @DD-jj2tc
    @DD-jj2tc 3 года назад

    You forgot to mention chips chips are great 6 solder point data in/out vcc in. Out gnd in.out the size of a dime and cheap

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

    مشكور يتعذر الاشتراك .

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

    Enjoyed this tutorial..
    Had a small 7 * LED RGB WS2812 "Wheel' from AliExpress (bit.ly/2EFA8Hb). As its a circular shape - it really suited the Adafruit library referenced in the tutorial. Will try same with an ATTiny 85 microcontroller 'stuck on the back of it'!

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

    Zu viel Werbeunterbrechungen. Schade.

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

    The monoto.....Crap, I fell asleep. What did I miss? Last I remember he was telling us the value of Y % pink = Potato. Did I get that right? I keed I keed But seriously you lost me at "Today in the workshop."

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

    Do you even PowerPoint bro?!
    You shouldn't be reading off of it like that PowerPoint should be a series of powerful points in exhaustive annotations

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

      Bro you came here to learn. Shut up

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

      The quality of these presentations is absolutely outstanding. The amount of preparation that must go into them is unbelievable.
      There is no stumbling over words, no ums & ahhs, just a smooth and flawless delivery.
      I taught in higher education for decades and can recognise the extraordinary quality of these videos.
      If you cannot see that, why are you here?