1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

8x8x8 led cube ghosting issue (probadly easy solution....)

Discussion in 'Arduino' started by fezder, Dec 24, 2015.

  1. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    So, i made this big-ish project, and now i encountered annoying phenoma: When lower leds are lit, they light also upper ones.
    Currently current for each led is about 6mA (5volts supply voltage and 470 ohms resistor)
    I made earlier smaller, 4x4x4 cube, but in that ghosting wasn't big issue as cube was inside enclosure covered with mirror-plated plexi, so that forgave some ghosting. Besided it has RTC clock so main purpose is clock, but cube is decoration.

    Now, with bigger cube, it looks quite stupid and messy. I noticed that ghosting decreased when supply voltage was lowered to 3v3, ghosting was tolerable.
    Led current would be ~3mA.
    So, i was thinking possible cures for ghosting, and i'm now asking if anyone of you would know other alternatives and feedback for these (google did show other people with similar problems, but i really don't feel like painting leds undersides now that cube is done....)

    1: delay and blanking in code
    no other leds have ghosting effect, only the ones right on top of currently-on ones

    2: change bigger value resistors
    doable, don't have currently enought suitable value resistors

    3: PWM drive to layers darlington array with fet (whole cube dimming)
    This would save trouble of changing resistors, but i never pwm-dimmed darlington array, so any issues in there?

    4: painting undersides of leds
    Yeah, 512 leds to be painted, well doable if nothing else. I did try with external led, placed nail polish and it didn't help that much

    So, for help, video as well as circuit & code


    in circuit AX means anodes, and C_L means cathodes_layers. Didn't wanna mess up drawing whole cube
    8x8x8 cube_controller.jpg

    Code (c):
    int dataPin = 2;        //IC 14       //Define which pins will be used for the Shift Register control
    int latchPin = 3;       //IC 12
    int clockPin = 4;       //IC 11
                            //OE-GND
                            //MR-VCC
    int seq[14] = {1,2,4,8,16,32,64,128,64,32,16,8,4,2};       //The byte sequence

    void setup()
    {
      DDRD = DDRD | B00011100;
        /*pinMode(dataPin, OUTPUT);       //Configure each IO Pin
        pinMode(latchPin, OUTPUT);
        pinMode(clockPin, OUTPUT);*/

    }

    void loop()
    {
        for (int n = 0; n < 14; n++)
        {
          PORTD = B00000000;
            //digitalWrite(latchPin, LOW);             //Pull latch LOW to start sending data
           shiftOut(dataPin, clockPin, MSBFIRST, seq[n]);          //Send the data
           PORTD = B00001000;
           //digitalWrite(latchPin, HIGH);            //Pull latch HIGH to stop sending data
            delay(75);
        }
    }
    Thanks!
     
    Last edited: Feb 15, 2016
  2. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    furher tested with enamel paint, didn't have any red alcydic paint, and it did give better result than nail polish.
    Since ghosting is present even in still image, painting seems to be only way....
     
  3. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,059
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    Hi fezder,

    I didn't find the ghosting distracting, as the lit LED's wash it out. Rather than paint, have you considered short sleeves of heat-shrink tubing?

    John
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,160
    Likes:
    340
    Location:
    Brisbane Australia
    ONLINE

    You don't say what chip you are shifting into. Most should have latch high during shifting and then toggled low to latch the new values.

    Mike.
     
  6. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    By ghosting i mean lighted leds illuminating un-lit ones (i do use diffused ones)
    hmm, well it's hard to apply heat shrinks now, i made it with this instrucable:
    http://www.instructables.com/id/8x8x8-Arduino-LED-Cube/
    in day light and 3v3 ghosting ca't be seen pretty much at all
    i use 74595 from texas instruments
    http://www.ti.com/lit/ds/symlink/sn74hc595.pdf
    i drive latchpin low->send data->latchpin high
    Hmm, now that i read datasheet, it mentions that latchpin (RCLK, pin 12) is High-edge triggered.
     
    Last edited: Dec 25, 2015
  7. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,059
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    That is what I thought you meant. The heat shrink effectively reduces sideways illumination so adjacent LED's don't get the scattered light. I also can't contemplate rebuilding it with that many LED's . However, you might try the heat shrink (red, if the LED's are red, but any color will work) on a few to see if it helps. Then you will be ready for your 16X16X16 supercube. ;)

    John
     
    • Like Like x 1
  8. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    When i started building this, buddy said my next is probadly 16'RGB cube....gosh
    do you mean by placing heatshrink like a ''hood'' on leds, or how?
     
  9. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,059
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    Yes, just like a hood. Quite awhile ago, I was building an IRED sensor and used black heat shrink for the same purpose. You can probably get a size that is a nice slip fit. Then when you know the size and length that is best, produce a lot and give them a brief heating with hot air to make sure they don't fall off. I liked the sleeve, because it was much more opaque compared to paint for IR and easier to adjust.

    John
     
    • Thanks Thanks x 1
  10. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    hmm, i tested with heatshrinks and they seem to do do the trick. Much easier perhaps than to play with paint.....thanks!
     
  11. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,160
    Likes:
    340
    Location:
    Brisbane Australia
    ONLINE
    After watching the video again, is the "Ghosting" caused by proximity rather than electronically?

    Mike.
     
  12. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    Proximity, nearby lit leds cause other nearby unlit ones to appear dimly lit. If i block unlit ones with finger, they appear ''off'' as they should be
    directly up coming light from lower leds seem to cause bigger ghosting than sideway coming light
     
    Last edited: Dec 25, 2015
  13. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    Took couple shots to show better that issue:
    3vedited.jpg 5vedited.jpg
     
  14. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,059
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    I see what you are trying to do, but the ghosting is really not that bad. In your earlier video, the sine wave was quite clear even with the ghosting. On the positive side, ghosting gives perspective. You may want to consider reducing, but not eliminating it. In terms of spectroscopy, reducing it by 50% to 90% will make a marked difference, but you may still see enough scatter to give it three dimensions.

    It is a nice project.

    John
     
    • Agree Agree x 1
  15. Dr_Doggy

    Dr_Doggy Well-Known Member

    Joined:
    Aug 11, 2007
    Messages:
    1,718
    Likes:
    37
    I did one of those a while back, but i didn't put resistors on my matrix, i thought that was what caused the ghosts , i guess not, but mine were in more random rows

    My resolution was a few series or parallel resistors, i forget where or how, and just messed around till it worked since i didn't know what i was doing,.

    but i wonder if your ghosts are actually reflections? Maybe roughing with some sand paper, which is how i turned my clear led s to diffuse ones, making it smoother to the eye.
     
  16. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    Doggy, they are reflections. I made video when testing scrolling-vu meter, this video is taken through 2-way mirror and it did eliminate ghosting quite bit:
    And I also tested that they are reflections by placing finger under unlit leds, then they appear as intended (unlit)
     
  17. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    Thanks for pointing out sand-paper :)
     

Share This Page