Show Posts
Pages: 1 [2] 3 4 ... 10
16  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 23, 2013, 06:46:25 pm
Those of you who have been following this thread probably remember that I've build my 4x4x4 test cube on some solderless breadboards and that I've used 3 shift registers in total (1 for the anode planes, using only 4 of its outputs) and 2 for the cathode columns, using all their 8 outputs (16 in total). You may also remember that I had some strange ghosting that I could not fix in the hardware so I got around the problem by introducing a 75 microseconds delay in the software between  the switchwing between two layers.

These days I've ordered the printed circuit that I've designed for the driving circuit and today I have soldered the components onto it, replacing the solderless breadboard solution with a final, soldered one. But I have done something a little bit differently. This time I have used 5 shift registers in total for the very same 4x4x4 cube: 1 shift register for the anode planes and 4 shift registers for the cathode columns, using only 4 outputs from each shift register. So now, instead of only 3, I have 5 shift registers chained.

The good news is that the printed circuit design is flawless. It worked immediately during the first attempt to fire it up.
The bad news is, that the ghosting has become magnitudes worse. Now that 75 microseconds delay between switching layers is not enough anymore. Now I can only get rid of the ghosting by introducing a 600 microseconds delay. That's unacceptable. For an 8x8x8 cube it would probably be around 4-5 milliseconds, which would kill the whole multiplexing mechanism and the cube would flicker like hell. So I have no choice but to figure out what is wrong with the hardware and fix it. What makes things even more complicated is that now the components are soldered in, so it will be more difficult to experiment.

I did draw an important conclusion today. The ghosting appears because the anode layers turn off too slowly, not because the cathode columns turn off too slowly. Or at least that's what the experiments suggest. It also seems that the ghosting becomes exponentially worse with more shift registers chained. Does anybody have any idea at all what could be wrong? Could it be because of those 220 Ohm resistors at the gates of the MOSFETS which turn the anode layers on/off?

Remember the schematic:


I guess I could find that out by shorting the 220 Ohm resistors temporarily. I hope that will not damage the MOSFETS...
17  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 13, 2013, 03:50:52 am
Thank you smiley
I predict it will be at least two months before I can write all the articles and the software one will be last. If you cannot wait until then, you're welcome to download the current version of my code from here:
http://iqjar.com/download/jar/LED_Cube/4x4x4/LEDQB_v0.4.ZIP

In the software article I'll go into details about how and why I've done things the way I've done them. Until then you can try to figure it out yourself and I can answer your questions, should there be any.
18  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 12, 2013, 06:20:55 pm
As I have promised, I'll try to give back what I have learnt here to the community, by writing a series of articles about how to build an LED cube. For now, I've written a very long introduction smiley

http://iqjar.com/jar/building-an-8x8x8-led-cube-introduction/

I plan to write 3 more articles, one about building the cube itself, one about putting together the driving circuit and one about writing software for it. These will take time, because I'm doing it in parallel with actually building the big, 8x8x8 cube, so that the experience is fresh while I'm writing about it.
I'm trying to explain things on a very simple level, suitable for beginners like I was a few months ago.
19  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 12, 2013, 03:04:04 am
Thanks smiley
I stopped developing animations for now in favor of starting the 8x8x8 cube, but new ones will follow when the big cube will be done smiley
20  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 11, 2013, 06:47:34 pm
Yepp! smiley

Just for fun, here's another video of the 4x4x4 LED cube smiley
http://youtu.be/H_wenZQ0fmI

The main thing to notice here compared to the previous video is how much smoother the animations are, even on camera. This is because now I'm switching layers every 1 ms. Previously it was 3 or 4 ms.
21  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 11, 2013, 06:25:20 am
I kind of grew tired of hunting down the ghosting smiley I'll leave it as it is for now, with the software fix. I read somewhere that somebody had the same problem and he changed some wires and bad connections and the problem went away. Maybe I'll have the same luck. Today the printed circuit will be ready so I will soon switch form the solderless breadboard solution to the printed circuit (let's hope I've designed it well smiley ).

Anyway, I wanted to write about the LED currents again. For 20 mA per LED we agreed to have 82 Ohm resistors. I've used 1KOhm ones instead, limiting the current to about 1.6 mA per LED. This seems to be the optimal value for super-bright, diffused, 3mm blue LEDs. This value seems to give optimal brightness (not too bright to cut through your retina, but bright enough if there's no strong light in the room - a lamp is fine, in bright daylight they look a bit pale). If the LEDs are brighter, they bother me at night. For white LEDs probably the same resistor values are optimal. For orange, green and red ones you need weaker resistors because their voltage drop is less.

As an experiment, I've tried adding higher value resistors. At 5.6 KOhm (0.3 mA) the LEDs still look quite bright (but not enough for a cube in my opinion). The point where they start loosing their light is 47 KOhm (0.03 mA).
22  Using Arduino / LEDs and Multiplexing / Re: 3x3x3 LED cube, newbie questions (5x5x5 comming soon) on: March 08, 2013, 02:59:31 pm
Hi Guys!

@Hippynerd: If your cube would have ghosting like mine, you would notice it, trust me smiley It is very visible and... annoying. Unfortunately I can't create a video as my camera is broken and even for my last video I had to borrow one (I really should get one...), but I can describe it the following way: when multiplexing is used, the ghosting is seen as the previously multiplexed (lit) layer turning off too slowly, so basically you see a ghost image (dim image) of the current layer in the previously lit layer. So, if you light up an LED in the bottom layer, you'll see the LED which is in the same column and in the top layer (bottom layer is lit after the top layer because the layers come after each other from bottom to top) dimly lit. If you light an LED in the second layer, you'll see the LED below it dimly lit. For the third layer the ghost will be in the second layer and so on.

@WonderTiger: Sure, you can check out my code here: http://iqjar.com/download/jar/LED_Cube/4x4x4/LEDQB_v0.4.ZIP
I've taken a slightly different approach. My animations are all generated on the fly, no patterns are stored anywhere. I also put great emphasis into keeping every part of the code in the place where it logically belongs, so I have lots of files and classes. So far it worked out well, we'll see how well it will work with the 8x8x8 cube... The part that writes the data out to the cube is in QBWriter.cpp, in the function QBWriter::sendOutputBuffer(). You'll see there that in the first step I shift all 0s into all the shift registers and then, if there's any non-zero data to be displayed, I first wait for 75 milliseconds (delayMicroseconds (TurnOffLatency); //Wait for everything to turn off). this is a software fix to get rid of the ghosting. I'd like a hardware fix though smiley-sad

Code:
void QBWriter::sendOutputBuffer () const
{
    //To get around the ghosting introduced by the slow turning off of the cathode columns, we first turn everything off and wait a little
    digitalWrite (PIN_SS, LOW); //Start transferring data   
    for (byte i = 0; i  <= N; ++i)
    {
        SPI.transfer (B00000000);
    }
    digitalWrite (PIN_SS, HIGH); //Done transferring data
   
    if (isOutputDataNonZero ())
    {
        delayMicroseconds (TurnOffLatency); //Wait for everything to turn off
 
        //Then we push out the contents of the output buffer to the LED cube   
        digitalWrite (PIN_SS, LOW); //Start transferring data
        for (byte i = 0; i  <= N; ++i)
        {
            SPI.transfer (mOutputBuffer[i]);
        }
        digitalWrite (PIN_SS, HIGH); //Done transferring data
    }
}
23  Using Arduino / LEDs and Multiplexing / Re: 3x3x3 LED cube, newbie questions (5x5x5 comming soon) on: March 08, 2013, 09:04:51 am
I have noticed that you use shiftOut() instead of the SPI library that I use. Theoretically the SPI library's methods are faster, but I'll try out shiftOut() too, who knows, maybe it makes a difference...
24  Using Arduino / LEDs and Multiplexing / Re: 3x3x3 LED cube, newbie questions (5x5x5 comming soon) on: March 08, 2013, 08:46:15 am
Yes, I have the shine-through effect too, but that's not a big problem and there's not much you can do about it anyway. Thank you for the code! smiley I will check it.
25  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 08, 2013, 04:14:35 am
Oh, yes, you're right. It's not enough to clear, you need to latch too. I'll try that tonight. Thanks! smiley
26  Using Arduino / LEDs and Multiplexing / Re: 3x3x3 LED cube, newbie questions (5x5x5 comming soon) on: March 08, 2013, 04:13:03 am
Hey Mike!

Nice video smiley

I've recently built a similar 4x4x4 cube. I'm having some trouble with ghosting on the cube (it seems that the cathodes are not turning off quickly enough). The way it manifests is that when I turn on a pair of a new anode plane and a new cathode column, the LED which at the intersection of the new plane and the old column, lights up for a brief moment. This results in ghosting. It is most likely a hardware problem, but I want to make sure that it's not a software problem. Have you had any kind of similar ghosting problem? Would it be possible for me to see your code, maybe I'll get some insights about what I might be doing wrong...

Thanks,
Andras
27  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 07, 2013, 04:41:50 pm
I've tried out a couple of other things tonight, hoping to get rid of the ghosting:
1. I've added some big (10uF) capacitors in parallel with the existing smaller ceramic ones to each shift registers. Didn't help.
2. I've disconnected the clear (SRCLR) pin of the shift registers from the 5V (which prevented them from clearing) and connected them to two Arduino pins. When I'm clearing the the data in the shift registers, instead of shifting all 0s into them, now I set the SRCLR to LOW for a moment and that clears them. This way te ghosting doesn't go away even if I add that software delay. This is either because the clear doesn't work (does not clear the shift registers) or because for some perverted reason they need those 0s to be shifted in...

God only knows what the hack is going on here smiley
28  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 07, 2013, 04:59:55 am
I guess the problem is with the sketch editor then... You should open the file with another text editor (notepad, Total Commander viewer, NotePad++, etc.) and you would probably be able to paste.
OK, good night smiley
29  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 07, 2013, 04:12:49 am
Can you copy-paste from scratch to notepad and from notepad here? If not, which step fails?
30  Using Arduino / LEDs and Multiplexing / Re: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 on: March 07, 2013, 03:18:55 am
If it's Windows, it's a subtle way of letting you know that it's longing for a reboot smiley-razz
Pages: 1 [2] 3 4 ... 10