I previously made a 5x5x5 LED cube using TPIC6b595 shift registers. I soldered all the components on a perfboard which was rather messy. I now want to increase the size of the cube to 7x7x7 and adjust the schematic accordingly.

I plan on designing custom PCBs for the circuit so I hope that some of you more experienced guys can point out design flaws in my circuit or if it will even work at all so I don't make PCBs that are useless.

The LEDs of one layer will have their anodes connected and the cathodes of every column of less will be connected. The columns will be controlled directly by the current-sinking shift registers and the anodes will be controlled by P-Channel MOSFETs.

What I am unsure about are the 1k and 10k resistors I connected to each anode layer and cathode tower. I don't have them in my 5x5x5 cube but I read that they are necessary so the currents can go away after switching layers to prevent ghosting. What do you think about this? It obviously adds passive current draw to the system...


Preview image of schematic

Original PDF: https://drive.google.com/file/d/1xlZ-9P20JkZA74vZQpghZAYoYlYk1-Gp/view?usp=sharing

Looking forward to your suggestions.


1 Answer 1


I'm going to assume you know most of what you are doing. Having built one, you are in a pretty good place and I'm not going to question any of that.

Instead, let's address this:

What I am unsure about are the 1k and 10k resistors I connected to each anode layer and cathode tower. I don't have them in my 5x5x5 cube but I read that they are necessary so the currents can go away after switching layers to prevent ghosting. What do you think about this? It obviously adds passive current draw to the system...

Ghosting is a worse problem with FETs more than BJTs (as a hobbyist opinion more than a matter of long experience.) FETs are loaded with capacitance. The purpose of the \$10\:\text{k}\Omega\$ resistor is to "pull up" on the LED cathode, "quickly enough," so that the LED itself isn't used for "very long" for the same purpose. Of course, once the driver+stray capacitance has been charged up enough the current stops, regardless. But without the aide of a resistor and because of the fact that the LED exhibits a rapidly and widely varying resistance for pulling up on the stray capacitance, it's really nice to place this under management by adding a parallel resistance.

For a short time as the driver+stray capacitance is first charging, the initial charging current will most likely still come through the LED. But as the charging current diminishes, and the LED resistance climbs rapidly according to the inverse of that charging current, the LED supplies less and less but never really finishes the job so there is always some residual until the next cycle starts. Putting a parallel resistor there means that once the LED resistance reaches a certain magnitude (the charging current gets small enough), then the \$10\:\text{k}\Omega\$ will take over and, at least, act more like a fixed resistor than a variable one while also at the same time now bypassing the LED and removing current from it. Which is a somewhat better situation than before.

You can, better than within an order of magnitude, estimate the resistance of an LED using a simple formula: \$R_{_\text{LED}}\approx R_{_\text{OHMIC}}+\frac{\eta\cdot V_T}{I_{_\text{LED}}}\$. Compared with the \$10\:\text{k}\Omega\$ bypass resistance, \$R_{_\text{OHMIC}}\$ is always tiny so you can completely ignore that term. This leaves the second term, \$\eta\cdot\frac{ V_T}{I_{_\text{LED}}}\$.

\$\eta\$ is a weird 'emission coefficient' and for LEDs is probably 2 or 3. Maybe 4 or more in some cases. But almost never 1. \$V_T\$ is the thermal voltage and probably you should use about \$28\:\text{mV}\$ for this. The last part is the LED current, of course. So you can see how the LED resistance varies with respect to its current. The \$10\:\text{k}\Omega\$ resistor will just be a constant value all the time.

Example: Suppose you can see \$100\:\mu\text{A}\$ in an LED (you probably can see it as that 'ghosting' effect.) Let's use \$\eta=4\$ and work out that \$4\cdot\frac{ 28\:\text{mV}}{100\:\mu\text{A}}=1120\:\Omega\$. At \$10\:\mu\text{A}\$ this would climb to \$11.2\:\text{k}\Omega\$. Etc.

Better, would be to actively pre-charge the driver+stray capacitance, directly at the cathode node during blanking. That would nip everything in the bud, almost immediately. No ghosting problems, at all, then. Or, use BJT drivers, perhaps. (Though that won't impact the stray capacitance.)

  • \$\begingroup\$ So if I got that right you say that it would be ideal to use a GPIO (which is impossible for every cathode since there are 49 cathode columns. Could be done with dedicated shift registers but I think that's a bit overkill) to supply 5V to each cathode column to instantly prevent current from going through the LED because it has +5V potential on both sides? I would need a current limiting resistor as well if I put 5V on the cathode because it would be a short circuit otherwise, wouldn't it? Thank you for the long answer! \$\endgroup\$
    – Moritz
    Aug 6, 2021 at 20:55
  • \$\begingroup\$ So the 1k connecting each anode layer to GND has the same purpose as the 10k connecting each cathode column to VCC which is to create a potential across the LED that prevents current to flow through it. I already have my MOSFETs and it sounds complicated to supply VCC to each 49 cathodes so I guess it's best if I stick to the layout I have currently? \$\endgroup\$
    – Moritz
    Aug 6, 2021 at 20:59
  • \$\begingroup\$ @Moritz I don't want to design this for you. I'd probably use BJT drivers -- they are way cheaper (0.4 cents each), quite appropriate at the levels of current used, and behave "better" in my mind's eye. They have lots less internal capacitance to charge/discharge, too. But were this my project, I'd definitely spend time studying the work of others as well as thinking for myself. Finally, there are (I'm forced to admit) quite a few very, very good LED driver ICs in the world, today. And MCUs are dirt cheap. I might even consider an idea of using multiple MCU submodules and not shift registers. \$\endgroup\$
    – jonk
    Aug 6, 2021 at 22:10
  • \$\begingroup\$ @Moritz I do like what I see of the tpic6b595, though! Looks nice at first blush. Good maximum specified current for LED driving, too! But you can also find ICs that include the anti-ghosting FETs inside them, as well. (I haven't spent time on your datasheet to see if it does, yet.) If you get an IC with anti-ghosting built into them, then that's one less thing to worry over. Oh. Have you observed ghosting with that IC? Perhaps there isn't any to worry about? \$\endgroup\$
    – jonk
    Aug 6, 2021 at 22:14
  • 1
    \$\begingroup\$ I haven't observed ghosting on my 5^3 cube but the guy who wrote the guide for the 8^3 using TPIC6b595 had it. I will design my pcb with pads for the pullup and pulldown resistors and only if there is ghosting I will solder them on. Thank you for your time! \$\endgroup\$
    – Moritz
    Aug 6, 2021 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.