Close
0%
0%

LEDodecahedron

We're going for it now, 612 LEDs, 51 of them controlled by a single IS31FL3733 chip

Similar projects worth following
Bunch of IS31FL3733 on a pentagon PCB controlling a bunch (76? - 106? - 128? - 181?) of RGB LEDs. It's 51. Was hard enough to route anyways!

Everybody's doing it, my hackerspace has this thing for dodecahedrons and I thought that would give an interesting challenge.

Trying to find a sweet spot of LEDs and controller.

ledodecahedron.mp4

MPEG-4 Video - 922.50 kB - 11/16/2022 at 05:10

Download

  • silly idea

    davedarko09/24/2024 at 12:36 0 comments

    since the IS31FL3733 is not recommended for new designs, why not redesign the LED PCBs with the IS31FL3741. gotta research that - would mean more LEDs (117 instead of 64).

    According to my table, I would get 2 more rows around the cube with 106 LEDs. 

    There's only one ADDR pin here, so you can have a maximum of 4 panel adresses, but definitely managable to address half a cube with the RP2040 that has two I2C channels. 

  • I2C buffer size on the ESP32

    davedarko09/03/2023 at 17:22 0 comments

    Been a minute and I've currently found some motivation to work on animations and make the code run faster plus also mapping things finally.

    Found out the ESP32 only has a 64 byte hardware buffer for I2C and that I need to use endTransmission after 63 bytes, stole some adafruit code for I2C oled displays and put it in the library I'm currently using for the IS31FL3733.

    Here's a snippet of the I2C write section.

    Wire.beginTransmission(i2c_addr);
    Wire.write((byte) reg_addr);
    
    uint16_t rounds = 1;
    uint16_t bytesOut = 1;
    uint8_t *ptr = buffer;
    
    #if defined(ESP32)
        while (count--) {
            if (bytesOut >= 64) {
                Wire.endTransmission();
                Wire.beginTransmission(i2c_addr);
    
                Wire.write((byte) reg_addr + 63*rounds);
                bytesOut = 1;
                rounds++;
            }
            Wire.write((byte)(*ptr++));
            bytesOut++;
        }
        Wire.endTransmission();
        return 1;
    
    #else
        Wire.write((byte) reg_addr);
        for (uint8_t i = 0; i < count; i++) {
            Wire.write((byte)(buffer[i]));
        }
        Wire.endTransmission();
        return 1;
    #endif

  • gave a little talk at hacking in parallel

    davedarko12/27/2022 at 17:51 0 comments

    There are some "between the years" events happening in Europe that follow the spirits of the chaos communication congress that got cancelled this year. In a small venue with 400 people I gave this talk about my Dodecahedron! :) Was a fun first talk of this kind for me.

  • 16 frames per second

    davedarko11/18/2022 at 09:38 0 comments

    Did some more "perfect scenario" calculations for the possible frame rates, after failing math hard at supercon, thinking that I am sending out half a million bytes for a frame on the cube.

    • 12 displays
    • 192 bytes of data  - 12x16 pwm values for 64 LEDs, even though I'm using only 51 LEDs
    • every byte is followed by an ACK from the peripheral

    So we have 12 * 192 * 9 bits to fly over of raw data, not including addressing and setting PWM page. At a 400kHz clock speed or 400000 bits/s we arrive at a hypothetical 19.3 fps. 

    What did I change to get here? After sending the data for the LEDs in bursts, I arrived at roughly 10fps and hooked the cube up to the oscilloscope to see what's going on. Turned out the clock was at roughly 200kHz instead of the expected 400kHz o.o

    picture of oscilloscope
    the edges of the data are not sharp at all

    This might look very obvious at first sight to some, but the spikes aren't supposed to look like this and there is this magical thing that you can add to I2C lines, when it looks like that - I forgot about pull-up resistors! To allow for a fast rise you need resistors connected to VCC to help rise the potential of the capacitive natured data and clock line. To be honest I have no idea how to better explain this, but I hope the image helps a bit.

    I've added 2.2k resistors to the module and suddenly arrived at 16fps! I might be able to go even faster with a different controller, but I still like the XIAO NRF52840 sense too much with all its features that I have yet to use :D

  • slow libraries everywhere

    davedarko11/15/2022 at 12:14 1 comment

    I've spent 3 hours hunting down the speed settings for I2C on the Seeed XIAO NRF sense board in Arduino, but couldn't find it. My goal was to have a frequency of 1MHz for I2C instead of 100kHz, but so far there was no chance.

    it's quite frustrating that I still have no idea where the seeed library based on mbed for the XIAO NRF sense defines how the I2C works with the wire library in Arduino. I found so many registers and values where I was "aha! That's the two wire interface speed value that I was looking for!" but then nothing changed when I edited the sdk_config.h file.

    The other thing that slows down the animations is the code for writing to the LEDs. Looks like the code first writes a select page and then writes a single byte for the LED pwm value. There's definitely optimisation possible in streaming plenty bytes after selecting a page, instead of ping pong-ing that often to effectively set one byte.

    [UPDATE] 10 frames per seconds reached

    managed to send complete frames to the I2C controllers and now reach 10 frames per second on the NRF52840 board. After some datasheet reading I'm not so sure I can easily reconfigure the I2C to go 1MHz on the NRF52 and ordered an ESP32-S2 QT PY board to play around with. Last hope for the NRF52 is using the adafruit board libraries instead of the XIAO mbed library as I am fairly certain I saw code there that makes more sense. Would be nice to be able to use the NRF board with all its sensors (mic+accelerometer) on board.


    FLASHING LIGHTS WARNING 

  • mistakes been made

    davedarko12/30/2021 at 11:38 0 comments

    I missed that one LED wasn't correctly placed in the schematics and one connection is missing. Have to go in with magnet wire and fix that on all 15 boards :)

  • shapes

    davedarko12/17/2021 at 19:33 0 comments

    Always tough googling something when you're looking for the name to google in the first place. I needed the "dihedral angle" of a dodecahedron, meaning the angle between the sides / faces of the body. It's 116.56505°. The cool thing is, with that Angle I can basically nibble away all sides and have the perfect folding angle for this! But for now I just eye-balled it.

    // 
    
    difference()
    {
        cylinder(3, 35, 33.15, $fn=5);
        union() {
            color("red") cylinder(1, 30 , 30, $fn=5);
            color("red")translate([0,0,1]) cylinder(2, 32 , 31, $fn=5);
        }
    }
    
    translate([-31, -25, 6]) rotate([ 0, 116.56505, 0]) cube([5,50,5]);
    screenshot of openscad, a small frame for a pentagon shaped object is shown. A little bar in an angle is close to it.
    Screenshot that compares the angle of the block to the manually set angle of the frame, so it can fold up to a dodecahedron. Angle is basically indistinguishable.

  • First boards are ordered after 2 years

    davedarko12/15/2021 at 17:02 0 comments

    Since I'm visiting family in America, I found some time to tackle those weird PCB designs that I always talk about, but never do. Two years ago I made the #Do or Donut SAO  , which rhymes with this project as in me using the same(?) chip to control a bunch of LEDs. When I started this, two things came clear: I did not want to use more than one chip on a board and that basically meant going for 51 LEDs. You can read up on all my minor design choices and routing issues on twitter: https://twitter.com/davedarko/status/1468990742316167171

    The distance between the LEDs in not the same at all, as the five triangles that make up the pentagon have angles of 72-54-54 degrees and are there for not symmetrical in all the directions. But I'm happy with the spacing, so I proceeded.

    I should be able to power everything with a considerate brightness from a smaller battery, as was the LED cubes I took inspiration from. Heat should not be a problem either, but we'll see about that. The dodecahedron will have a height about 5cm.

    The chip can have up to 16 addresses, so that's perfect for controlling the 12 boards with one IC. I have not calculated the frame rates of anything, the chips talk I2C with up to 1MHz, to up to 12x16 LEDs. 

View all 8 project logs

Enjoy this project?

Share

Discussions

Xasin wrote 12/30/2021 at 13:56 point

I'm wondering how well this would have worked using WS2812-Mini LEDs.
If you look at someone like CoeleCan't on Twitter, they are driving giant RGB Matrices made of NeoPixel-Style LEDs using a Teensy, and the results are quite impressive. That would also reduce the routing complexity of these PCBs.

Apart from that this is already looking really cool, I'm quite excited to see how well it'll work!

  Are you sure? yes | no

davedarko wrote 12/30/2021 at 21:06 point

in short: 612mA for all neopixels at (0,0,0) was a no-no for me, but that giant project sounds nice. At that size routing would probably a bit tricky, but I can see why one would think about going that route. Also the board is routed, so that's nothing to worry about anymore :) 

  Are you sure? yes | no

Xasin wrote 01/02/2022 at 12:44 point

Ohhh right, I almost forgot about the notoriously bad standby power use of NeoPixels... Ehh.
To be fair, it's also more fun to do something a bit more efficient and challenging like routing a matrix.

Can't wait to see the finished dodecahedron <3
Will it actually do something proper, or just look really, really cool?

  Are you sure? yes | no

davedarko wrote 01/03/2022 at 00:25 point

I got half of it "done" now and there's still some more to do to make it portable :) I'm thinking about adding a gyroscope so I can work with gradients and fake shadows. Preferably write a selfhosted ESP32 web page where the JS can map images to the cube.

  Are you sure? yes | no

Xasin wrote 01/03/2022 at 09:33 point

Ohh whew, good luck getting gyros, those things are hard to find!
I just dislike how everything is kinda out of stock, so designing projects is a challenge just because you don't know what's around.

An ESP32-C3 could fit into the dodecahedron nicely, and using a self-hosted static website is a smart move!
Always wanted to do something like it and even got the basic API structure and libs done.

Keep me posted, that sounds very fun :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates