Run an 8x8 LED Matrix using 3 pins!

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.ย. 2017
  • (Expand for Errata) Previously, we looked at the 8x8 LED Matrix. We noted that, since it needs 16 pins to power, we'll have to sacrifice quite a lot of pins on the microcontroller. I left this as an open question at the end of that episode, which you can watch here → • 8x8 LED Matrix for Ard...
    In this video, we try to look for ways to cut down on the number of pins, through use of our trusty 74HC595N shift register! We first looked at this nifty little component, which helps store one byte of data, in this video → • Integrated Circuits (w...
    By combining two shift registers with the LED Matrix, we can eliminate almost all of the pins used to drive the matrix. What's even better is, the first shift register can drive the second, reducing our pin count down to just 3.
    Want to see the code? Downloads are here: bitbucket.org/nerdfirst/ardui...
    To download, click "Download" on the left sidebar, and select "Download Repository".
    = ERRATA =
    Please note the mistake at 9:10 - In the diagram, the shift and store pins have been reversed. The store pin should be above the shift pin. Thank you very much to Joshua Thyer for pointing out the error!
    = 0612 TV =
    0612 TV, a sub-project of NERDfirst.net, is an educational TH-cam channel. Started in 2008, we have now covered a wide range of topics, from areas such as Programming, Algorithms and Computing Theories, Computer Graphics, Photography, and Specialized Guides for using software such as FFMPEG, Deshaker, GIMP and more!
    Enjoy your stay, and don't hesitate to drop me a comment or a personal message to my inbox =) If you like my work, don't forget to subscribe!
    Like what you see? Buy me a coffee → www.nerdfirst.net/donate/
    0612 TV Official Writeup: nerdfirst.net/0612tv
    More about me: about.me/lcc0612
    Official Twitter: / 0612tv
    = NERDfirst =
    NERDfirst is a project allowing me to go above and beyond TH-cam videos into areas like app and game development. It will also contain the official 0612 TV blog and other resources.
    Watch this space, and keep your eyes peeled on this channel for more updates! nerdfirst.net/
    -----
    Disclaimer: Please note that any information is provided on this channel in good faith, but I cannot guarantee 100% accuracy / correctness on all content. Contributors to this channel are not to be held responsible for any possible outcomes from your use of the information.

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

  • @3DSage
    @3DSage 5 ปีที่แล้ว +22

    Your video was the only one that helped me understand this! Thank you for making this video.

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

      You're welcome! Very happy to be of help =)

  • @d.dragon5425
    @d.dragon5425 5 หลายเดือนก่อน +1

    OH MY GOD, I HAVE BEEN LOOKING FOR THIS FOR 3 ENTIRE DAYS, THANK YOU.

    • @NERDfirst
      @NERDfirst  5 หลายเดือนก่อน

      You're welcome! Very happy to be of help :)

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

    Fantastic explanation. Very detailed and consise and very clear to understand. One of the best that I have seen so far on youtube. Keep up the exellent work.

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you very much for your comment! Very happy to be of help =) Glad you found the video useful!

  • @malshwwaf
    @malshwwaf 2 ปีที่แล้ว +1

    you're the man bro!
    the way you explained it, I don't have to come back to the video, I can do it myself from scrach!
    what a legend.

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

      Hello and thank you very much for your comment! That's exactly what I had hoped to achieve - To share the underlying concepts as opposed to codes, wiring diagrams or a step-by-step thing. I'm glad this worked out for you!

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

    *Expand for Errata and Other Notes*
    *1. On Current Draw*
    Do note that one important concern is whether the shift register and the Arduino can truly provide enough current to power the matrix, especially if many LEDs are switched on at the same time. This is particularly important as the datasheet for the 74HC595 shift register says that the maximum current any pin can source or sink is 8mA which is really not a lot. It'll work in little toy examples like this one, but if you're going to be building something like this for use in the long run, you might not want to do it the way I did!
    Take your own measurements, refer to datasheets, and use external power sources to be safe. Thanks to TH-cam user Enigma758 for bringing this up.
    *2. Errata*
    Please note the mistake at 9:10 - In the diagram, the shift and store pins have been reversed. The store pin should be above the shift pin. Thank you very much to Joshua Thyer for pointing out the error!
    *3. On Debugging and Help*
    Unfortunately due to high IRL workloads, I'm not able to look at your code and help diagnose problems. You may contact me at hello(at)nerdfirst(dot)net for paid consultation, if you really see the need.

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

    This tutorial has saved us on a proejct we couldn't get to work, thank you so much!

    • @NERDfirst
      @NERDfirst  ปีที่แล้ว

      You're welcome! Very happy to be of help =)

  • @fantasticphone9693
    @fantasticphone9693 5 ปีที่แล้ว

    excellent video, you make it easy to understand ! Your efforts are greatly appreciated - thank you!

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      You're welcome! Very happy to be of help =)

  • @AndreiNeacsu
    @AndreiNeacsu 6 ปีที่แล้ว +1

    Nice tutorial! Thanks!

    • @NERDfirst
      @NERDfirst  6 ปีที่แล้ว +1

      You're welcome! Glad to be of help =)

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

    Another really clear tutorial thanks

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

      You're welcome! Glad to be of help =)

  • @jonathanjacks3338
    @jonathanjacks3338 6 ปีที่แล้ว +3

    Awesome explanation. I had wired my grid together and was going to use 16 pins on my uno when I started worrying about current draw frying my board. I then spent HOURS trying to figure if I had reason to worry.

    • @NERDfirst
      @NERDfirst  6 ปีที่แล้ว +1

      Hello and thank you very much for your comment! Glad to be of help =)
      Do note that there is _still_ technically a concern with regard to current draw. You have to check and see how much current each LED is drawing, and it could pose a problem at two places:
      1) The LEDs will now draw current from the shift register chip instead of directly from the Arduino. However, the shift register is still powered by the Arduino! The current draw of all LEDs that are lit will therefore burden the 5V pin connected to the VCC leg of the shift register.
      2) The same thing goes for ground - The return path for all the LEDs go back to the Arduino's ground pin via the shift register. There is also a limit as to how much current the ground pin can sink. Again, if there is too much current drawn by the LED matrix, you still risk damage to the ground pin.
      So, use resistors where appropriate, and don't light up too many LEDs at once if you're not sure.

    • @moisesmosso6328
      @moisesmosso6328 5 ปีที่แล้ว

      @@NERDfirst which led I should use if I want to build my matrix from scratch by soldering the led's on a matrix of 8x16 with shift resister, with just the power of the arduino without burning it?

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

    Really good explaination!

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

      Hello and thank you for your comment! Glad you liked the video =)

  • @Aman-to1nj
    @Aman-to1nj 4 ปีที่แล้ว +2

    Thanks man! Now i got to know many others are unnecessarily making this concept complicated. Its very difficult to write control code if you are making a 20 X 20 led matrix, the binary for 20 will be very big and you cant use Int as you exceed its limitation, so I used Float. But yours differential control for each shift register is awesome!

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

      Hello and thank you for your comment! Yes unfortunately the way in which these panels are addressed makes it messy to scale up. Shift registers help for sure, but like you said, past a certain point there will even be issues with data storage.

  • @idrisishola6469
    @idrisishola6469 5 ปีที่แล้ว

    Good tutor. More power to your elbow

  • @srs2236
    @srs2236 ปีที่แล้ว

    Thanks again! Just what I need for my electronics project!

    • @NERDfirst
      @NERDfirst  ปีที่แล้ว

      You're welcome! Glad to be of help =)

    • @srs2236
      @srs2236 ปีที่แล้ว

      @@NERDfirst Hi! I wanted to ask if I could replace the 74HC595N with 74HC299N? I am trying to but it is driving me crazy. There is only one clock input on the 74HC299N while the 74HC595N has two - one for shift register and one for store register. Thanks a lot!

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

      Hello again! I don't have experience using the 74HC299N, so take everything I say here with a pinch of salt. I just skimmed the datasheet and have a _very_ limited understanding.
      The 595 is actually _two_ sets of shift registers, which allow you to shift values into a "temporary" bank before storing them into the output. The 299 doesn't have this, since, if I understand correctly, it's designed for parallel updates of the internal shift register via its pins, ie. The pins can be used for both reads and writes.
      You will probably not use this feature. Instead, you can still use DSL Pin 18 as a digital input, while left shifting (ie. MR Pin 9 High, S1 Pin 19 High, S0 Pin 1 Low while pulsing CP Pin 12). This will make it behave the same way as the shift register in the video, minus the two-bank "storing" effect.
      Not really sure if it'll work well in the context of driving these matrices though.

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

    Great content man

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

      Hello and thank you very much for your comment! Glad you liked the video =)

  • @sennabullet
    @sennabullet 8 หลายเดือนก่อน

    awesome! super educational!

    • @NERDfirst
      @NERDfirst  8 หลายเดือนก่อน

      Hello and thank you very much for your comment! Glad you liked the video =)

  • @user-wc9fi8gk3k
    @user-wc9fi8gk3k 5 ปีที่แล้ว

    Thank you so much for this explainining

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      You're very much welcome! Glad to be of help =)

  • @vladimirbratasiuk6509
    @vladimirbratasiuk6509 5 ปีที่แล้ว

    wery good explanation thank you

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      You're welcome! Very happy to be of help =)

  • @wouthaakman4769
    @wouthaakman4769 5 ปีที่แล้ว

    Great video!
    Does it matter whether you connect the resistors to the shifting register responsible for the rows or columns?

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

      Hello and thank you for your comment! Technically, no - As long as the LEDs somehow receive power, they will switch on.
      Realistically however, it's better to put resistors on what you are _not_ scanning, ie. If you are going to cycle through row by row (which i call "scanning" the rows), you'd want to place the resistors on the columns instead.
      The idea is to avoid having an entire line of LEDs going through the same resistor. Since they'd be in series, the lights will each be much dimmer.

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

    Very useful tutorial, THANK YOU! What about the limit for current through the Register and via the Arduino, particularly when all LED are lighted?

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

      You're welcome! Glad to be of help =)
      For this, I would recommend that you either pursue the datasheet or do your own measurements. However, another commenter has also done some of the measurements on their own matrix, you can see the results of their findings on my other video on this topic: th-cam.com/video/G4lIo-MRSiY/w-d-xo.html&lc=UgztVk5rMrTeLnISr4R4AaABAg
      Personally I'm not too concerned about the over-draw of current, but taking caution is still the best.

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

    Im working on a 8 directional joystick display, so i can show an arrow for each direction, since both the joystick and the 8x8 display had to be connected it became very messy, im gonna have to try this tomorrow so i can impress my teacher and flex on my peers(i need a win since i failed my first year) so thanks for the thorough explanation, im now a lot smarter :)

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

      Hello and thank you very much for your comment! All the best for your work =)

  • @NadavSSSS
    @NadavSSSS ปีที่แล้ว

    tysm you helped me a lot

    • @NERDfirst
      @NERDfirst  ปีที่แล้ว

      You're welcome! Glad to be of help =)

  • @Maher-
    @Maher- 4 ปีที่แล้ว

    This is an awesome video thanks for sharing all the good information,
    If i want to use an led stripe , do i need to follow the same concept?

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

      Hello and thank you for your comment! Glad to be of help =)
      The LED strips I have encountered so far do not work in the same way. For example, the WS2812 strip uses a single data channel to control any number of LEDs, with each LED forwarding the messages to the next.

    • @Maher-
      @Maher- 4 ปีที่แล้ว

      @@NERDfirst I want to build a stopwatch with 4leds stripe in each segment 28led for each number, what do you advise me for the electronic circuit?
      Thanks

  • @godlymajins
    @godlymajins 5 ปีที่แล้ว

    Thank you so much!

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      You're welcome! Glad to be of help =)

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

    Well explained

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

      Hello and thank you for your comment! Glad you liked the video =)

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

    So clear idea and explanation...
    But how the 8*16 matrix get power supply.. is there any power supply circuit required for the led matrix

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

      Hello and thank you for your comment! The way I'm doing it, there's no distinction between "signal" voltages and a source of power. Of course, this might put unnecessary strain on your Arduino and the shift register.

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

    Sir, You made me understand everything in crystal clear. Could you please make video for 8x8x8 led cube. Thank you

    • @NERDfirst
      @NERDfirst  6 ปีที่แล้ว +1

      You're welcome! What would you like to know about LED cubes? I'm not sure what there is to discuss beyond what was covered in these videos! You should be able to extend the same idea accordingly!

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

      Sir, Thank you very much for your reply. I made the cube and all the connection , but when I power up the arduino , just all the LEDs lit(before and after the code uploaded). Nothing else happen. Thank you.

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

      Hello again! I'm afraid I have too little information to give you any advice.
      Luckily LED cubes are fairly common projects so there are many in-depth tutorials you can refer to. Consider checking out the following Instructable, which breaks down the whole process and goes in depth: www.instructables.com/id/Led-Cube-8x8x8/

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

      Thank you very much sir.

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

    Great Tutorial! Very informative! For a project for school we have to show various characters on a dot matrix without using an arduino or other microcontroller. How would you do that?

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

      Hello and thank you for your comment! It depends on what LED matrix you are using. If you're using the same one as I have, you'll have trouble displaying most shapes since you won't be able to do scanning the way I did without a microcontrollers.
      This limits you to doing very simple shapes by powering up the relevant rows and setting their corresponding columns to ground through a resistor.

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

      If it is a fixed image you can use a eeprom and build yourself a clock to scan the lines. If you need to change the characters it is better a fpga. (I mean, because you dont want to use arduino or microcontroller), or you still can go to for a big logic circuit, always with a clock of course, with specific butttons for each character or just show in a loop, it is kinda fun but alot of work in the logic part as well, alot of wire too but it depends how good you are with logic port and karnaugh etc..

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

    Nice video. Can you explain how to create a moving display?

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

      Hello and thank you for your comment! Unfortunately I'm not aware of any shortcut to this (you can look for libraries that may help you), but if you're not using any libraries, you simply have to store all the frames of your animation and light up the LEDs accordingly over time.

  • @Max27653
    @Max27653 5 ปีที่แล้ว

    is there a schematic available somewhre where to read how you connected the 595 with the row and col of the matrix?

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you for your comment! 8:54 gives you a simplified idea of the connection.
      If you're looking for the actual pinout of the matrix, you'll have to google for the right one you have. Use this search as a start point: www.google.com.sg/search?q=8x8+led+matrix+pinout&tbm=isch

  • @kiminotoriko6178
    @kiminotoriko6178 5 ปีที่แล้ว

    very good explanation! i understand now. but now i donthave idea how that led matrix can show running text. pls make video how to do running text use led matrix. i appreciate it. Thank you!

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you for your comment! To do this, simply light up the right pixels over time, there really isn't a lot more to it, but it wouldn't be very intuitive. You can use this tutorial as a reference, but note that they are using a MAX7219 which has an additional chip to make wiring easier: howtomechatronics.com/tutorials/arduino/8x8-led-matrix-max7219-tutorial-scrolling-text-android-control-via-bluetooth/

  • @arminarya6272
    @arminarya6272 5 ปีที่แล้ว

    very helpfull. tanks

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      You're welcome! Happy to be of help =)

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

    great video!! Do you know how would the code be if i'm not allowed to use shiftout()?

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

      Hello and thank you for your comment! It's certainly possible to operate a shift register without using the shiftout() functions, but you'll need to understand how the shift registers work so you know the right times to trigger off the shift register's shift and store pins.
      I've covered the shift register before, you may want to check out my video here: th-cam.com/video/MRy47jCn3zA/w-d-xo.htmlm

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

    Thank u so much!

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

      You're welcome! Glad to be of help =)

  • @Enigma758
    @Enigma758 ปีที่แล้ว

    8:40 Hi. If you light a row of LEDs at a time, you will be overstressing the the 74HC595 which is not designed to handle that much current. It may work and the chip may survive, but there is going to be a voltage sag (drop) due to sinking excessive current.

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

      Hello again! Indeed, the same considerations apply as with your comments on the other 8x8 matrix video. I'll put up a pinned comment for clarification.

  • @neorondovio6365
    @neorondovio6365 ปีที่แล้ว

    If you want to try using only 1 shift register and 1 decade counter, I highly recommend preparing 8 transistors for the decade counter pins. You will probably implement those output pins for the rows of the matrix due to its limited capability. I recently tried using those and directly connecting decade counter output pins as VCC for the led. I found out that each of these pin have built in resistors inside. These resistors are provided from the inverters of the IC. Making the last video as a reference, you don't like these resistors to be in series with your paralleled LEDS. Since the decade counter is an unchangeable IC, your best course is to connect each pin to the base of a transistor and make it as a switch for the direct 5V source (connected in collector) to pass through the emitter (connected in VCC of 8x8 matrix). I had a hard time finding this idea but it is such an opportunity to learn and share it with you.

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

      Hello and thank you for your comment! This is super interesting, I never considered how the internals of the IC could also lead to undesirable behavior. I mostly looked at it as a black box ignoring implementation.

    • @neorondovio6365
      @neorondovio6365 ปีที่แล้ว

      @@NERDfirst Always welcome 😊. Btw you can also use these 8 transistors as a solution for your maximum current draw in your shift register. You can just make those output pins as a switch to provide a direct 5 volts in every anode of your matrix. Since the 5V source of the arduino can handle, theoretically, a maximum of 800mA, you won't get any problem in long runs.

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

    Thank for the video, it was really usefull.
    But i have one question.
    when i test everything by just shifting out a 0 and then a 255 and then storing it like you said to test the setup my leds dont light up but sometimes if i press the reset button random colloms light up or random rows, its really confusing.
    My wiring should be correct because i was able to light al of the leds up once.

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

      the problem lies with the second shift register

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

      Hello and thank you for your comment! From your comment, I assume you've fixed it!
      As long as all the pins on the shift registers have been correctly connected, and that your code takes care to reset the registers everytime at the beginning, it should be fine.

  • @amaran_en_katarina
    @amaran_en_katarina 6 หลายเดือนก่อน

    There are 16bit i2c (de)multiplexers that only require two wires. They can run on 2v so I think you can do without the resistros as well.

    • @NERDfirst
      @NERDfirst  6 หลายเดือนก่อน +1

      Hello and thank you for your comment! Yes, there are definitely many ways of solving this. I went for the Shift Register technique since it's what I had on hand, and is relatively simple to understand without too much additional pre-requisite knowledge of techniques like i2c.

  • @somnathbera8927
    @somnathbera8927 5 ปีที่แล้ว

    Thank you

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      You're welcome! Happy to be of help =)

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

    very clear

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

      Thank you! Glad you liked the video =)

  • @gunja203
    @gunja203 5 ปีที่แล้ว

    Maybe a noob question but...where do I connect the data, store and shift pin from the shift registor to the arduino ?

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you for your comment! This depends on your code! Just set aside whichever pins you want and use them.

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

    Do these two ICs provide enough current to drive LEDs without loss of brightness when all 8 go on?

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

      Hello and thank you for your comment! I have not consulted with the datasheets of both the ICs and the matrix to confirm this. Visually, it seems acceptable, bearing in mind that the "scanning" nature of this approach will also have some impact on the brightness. But if you want to be really certain then you'll have to delve into the datasheets.

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

    Nice thanks a lot

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

      You're welcome! Glad you liked the video!

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

    Nice video! There's one thing that I want to ask: can I control one single LED and let it blink, which is a pwm signal output by the register.

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      PWM is a little finicky, in my experience. When you're using a shift register, you essentially have to "fake" PWM by rapidly streaming information to the register and updating the LEDs to flicker on and off. Your whole code will be tied up doing this and you'll work the shift register very hard.

  • @ngg-mw5qv
    @ngg-mw5qv 4 หลายเดือนก่อน

    Hii, currently making this one and im having trouble. No led turns on but when i touch the IC it lit up all led. Could it be the IC the problem?

    • @NERDfirst
      @NERDfirst  4 หลายเดือนก่อน

      Hello and thank you for your comment! It's not really easy to tell what the problem is.
      Double check that your connections are correct and not loose. If you're prototyping on a breadboard like I am, a lot of the times, that's all it takes.
      Otherwise, you're gonna have to go through a set of sanity checks to see if the code or LED matrix are working properly.

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

    Hello! Can you tell me how I can display, for example, letter A and after 1 second, letter B appears ?

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

      Hello and thank you for your comment! The easiest way is to use the scanning method described to draw the first image. Use delay() to make the program wait, and then draw the next picture.

  • @user-jg3hr4xg6s
    @user-jg3hr4xg6s 3 หลายเดือนก่อน

    Hey man, I saw you're still replying to comments and wanted to ask if there's a u8g library compatible with this. it would eliminate the need for the max7219 entirely

    • @user-jg3hr4xg6s
      @user-jg3hr4xg6s 3 หลายเดือนก่อน

      also subbed

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

      Hello and thank you for your comment! I'm not aware of any graphics library for such LED matrices that also don't assume that they're driven by a max7219 or similar chip. Given the amount of wiring and setup involved, I think this technique just isn't as easy and consequently isn't as popular.

  • @nobodycanknow5181
    @nobodycanknow5181 ปีที่แล้ว

    Hi! Really love the tutorial!!! very easy to understand... I just encountered a bit of a pickle...
    when i use this your code in this part:
    for (int i=0; i> i);
    store();
    }
    all the led light up...
    but when i interchange the two shiftout function:
    for (int i=0; i> i);
    shiftOut(DATA, SHIFT, LSBFIRST, ~pic[i]);
    store();
    }
    the desired pattern shows up...
    can you pls tell me what is happening? I think i correctly placed the wire connections...

    • @NERDfirst
      @NERDfirst  ปีที่แล้ว

      Hello and thank you for your comment! Looks like the role of the two shift registers have been swapped around. Assuming that your wiring is indeed correct (including the wiring going to rows vs columns, assignments of voltage sinks and sources, and wiring between the two shift registers), then it's entirely possible this might be caused by differences in components.

  • @jacktheaviator4938
    @jacktheaviator4938 5 ปีที่แล้ว

    I built my own 8*8 matrix, and wired it as shown, when I uploaded the code, all of the LEDs were lit. Could you point me in the right direction to debug the issue? And something that I wasn't quite clear on from your video, should enable and reset be pulled high or low?

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you for your comment! There are many factors that are at play in such a situation. You can try your luck with the shift registers first, but if that's not he cause you'll probably have to eliminate to possibilities bit by bit to home in on the error.
      So I'll answer your second question first in case that's the cause - "enable" should be pulled low, and "reset" should be pulled high, per the diagram at 9:52. Try that first, if it works then you're done!
      Otherwise, you'll have to eliminate possibilities bit by bit. Firstly, try taking away the shift registers first and just working with your matrix "manually". Instead of trying to draw any fancy pattern, just try to light up one LED first. This will be a "sanity check" to make sure that the basics are okay before you attempt anything else.
      If everything works fine here, great! We can examine the shift register connection and/or the code. If not, you may want to peek into your circuit for the 8x8 matrix to make sure everything is actually wired right. (In my personal opinion, I think this is where the problem is - There are so many connections and it's easy to accidentally bridge something that shouldn't be connected!).

    • @jacktheaviator4938
      @jacktheaviator4938 5 ปีที่แล้ว

      @@NERDfirst I had a solder bridge on one of the legs of the shift register, and I guess it pulled everything high. Thank you for putting an awesome video out there. I DEFINITELY will be a loyal subscriber

    • @jacktheaviator4938
      @jacktheaviator4938 5 ปีที่แล้ว

      I have one other question, do you know of a simple to use converter that can change the needed binary into the values needed to code different designs?

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Really happy you got it figured out!
      For a converter you can use this one here: www.rapidtables.com/convert/number/binary-to-decimal.html

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

    Could you use this scheme to control a 9px row x 368 column matrix? I'd even be willing to leave a column on the table if I could do this with 47 shift registers, and only 3 data pins.

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

      Hello and thank you for your comment! Theoretically, yes, you should be able to do this. However, when things start to get large scale, miniscule issues will begin to add up. For example, the time taken for information to propagate from one shift register to the other. Hell, even the time required for the arduino to serially stream the information out. That's going to take time, but you can't delay scanning or things will look weird.
      What I'm saying is, you can try this, but be prepared for weirdnesses!

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

      @@NERDfirst Yeah, and refresh rate is going to have to be pretty high. Could be worth a shot. I'll give it a go eventually. I'm at the concept phase of my project, so, nowhere near ready to execute just yet.
      Thanks for your reply.

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

      Usually when people want to drive large enough displays (eg, via VGA), they may look towards more powerful equipment like FPGA. I haven't used that before though, and I'm not sure if that will be overkill for what you're doing, but you may want to add that to your list of hardware to research. Good luck for your project =)

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

    Great explanation for a matrix.thank you for the video.
    Can you help me to get the zip file for the code? How can i get a link to google drive?

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

      Hello and thank you for your comment! The downloads have been shifted to BitBucket. Check the video description for the link and relevant instructions.

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

      Code has been moved to bitbucket? Can you help me with this? i am completly newbee and can noy find any code there have made a account

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

      As mentioned in the video description, click on "Downloads" on the left sidebar of the bitbucket page. Then click on "Download Repository".

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

    Hello I realy liked the video! I am making a led display the way you did in the video, that Imitates firework. is it possible to fade the leds after they are turned on?

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

      Hello and thank you for your comment! Fading is possible but challenging. To do this (assuming you're on Arduino which doesn't put out "true" analog signals), you'll have to read up on how PWM works - It "dims" LEDs by repeatedly switching them on and off. That in itself isn't too difficult, but the problem is you're also scanning to draw out the display. Meaning you have to scan out images that are different over time, with some pixels alternating between on and off to achieve the PWM effect.

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

      @@NERDfirst thank you for your reaction. I understand that it s difficult to scan and fade. And what if I have a fixed order of LEDs that need to turn on. Maybe I can do that without scanning? Or do I need more pins for than on Arduino. I have 25 LEDs
      This is wat I want to make : th-cam.com/video/fheVqMlpWUM/w-d-xo.html

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

      If you don't do scanning, you're a lot more limited in terms of what shapes you can draw. You can draw simple horizontal and vertical lines, as well as a single rectangle. The linked video makes it seem like you might be able to get away with it. You'll have to plan out your animation well.

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

      @@NERDfirst yes the shape that I want is exactly the same as in the link I have send. And is not going to change like a led matrix. will it be possible to use the shift register chips for me? In order to do the fading and reducing the amount of pins? Or is there a simplified way to control this
      The thing is i want to make exactly the same as in the link I send you

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

      Yes. It sounds doable. Plan out your animation beforehand to know which pins need to be toggled on and off, then you can see which parts can be optimized.

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

    so I'm having a problem with this when upload the code I just get a straight diagonal line. if I change the 8 in "for (int i=0; i

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

      problem solved I had the store and shift pins swapped

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

    so which pin is the vcc for the registors on the arduino nano?

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

      Hello and thank you for your comment! You can refer to the Arduino Nano pinout here: bigdanzblog.wordpress.com/2015/01/30/cant-get-i2c-to-work-on-an-arduino-nano-pinout-diagrams/

  • @disisntdaryl
    @disisntdaryl 5 ปีที่แล้ว

    I have a question for you. If I only have resistors on the grounds can I light up all the LEDs at once or will it have to be scanned instead? do i choose the resistor based on 8 Leds in parallel or do i base the resistor on 1 led? For example if the grounds are on the columns and i try to light the whole column vs one led in that column. to light the whole column will i have to scan or can i just send power to all rows ? 8 leds would be on going thru one resistor..

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you for your comment!
      1. If you want to light up all LEDs (or if you want to control all LEDs independently), then you don't have to perform any kind of scanning. Scanning happens because we want to selectively light up certain patterns of lights despite having too little pins to control. To answer your question - Yes, if the pins on the "return path" go to ground, turning on the other pin will light up the relevant LEDs.
      2. Assuming that you follow my design (where the resistor is placed on the "input" line, so to speak), your resistor is for 1 LED. The common return path for all the LEDs in the row does not require a resistor. The reason for this is because if multiple LEDs "share" a resistor, the total amount of current going to each LED is greatly limited, so you'll lose brightness.

    • @disisntdaryl
      @disisntdaryl 5 ปีที่แล้ว

      @@NERDfirst just wondering if it will get dim with all the rows of an led sharing a resistor on the ground like it will when it is on positive

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Yes, as resistance is "shared" across all the LEDs, their _total_ current draw is restricted. You'll have to use a different (lower) resistance to get the same brightness.

    • @disisntdaryl
      @disisntdaryl 5 ปีที่แล้ว

      @@NERDfirst however, if I use a lower resistance then it may overpower an led when only one led is being lit.
      So to operate the LEDs at full brightness both when lighting one led and when lighting the whole matrix I would have to scan instead of just sending power to all pins. Correct?

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Indeed! Good thinking. It's still better to individually place resistors.
      If you want more _consistent_ brightness, scanning is still better (though scanning will take away brightness as well because the leds are off more often than they're on)
      Chances are, you just can't get "full brightness" with this setup.

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

    Hi! At 14:21 how do you get the number 128? I'm doing a simple simulation of a 3x3 matrix before scaling up to 8x8, but with the 3x3 the code doesn't work (I've changed the array to {0, 16, 17} to match what a 3x3 can do). Any advice?

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

      Hello and thank you for your comment! I explain why it's 128 at 14:23. Let me know if there's anything not clear there so I can elaborate further.

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

      @@NERDfirst omg i must have missed it thanks so much!

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

      No prob =)

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

      @@NERDfirst I know this is off topic, but I have a code meant for a series of 8 daisy chained 74HC595 shift registers which lets me change 1 bit at a time (basically running through all the existing outputs, 8 at a time, store them, only replace the 1 particular one I want changed, before pushing them all back through the registers...). Will it be able to work the same way if I replaced the 8 daisy chained shift registers with 1 64-bit shift register instead?
      Sorry if I shouldn't be asking a topic out of scope, let me know and I can delete this.

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

      @@dragongirlster If I'm understanding you correctly, it should be okay. 8-daisy chained shift registers means you essentially have a 64-bit shift register (ie. Each bit can be shifted 64 times before it "drops off"), so replacing it with an actual 64-bit shift register component _should_ be exactly equivalent.

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

    Can you do an intro tutorial for raspberry pi and arduino programming?
    Thanks

    • @NERDfirst
      @NERDfirst  6 ปีที่แล้ว +2

      Hello and thank you for your comment! I think those exist fairly widely though, not sure if I could add very much value to what already exists.

  • @tegancirulli2355
    @tegancirulli2355 5 ปีที่แล้ว

    Propbably a ridiculous question but how do you know which side is the rows on the led matrix and which side is the columns?

    • @moisesmosso6328
      @moisesmosso6328 5 ปีที่แล้ว

      With a multimeter you should get 5v on one shift resister and 0v on the other resister....

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you for your comment! While the suggestion by @moises mosso is good, the easiest way is to just look for the datasheet of the matrix, which you can find by searching for the part number. The one I have is the 1088BS, and the pinout looks like this: drive.google.com/open?id=1LdaVACR2Yiczm33zBCXs6-uugWNl7c8k
      If you need more information on the matrix, please refer to my other video on this topic: th-cam.com/video/G4lIo-MRSiY/w-d-xo.html

  • @arivnidunami3047
    @arivnidunami3047 2 ปีที่แล้ว +1

    And now, how to make it scrolling? Please make the video, thanks.

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

      Hello and thank you for your comment! Generally, for more complex things like even switching what is displayed or animations, the code can get quite messy. Maybe find some library that can do this for you.

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

    at 9:10 you show a pin schematic for the 74HC595N chip labeling 5th pin on the right Shift, and the 6th pin on the right Store.
    but @ 10:06 when you show the 2 chip wiring diagram you switch the Shift and store pins coming from the Arduino signal.
    I was just wondering if this was a mistake or something?
    Love the content and thanks for the help so far!

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

      Hello and thank you very much for your comment! Yes indeed, this is a mistake. Interestingly it's the diagram at 9:10 that is incorrect - The Store pin is on top of the Shift pin. Thank you very much for pointing this out, I'll add a note to the video description.

  • @rizkymuharman9680
    @rizkymuharman9680 5 ปีที่แล้ว

    is there a zip file to program ?

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

      Hello and thank you for your comment! Please check the video description for a Google Drive link.

  • @idrisishola6469
    @idrisishola6469 5 ปีที่แล้ว

    More tutorials my boss

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

      Hello and thank you for your comment! Videos come out twice a week, definitely lots to come from me =)

  • @arminarya6272
    @arminarya6272 5 ปีที่แล้ว

    Can email you I had a few questions from you

    • @NERDfirst
      @NERDfirst  5 ปีที่แล้ว

      Hello and thank you for your comment! As much as possible, I would prefer answering questions in the comments section on the video so that everyone can benefit from our conversation. However, if you need to contact me privately, you can get my email address by clicking on "View Email Address" on this page: th-cam.com/users/lcc0612about

  • @ANANDKUMAR-lu8dj
    @ANANDKUMAR-lu8dj 3 ปีที่แล้ว

    How are you have told is not working only

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

      Hello and thank you for your comment! You might want to elaborate a little further on what is not working.

  • @user-tt7ib5po1e
    @user-tt7ib5po1e 2 ปีที่แล้ว +1

    you have a booger in your nose 5:26

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

      Oh well, and now it's archived forever for the world to see!