Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 72 of 72

Thread: Teensy 3.1 & Programmable WS2812B RGB LED POV Staff - Newbie Questions

  1. #51
    Yeah, until then, this:

    Click image for larger version. 

Name:	Mess 20151116_071441.jpg 
Views:	270 
Size:	92.4 KB 
ID:	5520

  2. #52
    Junior Member
    Join Date
    Oct 2015
    Location
    Atlanta, Fort Lauderdale
    Posts
    12
    Results:

    Click image for larger version. 

Name:	12238492_10205167019711410_1514663166006274215_o.jpg 
Views:	143 
Size:	63.6 KB 
ID:	5521Click image for larger version. 

Name:	12191169_10205167019751411_5229028278137620000_o.jpg 
Views:	107 
Size:	87.8 KB 
ID:	5522Click image for larger version. 

Name:	905646_10205167020391427_7884792012800978792_o.jpg 
Views:	135 
Size:	67.4 KB 
ID:	5523

  3. #53
    Senior Member
    Join Date
    Sep 2015
    Location
    Taiwan
    Posts
    113
    Hello!
    Just encountered unknown problem with TLC5947&teensyLC/3.1
    using adafruit TLC5947 library, the device works and displays as programmed for few cycles(seconds)
    and then runs random or like whatever it like, even idle for seconds and continues

    I'm guessing the library shiftouts so fast(with 48mHz/72mHz , about 1-3us per bit) and drives the driver crazy

    still figuring if battery problem,connection, poor jump wires or anything
    did anyone bumped into similar problem?

  4. #54
    Member
    Join Date
    Oct 2015
    Location
    Skopje Macedonia
    Posts
    25
    Hi Paul
    What's happening with development of add-on board for POV project
    Thanks

  5. #55
    I'm also keen to find out.

    The next version of the Mitochondrion glow staff is now spinnable and ready for Kiwiburn. The on-Teensy memory only holds about fifty images and those are only 16 colour, so I'd be delighted to have more memory to work with. And my audio FFT visualiser is far from what it could be.

    No spinning pics yet, coz I don't have a camera that can cope, but here's some of the construction.

    Click image for larger version. 

Name:	20160106_072209.jpg 
Views:	176 
Size:	127.1 KB 
ID:	6016
    Click image for larger version. 

Name:	20160106_072242.jpg 
Views:	138 
Size:	105.0 KB 
ID:	6017
    Click image for larger version. 

Name:	20160106_072326.jpg 
Views:	163 
Size:	108.9 KB 
ID:	6018

  6. #56
    Senior Member
    Join Date
    Sep 2015
    Location
    Taiwan
    Posts
    113
    @happyinmotion
    I'm planing using SPIflash for that, a winbond SPIFLASH chip could hold up to 16Mbit or more,
    and wow, looks like you have four-sided apa102 ,from the constuctions, I will be waiting for your pics.

  7. #57
    Junior Member
    Join Date
    Nov 2015
    Posts
    1
    Any update on these shields?

  8. #58
    Quote Originally Posted by Po Ting View Post
    @happyinmotion
    I'm planing using SPIflash for that, a winbond SPIFLASH chip could hold up to 16Mbit or more,
    and wow, looks like you have four-sided apa102 ,from the constuctions, I will be waiting for your pics.
    Yup, four sided, 200 LEDs per strip, so 800 LEDs in total. You can use this in daylight.

    There's enough room inside a 25.4 mm ID tube for a 14500 cell, the cell holder, four PCBs, four LED strips, and pretty much nothing else.

    Cells go at the ends, then there's room at the middle in the centre for another board that holds the Teensy and other gubbins. There's also enough room, just, for JST XH connectors to distribute power and data from the boards with the cells to the three other boards.

  9. #59
    Senior Member
    Join Date
    Sep 2015
    Location
    Taiwan
    Posts
    113
    that's a bigger tube than I usually use (22mm internal diameter)
    do you use AA batteries? or many 14500 lithium batteries? i spot a Trustfire battery above, I can't imagine 800 LEDs' power drain,

    also,I see a lot of soldering , the clock/data/volt and ground, are they just simple PC plate(or stick) board that carries the LED strips?

    I'm currently designing a PCB board for makers to start with an easy POV.
    what do you think about laying out the lines on the board(with pads designed for APA102)
    for less soldering, or more laziness, LOL

  10. #60
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,626
    Quote Originally Posted by Po Ting View Post
    I'm currently designing a PCB board for makers to start with an easy POV.
    what do you think about laying out the lines on the board(with pads designed for APA102)
    for less soldering, or more laziness, LOL
    I would suggest that it might be ok for testing, but for using it in something like a spinning staff, you want to do regular solder (and probably through hole solder with 2 rows that you can securely attach the wires, and know they won't come out when spinning it.

  11. #61
    Batteries are 14500 lithiums. Power is capped at 10 Watts by FastLED, which is bright enough for daytime use. More power drain just sags the battery Voltage and causes red-out.

    Boards on three of the four sides just distribute power and data. I've tied strips to the power and ground in multiple places for redundancy.

    My preference for reliable connections to strips is to sew with thin wire through the holes in the strip pads before soldering. That gives a solid joint. Sewing also works for joining strips and I've a guide to how I do it here. For the middle of the strips, it can be hard to locate exactly where the strip pads will be, so I just put a row of vias in and sew to the closest.

    Click image for larger version. 

Name:	20160122_074301 - cropped.jpg 
Views:	96 
Size:	99.2 KB 
ID:	6173

    Click image for larger version. 

Name:	20160122_074529 - cropped.jpg 
Views:	88 
Size:	120.1 KB 
ID:	6174

    Click image for larger version. 

Name:	20160122_074754 - cropped.jpg 
Views:	86 
Size:	118.8 KB 
ID:	6175

  12. #62
    Senior Member
    Join Date
    Sep 2015
    Location
    Taiwan
    Posts
    113
    I would suggest that it might be ok for testing, but for using it in something like a spinning staff, you want to do regular solder (and probably through hole solder with 2 rows that you can securely attach the wires, and know they won't come out when spinning it.
    sorry i didn't make my idea fully clear, the pads were for soldering, not just sticking on.
    and yes, they have some holes through the pad, so that the pad wouldn't torn easily during spinning or soldering


    never thought of sewing before soldering, thanks for the idea and the link,
    those strips with tiny circle pads are just uneasy to solder, with oxidated surfaces, even harder.

    my ways are pads right under the four circles,
    strips with adhesive can stick well ,( and must remember to remove the adhesive under the junction points)
    the distance of the circles varies between different source of strips, i did the same way to locate, larger pads

  13. #63
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Quote Originally Posted by PaulStoffregen View Post
    In about 6 weeks, PJRC will start selling a shield meant for these types of projects. The PCBs went into manufacturing this week, so this product has finally moved from the lengthy planning & design phase to the beginning of production. Normally I resist the vaporware urge to mention stuff in development which has no clear delivery date. Since this is now in production, you can be pretty sure we'll be selling these before Chistmas....
    is there any progress? i will be very happy to see these boards.
    thx for short reply

  14. #64
    I've put together a pretty detailed write up of the Mitochondrion, Mark 5.3, with lots of high-quality pics and technical details included.

    Click image for larger version. 

Name:	_T8A5303.jpg 
Views:	69 
Size:	72.4 KB 
ID:	6636

    Click image for larger version. 

Name:	_T8A5279.jpg 
Views:	69 
Size:	103.9 KB 
ID:	6637

    This has survived it's first festival (Kiwiburn) with no damage. Next job is adding a watch-dog timer, so that it resets properly when the batteries bounce when I drop it.

  15. #65
    Can't resist posting a few more pics:

    Click image for larger version. 

Name:	_T8A5269.jpg 
Views:	66 
Size:	91.3 KB 
ID:	6638

    Click image for larger version. 

Name:	_T8A5308.jpg 
Views:	67 
Size:	45.0 KB 
ID:	6639

    Click image for larger version. 

Name:	_T8A5323.jpg 
Views:	68 
Size:	120.3 KB 
ID:	6640

  16. #66
    Senior Member
    Join Date
    Sep 2015
    Location
    Taiwan
    Posts
    113
    WOW, that's lots of effort
    Can't wait to share mine

    Mines would be featuring time setting for each picture ,for music performance
    And a GUI for any user

    But I certainly don't have many leds and area in space
    Had only 18/36 for poi /staff . Limited to SD speed this version

    Speaking of switch. Have you tried any with RF remote control ?

  17. #67
    Thanks.

    Quote Originally Posted by Po Ting View Post
    Mines would be featuring time setting for each picture ,for music performance
    And a GUI for any user
    Speaking of switch. Have you tried any with RF remote control ?
    Yes, that's on the list of things I'd like to do next. I'm thinking something like a BlueSmiRF to wirelessly link to a phone running MIT App Inventor or equivalent.

  18. #68
    Junior Member
    Join Date
    Apr 2017
    Posts
    2
    Hello everyone,

    first of all thanks for your code "Mortonkopf" I am working with your code to make spinning Pov-Display with Lpd8806 LED Strips with 2 Wings.

    but because i used two lpd8806 LED Strips i have speed problem.

    If first strip shows 1 slice of image then second strip has to show 88 slice of image to get whole image when the propeller spins.

    I put almos same code twice to seperate image. So the Teensy Cpu has to complie longer so the frequency becomes slower.

    How can i make frequency more faster? (leds should blink faster / now i have 264ms but purpose is 200ms)

    Is there anyone who can help me?



    i use total 56 leds.

    image size ist 56 * 176

    int rightWing[29] = {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26 , 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56};
    int leftWing[29] = {0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55};

    int lastVersion[176] = {88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120 ,121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 ,57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87};

    for (int row=0; row<bmpHeight; row++) {
    { if(flip)
    pos1 = bmpImageoffset + (bmpHeight - 1 - lastVersion[row]) * rowSize;
    else
    pos1 = bmpImageoffset + lastVersion[row] * rowSize;
    if(bmpFile.curPosition() != pos1) {
    bmpFile.seekSet(pos1);
    buffidx = sizeof(sdbuffer);
    }
    for (int col=0; col<bmpWidth; col++) {
    // read more pixel data
    if (buffidx >= sizeof(sdbuffer)) {
    povidx = 0;
    bmpFile.read(sdbuffer, sizeof(sdbuffer));
    buffidx = 0;
    }
    // set pixel
    r = sdbuffer[buffidx++];
    g = sdbuffer[buffidx++];
    b = sdbuffer[buffidx++];

    povbuffer[povidx++] =(((uint32_t)b & 0x80 )<<16 | ((uint32_t)g & 0x80)<<8 | (uint32_t)r & 0x80);

    }
    for(int i=0;i<28;i++){
    leds1 [i] = povbuffer[leftWing[i]];
    }

    }
    {
    if(flip) // Bitmap is stored bottom-to-top order (normal BMP)
    pos = bmpImageoffset + (bmpHeight - 1 - row) * rowSize;
    else // Bitmap is stored top-to-bottom
    pos = bmpImageoffset + row * rowSize;
    if(bmpFile.curPosition() != pos) { // Need seek?
    bmpFile.seekSet(pos);
    buffidx = sizeof(sdbuffer); // Force buffer reload
    }
    for (int col=0; col<bmpWidth; col++) { // For each column...
    // read more pixel data
    if (buffidx >= sizeof(sdbuffer)) {
    povidx = 0;
    bmpFile.read(sdbuffer, sizeof(sdbuffer));
    buffidx = 0; // Set index to beginning
    }
    // set pixel
    r = sdbuffer[buffidx++];
    g = sdbuffer[buffidx++];
    b = sdbuffer[buffidx++];
    //we need to output BRG 24bit colour//

    povbuffer[povidx++] =(((uint32_t)b & 0x80 )<<16 | ((uint32_t)g & 0x80)<<8 | (uint32_t)r & 0x80);
    //Color(b,r,g);//octo colour, but you might need to change this
    }
    for(int i=0;i<28;i++){
    leds [i] = povbuffer[rightWing[i]];

    }
    }
    FastLED.show();

  19. #69
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    829
    @corumlee, how about reading from the sd file once, but for both strips, read first set of led values and second set from same buffer, just offset the second led read position by the length of the first strip. This way you only read fro the SD once instead of twice? That would read into povbuffer for both leftwing and rightwing from accessing the sd once?

  20. #70
    Junior Member
    Join Date
    Apr 2017
    Posts
    2
    Quote Originally Posted by mortonkopf View Post
    @corumlee, how about reading from the sd file once, but for both strips, read first set of led values and second set from same buffer, just offset the second led read position by the length of the first strip. This way you only read fro the SD once instead of twice? That would read into povbuffer for both leftwing and rightwing from accessing the sd once?
    Hello, mortonkopf. thank you for your quickly reply. actually i thought also similar idea and made it with your another code.

    int rightWing[29] = {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26 , 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56}; // {56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2};
    int leftWing[29] = {0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55}; // {55, 53, 51, 49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1};
    int lastVersion[150] = {75, 76, 77 ~~150, 1, 2, 3 ~~74}
    for (int x = 0; x < f; x++) {
    for (z = 28; z > 0; z--) {
    leds[z - 1] = array[x + ((j - rightWing[z]) * f)];
    leds1[z - 1] = array[lastVersion[x] + ((j - leftWing[z]) * f)];
    // Serial.println(lastVersion[x]);
    // Serial.println(x);

    }

    but this time with SD card buffer it seems quite different.

    can you please show me the rough where i should write and how i should construct the additional code?

    if(flip) // Bitmap is stored bottom-to-top order (normal BMP)
    pos = bmpImageoffset + (bmpHeight - 1 - row) * rowSize;
    else // Bitmap is stored top-to-bottom
    pos = bmpImageoffset + row * rowSize;
    if(bmpFile.curPosition() != pos) { // Need seek?
    bmpFile.seekSet(pos);
    buffidx = sizeof(sdbuffer); // Force buffer reload
    }
    for (int col=0; col<bmpWidth; col++) { // For each column...
    // read more pixel data
    if (buffidx >= sizeof(sdbuffer)) {
    povidx = 0;
    bmpFile.read(sdbuffer, sizeof(sdbuffer));
    buffidx = 0; // Set index to beginning
    }
    // set pixel
    r = sdbuffer[buffidx++];
    g = sdbuffer[buffidx++];
    b = sdbuffer[buffidx++];
    //we need to output BRG 24bit colour//

    povbuffer[povidx++] =(((uint32_t)g)<<16 | ((uint32_t)b)<<8 | (uint32_t)r);
    //Color(b,r,g);//octo colour, but you might need to change this

    }
    for(int i=0;i<28;i++){
    // Serial.println(povbuffer[rightWing[i]]);
    leds [i] = povbuffer[rightWing[i]];

    //i think i should write some addtional code here.

    }
    }

  21. #71
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    829
    if you increase the sdbuffer to your total number of leds, 56, then you can fill the buffer for both sides in one call. Your numbering of the array led values is odd to me. Are you using two strips of leds next to each other? the physical setup is important for knowing how to do the for loops


    You also have the zero led in both arrays, which is probably not what you want.

  22. #72
    Senior Member
    Join Date
    Sep 2015
    Location
    Taiwan
    Posts
    113
    I guess with proper stacking purpose , modifying your picture(bmps) in your PC
    reading lines at one could be easy, but its connected to how you read and show your strips,
    you MUST know what effect you want


    and and speaking of speed,
    //we need to output BRG 24bit colour//
    actually if you don't need full depth bmp
    change the BMP format to 8 bit (256color) while saving,
    and you need to add a reference array to read the the color indexs,
    (should need a extra 256*3 bytes RAM, not much for teensy)

    I reference them with a fixed table of 3-3-2? format, and saves my file all with the same color table
    which stores RGB color with 3bits for Red,Green and 2bits for blue (eyes are insensitive to blue's gamma,relative to red&green)

    byte rawcolor = buff[x];
    b = mapop(((rawcolor / 4) % 8));
    g = (rawcolor % 4) * 85 ;
    r = mapop((rawcolor / 32));
    }
    }

    inline byte mapop(byte ok)
    {
    const byte T256C[8] = {0, 36, 73, 109, 146, 182, 219, 255};
    return T256C[ok];
    }
    it should also be faster if you use jpeg, gif, png since they are significant smaller
    but i didn't figure how they encode, worth a try

    last but not least, did you use teensy 3.2 or 3.5/6? SDIO should be fast enough to read the pictures,
    are you sure your program is stucking at reading file? or showing the strips?
    I took a look in the datasheet, its a SPI chip with 20Mhz rates,
    but speeds may shown low if SPI settings were slow , or if you uses softSPI?(pins thats not hardware SPIs)

    Can you show what your hardware is like, or the POV effect is like? its hard to imagine just from your code
    and also your setup() ? as needed to find SPI settings/data out pin

Posting Permissions

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