Hexagon Platform LED Project - Need Help

Hello Everyone! I’m working on building this hexagon platform where people will stand on. I’m no engineer but usually learn quickly. First I need help on wiring - 24 led strips, 24 channels so I have the expander boards. Once I have the wiring completed and tested, I’ll be pouring a layer of epoxy white resin over the top giving it a concealed look but want to make sure I have done the wiring correct so far.

  1. Do I 3 way split from the Pixelblaze board to the 3 expander boards?
  2. Once I have the wiring completed, I would like to know how to pixel map this? Or would I just load the RING example? Any suggestions?

Hopefully the pics and video gives you an idea of what I’m trying to get accomplished.

https://youtu.be/m4tmeM-IEZ0
Thank you in advance.

First, why are you using separate channels? You should and could chain the strips… even if you want to use an expander board, with 8 channels, you can do at least 3 strips per channel (and really more)…

I’m guessing you wanted to avoid running a data line on the end of one strip, to the next strip… but you could run it underneath, right? If you are coating in epoxy, it’ll be invisible anyway. Yes, it would mean zig zag wiring, but the mapping fixes that anyway, so… but if you have the expander, I guess…

I know @wizard used multiple expanders for his Volumetric Cube, so I’m guessing you can wire them up, but I think you have to change the address of each board, different serial bus address (so it’s shared data lines from the PB, each only listens for it’s own address)

Mapping itself is really easy, since it’s just a ring, as you said… The radius changes as it gets bigger, but the angles remain the same since the number of LEDs is constant each ring.
I know there is mapping code I wrote that you plug in the number of rings and count for each and that would work fine… EXCEPT in this case, you aren’t going around and then onto the next ring, you are doing a strip, and going on to the next strip, so that ring code won’t work as written, but it’s a simple change to iterate the angle then the radius(es) (radii?) Rather than the way that code goes now.

I’ll post a version that will work for you when I get a chance to rewrite the above linked code.

Ah, just noticed some strips have less LEDs than others… Yeah, that’ll have to be handled too.

Likely it’ll be stripcount instead of ringcount, since the number of LEDs varies per strip…

Just to get the map sizing right, relative to the space between LEDs (so between two on a strip), how big is the space from center of the hex to the first LED on the strip? Please post both measurements. (I can guess at the space between but confirmation is good), also which is strip 1 and strip 2, (clockwise or counterclockwise?)

I edited the above, so don’t want you to miss the questions there.

Just a suggestion: after you get everything running, but before you pour the epoxy, do a “burn-in” test of at least 48 hours running a pattern that exercises all colors of all the LEDs. This short period will reveal most LED manufacturing failures before you seal everything in. Can’t wait to see your finished product!

3 Likes

Hi @LostPanduh
I think I recall a conversation we had about this some time ago, but I can’t seem to find it.

For mapping, I would make a list of each strip and it’s length. Then looping over that, some code to draw a line of pixels of that length, with an offset and incrementing an angle each pass.

Here’s what I came up with:

function (pixelCount) {

  /**
   * A helper function that draws a line from x,y incrementing by dx,dy
   * for each pixel
   */
  function line(x, y, dx, dy, count) {
    var line = [];
    for (var i = 0; i < count; i++) {
      line.push([x + dx * i, y + dy * i]);
    }
    return line;
  }

  //each side of the hexagon follows a pattern of strip lengths
  //with corners long at 12 pixels, followed by 11, then a middle with 10
  //assuming we start at a corner: [12, 11, 10, 11] before the next corner
  var strips = [
    12,11,10,11,
    12,11,10,11,
    12,11,10,11, 
    12,11,10,11, 
    12,11,10,11, 
    12,11,10,11,
  ]

  var map = [];
  var angle, x, y, dx, dy, length;
  for (var i = 0; i < strips.length; i++) {
    length = strips[i]
    angle = (Math.PI * 2 * i) / strips.length

    //a vector in the direction of angle (rotating clockwise)
    dx = Math.sin(-angle)
    dy = Math.cos(-angle)

    //starting location is some multiple of this, leaving a hole in the center
    x = dx*3
    y = dy*3

    map = map.concat(line(x, y, dx, dy, length))
  }

  return map
}

Hope that gets you close!

2 Likes

I did separate channels due to my limited knowledge of mapping. I am still thinking too linear… if this works maybe i’ll try chaining it next time… this just seemed a bit easier for my novice level.

With that said, I think i see from the Volumetric Cube pic how the expander boards chain to each other so I’ll give that a try and see if i can get this all lit up. then i’ll try and digest everyone’s input today on the mapping next… just want to see if this all lights up first :stuck_out_tongue:

@LostPanduh ,

Right, for the output expanders, run the data line to each. For every different expander, you need to nick the trace on the underside of the board to set different addresses. Leave the larger pads on either side so that you can blob solder across it if you change your mind later. A hobby knife, box cutter, or even a small dremel tool can work.

Thanks for the code… i’m going to attempt that tonight. but for now… here is what I have so far! It worked surprisingly… i’m ecstatic right now… got everything to work. Thanks for all the help so far.

1 Like

Good idea… I’m going to do that burn-in test now. here is the semi finished product… or proof of concept so far… I put a piece of acrylic over it to somewhat show what it’ll look like once the epoxy pour is done. Without any mapping, half of the patterns work good enough… What i would love to have is something more like a round spectrum waveform (see youtube link below of that example) is that possible?

3 Likes

Yes, I did that pattern recently… Something like it.