LED Cube/Understanding The Electronics

Aus Wiki CCC Göttingen
Wechseln zu: Navigation, Suche

This page is meant to give you a understanding of the workings in your LED cube. We will try to avoid common electronics slang, thus this is especially suitable for you if you are not familiar with electonics. If you are, however, you are probably better of simply having a look at the schematics and your cube itself - it is not complex in any aspect.

The Cube Structure

We will first explain the cube structure and then work our way to the USB connector. First of all, some basic understanding on how you work with LEDs.

LEDs are very handy and mostly nice-looking devices which is the reasen we chose to create this cube kit. Usually, if you connect a LED to a battery, there is a characteristic of the LED you have to take into consideration. For batteries with very low voltage ratings, your LED will not emit light. If you slowly increase the voltage, for example by using different batteries, or, if you are more used to electronics, use a variable voltage source, you will see that at some voltage, current will start to flow through the LED and it lights up. This depends on the color (or the technology) of the LED. Red LEDs for example start to light up at about 1.5 V. However, in contrast to a light bulb, which will not get much brighter or draw much more current at higher voltages, the LED will! Thus, if you want to connect a LED to a commonly available voltage source with a fixed voltage, it is necessary to add a resistor to the circuit which is able to limit this current. So, if you want to connect an LED to a battery, the circuit will look somewhat like this:

@todo: G1

Please notice that I have used two colors for the wires: black and blue. You can use these colors to find the same wires in future schematics.

Now, we are not interested to always light up an LED, but we want to be able to switch them off and on to display different patterns on our cube. Thus we add a switch:

@todo: G2

With this circuit we can control the LED with the switch. If the switch is closed, the LED lights up. If it is opened, the LED is off. You may have wondered that you do not see this switch on your own LED cube: The switch is included in the microcontroller (the largest device on your board) and controlled by a program that is running on it. Thus you do not have to switch your LED off and on manually, but it is cone automatically.

However, we are not nearly done. We do not have only one LED, we have 27 in a 3 * 3 * 3 cube! So, let's add further LEDs to our circuit, which will give us one plane of your cube:

@todo: G3

This is quite a bit more complex. Please take some time looking at this diagram. You can clearly see that the "Switch-Resistor-LED" construct has simply been duplicated until we had nine of them. The battery is still only one - we can connect all of these constructs to the same battery. Notice especially that you can already recognize that this is one plane of your cube. The black wires are going downwards, the blue wire is used to connect the short pins of the LEDs together and is then going down seperately, using only one wire. Using this pattern and our intelligent switches within our microcontroller we are already able to display two-dimensional patterns.

But, that's not enough! We need two additional planes. The first idea that comes to ones mind may be to again add two copies of that plane, leading to 27 LEDs, 27 Resistors and 27 Switches, and be done. However, this would be quite problematic: One would first of all require a device which has enough switches, is able to bear the current required by the LEDs to light up. Also, we would have a big mess of wires in our cube which will probably not be as nice at one would with their cube to be. So, we are now doing something which is called multiplexing. Don't be scared of this word, it is really easy. We simply add additional planes of LEDs, however we connect all LEDs together at the lead to the resistor. Thus, three LEDs share one resistor and one LED:

@todo: G4

But, you see a big, red question mark in this diagram: How to we connect the opposite wires of the LEDs? Well, we could for example do this:

@todo: G5

Now, (as you may have already guessed) this is not the best idea. If we now close one switch, the three LEDs that share one resistor and switch will all light up (Probably only, actually. Something else is possible, but I will not go into it in this document as this would only confuse you.)