64x64 RGB LED Matrix Panel - SmartMatrix and Teensy 3.6

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
here's some of the pitfalls I encountered trying to get a 64 by 64 132 scan rate RGB LED panel working what problems I ran into and how I ended up overcoming it I got this 64 by 64 RGB LED matrix so it's 64 pixels down and 64 across and because there's so many other projects already out there that use these types of displays I thought it would be very easy to get going but I ran into trouble I tried several different libraries as well as physical hardware setups to drive the display but it always ended up flickering at best so this video will show what it is I did try what did or didn't work and why we'll look at the hardware on these displays how they work and finally do some demos to show what the display can do here's the back of my particular display this one has hub 75e written on it in general these displays have an input and output ribbon connector each one 16 pins so you can bring control data in the display will use it and you can cascade out and drive multiple displays and there's a 5 volt and ground power header here the LEDs themselves are simple RGB LEDs that have to be driven as a row and column matrix so all of these ICS are things like shift registers to clock data in latches to store the data out for the LEDs while clocking in more data and constant current LED driver chips the part number on mine is p2 1515 which means the pitch between LEDs Center to center is 2 millimeters the LED size is 1.5 millimeters by 1.5 millimeters this 32s is 1 over 32 scan rate so we'll look at what the scan rate is all about as well since these displays can draw several amps when fully bright and showing a lot of pixels especially white it's recommended to use a heavy-duty 5 volt supply so I'm using an old PC supply with an ATX breakout and I'm taking 5 volts to plug in to the display the data cable that comes with the display I'm hooking up to the breadboard with DuPont jumpers and the final circuit that I got working for now uses a teensy three point six so I laid out the breadboard in a way where the 16 pin cable pins come down over here then I have more jumpers going over to the teensy in trying to get the matrix panel working my first attempt was to just dive on in using the PX matrix library because I've seen other people use this no problem with esp8266 and that's what I wanted to try using so there's all sorts of instructions including special wiring considerations which we'll look at later so in the end I got the thing to display some stuff but it was flickering so I didn't know if the system is running slow I'm using the wrong combination of libraries or my panel had an issue and I had to dig deeper so I located this github repository for LED panel documents schematics data sheets other info from people reverse engineering and this happens to be my specific panel part number printed on my panels silkscreen and here's the schematic that's been drawn this is the input data 16 pin cable here's the output cable the inputs are buffered with 7/4 HC 2 4 5 and then we have row and column LED drivers depending on the size of the panel there's a certain number of address pins mine use all 0 up through a4 in order to address 64 rows and columns so depending what address pins are selected on the input header the appropriate rows will be illuminated and then the appropriate column will also have red green and blue data lit up for whatever rows we are trying to light up so these are 6 chains of shift registers red green and blue input 0 and then red green and blue input 1 and we will light up 2 rows at a time one with red-green-blue input zero and one with red green blue input one so the data will come in go through the shift register and the output of the shift register goes to the output connector so you can chain on to the next display and extend this shift register so you can drive multiple displays zooming in on the input connector we have red green and blue zero going to the shift registers red green and blue one going to these other shift registers the five address pins controlling which rows to light up then the clock latch and output enable for the shift registers the schematic shows that these row drivers are ICN 2012 and these columns are ICN 2037 so the datasheet for the 2012 we have eight outputs per chip controlled by address and enable pins and each chip can have one output row at a time on so that's all controlled in the library to control the display for the columns the 2037 chip is an LED driver with 16 LEDs per chip there's a resistor to control the current and this can drive 16 LEDs by clocking in the data latching it and enabling the outputs and there's data out so you can cascade for more LEDs sparklin has a blog post about how these panels work and this is what we just looked at in those data sheets for the two chips you control which row you want to turn on with some address pins you clock in your data and activate the rows and control the RGB colors on the columns as for the scan rate the panels can be purchased with different scan rates like 116 132 one eight the scan rate decides how many LEDs are turned on at a time so they give an example for a 32 by 32 LED matrix with a 116 scan rate you have 32 times 32 LEDs which is 1024 and you divide by 16 which gives you 64 LEDs being on at a time with this 116 scan rate so if you've got 64 LEDs on at a time and your panel is 32 wide then you've got two lines of 32 on so you will display two lines and then display two more lines and two more lines and keep scanning until you've got a full frame so with my panel it's a 64 by 64 and a 130 to scan rate so in my case I have 4096 LEDs divided by 32 I have a hundred and twenty-eight LEDs on at a time so that means I have two lines of 64 on at a time so it's the exact same situation as this if you have different scan rates you might have different amounts of lines on at a time and so on so going back to this px matrix library when I was trying to just blindly get up and running with esp8266 the esp8266 pins connect up to the input panel connector like this but at the same time there's a few jumpers you have to put a cross between the panel input and panel output connector I had no idea what this really was doing I just hooked it up and expected it to work what this is doing is converting this data input into one long shift register instead of individually clocking in red green and blue for both 0 & 1 scan lines you've got a clock through everything in one chain before you can latch the outputs so I believe this is the reason my esp8266 with such a big panel and scan rate this is too slow so I abandoned using px matrix and I started looking at other options Adafruit has the art of G B matrix panel library but as far as I understand they only support up to 32 by 32 panels but they did say hey if you need to support different stuff and you want to use teensy or ESP 32 there's a smart matrix library so I looked into that and when I came over to the smart matrix info this library was created 14 C 3 and I have a three point six it has since been ported over for p32 but I'm not sure if it's fully supported and besides I haven't used DSP 32 very much which I need to correct so I'm not really set up to use it and I didn't need any more unknowns I already am set up and ready to go with teensy 3.6 so I decided to do that but trying to use this of course a new can of worms this library is setup to use hardware and they have up to version 4 of a hardware shield here long story short I went with the version 3 shield setup so if I load some of the sample sketches I have to comment out this shield version 4 and allow it to use shield version 3 so the thing I like about this library they use all sorts of other things including fast LED can be used and so you can take advantage of some features of other graphics libraries and platforms and for things like if you want to do an audio spectrum analyzer display you can use the teensy audio features so I'll do that in the future but for now I just want it to get up and running here's the version 3 smart matrix shield schematic that I am basing my setup on so the reason I didn't want to use the version for newer shield they're controlling things differently where you actually do need a separate latch I see and I didn't want to use any ICS for now so I used version 3 and I can just wire this direct and not use buffers all this is really doing is taking the outputs from teensy sending them through a sub 4 to 45 buffer and then on out to the panel so I just sent these direct to the panel all this other stuff like an SD card support and power auctions some sort of expansion port I don't need to know what any of that does right now so part of the new can of worms the 64 by 64 panel with 132 scan rate needs 5 address lines but here on this version 3 shield we only have 4 address 0 1 2 & 3 and over here 10 8 on this panel input is grounded but that's where the extra address line would go so I started getting stumped again what am I supposed to do here back to Google and I found somebody once upon a time trying to get a 64 64 hub 75 132 LED panel working long story short on this there's a thread with back and forth talking about making changes to certain library source code files in order to add this extra address pin so I made the changes and got mine working finally based on all of this and I will put the modified files on github and finally this is my setup so I have this github smart matrix 3 hack where I'm putting those modified files to get it to run here's my wiring diagram so this is teensy pin 37 which goes down to this fifth address pin needed to control a 64 by 64 132 scan rate display there's this 1k resistor I put here between these two pins there's two output pins from teensy that have the same net connection on their schematic and I didn't look in the code to see if those are being driven alternately or are they driving high or low outputs simultaneously what the reason is and if that might cause some sort of hardware contention trying to drive one and the other so if they are meant to be connected together I connected them with a 1k resistor so they are still going to be connected but if one's driving high while one's driving low I'm not going to get a short and that seemed to work so I left that in this is the input panel header on the back of my matrix the top left is pin or 0 so that's how this wiring goes and this is what I've got up and running so I'm powering by a USB the other matrix panel connector for 5 volts and ground I'm powering from the PC power supply and then through this header on the back of the panel there's two ground pins that I'm bringing back to here so that gives me a common ground between the power supply through the panel wiring back to teensy so I have a ground for these data lines so now that I have a modified library to support all the I need and I've mocked up the wiring to support that I can finally run some of the example sketches for the smart matrix library this was just meant to get up and running with minimal extra hardware building if I'm going to actually do anything longer-term I'm probably just going to build the hardware for the version 4 of the shield so it looks similar to the other version 3 where I just connected straight from teensy over to panel but we do need this latch they set this up so that they actually don't use these address pins coming out of teensy there somehow deriving them just by these other controls and latching the address info but because they did this and they simplified all the pins you need I think that's why the library isn't set up for the version 3 shield they never implemented those changes from that message thread so that's why I have to do my hack to get it working on version 3 so finally when we look at some of these examples there's a demo here for fast led functions for me to get this working now with the setup I have I just comment out shield version 4 because I'm using 3 I change matrix width and height to 64 and I change this to 64 row and mod 32 scan and then I can compile and upload to teensy 3.6 and it works so I've been showing some of these demo sketches throughout this video now I just need to maybe study what features are available what kinds of things I can do like actually downloading an image in there or just drawing simple graphics scrolling text and all of that and put the panel to more practical use as I do more projects I'll have update videos on how I put this to use and if I ever get around to making the version for shield with that latch so lots of things to do with this project still I may also try using esp 32 hopefully this was informative or educational whether you were just watching this to see how the display generally works or if you actually have one that you're trying to get up and running and you have a TNC this one way to do it and even if you want to use maybe an ESP 32 and this video doesn't cover that specifically at least now you might know how to branch out and do your own research so if you found this useful in some way give it a thumbs up if you like this kind of content consider subscribing see you on the next project
Info
Channel: Gadget Reboot
Views: 41,069
Rating: undefined out of 5
Keywords: 64x64 rgb led panel, rgb led matrix, smartmatrix, teensy 3.6, 64x64 1/32 scan panel, how to use 64x64 rgb panel, smartmatrix fastled library, led matrix, teensy, led panel, fastled, fast led
Id: bu308tAqyIw
Channel Id: undefined
Length: 15min 52sec (952 seconds)
Published: Sun Aug 11 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.