# LED Cube with no transistors

Regarding this instructable , why is it possible to build this circuit without transistors?

We have 4 layers of LEDs like that, which is controlled by an Arduino. Every circle is a LED, the blue arrows are connections to ground (individual pins set to LOW on the arduino when the LED should turn on).

And there's 1 connection to a HIGH pin on each layer with a 100 Ohm resistor.

In total 16 Pins for the ground connections and 4 Pins for each layer (VCC).

This code turns all LEDs on 1 layer on.

////////////////////////////////////////////////////////////turn all on
void turnEverythingOn()
{
for(int i = 0; i<16; i++)
{
digitalWrite(column[i], 0);
}
//turning on layers
for(int i = 0; i<4; i++)
{
digitalWrite(layer[i], 1);
}
}


So when everything is turned on, each layer pin has to drive 16 LEDs, this will result in a higher current load than what the atmega chip on the Arduino can supply. At least this was my original question / concern.

My original understanding was that there are 4 LEDs in series (one vertical red line connecting 4 LEDs) and that each of these 4 lines are in parallel.

As already has been pointed out in the answers / comments, the 16 LEDs are actually in parallel.

The calculation for the resistor was made via 2 V / 0.02 A = 100 Ohm.

Remaining questions:

1) I don't see why all 16 LEDs per layer are in parallel? Is it because they don't share a common ground connection but each one has an individual ground?

If I imagine the red vertical lines (only drew 2) look like this simulate this circuit – Schematic created using CircuitLab

and you could also draw it like that simulate this circuit

then I think I understand why all 16 LED are in parallel.

2-ish) The calculation for the 100 Ohm resistor results in: 2V is shared among all LEDs and they have to share the 20 mA provided by the current limiting resistor? This would match passerby's calculation of 1.25 mA per LED. I assume 20 mA was chosen to have enough headroom to the max. current?

The I can understand why we don't need transistors.

• VTC unclear until the necessary context from the external website is incorporated into the question. – pipe Mar 15 '18 at 8:59
• @pipe if op is confused about how it works, how are they supposed to know what the "necessary context" is supposed to be? You basically bullying a noob for asking the question and not knowing the answer in the first place. – Passerby Mar 15 '18 at 9:46
• The instructable link also has an "ask question" button. I suggest you do that and await an answer OR present your question in such a way as to make it self contained within this site. VTC. I agree with @pipe on this. – Andy aka Mar 15 '18 at 10:10
• @Passerby The necessary context is the actual circuit that OP asks about in the first sentence of the question. It has nothing to do with the answer. – pipe Mar 15 '18 at 10:13
• @Passerby Do you seriously think this question is answerable without the schematic, or what are you really arguing about? Obviously you had to visit the external website to answer the question or you had not learnt about the 100 ohm resistor. This is something the next person to answer this can not do if the website is taken down. – pipe Mar 15 '18 at 15:49

## 1 Answer

Each layer is tied into a single 100 ohm resistor. This limits the total current for the 16 leds in a layer to 20 mA total, in theory. As the internal resistance of the atmega pin also changes the available voltagr based on the current passed, the actual current may be slightly lower.

Since its limited to 20mA, the pin would not blow and there is no need for a transistor to allow a higher current carrying capacity. And each led can still be bright at 1.25 mA each in parallel.

• I maybe got confused by the specifications I had in mind (> 2V voltage drop and 20mA current). I thought as I had at least 4 x 4 LEDs (series) in parallel I would have a voltage drop of 4x2 V at least while I only supply 5V and 4x 20 mA would add up. So I am basically driving the LEDs with less current and voltage? Or if I'm not completely mistaken because I only supply x mA and the resistance from the LEDs doesn't change I automatically end up with less of a voltage drop and lower current? – idkfa Mar 15 '18 at 10:16
• You can also see in the video in the instructable, that the current is shared between a layer of LEDs. As more LEDs turn on, the LEDs get dimmer. – HandyHowie Mar 15 '18 at 12:03
• @idkfa objects in parallel share the voltage, the current adds up. Objects in series share the current, the voltage adds up. Here there are 16 parallel leds in series with a resistor. And 4 parallel sets of that. – Passerby Mar 15 '18 at 12:24