#1 How to: WS2801 RGB 5050 LED's on Arduino uno, shiftOut

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2014
  • Visit www.crazy-logic.co.uk for more interesting stuff.
    The code,
    www.crazy-logic.co.uk/projects...
    Multiple strings
    www.crazy-logic.co.uk/projects...
    other interesting ref's
    arduino.cc/en/Reference/shiftOut
    www.adafruit.com/datasheets/WS...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 46

  • @RandomPsychic
    @RandomPsychic 6 ปีที่แล้ว

    Its an amazing chip. Its applications are not just limited to LEDS. By using external mosfets, you can drive multiple PWMs albeit at 2kHz.

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      Indeed it's very use full. :) Thanks for watching

  • @jonathanmills5328
    @jonathanmills5328 7 ปีที่แล้ว +1

    Thanks for your video. Can only WS2801 be used or also other protocols?

    • @CrazyLogic
      @CrazyLogic  7 ปีที่แล้ว

      Others can be user but they need to have a separate clock and data wire to use this method.

  • @jdvm086
    @jdvm086 9 ปีที่แล้ว

    Gracias por tu aporte a la comunidad!!
    thanks

    • @CrazyLogic
      @CrazyLogic  9 ปีที่แล้ว

      You're welcome :)

  • @zmaxer01
    @zmaxer01 6 ปีที่แล้ว

    I'm trying to create a light malfunction a flickering effect, any idea's how to code that, with randomisation?
    Thanks in advance.
    Cool tutorial!

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      yeh - you can turn it on/off using a random delay to create the flicker effect.

  • @thezopelo
    @thezopelo 3 หลายเดือนก่อน

    Thank you human.

  • @n3on4s
    @n3on4s 7 ปีที่แล้ว

    Okey, nice video!
    How many pixels/leds u can control with ardruino? in this video it is 8 and what is a max amout?

    • @CrazyLogic
      @CrazyLogic  7 ปีที่แล้ว

      So the maximum amount of pixels in a string is not defined by the Arduino/code but by the pixels chip (and the bus speed which is set in software/hardware).
      The way they work is by reading a string of data, then removing the first 3 bytes (a frame) they receive, then passing the rest of the string to the next pixel. But there is also 2 reset criteria to tell the first chip when to start receiving data.
      If the CLK is low for 500us or more then the next rise is the start of the frame for the first pixel,
      Also on some (mainly 3 wire pixels) there is a time out - which limits the number of frames.
      From the WS2801 datasheet you can also see there is a physical limit between pixels too of ~6m. cdn-shop.adafruit.com/datasheets/WS2801.pdf
      But To summarise, I have driven 5m length of 4 pin 30 pix/m pixel tape without any issues other than a bit of voltage drop down the length (translates into brightness change) and with the 3 wire pixels (operating off a faster Micro-controller) I have driven 5m of 60 pix/m again without any data issues. TBH i suspect you'll run out of Arduino processing power before you hit the pixel limit.

    • @n3on4s
      @n3on4s 7 ปีที่แล้ว

      Thanks for the answer. TBH im good at programming, but suck at electricity. My dream is to build a huge something like 1m x 1m led matrix on wall, and control it with Arduino. By Arduino processing power what do you mean? should i use something like raspberry pi to run such project?

    • @CrazyLogic
      @CrazyLogic  7 ปีที่แล้ว

      it all depends - i think my advice would be to start with an Arduino, to learn about the strings and electronics. then when the Arduino platform starts to limit your creativity more up to a PI or another MCU like a teensey - i would also probably say for that many pixels you'll be better using the fastSPI library and having fewer strings rather than use the code from this video.
      also depends how many pixels you'll drive in the 1mx1m matrix. if 30 by 30 pixels, then i think (have not tested this) that you might hit the limit, but there's no harm in trying - and there's certainly other users on TH-cam who will have tried more than me. If you can find an answer to how many you can drive in another video, please drop a link in here to it, and if not let me know as i have some tape i could use to find this limit experimentally.

  • @erghy
    @erghy 7 ปีที่แล้ว

    what library did you use ?? and from were can i download it ?

    • @CrazyLogic
      @CrazyLogic  7 ปีที่แล้ว

      all the code is in the video. :)

  • @adamjensen6376
    @adamjensen6376 7 ปีที่แล้ว

    Hi there i wanted to know something I am working on a weather station here and I have four RGB and I was wondering how can I loop it to change red then green then blue then half of
    leds
    4 turn to red
    4 turns to blue
    4 turns to green
    and so on
    then
    when weather changes the led changes
    if its hot the led turns red
    if its cold
    the led turns blue
    and if it rains the leds turn white
    and so on
    how can I do that

    • @CrazyLogic
      @CrazyLogic  7 ปีที่แล้ว

      If you have WS2801, then a simple bit of code that's something like below would cycle through the LED's
      for(i=0;i

  • @kevinjude9155
    @kevinjude9155 6 ปีที่แล้ว

    Hi there, nice video. Do you have RGB LED Strip WS2811 12v coding ? the ic control 3 led at a time. can you share it at the comment or make a video about it ?

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      it should be exactly the same but rather than each pixel it controls 3 at a time. the SPI side of things is the same.

  • @AladinBecovic
    @AladinBecovic 6 ปีที่แล้ว

    Is it possile to have an array of say 50 led lights with this code? And also would i need an external power supply or can i somehow manage to power them all using only the arduino ?

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      Yeah arrays of lengths past 300 pixels work fine. Power consumption can be worked out by 60mA per pixel and then really you want to limit that to 400mA on the Arduino (a usb is usually half an amp). So really - 7 pixels on full would be the limit for the USB.

    • @AladinBecovic
      @AladinBecovic 6 ปีที่แล้ว

      Thank you for the fast response!

  • @jahson898
    @jahson898 4 ปีที่แล้ว +1

    Very well explained 👍🏾

    • @CrazyLogic
      @CrazyLogic  4 ปีที่แล้ว

      Glad it was helpful!

  • @dradon123
    @dradon123 2 ปีที่แล้ว

    Hi would this code work for cc1310 Ti board?

    • @CrazyLogic
      @CrazyLogic  2 ปีที่แล้ว

      no idea - if there's a UART controller in hardware you'ld need to modify the code to suit

  • @ParallaxVisuals
    @ParallaxVisuals 9 ปีที่แล้ว

    dude!!!

  • @jkbanga971
    @jkbanga971 6 ปีที่แล้ว

    hi there I need help to make matrix with uno if you can...

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      there are plenty of libraries available for this - have a look on google for WS28** libraries.

  • @luisangelantoniorobles4281
    @luisangelantoniorobles4281 6 ปีที่แล้ว

    Hi, how can I make sentences with that strip of LEDs in Arduino?

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      you would have to spend quite some time programming any led strip to display letters - there might be a library available, but i'm unaware of it.

  • @audiledumbau9277
    @audiledumbau9277 8 ปีที่แล้ว

    can i make it on my audi a5 ??backlight??i have led backlight??this where are a big Projekt for me when you can give you 500$

  • @floatinghat2270
    @floatinghat2270 4 ปีที่แล้ว

    What if i havd 300 leds so i use the same code?

    • @CrazyLogic
      @CrazyLogic  4 ปีที่แล้ว +1

      in theory yes - the key is that after your last LED there needs to be a period of no data to trigger the first LED to latch again for the next loop of data.

  • @ahmadkamal8318
    @ahmadkamal8318 6 ปีที่แล้ว

    Do you have it circuit connection ?

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      3:30 onwards shows the connections :)

    • @ahmadkamal8318
      @ahmadkamal8318 6 ปีที่แล้ว

      Crazy-Logic ok thanks. Do you know how to coding one led one led light like in this vudeo by using ws2811 rgb ?

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      Have a look online for a 2811 library as they're quite specific in their requirements for timings.

  • @ProgrammingEditingHub
    @ProgrammingEditingHub 3 ปีที่แล้ว

    How to do this with regular leds not strip ??

    • @CrazyLogic
      @CrazyLogic  3 ปีที่แล้ว +1

      You could use PWM and analog.write to control the LED and then just pull the channel values as in this video.

    • @ProgrammingEditingHub
      @ProgrammingEditingHub 3 ปีที่แล้ว

      @@CrazyLogic any video guide ?
      Basically i want to add 60 leds to my wall clock for showing seconds .. and i want just to glow led one by one until it reaches 60 then power off all then again start with one

  • @Electromaniaworld
    @Electromaniaworld 6 ปีที่แล้ว

    interesting

    • @CrazyLogic
      @CrazyLogic  6 ปีที่แล้ว

      Thanks for watching :)

  • @audiledumbau9277
    @audiledumbau9277 8 ปีที่แล้ว

    can you make it faster??

    • @CrazyLogic
      @CrazyLogic  8 ปีที่แล้ว

      +billo chiko the scroll in the video can be made faster - but the refresh rate is limited by the Arduino and SPI bus timings.

  • @EnergeticWaves
    @EnergeticWaves 5 ปีที่แล้ว +1

    I’m using capital because I want to. Lol