Madmapper + Teensy + 1800 LEDs Framerate Issues
  • Raphael
    junior Member
    Posts: 2
    Joined: Wed Jul 25, 2018 11:17 pm

    Madmapper + Teensy + 1800 LEDs Framerate Issues

    by Raphael » Wed Aug 01, 2018 7:45 pm

    Hi err'body,


    I’m having framerate issues when connecting madmapper to strips with more than 600 LED pixels, using Teensy 3.2 as a controller. I’m using madmapper.com/arduino-led-strip-control ... apper-2-1/ as the basis for the setup.

    My setup
    • 28 x 60 WS2812B LED strips (1680 pixels total) connected serially with proper power injection (see diagram).
    • 5V power supply
    • Teensy 3.2 with OctoWS2811 adaptor (I was having issues with the 3.2V data line from the Teensy board, the adaptor upscales it to 5V)
    • Madmapper 3.2
    • FastLED-serial-only-single-line.ino loaded on the Teensy - using pin 7 as my data line (no clock pin, as it is a WS2812B strip)
    DIAGRAM HERE: https://whimsical.co/PkdPBoHgxvs8aU4wczVQ98

    I’ve been having sporadic issues with FastLED-serial-only-single-line.ino

    First issue:, above the 1300-1400 Pixel mark, the pixels in the 1400+ range would blink uncontrollably or simply not light up. I fixed that by doubling the data buffer from 4086 to 8000 like so:

    From this:

    Code: Select all

    // MadLED protocol buffer char dataFrame[4086]; int readingFrameOnLine=-1; bool gotNewDataFrame=false;
    To this:

    Code: Select all

    // MadLED protocol buffer char dataFrame[8000]; int readingFrameOnLine=-1; bool gotNewDataFrame=false;
    That seemed to solve the problem, but I don’t know why or what consequences thsat might have.

    Second issue, if I set NUM_LEDS above 600 in FastLED-serial-only-single-line.ino, the frame rate decreases gradually until it stops to a crawl around 1800 LEDs.

    Code: Select all

    #define NUM_LEDS 1600 #define DATA_PIN 5 #define CLOCK_PIN 6

    Questions
    • I assume there’s a limit of LED that you can run on a Teensy with high framerate (I’ve read 3000+), but it’s unclear to me: Is that limit by pin or by Teensy board?
    • I read people on forums claim that they run 2000+ LEDs on a single Teensy pin without framerate issues. Can I technically have a single data pin driving 1800 LEDs at 60FPS? And if so, how?
    • There also a FastLED-serial-two-lines.ino file provided, but I don’t understand how it works, and seems limited to 2 pins. My assumption is that there’s a hard limit per Teensy pin and that the OctoWS2811 and FastLED makes it easy to assign certain universes to certain pins to keep the framerate up. Am I correct to assume that I can keep the framerate up by assigning different universes to different pins? If so, could I drive my whole setup with roughly 450 LED x 4 Teensy pins?
    Thanks for your help. This is new to me, and I’m trhying to be as clear as possible. The lack of documentation around this stuff is fun, but frustrating :)
    Attachments
    Madmapper LED setup.png
    Madmapper LED setup.png (127.62 KiB) Viewed 245 times
  • mad-matt
    garageCube team
    Posts: 557
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Madmapper + Teensy + 1800 LEDs Framerate Issues

    by mad-matt » Fri Aug 03, 2018 10:14 am

    First issue:, above the 1300-1400 Pixel mark, the pixels in the 1400+ range would blink uncontrollably or simply not light up. I fixed that by doubling the data buffer from 4086 to 8000 like so
    In the latest version of the arduino patch, the code is

    Code: Select all

    char dataFrame[NUM_LEDS*3];
    I saw the patch was not up to date in the ZIP, there is also another fix there. Please re-download the ZIP and use the file there.
    Second issue, if I set NUM_LEDS above 600 in FastLED-serial-only-single-line.ino, the frame rate decreases gradually until it stops to a crawl around 1800 LEDs.
    Let me know if the latest patch solves this issue. It solves an issue with LED protocols without clock (ie WS...)

    To my experience I could run 1200 LEDs at 60 FPS on a single line of teensy, after that I had issues. I had no time to check where the issue was coming from.

    I always say: if you have a large setup, you'd better use a professional LED controller (like Advatek Pixelite). It's not expansive compared to your LED setup and the time it will take to get everything working. And each output has a fuse, and you won't burn your computer USB port by doing mistakes with cables...
  • Raphael
    junior Member
    Posts: 2
    Joined: Wed Jul 25, 2018 11:17 pm

    Re: Madmapper + Teensy + 1800 LEDs Framerate Issues

    by Raphael » Sun Aug 05, 2018 6:56 pm

    Thanks for the answer, mad-matt !

    Code: Select all

    char dataFrame[NUM_LEDS*3];
    works when you have a high number of LEDs, but at small number of LED (e.g. 60), it looks like there isn't enough data frame to run smoothly. At higher LED counts, it's fine. I haven't tested it with my large setup yet again yet. Will do tomorrow.

Who is online

Users browsing this forum: Bing [Bot] and 4 guests