Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: LED matrix questions

  1. #1

    LED matrix questions

    Hi peeps,

    I'm planning to make an installation that makes use of a bunch of (preferably daisy-chained) LED matrixes like this Adafruit one; https://www.adafruit.com/product/2278
    Before I buy anything I'd like to make sure I understand correctly that these matrixes require about 3200 bytes of RAM to be able to PWM the whole thing fast enough. A Teensy 3.6 has 256kByte of RAM so the daisy chaining of about 10 of these boards shouldn't be much of an issue for it?

    I'd like to use one of these smartMatrix shields to connect the thing, so the thing can be hidden away nice and clean. https://www.adafruit.com/product/1902

    Then at last; I was actually looking at aliExpress to see what options are there. Does anyone have any recommendations there, or any things I should look out for?
    The thing seems to be the exact same thing; -Downsized link-

    Hope you can help me out! Thanks in advance

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    397
    For the most part you're on the right track but I'm not sure about 10 boards across. If you get the 64x32 boards that's 640 pixels that need to be clocked out * 16 rows * at least 50-60 times per second so it's not too flickery * bit depth. I think the library supports up to 128 pixels across and you can probably fix the software to handle something wider but I'm just not sure about the timing.

    Regarding buying the boards on AliExpress, these boards are pretty common and don't always say HUB75 but that's what they are. I've ordered several from different vendors and all so far so good, except for one 64x64 board that is HUB75E that uses a different chipset and had to be sent some config bits before each scan line. I wrote a quick & dirty piece of code bit banging the protocol based on http://bobdavis321.blogspot.com/2019...nels-with.html just to make sure the board was functional, but haven't done anything with it since then.

    Good luck with your project.

  3. #3
    Quote Originally Posted by potatotron View Post
    For the most part you're on the right track but I'm not sure about 10 boards across. If you get the 64x32 boards that's 640 pixels that need to be clocked out * 16 rows * at least 50-60 times per second so it's not too flickery * bit depth. I think the library supports up to 128 pixels across and you can probably fix the software to handle something wider but I'm just not sure about the timing.

    Regarding buying the boards on AliExpress, these boards are pretty common and don't always say HUB75 but that's what they are. I've ordered several from different vendors and all so far so good, except for one 64x64 board that is HUB75E that uses a different chipset and had to be sent some config bits before each scan line. I wrote a quick & dirty piece of code bit banging the protocol based on http://bobdavis321.blogspot.com/2019...nels-with.html just to make sure the board was functional, but haven't done anything with it since then.

    Good luck with your project.
    Thanks for your reply! Just wondering if you ment to say; 640 pixels * 32 rows (typed 16 in post) * 50-60 times per second. Cause if you actually ment to say 16, I wonder why it would be 16 instead of 32, as the board has 32 rows or am I missing some understanding of the scan lines at the moment, is it doing some kind of interlacing? Also, how would you go about calculating the speed at which the teensy can actually do this? I bet this is related to the CPU speed, in which case I might calculate to use a teensy 3.6, and if thats not sufficient try to rewire a teensy 4.0 to the 3.x compatible smartMatrix boards. Thanks!

  4. #4
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    397
    You send 2 lines of data with every row so for x32 boards it's 16 iterations. This https://bikerglen.com/projects/lighting/led-panel-1up/ explains it better than I can.

    As far as the update rate goes -- let's say you want 8 bits of color resolution and you want 100 update per second so it's not flickery. That's 16 (lines) * 256 (bitplanes) * 100 (update) = 409600 per second, or one every 2450 nanoseconds. The Teensy 3.6 runs at 180 MHz, which is a clock every 5.6 nanoseconds. 2450 / 5.6 = 439 clocks per update, so you've already exceeded the chips ability to send out 640 pixels.

    If you drop the refresh rate down to 50 times per second and only do 7 bit pwm you get 1758 cycles per update which might be doable but I'm not certain -- I think the Smartmatrix library uses DMA but I haven't dug into the code enough to know the specifics. My guess is also that you'd see the flicker at that rate. Or maybe you don't need that much bit depth? If you only need 12 bit color you could update 100 times per second and have 7000 clocks to send the data out. I don't have the shield to test but I'd guess that's possible.

    The Teensy 4 doesn't work with the SmartLED shield right now but the author is working on it (https://github.com/pixelmatix/SmartMatrix/issues/89).

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,286
    I saw a project where someone used 8 panels. I don't know if they were using SmartMatrix or other code to drive them. But that is a huge amount of data to transfer, maybe starting to push the limits?

  6. #6
    Quote Originally Posted by PaulStoffregen View Post
    I saw a project where someone used 8 panels. I don't know if they were using SmartMatrix or other code to drive them. But that is a huge amount of data to transfer, maybe starting to push the limits?
    I guess I could also just have (for example) 4 boards per teensy, and then have one 'master' board that sends data over to the correct 'slaves'. The image is not changing that fast in my installation, so a little less speed is fine, I just do need the 8 bit color options

  7. #7
    Junior Member
    Join Date
    Jan 2020
    Posts
    5
    I'm working on a project that drives 4 panels (each 64x32 pixels) using a T3.6 and SmartMatrix. Overclocked to 240Mhz, there's just enough speed to refresh the screens at 100-120 Hz (with 16 bit per pixel color) while also performing full screen rendering operations. However, I think that's about the practical limit. Any larger and you run out of memory and speed.

    With these panels, you can't really go lower than 100 Hz refresh rate or you get really awful flickering, even with a static image. The LEDs don't have any persistence while the scan goes to the next line, so they flash on and off constantly.

  8. #8
    Junior Member
    Join Date
    Jan 2020
    Posts
    5
    The SmartMatrix library uses double buffering so the memory usage is twice as large as you would expect. In my case, with a 128x64 screen size and 16 bit color depth * 3 color channels (6 bytes per pixel), the buffer allocation is 98304 bytes.

    Of course you can also do 8 bit color which would use half as much memory (3 bytes per pixel). The library isn't set up for lower color depth than that.
    Last edited by easone; 01-16-2020 at 09:12 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •